‎2010 Feb 12 5:27 PM
HI,
while working on bapi I have one requirment. when we select the data form table then if in where condition if one input field is not blank then it should select data using input field if it is blank then it should select all the data. I am try to use renge but it is not working. my code is that.
RANGES: ERDAT1 FOR VBAK-ERDAT1.
ERDAT-SIGN = 'I'.
ERDAT-OPTION = 'EQ'.
ERDAT-LOW = CREATED_ON. "it is bapi import parameter
APPEND ERDAT1.
CLEAR: ERDAT1.
for example:
select * form vbak into i_vbak where erdat in erdat.
so if erdat is blank then it should select all data.
Please let me know i want to use with the help of ranges.
thanks
‎2010 Feb 12 5:35 PM
hi,
if you want to select all data - your range table (erdat1) should be empty:
if not CREATED_ON is initial.
APPEND ERDAT1.
else.
REFRESH ERDAT1.
endif.
regards,darek
‎2010 Feb 12 5:35 PM
hi,
if you want to select all data - your range table (erdat1) should be empty:
if not CREATED_ON is initial.
APPEND ERDAT1.
else.
REFRESH ERDAT1.
endif.
regards,darek
‎2010 Feb 12 6:52 PM