cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontal Scrollbar in ALV

Former Member
0 Kudos

Hi All,

I am quite new to using the Webdynpro ALV and would like to know how we can set a horizontal scrollbar in an ALV as my alv has a lot of columns.

Appreciate your responses,

Chaitanya.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You just need to set the scrollable column property:

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_scrollable_col_count( 8 ).

Former Member
0 Kudos

Hi,

I tried same in my application, i kept this code in MAIN View INIT Method. Its doesnt effect my ALV...what should be the reason?

Thanks,

Saurin Shah

Former Member
0 Kudos

Hi,

Inaddition to the above, In the WD applicaion parameters, include the WDTABLENAVIGATION parameter to SCROLLBAR .

Hoe many columns are there in your ALV and are they any static/fixed and scrollable columns.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

I have one input field and one submit button and display alv. on action method of submit button , i wrote a code,

"Used Component Instantiate ( i.e. SALV )

DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

LO_CMP_USAGE = WD_THIS->WD_CPUSE_SALV( ).

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_salv( ).

DATA: r_table TYPE REF TO cl_salv_wd_config_table.

CALL METHOD LO_INTERFACECONTROLLER->GET_MODEL

RECEIVING

VALUE = r_table.

"Set up ALV Scrollable Column......

CALL METHOD R_TABLE->IF_SALV_WD_TABLE_SETTINGS~SET_SCROLLABLE_COL_COUNT

EXPORTING

VALUE = 5.

DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.

lr_table_settings ?= r_table.

"Set up ALV Header Text...........

DATA: HVAL TYPE REF TO CL_SALV_WD_HEADER.

CREATE OBJECT HVAL.

CALL METHOD HVAL->SET_TEXT

EXPORTING

VALUE = 'HeAdEr'.

CALL METHOD LR_TABLE_SETTINGS->CREATE_HEADER

RECEIVING

VALUE = HVAL.

and as u said i set applicaiton parameter WDTABLENAVIGATION to SCROLLBAR. But it doesnt effect me in out put ....

Thanks,

Saurin Shah

Former Member
0 Kudos

Hi,

Have you made any col count changes in the 2nd view.

How many columns are there.

Also set the ALV width to '100%'.

Is this ALV inside any transparent container.

Are they any fixed columns/static colmuns that are freezed.

As per your code everything is fine.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

First thing i have everything on same view. I have sales order no as input and gettting all details from VBAP table so around 30 to 35 column. ALV is in View Container and we dont have option to set width of this View Container. Actually i put View Container in group bt after u asked i take it out bt still it doesnt give me effect...

Thanks

Saurin..

Former Member
0 Kudos

Hi,

If this ALV is inside Group or Transparent contianer, then set the width for this also.

Aslo change the layout of the ROOTUI to matrixlayout and set widht as 100%.

Or

Try to give one column as Static(freezed) and check the ALV.

Set the ALV width using method SET_WIDTH of if_wd_salv_table_settings.

It should work fine.

Regards,

Lekha.

0 Kudos

Hi Saurin,

You shall put int method "WDDOMODIFYVIEW" of your main view or of your view where contains ALV container..

Regards,

Will

Answers (0)