REPORT   ZAN_DD_TEST.TYPE-POOLS VRM.TABLES SSCRFIELDS.DATA : L_NAME1 TYPE VRM_ID,       L_NAME2 TYPE VRM_ID,       LI_LIST...
L_VALUE1-TEXT = Numeric.  APPEND L_VALUE1 TO LI_LIST1.  CLEAR L_VALUE1.  L_NAME1 = P_DEPMNT.  CALL FUNCTION VRM_SET_VALUES...
CALL FUNCTION VRM_SET_VALUES    EXPORTING      ID               = L_NAME2      VALUES           = LI_LIST2    EXCEPTIONS  ...
IF P_DESNTN = A.    P_TEXT = A.  ELSEIF P_DESNTN = B.   P_TEXT = B.  ELSEIF P_DESNTN = C.   P_TEXT = C.  ELSEIF P_DESNTN =...
Content Type contains Two Types Char, NumericChar type Contains A,B,CNumeric type Contains 1,2,3
Requirement is based on the content type content value will come.In Char Content TypeCase1Case2Case3
In Numeric Content TypeCase1Case2Case3
By   Anil   anil.neegineni@gmail.com
Upcoming SlideShare
Loading in …5
×

Dynamic dropdown list

2,203 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,203
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
65
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Dynamic dropdown list

  1. 1. REPORT ZAN_DD_TEST.TYPE-POOLS VRM.TABLES SSCRFIELDS.DATA : L_NAME1 TYPE VRM_ID, L_NAME2 TYPE VRM_ID, LI_LIST1 TYPE VRM_VALUES, LI_LIST2 TYPE VRM_VALUES, L_VALUE1 TYPE VRM_VALUE, L_VALUE2 TYPE VRM_VALUE.SELECTION-SCREEN BEGIN OF BLOCK A.SELECTION-SCREEN BEGIN OF LINE.SELECTION-SCREEN COMMENT 1(15) TEXT-002. " Content TypePARAMETERS P_DEPMNT TYPE NAME1 AS LISTBOX VISIBLE LENGTH 26 USER-COMMAND ONE.SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.SELECTION-SCREEN COMMENT 1(15) TEXT-001. " Content ValuePARAMETERS : P_DESNTN TYPE STEXT AS LISTBOX VISIBLE LENGTH 20 USER-COMMAND TWO.PARAMETERS P_TEXT2 TYPE C MODIF ID M1.PARAMETERS P_TEXT TYPE NAME1 MODIF ID M1.SELECTION-SCREEN END OF LINE.SELECTION-SCREEN END OF BLOCK A.INITIALIZATION.REFRESH LI_LIST1. L_VALUE1-KEY = C. L_VALUE1-TEXT = Char. APPEND L_VALUE1 TO LI_LIST1. CLEAR L_VALUE1. L_VALUE1-KEY = N.
  2. 2. L_VALUE1-TEXT = Numeric. APPEND L_VALUE1 TO LI_LIST1. CLEAR L_VALUE1. L_NAME1 = P_DEPMNT. CALL FUNCTION VRM_SET_VALUES EXPORTING ID = L_NAME1 VALUES = LI_LIST1 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.AT SELECTION-SCREEN.CASE SSCRFIELDS.WHEN ONE.REFRESH LI_LIST2[].CLEAR : P_DESNTN, P_TEXT. IF P_DEPMNT = N. L_VALUE2-KEY = 1. L_VALUE2-TEXT = 1. APPEND L_VALUE2 TO LI_LIST2. CLEAR L_VALUE2. L_VALUE2-KEY = 2. L_VALUE2-TEXT = 2. APPEND L_VALUE2 TO LI_LIST2. CLEAR L_VALUE2. L_VALUE2-KEY = 3. L_VALUE2-TEXT = 3. APPEND L_VALUE2 TO LI_LIST2. CLEAR L_VALUE2. L_NAME2 = P_DESNTN.
  3. 3. CALL FUNCTION VRM_SET_VALUES EXPORTING ID = L_NAME2 VALUES = LI_LIST2 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.ELSEIF P_DEPMNT = C. L_VALUE2-KEY = A. L_VALUE2-TEXT = A. APPEND L_VALUE2 TO LI_LIST2. CLEAR L_VALUE2. L_VALUE2-KEY = B. L_VALUE2-TEXT = B. APPEND L_VALUE2 TO LI_LIST2. CLEAR L_VALUE2. L_VALUE2-KEY = C. L_VALUE2-TEXT = C. APPEND L_VALUE2 TO LI_LIST2. CLEAR L_VALUE2. L_NAME2 = P_DESNTN. CALL FUNCTION VRM_SET_VALUES EXPORTING ID = L_NAME2 VALUES = LI_LIST2 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.ENDIF.WHEN TWO.CLEAR P_TEXT.
  4. 4. IF P_DESNTN = A. P_TEXT = A. ELSEIF P_DESNTN = B. P_TEXT = B. ELSEIF P_DESNTN = C. P_TEXT = C. ELSEIF P_DESNTN = 1. P_TEXT = 1. ELSEIF P_DESNTN = 2. P_TEXT = 2. ELSEIF P_DESNTN = 3. P_TEXT = 3. ENDIF.ENDCASE.AT SELECTION-SCREEN OUTPUT.LOOP AT SCREEN. IF SCREEN-GROUP1 = M1. SCREEN-DISPLAY_3D = 0. SCREEN-INPUT = 0. MODIFY SCREEN.ENDIF.ENDLOOP.After F8(Execution)
  5. 5. Content Type contains Two Types Char, NumericChar type Contains A,B,CNumeric type Contains 1,2,3
  6. 6. Requirement is based on the content type content value will come.In Char Content TypeCase1Case2Case3
  7. 7. In Numeric Content TypeCase1Case2Case3
  8. 8. By Anil anil.neegineni@gmail.com

×