on 05-08-2006 12:32 PM - last edited on 02-04-2024 6:05 AM by postmig_api_4
i made this comma
SORT lt_lbkum BY werks ASCENDING lgort ASCENDING matnr ASCENDING .
loop at lt_lbkum.
AT END OF matnr.
READ TABLE lt_lbkum INDEX sy-tabix.
i_lbkum-werks = 'X'.
i_lbkum-lgort = lt_lbkum-lgort.
i_lbkum-matnr = lt_lbkum-matnr.
i_lbkum-lbkum = lt_lbkum-lbkum.
i_lbkum-bwart = lt_lbkum-bwart.
APPEND i_lbkum.
CLEAR i_lbkum.
ENDAT.
ENDLOOP.
and i get a lot of rows when i need to get only 1 row becuse the werks is 1000 al the time
when you are using sort and at new (contro break) statements the way itab is declared also matters.
let us know the declaraion of itab lt_lbkum and tell us how you want to sort and what kind of control break you want.
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
though WERKS is 1000 all the time MATNR may be different
as u had written AT END OF MATNR , it will count for every change in MATNR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rani,
Try this
SORT lt_lbkum BY werks ASCENDING matnr ASCENDING lgort ASCENDING .
data : wa_lbkum like line of table lt_lbkum.
loop at lt_lbkum.
AT END OF matnr.
READ TABLE lt_lbkum into wa_lbkum INDEX sy-tabix.
i_lbkum-werks = 'X'.
i_lbkum-lgort = wa_lbkum-lgort.
i_lbkum-matnr = wa_lbkum-matnr.
i_lbkum-lbkum = wa_lbkum-lbkum.
i_lbkum-bwart = wa_lbkum-bwart.
APPEND i_lbkum.
CLEAR i_lbkum.
ENDAT.
ENDLOOP.
Regards,
Ravi
Note : Please mark the helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i made this
SORT lt_lbkum BY werks ASCENDING matnr ASCENDING lgort ASCENDING .
data : wa_lbkum like lt_lbkum.
LOOP AT lt_lbkum.
AT END OF matnr.
READ TABLE lt_lbkum into wa_lbkum INDEX sy-tabix.
i_lbkum-werks = 'X'.
i_lbkum-lgort = wa_lbkum-lgort.
i_lbkum-matnr = wa_lbkum-matnr.
i_lbkum-lbkum = wa_lbkum-lbkum.
i_lbkum-bwart = wa_lbkum-bwart.
APPEND i_lbkum.
CLEAR i_lbkum.
ENDAT.
and it;'s not working???////////
User | Count |
---|---|
83 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.