본문 바로가기
ABAP

SELECTION SCREEN 라디오 버튼으로 파라미터 제어하기

by clode 2023. 2. 24.
728x90
반응형

SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN: BEGIN OF LINE.
PARAMETERS: RB_ACTUL RADIOBUTTON GROUP RB01 DEFAULT 'X' USER-COMMAND UCOM.
SELECTION-SCREEN COMMENT (15) FOR FIELD RB_ACTUL.
PARAMETERS: RB_PLANN RADIOBUTTON GROUP RB01.
SELECTION-SCREEN COMMENT (15) FOR FIELD RB_PLANN.
SELECTION-SCREEN: END OF LINE.

SELECTION-SCREEN BEGIN OF BLOCK BLOCK3 WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN: BEGIN OF LINE.
PARAMETERS: RB_MOTH RADIOBUTTON GROUP RB02.
SELECTION-SCREEN COMMENT (15) FOR FIELD RB_MOTH.
PARAMETERS: RB_SUMM RADIOBUTTON GROUP RB02.
SELECTION-SCREEN COMMENT (15) FOR FIELD RB_SUMM.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK BLOCK3.

SELECTION-SCREEN BEGIN OF BLOCK BLOCK4 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 20.
PARAMETERS : R_BEF    RADIOBUTTON GROUP GR2 USER-COMMAND UCOM MODIF ID PLN.
SELECTION-SCREEN COMMENT 25(10) TEXT-B01 FOR FIELD R_BEF.
SELECTION-SCREEN POSITION 55.
PARAMETERS : R_AFT    RADIOBUTTON GROUP GR2 MODIF ID PLN DEFAULT 'X' .
SELECTION-SCREEN COMMENT 57(10) TEXT-B02 FOR FIELD R_AFT.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.
  PERFORM MODIFY_SCREEN.

FORM MODIFY_SCREEN .

  LOOP AT SCREEN.
    CASE SCREEN-NAME.
      WHEN 'P_KOKRS'.
        SCREEN-INPUT = 0.
      WHEN 'P_BUKRS' OR 'S_MONTH-LOW' OR 'P_VERSI'.
        SCREEN-REQUIRED = 2.
    ENDCASE.

    IF RB_PLANN = 'X' .
      IF SCREEN-GROUP1 = 'PLN'.
        SCREEN-INPUT = 1.
        SCREEN-ACTIVE = 1.
      ENDIF.
      IF R_AFT = 'X' AND SCREEN-GROUP1 = 'BEF'.
        SCREEN-INPUT = 1.
        SCREEN-ACTIVE = 1.
      ENDIF.
      IF R_BEF = 'X' AND SCREEN-GROUP1 = 'BEF'.
        SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
      ENDIF.

    ELSEIF RB_ACTUL = 'X'.
      IF SCREEN-GROUP1 = 'PLN' OR SCREEN-GROUP1 = 'BEF' OR SCREEN-NAME = '%B004031_BLOCK_1000'.
        SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
      ENDIF.
      IF SCREEN-NAME = 'P_VERSI'.
        SCREEN-INPUT = 0.
        P_VERSI = GC_000.
      ENDIF.
    ENDIF.

    MODIFY SCREEN.
  ENDLOOP.

ENDFORM.
728x90
반응형

'ABAP' 카테고리의 다른 글

Parameter List box  (0) 2023.02.24
SELECTION SCREEN Search Help F4  (0) 2023.02.24
Dynamic table test  (2) 2023.02.24
강제로 PBO PAI 태우기  (0) 2023.02.24
Pop up Message  (0) 2023.02.24

댓글