Skip to Content
0
Oct 30, 2019 at 03:21 PM

Dropdown list In popup screen with dynamic values

173 Views

Hello Everyone,

I need to create a dropdown in modulepool popup screen with dynamic values(text from different table having maintainance view).

Dropdown working screen element(REASON) with dynamic values, Question is how to capture the selected value(REASON) in PAI ????

I have used below code.

  REFRESH LIST.
  NAME = 'REASON'.
  LOOP AT LT_TAB INTO LS_TAB.
    ADD 1 TO LV_COUNT.
    VALUE-KEY = LV_COUNT.
    VALUE-TEXT = LS_TAB-VAL.
    APPEND VALUE TO LIST.
  ENDLOOP.
*
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = NAME
      VALUES          = LIST
    EXCEPTIONS
      ID_ILLEGAL_NAME = 0
      OTHERS          = 0.