Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

logic required

Former Member
0 Likes
366

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

2 REPLIES 2
Read only

Former Member
0 Likes
343

Hi Karthik,

Use FOR ALL ENTRIES IN option in select statement.

Thanks,

sunil

Read only

Former Member
0 Likes
343

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