‎2006 May 08 11:41 AM
i have itab with
werks lgort and matnr lbkum
1000 10 11111 2323
..........................
i want to get the min value of lbkum
per matnr in werks
the final list need to be like this
werks matnr lbkum
10000 11111 2
20000 11111 3
30000 11111 1
40000 22222 1
‎2006 May 08 11:43 AM
sort itab by WERKS ascending
MATNR ascending
LBKUM descedning.
‎2006 May 08 11:44 AM
‎2006 May 08 11:45 AM
‎2006 May 08 11:46 AM
Rani,
The order of LBKUM is neither in ascending / descending order in the output you have displayed.
If you can specify whether it ASC / DESC, then you can do.
SORT ITAB WERKS ASC MATNR ASC LBKUM DESC.
Regards,
Ravi
‎2006 May 08 11:49 AM
hi,
as far as i understand ur requirement:
sort itab by WERKS MATNR ascending
LBKUM descedning.
rgds,
latheesh
‎2006 May 08 11:47 AM
First put lgort field at last in itab
sort itab by werks matnr lkbum
declare another itab1 with only fields werks matnr lkbum
loop at itab.
at new matnr.
move-corresponding itab to itab1.
append itab1.
clear itab1.
endloop.this will give u minimum lkbum per matnr per werks in itab1
<b>have u tried mine</b>
Message was edited by: Sekhar
Message was edited by: Sekhar
‎2006 May 08 11:50 AM
Hai Rani
sort itab by WERKS MATNR LBKUM Asdending.
Thanks & regards
Sreenivasulu P
‎2006 May 08 12:00 PM