on 05-18-2010 2:16 PM
Hi!
My ALV table contains by default 10 visible lines. How can I add more lines to the table to display at once, like 20 lines?
Thank you
Tamas
check this method SET_VISIBLE_ROW_COUNT
of interface if_salv_wd_table_settings.
make a where used list of this method in your system, you would get plenty of implementations.
http://help.sap.com/saphelp_nw70/helpdata/en/42/fb69fc46a21bc8e10000000a11466f/frameset.htm
Regards
manas dua
Edited by: Manas Dua on May 18, 2010 6:53 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just another way to do it.
DATA: lr_cmp_usage TYPE REF TO if_wd_component_usage,
l_value TYPE REF TO cl_salv_wd_config_table,
lr_interfacecontroller TYPE REF TO iwci_salv_wd_table,
lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_cmp_usage = wd_this->wd_cpuse_ALV( ). *ALV is your ALV component usage name
IF lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
ENDIF.
l_value = lr_interfacecontroller->get_model( ).
IF l_value IS NOT INITIAL.
lr_table_settings ?= l_value.
lr_table_settings->set_visible_row_count( 20 ). *enter the number you want
ENDIF.
Please provide points if is helpful!
Thanks!
Jason PV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can set the number of lines in the WDDOINIT method of your view.
(The following example uses an alv component named ALV_GRID.)
* -------------------------------------------------------------- *
* WZ Instantiate ALV component *
* -------------------------------------------------------------- *
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv_grid( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* -------------------------------------------------------------- *
* WZ get the (config model) *
* -------------------------------------------------------------- *
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv_grid( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model( ).
* -------------------------------------------------------------- *
* Table Settings *
* -------------------------------------------------------------- *
CALL METHOD lv_value->if_salv_wd_table_settings~set_visible_row_count
EXPORTING
value = 20. " or -1 for dynamic
CALL METHOD lv_value->if_salv_wd_table_settings~set_footer_visible
EXPORTING
value = 1.
By the way, setting the value to -1 will make the number of rows dynamic - try it.
...Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can change this directly in your web dynpro application. In ALV click settings, Display tab, and set the Displayed Rows:
Regards Jiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.