cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use a Dropdown list in a table col and only get the choosen key?

Former Member
0 Kudos

hi!

I have chosen Cell editor = Dropdown for two of the columns in my WD table (ordinary Table not ALV) .

When the table is displayed the first time this looks OK, but if a user selects a value from the dropdown list, both the key and the explanation text is copied into the cell, and the cell column is automatically widened. I want to copy the key value only, and not the connected text. How is this possible?

I started setting the table as fixed and setting the width on the column, but this was a puzzle I gave up since there are quite a lot of columns.

regards, Tine

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Tine,

I have done with the similar type of requirement. What exactly is your problem ? So that i can help you !!!

Former Member
0 Kudos

Have you tried using Drop down by Index instead of Drop down by Value.

Otherway would be to write the code on select event. In the code take the offset of the value selected i.e. and set the attribute value to offset.

Regards

Rohit Chowdhary

Former Member
0 Kudos

check the method where you are populating the values in internal table for dropdown.

Former Member
0 Kudos

Well , the problem is that in the dropdown list I want to see both the key value and the text, like you do in SAP GUI. Fex. if I would like to create a dropdown for langauges, factory calendar or countries, I want to see both the country code (the key) and the name of the country in the dropdown list, and then when user choose a line I would only like to see the keyvalue in the input field. Right now I concatenate the key and the text into the 'value' in the valueset table.

In some cases the user knows the key value better than the explanational text, and then it is good to show both values. But sInce I would like to save space in the table displayed in the view I only want to show the key values selected in the table (ex. NO if user choose Norway) .

But maybe it is better to create this kind of input help as an OVS with no input fields .?