Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set width of Dropdown Listbox at Column in ALV grid

Former Member
0 Kudos

Hallo.

I don't know how to set width of Dropdown Listbox at Column in ALV grid.

I'm using Alias for value in Dropdown Listbox.

Example:

LS_DRAL-HANDLE = '1'.

LS_DRAL-VALUE = 'Weight in kilogram'.

LS_DRAL-INT_VALUE = 'KG'.

In ALV is width of Dropdown Listbox same as width of column.

I want have column width 5 (only for showing "KG"):

lr_fieldcat->outputlen = 5.


But Dropdown Listbox width for showing whole text: "Weight in kilogram".


Thanks,

Vitezslav Kristof

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos

Did you deactivate the "column optimize", also concatenate code and text in text (value) field so get KG at left?

Regards,

Raymond

0 Kudos

Yes, column optimization is deactivated.

I have in fieldcat only:

lr_fieldcat->outputlen = 5.
lr_fieldcat->drdn_hndl = '1'.
lr_fieldcat->drdn_alias = 'X'.
lr_fieldcat->coltext = 'Name'.

Output is:

Second way is possible change outputlen:

lr_fieldcat->outputlen = 20.
lr_fieldcat->drdn_hndl = '1'.
lr_fieldcat->drdn_alias = 'X'.
lr_fieldcat->coltext = 'Name'.

Output is:

I want for dropdown list outputlen 20 but for int_value only 5. I don't want have so wide columns. I plan have 5 of this column in this ALV.

I want to have something similar as this (but this isn't in ALV):


0 Kudos

Alas, I don't find any parameter in ALV dropdown list to have a length for listbox different than column width...