Application Development 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: 

syntax problem

Former Member
0 Kudos

Hi All!

I want the equivalent ABAp syntax code for this selection screen code:

DELETE et_vekp WHERE NOT ( packvorschr IN selpackv

AND status IN selstat

AND vpobj IN selvpobj).

The inputs for selstat selpackv and selvpobj is coming from selection screen.

I had done like this : I had passed fixed inputs through r_packins r_vpobj and r_status (ranges)

DELETE et_vekp WHERE NOT ( packvorschr in r_packins

AND status in r_status

AND vpobj in r_vpobj ).

in first code : if suppose packvorschr is blank in selection screen the output is a combination of all packvorschr satisfying the condition of status and vpobj.all packvorschr is selected

But for the second code the output is values where packvorschr is blank

0r null.I mean its not taking all packvorschr into consideration and only null values are pulled out with the combination of other conditions.

I want the second code to work similarly like the first one.Please advise changes.

Regards

Praneeth

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Praneeth,

can u show ur code for populating r_packins r_vpobj and r_status .

have u filled like this

r_pacins-sign   = 'I'.
r_pacins-option = 'EQ'.
r_pacins-low    = 'XXXX'.
r_pacins-high   = 'XXXX'.
appen r_packins.

6 REPLIES 6

Former Member
0 Kudos

are u append the value in range....

Former Member
0 Kudos

Hi Praneeth,

can u show ur code for populating r_packins r_vpobj and r_status .

have u filled like this

r_pacins-sign   = 'I'.
r_pacins-option = 'EQ'.
r_pacins-low    = 'XXXX'.
r_pacins-high   = 'XXXX'.
appen r_packins.

0 Kudos

Hi chandra sekhar!

I had passed the same values as you said.The problem is i am dynamically pessing the packvorschr and some times it may contain values and some times it may be blank.

Regards

Praneeth

Former Member
0 Kudos

Hi Praneeth,

See that all ranges variable refer to same

table fields as your Select-options.

For eg. s_matnr for mara-matnr.

r_matnr for mara-matnr.

Regards,

Amole

former_member181962
Active Contributor
0 Kudos

If in the selection screen selpackv

is not filled with any values, then it is <b>NOT</b> equivalent to

r_packins-low = space.

r_packins-high = space.

r_packins-sign = 'I'.

r_packins-option = 'EQ'.

NO values in selpackv means => No Values in r_packins.(Do not fill r_packins at all in tis case).

Regards,

Ravi

Former Member
0 Kudos

Hi ,

As you are dynamically populating ranges

table it will be better you follow below

logic.

if not packvorschr is initial.

build r_packins table

endif.

if not status is initial.

build r_status table

endif.

Please paste your code where you are populting

ranges dynamically. Debug carefully you will

know the problem yourself.

Regards,

Amole