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: 

vrm_set_values

Former Member
0 Kudos

hi all,

i am using the function module vrm_set_values for the values in the list box.

I have 4 values to be and i can display all the 4 values.

but when try to select the second or third value in the list still the first value apperas.

can anyone give me suggestion whats need to be done.

Thanks,

Srinu.

2 REPLIES 2

Former Member
0 Kudos

Hi,

Try this below code

REPORT ZY_DROP_BOX_SELSCR.

type-pools: vrm.

data: param type vrm_id,

values type vrm_values,

value like line of values.

parameters: p_list as listbox visible length 15.

at selection-screen output.

param = 'P_LIST'.

value-key = '1'.

value-text = 'SAP-ABAP'.

append value to values.

value-key = '2'.

value-text = 'SAP-SD'.

append value to values.

value-key = '3'.

value-text = 'SAP-MM'.

append value to values.

value-key = '4'.

value-text = 'SAP-FI'.

append value to values.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = param

VALUES = values

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

start-of-selection.

if p_list = 1.

write:/ 'The Value selected is: SAP-ABAP'.

endif.

Hope it helps you

Thanks,

Ruthra

0 Kudos

Thank you for the reply,

but i am appending the values with in the loop.