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

Soet/Filter using ALV?

Former Member
0 Likes
459

Hi all,

I am working with ALV's .Sort/Filter should work by selecting Column we need to sort.It gives error if column header is selected.Please suggest any code in order to sort a column selected.

Regards,

Madhu

3 REPLIES 3
Read only

vyende
Active Participant
0 Likes
428

what is the error message?

Read only

Former Member
0 Likes
428

Hi Ganesh,

For filter have alook at <b>BCALV_TEST_FULLSCREEN_FILTER</b> in your SAP system.

Regards,

Azaz Ali.

Read only

Former Member
0 Likes
428

You can specify single click sort on column headers via the lvc_s_layo layout structure you pass to the alv method


....
layout-SGL_CLK_HD = 'X'
...
set_table_for_first_display
...
  EXPORTING
     is_layout = layout
...

Alternatively, you can register to respond to the internal alv evevt 'header_clicked' (or something - check the 'attributes' tabs of cl_gui_alv_grid)

Then, in your response to this event you can manually add a sort condition or filter condition using the methods 'set/get_sort_criteria' and 'set/get_filter_criteria'

Hope this helps...

Phil