2013 Aug 01 10:26 AM
Hi All,
I am using the function module VRM_SET_VALUES for the values in the list box.
I have N values to be display and i can display all the 'N' values.
but when am trying to select the second or third value in the list still the first value appears.
can anyone please give me q suggestion .
Thanks,
Uma
2013 Aug 01 2:00 PM
Hi Uma,
If you have maintained the same key values as in the following way ,then the problem will come.
ls_value-key = 'Y'.
ls_value-text = '- All Parts'.
APPEND ls_value TO lt_list.
ls_value-key = 'Y'.
ls_value-text = '- Common Parts'.
APPEND ls_value TO lt_list.
so make the key values as unique.The problem would get resolved.I have already tested it.Try it once.Hope it helps you......
Regards,
shamili.
2013 Aug 01 1:11 PM
You must have used key,value pairs for internal table parameter of FM. Are the keys unique?
Post code sample for more clarity.
EDIT: Just tested it. Your issue could be replicated when vrm_values-key content is same for all records in internal table. Try to keep key unique.
2013 Aug 01 1:27 PM
Hi Uma,
Pass the same value for both key and text.
data: gs_vrm TYPE vrm_value,
gt_vrm TYPE vrm_values,
gs_vrm-key = '1'.
gs_vrm-text = '1'.
append gs_vrm to gt_vrm.
clear: gs_vrm.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = <Parameter Name>
values = gt_vrm
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.
Thanks & Regards,
T. Prasanna Kumar
2013 Aug 01 2:00 PM
Hi Uma,
If you have maintained the same key values as in the following way ,then the problem will come.
ls_value-key = 'Y'.
ls_value-text = '- All Parts'.
APPEND ls_value TO lt_list.
ls_value-key = 'Y'.
ls_value-text = '- Common Parts'.
APPEND ls_value TO lt_list.
so make the key values as unique.The problem would get resolved.I have already tested it.Try it once.Hope it helps you......
Regards,
shamili.