1,定义SELECTION-SCREEN
1 2 3 4 5 6 7 8 9 |
*定义selection screen SELECTION-SCREEN BEGIN OF SCREEN 9001 AS WINDOW TITLE TEXT-001. PARAMETERS:p_ebeln LIKE ekko-ebeln. SELECTION-SCREEN END OF SCREEN 9001. *调用screen CALL SCREEN 9001 STARTING AT 10 10 ENDING AT 80 10. " |
call screen会弹出屏幕,显示如下:
2,CALL SELECTION-SCREEN
1 2 3 4 5 6 7 8 9 |
* 第一个screen PARAMETERS:p_check type c as CHECKBOX. * 调用第二个selection screen CALL SELECTION-SCREEN 9002. *定义selection screen SELECTION-SCREEN BEGIN OF SCREEN 9002 AS WINDOW TITLE TEXT-001. PARAMETERS:p_ebeln LIKE ekko-ebeln. SELECTION-SCREEN END OF SCREEN 9002. |
第一个sceen
点击运行按钮,调用第二个screen,
3,定义BLOCK
SELECTION-SCREEN BEGIN OF BLOCK BLOCK.
...
SELECTION-SCREEN END OF BLOCK.
该语法在屏幕中定义一个BLOCK,其扩展语法包括:
...WITH FRAME:创建一个框架。
...TITLE title:创建一个带标题的框架。
...NO INTERVALS:所创建的框架中限制SELECT 只有一个输入项。
另外block中还有以下语法:
SELECTION-SCREEN ULINE. 输出横线
SELECTION-SCREEN SKIP n.换行
SELECTION-SCREEN POSITION pos. 产生空格
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
DATA:g_mat LIKE mara-matnr. *不包含扩展语法 SELECTION-SCREEN BEGIN OF BLOCK block1. SELECT-OPTIONS:s_matnr1 FOR g_mat. SELECTION-SCREEN END OF BLOCK block1. *包含框架 SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME. SELECT-OPTIONS:s_matnr2 FOR g_mat. SELECTION-SCREEN END OF BLOCK block2. *包含框架及标头 SELECTION-SCREEN BEGIN OF BLOCK block3 WITH FRAME TITLE text-002. SELECT-OPTIONS:s_matnr3 FOR g_mat. SELECTION-SCREEN END OF BLOCK block3. *包含框架及标头且只有一个输入框 SELECTION-SCREEN BEGIN OF BLOCK block4 WITH FRAME TITLE text-003 NO INTERVALS. SELECT-OPTIONS:s_matnr4 FOR g_mat. SELECTION-SCREEN END OF BLOCK block4. |
屏幕显示如下:
4,Selection-screen include
参照已经定义的屏幕元素来创建
1 2 3 4 5 6 7 8 9 10 11 12 13 |
CALL SCREEN 9003. SELECTION-SCREEN BEGIN OF SCREEN 9004. SELECTION-SCREEN BEGIN OF BLOCK blk1. SELECT-OPTIONS s_sel FOR sy-repid. SELECTION-SCREEN ULINE. "换行线 PARAMETERS p_char. SELECTION-SCREEN END OF BLOCK blk1. SELECTION-SCREEN END OF SCREEN 9004. SELECTION-SCREEN BEGIN OF SCREEN 9003. SELECTION-SCREEN INCLUDE BLOCKS blk1."參照SCREEN 9004中的BLOCK PARAMETERS p_box TYPE c AS CHECKBOX. SELECTION-SCREEN END OF SCREEN 9003. |
显示如下:
以上,
发表评论