Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9008

Re: Product of two date ranges tables

$
0
0

Hi,

 

You can use IS INITIAL and IS NOT INITIAL for checking if the 2 tables are empty or not and perform 2 select queries as mentioned above.

 

for e.g.

 

SELECT * FROM BKPF INTO TABLE IT_BKPF1 WHERE BUDAT EQ '20141016' AND BUDAT GE '20140101'.
SELECT * FROM BKPF INTO TABLE IT_BKPF2 WHERE BUDAT LE '20141130'.

SELECT * FROM BKPF INTO TABLE IT_BKPF2 WHERE BUDAT LE '20141016'.


IF IT_BKPF1 IS NOT INITIAL AND IT_BKPF2 IS NOT INITIAL.

FLAG = 'TRUE'.
ENDIF.

IF IT_BKPF1 IS NOT INITIAL AND IT_BKPF3 IS NOT INITIAL.

FLAG = 'FALSE'.
ENDIF.


Viewing all articles
Browse latest Browse all 9008

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>