08-01-2007 7:24 AM
Hi Experts,
i have a scenario like this:
move a to b.
But before doing this i have to check whether 'a' is contained in the it1 internal table's field val.( ie 'a' is contained in it1-val).
without looping is there any method.
Points will be rewarded.
Regards,
Soumya.
08-01-2007 3:21 PM
hi
try this
<b>Read itab into wa.with key itab-val = 'a'.
if sy-subrc = 0.
valuer is in itab
else
move a to b.
endif.</b>
<b>hope it clears ur doubt</b>
regards
ravish
<b>plz dont forget to reward points if useful</b>
08-01-2007 3:17 PM
search 'a' for that field.
use search comand and chk with sy-subrc.
08-01-2007 3:19 PM
if it1 is an internal table with 1 record... then
read it1 index 1.
now, search a in it1-val
if exists move to b.
if it1 is an internal table with more entries, then u have to do a loop....
08-01-2007 3:21 PM
hi
try this
<b>Read itab into wa.with key itab-val = 'a'.
if sy-subrc = 0.
valuer is in itab
else
move a to b.
endif.</b>
<b>hope it clears ur doubt</b>
regards
ravish
<b>plz dont forget to reward points if useful</b>