‎2011 Jan 19 6:02 AM
Hi Experts,
I am facing an issue while using SORT option in 'REUSE_ALV_GRID_DISPLAY'.
Suppose i have Equipment number, characteristics and Date of Creation fields in the layout.
I have values of these two fields a follows:
Equipment No. Date of Creation Characteristics
1 26.10.2010 MAP-ID
1 26.10.2010 CERTIFICATION-DATE
2 26.10.2010 MAP-ID
2 26.10.2010 CERTIFICATION-DATE
Now when i use sort optoin in ALV, it gives me a layout as below
Equipment No. Date of Creation Characteristics
1 26.10.2010 MAP-ID
. . CERTIFICATION-DATE
2 . MAP-ID
. . CERTIFICATION-DATE
Date of Creation field value is common for both the equipments so it is getting diplayed just one for both the equipments.
I want to sort the table but Date field should come seperate for both the equipment. I want layout like below:
Equipment No. Date of Creation Characteristics
1 26.10.2010 MAP-ID
. . CERTIFICATION-DATE
2 26.10.2010 MAP-ID
. . CERTIFICATION-DATE
How to get this layout in 'REUSE_ALV_GRID_DISPLAY' ?
Please help me out with this requirement. Just using SORT option is not helping me out.
Thanks,
Nitin Karamchandani.
‎2011 Jan 19 6:07 AM
declare the internal table with type SLIS_T_SORTINFO_ALV .
an pass to parameter in function module REUSE_ALV_GRID_DISPLAY
‎2011 Jan 19 6:10 AM
Hi RUSHIKESH,
My problem is after using SORT option in ALV.
So this is already in my code...
Regards,
Nitin Karamchandani.
‎2011 Jan 19 6:50 AM
Hi,
If there is no need of calculating subtotals or anything specific available in it_sort of REUSE_ALV_GRID_DISPLAY, just comment this it_sort in the FM and for sort basing on equipment no., sort your final internal table by equipment no. just before the fm REUSE_ALV_GRID_DISPLAY call.
Please check. This should work.
Regards
Srinivas
‎2011 Jan 19 5:07 PM
Hi Nitin,
Please check by passing no_merge as 'X' in the layout while creating the grid.
Regards,
Archna
‎2011 Jan 19 6:12 AM
Hi ,
Directly use
SORT internal table according to your requirment before passing to ALV grid Function module .
Regards
Deepak.
‎2011 Jan 19 6:53 AM
hello guru,
sort the internal table for the first column ok .
thanks,
anji.
‎2011 Jan 19 7:23 AM
Hi Nitin
Once you added a sort entry to an ALV grid, the groupings will automatically happen and cannot be changed. You can view the contents of the sort entry by holding ctrl and shift in and double-right click on the header next to the last column. Now click on the Sort Sequence. I tried changing the COMP == ' ', but that does not help either. The only way to display all data entries is to propose sort sequences on the selection screen, sort your data this way internally and remove this sort buttons - use IT_TOOLBAR_EXCLUDING as part of your first call to CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY.
Hope this helps, else post a bit more info if we're misunderstand your question.
Best regards, Adrian
‎2011 Jan 19 10:43 PM
Equipment number, characteristics and Date of Creation fields
Change the order of the fields in ur internal table to equipment no., date..and then character..