‎2009 Apr 03 4:07 PM
Hi
I have developed one ALV report which is displayed as follows.
Field1 Field2 field3
______________________________________________
1392320 test notification for UKI1 20090212
1392323 test for limits & price freeze 20090223
1392324 ETG101 ontbreekt een bak. 20090224
Tijdens het controleren vande
bandverbinder in de ETG101 is
ergeconstateerd dat er een bak
mist.Tijdens een stop deze bak
monteren.
1392325 eddad 20090224
1392326 test for limits & price freeze 20090227
1392327 test for limits & price freeze 20090303
i.e. for field1 1392324, i have multiple data to display in Field2 which needs to be displayed one below the other.
All other fields in the next lines are blank.
Now when I try to sort, it all get messed up like following.
Field1 Field2 field3
______________________________________________
1392320 test notification for UKI1 20090212
1392323 test for limits & price freeze 20090223
1392324 ETG101 ontbreekt een bak. 20090224
1392325 eddad 20090224
1392326 test for limits & price freeze 20090227
1392327 test for limits & price freeze 20090303
Tijdens het controleren vande
bandverbinder in de ETG101 is
ergeconstateerd dat er een bak
mist.Tijdens een stop deze bak
monteren.
For trial basis, I tried to modify data in internal table in one of the event which sets the PF status.
And I could adjust the data. But after that the control goes to standard code which then again sorts it somehow and it again displays it incorrectly.
Is there any way to control or modify the sorting of the ALV display?
Can I use any events to solve this problem? If yes, how?
And is it possible to have proper sorting functionality for this requirement of displaying multiple lines for one field.
‎2009 Apr 03 4:13 PM
HI,
You need to fill the table like this ..
1392320 test notification for UKI1 20090212
1392323 test for limits & price freeze 20090223
1392324 ETG101 ontbreekt een bak. 20090224
1392324 Tijdens het controleren vande
1392324 bandverbinder in de ETG101 is
1392324 ergeconstateerd dat er een bak
1392324 mist.Tijdens een stop deze bak
1392324 monteren.
1392325 eddad 20090224
1392326 test for limits & price freeze 20090227
1392327 test for limits & price freeze 20090303
and use the sort on the first field..
g_sort-fieldname = 'FIELD1'.
g_sort-SPOS = '1'.
g_sort-up = 'X'. -- Ascending Order
APPEND g_sort TO i_sort.In the output 1392324 will be displayed once
Refer to this link..[SORT in ALV|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sortinALV]