我的要求是在选择屏幕中有两个单选按钮。执行后,应基于单选按钮调用报告。
单击后退按钮时不执行,它仍然打开report1
。按 F3 键或返回键与预期不同。
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER: ZREP_2 RADIOBUTTON GROUP rad DEFAULT 'X' USER-COMMAND frad,
ZREP_3 RADIOBUTTON GROUP rad . ##SEL_WRONG
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 100.
CALL SELECTION-SCREEN '100'.
AT SELECTION-SCREEN OUTPUT.
* Toggle the selection screens based on radio buttons
LOOP AT SCREEN.
IF zrep_2 = 'X' AND screen-group1 = 'SC2'.
PERFORM modify_screen. "Calling subroutine
ELSEIF zrep_3 = 'X' AND screen-group1 = 'SC1'.
PERFORM modify_screen. "Calling subroutine
ENDIF.
ENDLOOP.
FORM modify_screen.
screen-active = 0.
MODIFY SCREEN.
ENDFORM.
START-OF-SELECTION.
CASE 'X'.
WHEN zrep_2.
SUBMIT zpp_scrap_report AND RETURN.
CALL SELECTION-SCREEN 100.
WHEN zrep_3.
SUBMIT zpp_scrap_report_material_doc AND RETURN.
CALL SELECTION-SCREEN 100.
ENDCASE.