‎2005 Dec 15 8:49 AM
hi,
I want to compare single pernr against a set of pernrs in an internal table .
How to check a variable against a itab?
..
The following logic is not working,
loop at itab .
if itab-pernr ne v_pernr .
send mail ...
Endloop
‎2005 Dec 15 9:16 AM
Hi
Try try this one.
<b>data flag type i value 0.
loop at itab .
if itab-pernr eq v_pernr .
flag = 1.
endif.
Endloop
if flag = 0.
write:/ v_pernr,' not available'.
else.
write:/ v_pernr,' available'.
endif.
</b>
‎2005 Dec 15 8:54 AM
‎2005 Dec 15 8:55 AM
‎2005 Dec 15 8:55 AM
wats the exact comparision that u want?? can u be more specific??
Regards,
Bikash
‎2005 Dec 15 9:16 AM
Hi
Try try this one.
<b>data flag type i value 0.
loop at itab .
if itab-pernr eq v_pernr .
flag = 1.
endif.
Endloop
if flag = 0.
write:/ v_pernr,' not available'.
else.
write:/ v_pernr,' available'.
endif.
</b>