cancel
Showing results for 
Search instead for 
Did you mean: 

Change the row count in ALV

Former Member
0 Kudos

Hi,

I've created ALV and now I need dynamically to set number of visible rows to some number.

is it possible to do so ?

Rgds

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

to change the visible row count to u20185u2019



  DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

  lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.
  DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
  lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).

    DATA lo_value TYPE REF TO cl_salv_wd_config_table.
    lo_value = lo_interfacecontroller->get_model(
    ).
    lo_value->if_salv_wd_table_settings~set_visible_row_count( '5' ).

check out this thread :

rgds,

amit

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

hav u referred these demonstrations by Thomas :

/people/thomas.jung3/blog/2005/12/21/webdynpro-abap-alv

check out these useful links :

[original link is broken]

Configuring ALV

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d3...

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/db22242d-0701-0010-28a2-aeaa1fefd...

ths r gud links 4 beginners

rgds,

amit

Former Member
0 Kudos

thanks both

Former Member
0 Kudos

Refer this code :

  • * Set Visible Row Count

l_value->if_salv_wd_table_settings~set_visible_row_count( '5' ).

Here l_value is :

data lo_cmp_usage type ref to if_wd_component_usage.

lo_cmp_usage = wd_this->wd_cpuse_alv( ).

if lo_cmp_usage->has_active_component( ) is initial.

lo_cmp_usage->create_component( ).

endif.

DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

lo_INTERFACECONTROLLER = wd_this->wd_cpifc_alv( ).

DATA l_value TYPE ref to cl_salv_wd_config_table.

l_value = lo_interfacecontroller->get_model(

).

Above code can be generated from Code wizard.

Its just instantiating the ALV and then using Get Model method.