2009 Feb 18 2:45 PM
Hi folks,
I am creating an ALV display for the user by using the new OOPS API (CL_SALV_TABLE class). I want to provide the functionality of sorting the columns when the user clicks on the column headers.
According to the documentation the class CL_SALV_FUNCTIONAL_SETTINGS has a method called SET_SORT_ON_HEADER_CLICK. I have used this method in my program, but it is not working for me. Has anyone used this functionality in their reports, if yes please advise me how to do it. I can't figure out what I am doing wrong. I don't want to use events here.
Thanks in advance.
Hi folks,
I am creating an ALV display for the user by using the new OOPS API (CL_SALV_TABLE class). I want to provide the functionality of sorting the columns when the user clicks on the column headers.
According to the documentation the class CL_SALV_FUNCTIONAL_SETTINGS has a method called SET_SORT_ON_HEADER_CLICK. I have used this method in my program, but it is not working for me. Has anyone used this functionality in their reports, if yes please advise me how to do it. I can't figure out what I am doing wrong. I don't want to use events here.
Thanks in advance.
2009 Feb 18 3:16 PM
Hi,
Check this [link|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6]
regards,
Advait
2009 Feb 19 6:02 AM
Hi,
I already have this document, but it does not explain about the functionality that I want.
2009 Feb 18 3:30 PM
The effect of this method SET_SORT_ON_HEADER_CLICK is only restricted to the GRID output, not the full screen nor the List.
Try this way before calling the DISPLAY method:
data: lr_functional_settings type ref to cl_salv_functional_settings.
lr_functional_settings = gr_table->get_functional_settings( ).
lr_functional_settings->SET_SORT_ON_HEADER_CLICK( 'X' ).
Regards,
Naimesh Patel
2009 Feb 19 5:44 AM
Hi,
I have already written that piece of code, but it is not working.
2009 Feb 23 2:45 PM
Can you show your code of the FACTORY mehtod call of the CL_SALV_TABLE ?
Regards,
Naimesh Patel
2009 Feb 24 5:54 AM
Here it is,
TRY.
CALL METHOD cl_salv_table=>factory
* EXPORTING
* list_display = IF_SALV_C_BOOL_SAP=>FALSE
* r_container =
* container_name =
IMPORTING
r_salv_table = g_alv
CHANGING
t_table = gt_report
.
CATCH cx_salv_msg .
ENDTRY.
2012 Feb 20 5:53 AM
Hi,
Did anyone find the issue here. I am also facing the same problem.
2013 Nov 13 2:03 PM
According to the class documentation, this method only works in the grid control in the container, not in the fullscreen or classic list display of your output table.
EXPORTING
r_container = ob_container
container_name = 'CONTAINER'
IMPORTING
r_salv_table = gr_salv_table
CHANGING
t_table = int_tab ).
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |