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

How to hide key values in list box while using 'VRM_SET_VALUES'?

Former Member
0 Likes
7,273

I want to know if there any option not to show key values in the drop down box while using VRM_SET_VALUES

even also the option to show keys in drop down is made on in the GUI.

I want to know if there any option not to show key values in the drop down box while using VRM_SET_VALUES

even also the option to show keys in drop down is made on in the GUI.

7 REPLIES 7
Read only

Former Member
0 Likes
3,506

hello,

dont pass key value into internal table......pass this internal table into VRM_SET_VALUES FM....

Thanks

Sabyasachi

Read only

0 Likes
3,506

Not working.

Can you please give a sample code which ran correctly??

Read only

0 Likes
3,506

HELLO SOURAV,

jst follow my code:

TYPE-POOLS: VRM.
PARAMETERS: P_MAT TYPE MATNR VISIBLE LENGTH 10 AS LISTBOX.

DATA: IT_VRM TYPE VRM_VALUES,
       WA_VRM TYPE VRM_VALUE.


AT SELECTION-SCREEN OUTPUT.

   WA_VRM-KEY = 'M'.
   WA_VRM-TEXT = 'MALE'.

   APPEND WA_VRM TO IT_VRM.

   WA_VRM-KEY = 'F'.
   WA_VRM-TEXT = 'FEMALE'.

   APPEND WA_VRM TO IT_VRM.


   CALL FUNCTION 'VRM_SET_VALUES'
     EXPORTING
       ID                    = 'P_MAT'
       VALUES                = IT_VRM
*   EXCEPTIONS
*     ID_ILLEGAL_NAME       = 1
*     OTHERS                = 2
             .
   IF SY-SUBRC EQ 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

     CLEAR IT_VRM.
   ENDIF.


when i execute this in my system, then key value is not displayed......

Thanks

Sabyasachi

Read only

Former Member
0 Likes
3,506

Hi Sourav,

U can do this after set the LISTBOX in Screen Layout.

Please try it and let me know.

Thanks

Tarak

Read only

Zmok
Participant
0 Likes
3,506

hi,

option "Listbox" or "Listbox with key" in screen painter i/o field dropdown attributes has no effect = listbox key will always be displayed, if you have selected "show keys within dropdown lists" in your sapgui visualization settings.

Read only

Former Member
0 Likes
3,506

You can hide key value as per following image:

Read only

Phillip_Morgan
Contributor
0 Likes
3,506

Whether you see the keys or not is something that is decided by the customizing of your SAPgui.

I tested it on the example code from Sabyasachi. Switch this flag on and off to test it. This setting affects all dropdowns in the system...