08-12-2008 11:00 AM
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.
08-12-2008 11:02 AM
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
08-12-2008 11:26 AM
Thank you for the reply,
but i am appending the values with in the loop.