Skip to Content
0
Former Member
Feb 06, 2009 at 06:44 AM

How to find max records

14 Views

Hi,

My program is :

DATA : BEGIN OF itab OCCURS 0,

item(2) TYPE c,

code(2) TYPE c,

val TYPE i,

END OF itab.

itab-item = 'AA'.

itab-code = 'A1'.

itab-val = '5'.

APPEND itab.

itab-item = 'AA'.

itab-code = 'A1'.

itab-val = '6'.

APPEND itab.

itab-item = 'AA'.

itab-code = 'A2'.

itab-val = '7'.

APPEND itab.

itab-item = 'BB'.

itab-code = 'B1'.

itab-val = '5'.

APPEND itab.

itab-item = 'BB'.

itab-code = 'C1'.

itab-val = '5'.

APPEND itab.

itab-item = 'BB'.

itab-code = 'C1'.

itab-val = '2'.

APPEND itab.

now i want output like:

item code val

AA A1 6

AA A2 7

BB B1 5

BB C1 5.

Thanks n Regards.