主程序中如下定义:
*&---------------------------------------------------------------------*
*& Report ZA0_RP_DEF_SEL_SCREEN
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZA0_RP_DEF_SEL_SCREEN MESSAGE-ID ZSAPBC.
TABLES:SPFLI.
DATA: GV_DYNNR(4) TYPE C VALUE '0110'.
SELECTION-SCREEN BEGIN OF SCREEN 0110 AS SUBSCREEN.
SELECT-OPTIONS:
S_CARRID FOR SPFLI-CARRID,
S_CONNID FOR SPFLI-CONNID.
SELECTION-SCREEN END OF SCREEN 0110.
START-OF-SELECTION.
call SCREEN 0100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0100 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
自定义屏幕中,首先定义一个子屏幕区域:sub
然后在模块处做如下定义:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN SUB INCLUDING SY-REPID GV_DYNNR.
*
PROCESS AFTER INPUT.
CALL SUBSCREEN SUB.
MODULE USER_COMMAND_0100.