cancel
Showing results for 
Search instead for 
Did you mean: 

Set ALV-List on 100% of the browser window

0 Kudos

I have a problem with the configuration of the ALV component in a view. I would like that the maximum width is oriented to the browser window.

My first attempt was to set in the matrix Head Data-layout data of the ViewContainerUIElement which includes the ALV component width to 100%.

The second attempt to put in the ALV table settings its width to 100% was:

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
DATA lo_model TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
lo_interfacecontroller = wd_this-> wd_cpifc_alv ().
lo_model = lo_interfacecontroller-> GET_MODEL ().
lo_model-> IF_SALV_WD_TABLE_SETTINGS ~ set_width ('100%').


Both attempts were unsuccessful.

My goal is that the maximum width of the ALV ALWAYS based on the browser window. If multiple columns are displayed, is to be offered to the user a horizontal scrolling.

Is this so possible? Or I may miss something?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member198833
Active Participant
0 Kudos

Hi Sebastian,

After setting the width of the ALV with IF_SALV_WD_TABLE_SETTINGS~SET_WIDTH( '100%' ), have you tried using the method IF_SALV_WD_TABLE_SETTINGS~SET_FIXED_TABLE_LAYOUT ?

Regards,

Felipe

0 Kudos

Hi Felipe,

with this logic, he adjusts the ALV-width to the maximum width of my screen. But this is not dynamic, as it does not react to a change in size of the browser window. If the window is smaller than the maximum window size, the ALV table does not adjust. In addition, all displayed columns appear equal in size and the size of the column can not be changed.
It should be possible to adjust the column sizes and providing a horizontal scrolling when more columns in the ALV displayed than can be displayed in the browser window currently.

Kind regards,

Sebastian