cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce webdynpro ALV Table rows to 5 or less?

praveenkumar_kadi
Active Contributor
0 Kudos

Hi,

I want to reduce ALV table row display to 5 or less from default 10 rows.

I tried finding ALV Interface TABLE Settings and other settings and could not find out. Please let me know where shopuld i find the configuration?

Thanks

Praveen

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member233090
Active Contributor
0 Kudos

Hi Praveen,

you can set the visible row count as

set_visible_row_count( '5' ).

cheers,

bhavana

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Its the SET_VISIBLE_ROW_COUNT method of the IF_SALV_WD_TABLE_SETTINGS interface of the table config model class:

**** Access Component Usage
  DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
  l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
    l_ref_cmp_usage->create_component( ).
  ENDIF.

****Access Config Table Model
  DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  l_salv_wd_table = wd_this->wd_cpifc_alv( ).
  DATA l_table TYPE REF TO cl_salv_wd_config_table.
  l_table = l_salv_wd_table->get_model( ).

  l_table->if_salv_wd_table_settings~set_visible_row_count( 5 ).