Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RANGES IN BAPI

Former Member
0 Likes
839

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
604

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

2 REPLIES 2
Read only

Former Member
0 Likes
605

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

Read only

0 Likes
604

HI..

THANK YOU VERY MUCH..........I REALLY APPRICIATE.......