SAP ABAP建立多个SELECTION SCREEN

当用户输入选择条件时,须一步一步确定的时候,可以建立多个选择屏幕,根据用户的选择弹出选择屏幕。

REPORT demo_call_selection_screen.

SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE tit1.
PARAMETERS: cityfr TYPE spfli-cityfrom,
             cityto TYPE spfli-cityto.
SELECTION-SCREEN END OF BLOCK sel1.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS sel1.
SELECTION-SCREEN BEGIN OF BLOCK sel2
                           WITH FRAME TITLE tit2.
PARAMETERS: airpfr TYPE spfli-airpfrom,
             airpto TYPE spfli-airpto.
SELECTION-SCREEN END OF BLOCK sel2.
SELECTION-SCREEN END OF SCREEN 500.

INITIALIZATION.
   tit1 = ‘Cities’.

AT SELECTION-SCREEN.
   CASE sy-dynnr.
     WHEN ‘0500’.
       MESSAGE w888(SABAPDOCU) WITH ‘Screen 500’.
     WHEN ‘1000’.
       MESSAGE w888(SABAPDOCU) WITH ‘Screen 1000’.
   ENDCASE.

START-OF-SELECTION.
   tit1 = ‘Cities for Airports’.
   tit2 = ‘Airports’.
   CALL SELECTION-SCREEN 500 STARTING AT 10 10.
   tit1 = ‘Cities again’.
   CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

发表评论

电子邮件地址不会被公开。 必填项已用*标注