Skip to Content
0
Former Member
Jul 05, 2007 at 12:49 PM

Get last record of group of data with select statement

2617 Views

Hi sapfans,

we have the requirement to get the last MBLNR per material no. of table mseg. Normally I would read all the data into an internal table and use a sort, a loop and at end of.. But we have 32 Mio data in table MSEG and I get a dump trying to read all data. Is there any additional option like distinct, max, group by of the select statement that I could use?

Every little hint is welcome!

Regards

Nicola