05-08-2006 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
05-08-2006 11:43 AM
05-08-2006 11:44 AM
05-08-2006 11:45 AM
05-08-2006 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
05-08-2006 11:49 AM
hi,
as far as i understand ur requirement:
sort itab by WERKS MATNR ascending
LBKUM descedning.
rgds,
latheesh
05-08-2006 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
05-08-2006 11:50 AM
Hai Rani
sort itab by WERKS MATNR LBKUM Asdending.
Thanks & regards
Sreenivasulu P
05-08-2006 12:00 PM