Skip to Content
author's profile photo Former Member
Former Member

RANGES IN BAPI

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 12, 2010 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.