on 01-27-2014 6:25 AM
Dear expert,
I have a question on how to make a ALV grid having more row based on some triggering.
For example, I have a tray on the upper side of the page, another tray on the lower part of the page containing the SALV Grid.
I have bounded the properties "expanded" to a context attribute.
Where should i put the code that when i click the "Minimize" button on the tray to trigger the code for the following?
DATA:
l_salv_wd_table TYPE REF TO iwci_salv_wd_table,
lo_config_table TYPE REF TO cl_salv_wd_config_table,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
l_salv_wd_table = wd_this->WD_CPIFC_ALV_PAGE( ).
lo_interfacecontroller = wd_this->WD_CPIFC_ALV_PAGE( ).
lo_config_table = lo_interfacecontroller->get_model( ).
if lv_tray_info_expanded = abap_false.
lo_config_table->if_salv_wd_table_settings~set_visible_row_count( '30' ).
else.
lo_config_table->if_salv_wd_table_settings~set_visible_row_count( '15' ).
endif.
Hi Christopher,
You can achieve your requirement as below
Write your code in event handler method as below
method ONACTIONTRAY_TOGGLE .
DATA:
lv_tray_info_expanded TYPE wdy_boolean,
l_salv_wd_table TYPE REF TO iwci_salv_wd_table,
lo_config_table TYPE REF TO cl_salv_wd_config_table,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
"get expanded
wdevent->get_data(
EXPORTING name = 'EXPANDED'
IMPORTING VALUE = lv_tray_info_expanded ).
l_salv_wd_table = wd_this->WD_CPIFC_ALV_PAGE( ).
lo_interfacecontroller = wd_this->WD_CPIFC_ALV_PAGE( ).
lo_config_table = lo_interfacecontroller->get_model( ).
if lv_tray_info_expanded = abap_false.
lo_config_table->if_salv_wd_table_settings~set_visible_row_count(
'30' ).
else.
lo_config_table->if_salv_wd_table_settings~set_visible_row_count(
'15' ).
endif.
endmethod.
Hope this resolves your issue.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.