‎2008 Jan 24 12:27 PM
Hi everybody,
Please give me the code
I am having an internal table itab1 with 3 fields(itab1-a,itab1-b,itab1-c) and with 15 entries.
I am also having another internal table itab2 with 10 fields(itab2-a,itab2-b,itab2-c,itab2-lifnr,itab2-land1,itab2-name1...................) and with 10 entries.
First i should check Out of the 10 entries in itab2 weather any entry matches with the entries allready present in itab1
out of 10 entries in itab2 if any entry matches means then i should check weather itab2-lifnr is from lfa1-lifnr for any one of the remaining 9 entries
Thanks in advance,
Ajay
‎2008 Jan 24 12:38 PM
loop at itab2.
read table itab1 with key a = itab2-a
b = itab2-b
c = itab2-c.
if sy-subrc = 0.
itab3[] = itab1[].
*-- get remaining 9 entries
delete itab3 where a = itab1-a and b = itab1-b and c = itab1-c.
exit.
endif.
endloop.
loop at itab3.
read table itab4 with key lifnr = itab3-lifnr binary search.
if sy-subrc = 0.
*--criteria satisfied
else.
*--not satisfied
endif.
endloop.
Regards
Vasu
‎2008 Jan 24 12:38 PM
loop at itab2.
read table itab1 with key a = itab2-a
b = itab2-b
c = itab2-c.
if sy-subrc = 0.
itab3[] = itab1[].
*-- get remaining 9 entries
delete itab3 where a = itab1-a and b = itab1-b and c = itab1-c.
exit.
endif.
endloop.
loop at itab3.
read table itab4 with key lifnr = itab3-lifnr binary search.
if sy-subrc = 0.
*--criteria satisfied
else.
*--not satisfied
endif.
endloop.
Regards
Vasu