2011 Sep 20 8:51 AM
Dear All,
In the customized ALV report,we need the display of Red triangle in the column header While sorting.
In standard report, we can see the display of Red triangle in the sorted column header. how to enable that in my customized report
Thanks,
Raj V
Kindly do reply for the above threat
Edited by: raj on Sep 20, 2011 10:11 AM
Dear All,
In the customized ALV report,we need the display of Red triangle in the column header While sorting.
In standard report, we can see the display of Red triangle in the sorted column header. how to enable that in my customized report
Thanks,
Raj V
Kindly do reply for the above threat
Edited by: raj on Sep 20, 2011 10:11 AM
2011 Sep 20 9:21 AM
This is the standard behavior of ALV as soon as the SORT is executed in the ALV (not a SORT of the internal table before calling the ALV) - fill the SORT parameter (*) (or use a variant with a sort option) in the call of ALV
Regards,
Raymond
(*) eg. parameter IT_SORT of method [set_table_for_first_display|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5533cd30911d2b467006094192fe3/frameset.htm] of [Methods of Class CL_GUI_ALV_GRID|http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5ecd2fe11d2b467006094192fe3/frameset.htm]
2011 Sep 20 10:32 AM
Dear Raymond,
Thanks for your reply .....
Since we use customized Sorting icons in our ALV report, when we sorting the coulmn header, the Red triange is not get displayed. Pls let us know the ' BLOCK OF CODE ' to show the red triangle while do sort the column header.
Thanks,
Raj V
Edited by: raj on Sep 20, 2011 12:16 PM
2011 Sep 20 12:09 PM
Just fill IT_SORT with sort criteria and apply the change to sort via a (*)
CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_sort_criteria
EXPORTING
IT_SORT = <internal table of type LVC_T_SORT > .Regards,
Raymond
(*) For (old) Reuse FM use a GET_GLOBALS_FROM_SLVC_FULLSCR to get the ref to cl_gui_alv_grid.
2015 Aug 04 10:56 AM
2011 Sep 20 10:07 AM
Hi,
Just fill the SORT parameter in RESUE_ALV_grid_display or in SET_TABLE_FOR_FIRST_DISPLAY method of CL_GUI_ALV_GRID.
like this
WA_SORT-FIELDNAME = 'field name'.
WA_SORT-TABNAME = ' table name'.
WA_SORT-UP = 'X'.
WA_SORT-DOWN = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
Hope this will helps you.
Regards,
Kiran
Edited by: kiran kumar on Sep 20, 2011 11:07 AM
2011 Sep 20 10:35 AM
Hi,
Data: it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
wa_sort-fieldname = 'VBELN'.
wa_sort-tabname = 'ITAB'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'......... Use this only if you have currency columns.
append wa_sort to it_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_default = 'X'
i_save = 'A'
is_layout = wa_layout
it_fieldcat = it_fcat
it_sort = it_sort........................ used for automatic sorting
it_events = it_events
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE 'Error in displaying records.' TYPE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
Regards,
Danish.
Edited by: Danish2285 on Sep 20, 2011 3:06 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |