The input screen will vary based on the radio button selected,
Find the screen output based on the radio button selected.
screen 1.
screen2.
Code for the same.
***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 .
PARAMETERS :dele RADIOBUTTON GROUP mod1 USER-COMMAND com DEFAULT 'X'.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: cre RADIOBUTTON GROUP mod1 .
SELECTION-SCREEN COMMENT (15) text-007.
SELECTION-SCREEN COMMENT 40(20) text-008.
PARAMETERS: lv_scen TYPE plscn.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-003.
PARAMETER : p_param LIKE rlgrap-filename MODIF ID mod.
SELECTION-SCREEN END OF BLOCK blk3.
SELECTION-SCREEN BEGIN OF BLOCK blk4 WITH FRAME TITLE text-004.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (15) text-005 MODIF ID mod.
PARAMETERS: lv_plnrd TYPE pasch DEFAULT 'LA' MODIF ID mod.
SELECTION-SCREEN POSITION 40.
PARAMETERS: lv_month TYPE c AS CHECKBOX MODIF ID mod .
SELECTION-SCREEN COMMENT (30) text-006 MODIF ID mod.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK blk4.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECT-OPTIONS : lv_plant FOR plaf-plwrk MODIF ID rad,
lv_matnr FOR plaf-matnr MODIF ID rad,
lv_fini FOR plaf-pedtr MODIF ID rad.
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN END OF BLOCK blk1.
AT SELECTION-SCREEN OUTPUT.
PERFORM input_screen. " Validation
AT SELECTION-SCREEN ON p_param.
IF cre = 'X' AND sy-ucomm = 'ONLI'.
IF p_param IS INITIAL.
MESSAGE e001(zmrp).
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON lv_plant.
IF dele = 'X' AND sy-ucomm = 'ONLI'.
IF lv_plant IS INITIAL.
MESSAGE e002(zmrp).
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON lv_matnr.
IF dele = 'X' AND sy-ucomm = 'ONLI'.
IF lv_matnr IS INITIAL.
MESSAGE e003(zmrp).
ENDIF.
ENDIF.
*--->>> For F4 help
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_param.
PERFORM f4_for_file_path.
*--->>>
FORM f4_for_file_path .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_param.
ENDFORM.
*--->>>
FORM input_screen .
IF cre = 'X'.
LOOP AT SCREEN.
IF screen-name = 'LV_PLNRD'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF dele = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM.
No comments:
Post a Comment