Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Why my alv table doesn't has standard sort functionality ?

Hi,

I just create simple webdynpro with standard alv table.

lr_node = wd_context->get_child_node('STATUSLOGS').

SELECT * FROM zstatus_log INTO CORRESPONDING FIELDS OF TABLE lt_statuslog
WHERE file_name IN <fs_file_name>.

lr_node->bind_table( lt_statuslog ).

why the standard column sort functionality doesn't work. I cannot click on the header name ? it seems like readonly.

Please advise what is the possibility cause the problem.

Thank You and Regards

Fernand

Former Member
Former Member replied

HI,

Not sure if i understood correctly!

If you want to sort a column in alv, you can do that as mentioned below.

* Sort rows by seatsocc descending
  DATA: lr_field TYPE REF TO cl_salv_wd_field.
  lr_field = lv_value->if_salv_wd_field_settings~get_field( 'SEATSOCC' ). "lv_value is configuration model
  lr_field->if_salv_wd_sort~create_sort_rule( sort_order = if_salv_wd_c_sort=>sort_order_descending ). "for sorting in ascending order change the sort order to  if_salv_wd_c_sort=>sort_order_ascending 

Hope this helps!

Regards,

Srilatha

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question