Skip to Content
0
Former Member
Mar 05, 2009 at 10:22 AM

getting the last record from the internal table

4984 Views

When we use a READ statement it always picks up the first record which fulfill its condition but in my case I want to pick up the last record that fulfills it condition

I have a internal table like

id     type
N1      A
N1      T
N1      A
N1      6 ----> LAST RECORD

my code is

read table itab wIth key id = netobjid.

for eg if netobjid = N1 , then I want to read the last record that corresponds to N1 ie ID N1 TYPE - 6...

How to do that?