on 02-17-2011 4:15 PM
Hi all
I have an ALV in my ABAP web-dynpro. For this alv i would like to set the visible rows at the same number as there are rows in the internal table which is the supplier for the ALV.
In the TABLE component of the WEBDYNPRO you have a visible property who is controlling this.
I saw that for the ALV you had the same. Of the class IF_SALV_WD_TABLE_SETTINGS there is a method SET_VISIBLE_ROW_COUNT. So i thought this is the one where i can control it.
So when the table has 10 rows, 10 rows will be displayedon the screen and when the table has 20 rows, 20 rows will be displayed on the screen.
But this is not the case.
Is there something i forget?
Kind regards,
Anton Pierhagen
Hi,
Whatever you have mentioned is correct. It should work. Could you post the code you are using to set visible row count?
Best Regads,
Srilatha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
METHOD wddoinit .
DATA: lo_column TYPE REF TO cl_salv_wd_column,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table,
lt_functions TYPE salv_wd_t_function_std_ref,
ls_function TYPE salv_wd_s_function_std_ref,
lo_function TYPE REF TO cl_salv_wd_function_std,
lo_data TYPE REF TO if_wd_context_node,
lo_element TYPE REF TO if_wd_context_element,
lv_index TYPE i,
lo_model TYPE REF TO cl_salv_wd_config_table.
Retrieve ALV object
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
Initial? Create new
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
Interfacecontroller
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
lo_model = lo_interfacecontroller->get_model( ).
Get main NODE DATA, this is the node which supplies the ALV
lo_data = wd_context->get_child_node( name = 'DATA' ).
How many rows has the table?
lv_index = lo_data->GET_ELEMENT_COUNT( ).
Not more then 20 rows on the screen
IF lv_index GT 20.
lv_index = 20.
ENDIF.
Put the number of rows in the screen
lo_model->if_salv_wd_table_settings~set_visible_row_count( lv_index ).
should the screen set to freeze?
lo_model->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
ok do one thing
i guess you are doing some modifications to the alv related with functions in wddoinit.
so do one thing write this setting visible row in the end after all the statements
* Put the number of rows in the screen
lo_model->if_salv_wd_table_settings~set_visible_row_count( lv_index ).
and paste your full code of wddoinit.
and if possible write the code for setting visible row in wddomodifyview method itself
One of the last option i think is that Personalization/Customization
Can you check if there is any personalization for salv_wd_table ,
start this service from SICF transaction
/default_host/sap/bc/webdynpro/sap/wd_analyze_config_user
If there is any entry for this component or your component ,delete the entries. retest the application.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.