‎2008 Jan 25 10:16 AM
Hi Experts,
I have a list of OBJNR in the Internal table ItabA.
I need to fetch maximum of Counter from the table IHPA
for all the entries in the table ItabA.
can any one pls give the logic for this without writing select statement in a loop of itabA.
Thanks in advance
‎2008 Jan 25 10:19 AM
Hi Karthik,
Use FOR ALL ENTRIES IN option in select statement.
Thanks,
sunil
‎2008 Jan 25 10:20 AM
Hello,
Do like this.
select * from IHPA into table itab2 for all entries in itaba
where objnr eq itaba-objnr.
sort itab2 by objnr counter descending.
delete adjacent duplicates from itab2 comparing objnr counter.
Hope this will solve ur problem..
Cheers,
Vasanth