【第三篇】SAP ABAP7.5x新语法之程序结构&SubScreen

公众号:SAP Technical
本文作者:matinal

【第三篇】SAP ABAP7.5x新语法之程序结构&SubScreen

前言部分

我们知道,在SAP里的程序结构包含了很多内容,比如:Global Declarations里包含interface,classes,global data;Method里包含local data,implementation等等,同时本文也列举一个subscreen的例子,仅供参考。

程序结构

看看在SAP ABAP 7.50里程序结构发生变化了吗?

【第三篇】SAP ABAP7.5x新语法之程序结构&SubScreen

【第三篇】SAP ABAP7.5x新语法之程序结构&SubScreen

【第三篇】SAP ABAP7.5x新语法之程序结构&SubScreen

SubScreen举例

举一个SubScreen的例子,来看一下

REPORT zmatinal_subscreen.

SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN NESTING LEVEL 4.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
PARAMETERS: p1(10) TYPE c,
p2(10) TYPE c,
p3(10) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1100. SELECTION-SCREEN BEGIN OF SCREEN 1200 AS SUBSCREEN NESTING LEVEL 4.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-020.
PARAMETERS: q1(10) TYPE c OBLIGATORY,
q2(10) TYPE c OBLIGATORY,
q3(10) TYPE c OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 1200. DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm. DATA: number(4) TYPE n VALUE '1100'. START-OF-SELECTION.
CALL SCREEN 100. MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE. MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE. MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'BUTTON1'.
number = 1100.
WHEN 'BUTTON2'.
number = 1200.
ENDCASE.
ENDMODULE. AT SELECTION-SCREEN.
MESSAGE s888(sabapdemos) WITH text-030 sy-dynnr.

本文是SAP ABAP7.50系列的第三篇。

上一篇:复盘价值1000万的腾讯云硬盘固件"BUG"


下一篇:Objective-C中block的底层原理