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

FUNCTION "VRM_SET_VALUES"

Former Member
0 Likes
3,058

HI ALL

I WANT TO KNOW THE FUNCTION OF THE FUNCTION "VRM_SET_VALUES"

THANKS FIRST~~

4 REPLIES 4
Read only

Former Member
0 Likes
1,975

Hi,

<b>VRM_SET_VALUES</b> is used to display list of values for drop down field.

REPORT ZLIST.

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

NAME = 'PS_PARM'.

VALUE-KEY = '1'.

VALUE-TEXT = 'LINE 1'.

APPEND VALUE TO LIST. VALUE-KEY = '2'.

VALUE-TEXT = 'LINE 2'.

APPEND VALUE TO LIST.

CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.

START-OF-SELECTION.

WRITE: / 'PARAMETER:', PS_PARM.

Thanks,

Vinay

Read only

Former Member
0 Likes
1,975

Hi gg,

It is used for LIST BOX on screen - populating values in it.

1. this code may help you.

2. just copy paste.

3.

REPORT abc.

TYPE-POOLS : vrm.

DATA : v TYPE vrm_values.

DATA : vw LIKE LINE OF v.

PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.

INITIALIZATION.

vw-key = '1'.

vw-text = 'Jan'.

APPEND vw TO v.

vw-key = '2'.

vw-text = 'Feb'.

APPEND vw TO v.

vw-key = '3'.

vw-text = 'Mar'.

APPEND vw TO v.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'A'

values = v

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

regards,

amit m.

Read only

Former Member
0 Likes
1,975

Hi,

FM is used to have to drill down lists of hard coded ..

here is the sample code.

TYPE-POOLS: vrm.

DATA: name TYPE vrm_id,

list TYPE vrm_values,

value LIKE LINE OF list.

parameters:p_werks(4) AS LISTBOX VISIBLE LENGTH 30 OBLIGATORY."Plant

----


  • AT Selection Screen *

----


AT SELECTION-SCREEN OUTPUT.

name = 'P_WERKS'.

value-key = 'P002'.

value-text = 'GIL-BHIVADI'.

APPEND value TO list.

value-key = 'P003'.

value-text = 'GIL-PATIALA'.

APPEND value TO list.

value-key = 'P004'.

value-text = 'GIL-BANGALORE'.

APPEND value TO list.

value-key = 'P005'.

value-text = 'GTP-BANGALORE'.

APPEND value TO list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name

values = list.

Reward Points if it is Useful.

THanks,

Manjunath MS

Read only

former_member196299
Active Contributor
0 Likes
1,975

hi QQ,

VRM_SET_VALUES , This is the function module you use for displaying a drop down list in any of the fields in module pool program.

call function 'VRM_SET_VALUES'

exporting

id = name

values = l_tab_mat_descr

exceptions

id_illegal_name = 1

others = 2.

id = name of the screen field where you want to get the dropdown list.

values = internal table containing the list of values to be displayed in the drop down listbox field of the screen .

Regards,

Ranjita