Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CL_SALV_TABLE SORT 2 COLUMN

Former Member
0 Likes
829

Hallo, i want sort 2 column in example :

Seq. No. Name

3 Sarah

2 Mei

4 Al

1 Kai

I want to sorted 2 of column seq no and name, and i using this in my alv

loop at lt_salv_sorts[] into ls_salv_sorts.
try .
CALL METHOD lo_salv_sorts->add_sort
EXPORTING
columnname = ls_salv_sorts-fname_sorts ( this is seq_no and regist_name)
subtotal = if_salv_c_bool_sap=>true.
CATCH cx_salv_not_found . "#EC NO_HANDLER
CATCH cx_salv_existing . "#EC NO_HANDLER
CATCH cx_salv_data_error . "#ec no_handler
endtry.
endloop.

but i have problem my alv only the sorted name, the number is not sorted, can anyone help?

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
616

By writing a very short demo program, it proves to work perfectly. Please explain your special context.