Skip to Content
0
Former Member
Jul 02, 2009 at 06:27 AM

About initial value in the dropdown

30 Views

I am using codes below to add two options. The problem is that, i didn't choose any option and value in dropdown is also empty on the screen. However, the value of the corresponding variable of the dropdown will be defaulted to '1'. in my opition, the value of variable should be in initial. Any one has idea about this?

LW_LIST-KEY = '1'.
  LW_LIST-TEXT = 'MALE'.
  APPEND LW_LIST TO LT_LIST.

  CLEAR LW_LIST.
  LW_LIST-KEY = '2' .
  LW_LIST-TEXT = 'FEMALE.
  APPEND LW_LIST TO LT_LIST.

  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = LCNS_NAME
      VALUES          = LT_LIST
    EXCEPTIONS
      ID_ILLEGAL_NAME = 1
      OTHERS          = 2.