03-06-2013 1:15 PM
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.
03-06-2013 1:51 PM
hello,
dont pass key value into internal table......pass this internal table into VRM_SET_VALUES FM....
Thanks
Sabyasachi
03-07-2013 6:40 AM
Not working.
Can you please give a sample code which ran correctly??
03-07-2013 8:54 AM
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
03-07-2013 7:39 AM
Hi Sourav,
U can do this after set the LISTBOX in Screen Layout.
Please try it and let me know.
Thanks
Tarak
10-21-2014 8:07 AM
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.
10-21-2014 8:44 AM
10-21-2014 9:59 AM
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...