有时候为了方便,会把标准选择屏幕(1000)那一套东西拿到自己定义的屏幕上使用。有两个方法可以实现。
1、Subscreen,直接嵌入到自定义的Screen上,需要在Screen上画一个子屏幕的区域
2、弹出一个窗口,不用对自定义屏幕做更改
REPORT z_barry_test NO STANDARD PAGE HEADING.
TABLES ekko.
DATA: ok_code LIKE sy-ucomm.
SELECTION-SCREEN BEGIN OF SCREEN 111 AS SUBSCREEN.
SELECT-OPTIONS: p_ebeln FOR ekko-ebeln .
SELECTION-SCREEN END OF SCREEN 111.
SELECTION-SCREEN BEGIN OF SCREEN 222 AS WINDOW .
SELECT-OPTIONS: p_aedat FOR ekko-aedat.
SELECTION-SCREEN END OF SCREEN 222.
START-OF-SELECTION.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module user_command_0100 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'CALL'.
CALL SELECTION-SCREEN 222 STARTING AT 10 5 .
ENDCASE.
ENDMODULE. " user_command_0100 INPUT
*&---------------------------------------------------------------------*
*& Module status_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'M100'.
ENDMODULE. " status_0100 OUTPUT
*PROCESS BEFORE OUTPUT.
* MODULE status_0100.
* CALL SUBSCREEN subs1 INCLUDING sy-repid '0111'.
*
*PROCESS AFTER INPUT.
* MODULE user_command_0100.
* CALL SUBSCREEN subs1.
http://blog.chinaunix.net/uid-8527621-id-2029855.html