cancel
Showing results for 
Search instead for 
Did you mean: 

More ALV table lines

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

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

mike_mcinerney
Participant
0 Kudos

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

Former Member
0 Kudos

Hi,

you can change this directly in your web dynpro application. In ALV click settings, Display tab, and set the Displayed Rows:

Regards Jiri

florian_royer
Participant
0 Kudos

Hi guys,

but if i remember correctly, a "visible row count" once set by a view can not be overruled by code.