Skip to Content
0
Former Member
Dec 28, 2005 at 03:24 PM

help on logic

18 Views

Hi abapers.

i want to write a select statement as follows.

i have aufnr & auart fields in itab_aufk internal table.

i want to get some other fields from RSEB table.

the selection criteria is diff from order types.

loop at itab_aufk.

if itab_aufk-auart eq 'ZRF' or 'ZAC'.

select rsnum meins ...into iab_resb

from RESB

for all entries in itab_afko

where rsnum = itab_afko-rsnum

and rnpos ne '1'.

else.

select rsnum meins ...into iab_resb

from RESB

for all entries in itab_afko

where rsnum = itab_afko-rsnum.

endloop.

i want to avoide the loop statement for the above logic.

is there any alternative.

Please help me.