06-12-2013 10:07 AM
Hi All,
I have a requirement to sort an ALV grid and get the unique combination of keys.
for me output is coming like this i am using below coding.
AUFNR SERNR EQUNR banfn bnfpo ebeln ebelp LBLNI
Order | Serial No | Equipment No | Purchase Reg | Item | Purchasing Doc | Item | Service Entry | Service Da |
---|---|---|---|---|---|---|---|---|
4070408 | 14 | M-CS-JUTO-BCM | 1500015 | 10 | 101515 | 10 | ||
15 | M-CS-LTO-BCM | 10 | 10 | |||||
40 | M-FS-SBM1000 | 10 | 10 | 1000031274 | 12.04.2013 | |||
20 | 20 | 1000031275 | 12.04.2013 |
SORT it_all BY aufnr banfn bnfpo ebeln ebelp.
wa_sort-fieldname = 'AUFNR'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
*_Begin of modification mathumitha.T 10.06.2013
wa_sort-fieldname = 'BANFN'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
wa_sort-fieldname = 'BNFPO'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
wa_sort-fieldname = 'EBELN'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
wa_sort-fieldname = 'EBELP'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
wa_sort-fieldname = 'LBLNI'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
BUt i want like this .........
AUFNR SERNR EQUNR banfn bnfpo ebeln ebelp LBLNI
Order | Serial No | Equipment No | Purchase Reg | Item | Purchasing Doc | Item | Service Entry | Service Da |
---|---|---|---|---|---|---|---|---|
4070408 | 14 | M-CS-JUTO-BCM | 1500015 | 10 | 101515 | 10 | 1000031274 | 12.04.2013 |
15 | M-CS-LTO-BCM | 10 | 10 | |||||
40 | M-FS-SBM1000 | 10 | 10 | |||||
20 | 20 | 1000031275 | 12.04.2013 |
06-12-2013 10:45 AM
Hi,
Your question is not clear, if you want the data in second screen shot then
Service entry values come for serial number 14 whereas in first one it comes for 40. What do you need exactly ?
BR,
Ankit.
06-12-2013 10:57 AM