Application Development and Automation 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: 
Read only

List box

Former Member
0 Likes
982

Hi all,

I have a question regarding the module pool dropdown listboxes.

Is it possible to have a list box for two fields .

for example

Field 1 --> company id

Field 2 --> company name.

if i have to associate a listbox in such a way that when i click it i should get a drop down with both the fields( id and name) but when i select a entry it should take only the company id.

thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
765

HI,

Refer to the demo program DEMO_DYNPRO_DROPDOWN_LISTBOX

In the element Attributes Display of the List box field select the Drop Down as List Box with Ley.

6 REPLIES 6
Read only

Former Member
0 Likes
765

HI,

[List box in module pool|]

Thanks!

Read only

Former Member
0 Likes
766

HI,

Refer to the demo program DEMO_DYNPRO_DROPDOWN_LISTBOX

In the element Attributes Display of the List box field select the Drop Down as List Box with Ley.

Read only

0 Likes
765

Thank you for quick reply....

but these programs lso display only one field as a drop down. i want to see two fields in dropdown as in the search help( we can see more than one field as a drop down).

Is it possible?

can someone help me.

Rhanks again

Read only

0 Likes
765

HI,

In the element Attributes Display of the List box field select the Drop Down as List Box with Key.

But in the demo program it is selected as List Box because of which it is showing only one column if you select the List Box with Key you can get the key field also.

Check the highlighted box with red color in the link..

http://i678.photobucket.com/albums/vv145/avinashkodarapu/untitled.jpg

In the demo program it is selected as List Box you need to select as List Box with key.

Edited by: Avinash Kodarapu on Mar 18, 2009 9:56 PM

Read only

0 Likes
765

Hi,

You can't inlcude two fields in one listbox. Instead you have to concatenate the content of these fields into one custom and display this one. When you pick an entry, read the two tables content with appropriate row index or key (which in turn should be stored in some internal table as you only display string not the key itself).

To create self-defined listbox refer [example with VRM_SET_VALUES fm|http://sap.niraj.tripod.com/id38.html]

Regards

Marcin

Read only

Former Member
0 Likes
765

A list box is for one field only. However, in your case, you really do only want one field (company id). What I believe you want your list box to do is display the company name next to the company id. This can be done and is usually done for you if you use the proper field name in your list box definition. Otherwise you can "roll you own" using the PROCESS ON VALUE-REQUEST section of your screen.

Do a little research in the documentation and you will find your answer.