dialog module (1)基本知识

来源:互联网 发布:知乎dota2 lol 编辑:程序博客网 时间:2024/06/16 09:08

一、module

You can use MODULE as a keyword only at the events PBO and PAI. At the eventsPOH andPOV, you can useMODULE only as an addition to theFIELD statement.

    只能在PBO和 PAI事件中使用module作为关键字,在POH和 POV中 module只能被用作field语句中的附加选项。

二、LOAD-Of-PROGRAM 和 INITIALIZATION

The event LOAD-Of-PROGRAM should mainly be used to initialize global data when calling external procedures orTransactions. If you call executable programs withSUBMIT, we recommend that you use the eventINITIALIZATION, as theStarting values for parameter and selection criteria are set afterLOAD-OF-PROGRAM (seeprogram flow afterSUBMIT).

load-of-program事件主要是在call一个external procedures 或者 transaction 的时候,用于初始化全局数据。

如果你是用submit去call一个可执行程序,我们建议你使用initialization事件为parameter赋值,而选择屏幕上的信息在load-of-program事件中进行设置。

  在一个report中会首先执行LOAD-Of-PROGRAM ,然后才会执行INITIALIZATION事件。

比如下面的测试程序:

REPORT  ztest08.

LOAD-OF-PROGRAM.
  WRITE: / 'I am load-of-program'.

INITIALIZATION.
  WRITE : / 'I ma initialization'.

最后的输出结果为:

I am load-of-program

I ma initialization

三、

The screen flow logic, as an ABAP program, is structured from processing blocks. Possible processing blocks are the four event blocks for the screen eventsPBO,PAI,POH, andPOV, which all start with the key wordPROCESS. These event blocks contain a small set of statements that are described in the following sections, and which offer the the following functions:

  • Call dialog modules of the ABAP program using MODULE
  • Control data transports to the ABAP program and treat error messages using FIELD andCHAIN
  • Execute loops using table controls with LOOP
  • Call subscreens using CALL SUBSCREEN

(1)PBO、PAI、POH、POV这些屏幕事件,都是通过process关键字,来调用abap程序块来实现的。

(2)这些程序块包含了一系列包含下述功能的代码

  • 调用dialog modules,这是通过module来实现的
  • 控制数据传输到abap程序、处理错误信息,这是通过field和chain来实现的
  • 执行表的循环,这是通过loop实现的
  • 调用subscreen,这是通过call subscreen来实现的。

原创粉丝点击