在自定義Screen上利用標準選擇螢幕的兩個方法 --- 轉自老白的部落格

kevinhaerbin發表於2009-02-23
有時候為了方便,會把標準選擇螢幕(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.
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11011430/viewspace-1017751/,如需轉載,請註明出處,否則將追究法律責任。

相關文章