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 module VRM_SET_VALUES?

Former Member
0 Likes
691

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
608

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.

3 REPLIES 3
Read only

Former Member
0 Likes
608

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.

Read only

Former Member
0 Likes
608

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

Read only

Former Member
0 Likes
609

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.