‎2009 Mar 18 3:59 PM
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.
‎2009 Mar 18 4:03 PM
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.
‎2009 Mar 18 4:02 PM
‎2009 Mar 18 4:03 PM
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.
‎2009 Mar 18 4:11 PM
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
‎2009 Mar 18 4:22 PM
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
‎2009 Mar 18 4:29 PM
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
‎2009 Mar 18 4:26 PM
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.