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: 

problem in displaying two fields in dropdown on selection screen

Former Member
0 Kudos

Hi All,

I have a reqmt where i need to display the dropdown list for certain field.

For this perticular fields there is a description attached to it.

Please let me know teh way where i can display the field with description in dropdown.

Like

field1 field2

P Hi

R Hello

S How are you

I am using CALL FUNCTION 'VRM_SET_VALUES' for the same.

Please reply asap.

Edited by: PRADEEPKULAT on May 20, 2010 2:03 PM

3 REPLIES 3

Former Member
0 Kudos

Hi,

I am not sure about your question,

I understood that you have to Display both key and Text.

If so Concatenate both Key and Text .

I mean,


TYPE-POOLS : VRM.
DATA : T_VRM TYPE VRM_VALUES,
             WA_VRM TYPE VRM_VALUE.
WA_VRM-KEY = 'Field1'.
CONCATENATE WA_VRM-KEY  'Field1' INTO
                   WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
WA_VRM-KEY = 'P''.
CONCATENATE WA_VRM-KEY  'Hi' INTO
                   WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
WA_VRM-KEY = 'R'.
CONCATENATE WA_VRM-KEY  'Hello' INTO
                   WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.
WA_VRM-KEY = 'S'.
CONCATENATE WA_VRM-KEY  'How are you' INTO
                   WA_VRM-TEXT SEPERATED BY SPACE.
INSERT WA_VRM INTO TABLE T_VRM.


Then pass this table to the function module VRM_SET_VALUES.

I hope this resolves your issue.

Regards,

Raghava Channooru

JerryWang
Advisor
Advisor
0 Kudos

Hello friend,

Please refer to the demo report DEMO_DYNPRO_DROPDOWN_LISTBOX in your system. It is very helpful.

Best Regards,

Jerry

Former Member
0 Kudos

Hi Pradeep,

In ABAP as well as in other UI elements in Java, there is only the Key/Value Pair combination for all the Drop Down List Box. So, if you intend to show more information in the value you need to concatenate the values in the Value field before calling the Module to upload the data in the UI Element.

You can have a look at the demo code that is mentioned of the sample code to have a better understanding.

Hope this helps.

Thanks,

Samantak.