1、程序首先执行INITIALIZATION 事件;
2、接着执行AT SELECTION SCREEN OUTPUT事件(也就是PBO) ,在这个事件里你可以通过修改系统默认screen内表修改屏幕的某些属性;
PARAMETERS: TEST1(10) MODIF ID SC1,
TEST2(10) MODIF ID SC2,
TEST3(10) MODIF ID SC1,
TEST4(10) MODIF ID SC2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF SCREEN-GROUP1 = 'SC2'.
SCREEN-INTENSIFIED = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
3、系统将屏幕输出到用户端,用户就可进行交互操作了。也就是PAI处理,其分为
3.1字段AT SELECTION-SCREEN ON XXXX.
REPORT EVENT_DEMO.
NODES SPFLI.
AT SELECTION-SCREEN ON CITY_FR.
IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'.
MESSAGE E010(HB).
ENDIF.
3.2区域AT SELECTION-SCREEN ON BLOCK XXXX.
REPORT EVENT_DEMO.
SELECTION-SCREEN BEGIN OF BLOCK PART1 WITH FRAME.
PARAMETERS: NUMBER1 TYPE I,
NUMBER2 TYPE I,
NUMBER3 TYPE I.
SELECTION-SCREEN END OF BLOCK PART1.
SELECTION-SCREEN BEGIN OF BLOCK PART2 WITH FRAME.
PARAMETERS: NUMBER4 TYPE I,
NUMBER5 TYPE I,
NUMBER6 TYPE I.
SELECTION-SCREEN END OF BLOCK PART2.
AT SELECTION-SCREEN ON BLOCK PART1.
IF NUMBER3 LT NUMBER2 OR
NUMBER3 LT NUMBER1 OR
NUMBER2 LT NUMBER1.
MESSAGE E020(HB).
ENDIF.
AT SELECTION-SCREEN ON BLOCK PART2.
IF NUMBER6 LT NUMBER5 OR
NUMBER6 LT NUMBER4 OR
NUMBER5 LT NUMBER4.
MESSAGE E030(HB).
ENDIF.
3.3屏幕AT SELECTION-SCREEN
在此事件里可以进行对用户输入进行完整性进行检查。
在PAI处理中出现错误,系统返回屏幕,请求用户重新输入;
4、当所有的PAI执行后,则进入START-OF-SELECTION事件的执行。