ABAP--关于ABAP流程处理的一些命令的说明(stop,exit,return,check,reject)
生活随笔
收集整理的這篇文章主要介紹了
ABAP--关于ABAP流程处理的一些命令的说明(stop,exit,return,check,reject)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Stop 命令 使用該命令的程序位置 INITIALIZATION, AT SELECTION-SCREEN, START-OF-SELECTION和GET 事件中 處理說明 1、?當在INITIALIZATION事件執行該命令,系統將直接觸發應用服務器和客戶端屏幕元素的發送; 2、?在其他事件中將直接觸發END-OF-SELECTION事件的執行,如果不想執行END-OF-SELECTION,請使用RETURN或者 EXIT. 注意事項 EXIT命令 使用該命令的程序位置 用于循環和程序模塊中:DO和其他處理模塊中(event block, dialog module, procedure (function module, method, subroutine))...ENDDO,WHILE...ENDWHILE,LOOP...ENDLOOP,SELECT...ENDSELECT 處理說明 1、?循環處理中,EXIT只跳出當前的循環; 2、?在START-OF-SELECTION, GET, END-OF-SELECTION事件中,將直接觸發List輸出,將不執行END-OF-SELECTION事件;如果沒有List輸出,系統將直接返回選擇屏幕; 3、?對于procedure系統返回調用處; 注意事項 Sap推薦EXIT只是用于循環處理,對于處理模塊請使用Return。 RETURN命令 使用該命令的程序位置 用于處理模塊中(event block, dialog module, procedure (function module, method, subroutine)) 處理說明 1、?對于procedure ,RETURN將無條件退出當前的處理模塊,不影響后續模塊的執行; 2、?對于START-OF-SELECTION, GET, END-OF-SELECTION事件中,將直接觸發List輸出,將不執行END-OF-SELECTION事件;如果沒有List輸出,系統將直接返回選擇屏幕; 注意事項 RETURN不管存在多少層次的循環,將直接退出當前處理模塊,這一點和EXIT不同 CHECK命令 使用該命令的程序位置 用于循環和程序模塊中:DO和其他處理模塊中(event block, dialog module, procedure (function module, method, subroutine))...ENDDO,WHILE...ENDWHILE,LOOP...ENDLOOP,SELECT...ENDSELECT 處理說明 1、?循環處理中,CHECK只是不執行本次循環的后續處理,繼續調到下一次循環; 2、?在START-OF-SELECTION, GET, END-OF-SELECTION事件中,只是中斷本事件內的后續代碼的執行 ,不影響其他后續模塊的處理,這和EXIT,RETURN是不同的; 3、?對于沒有循環procedure系統返回調用處; 4、?對邏輯數據庫的GET事件,系統退出本次紀錄和子節點的讀取處理,將繼續下一條紀錄的處理; 注意事項 Sap推薦CHECK只是用于循環處理,對于處理模塊請使用Return。 REJECT命令 使用該命令的程序位置 用于邏輯數據庫的GET處理事件中 處理說明 REJECT的處理類似CHECK,但和CHECK不同的是:REJECT如果在循環內也同樣退出本次的處理,而CHECK只是退出循環,不退出處理 注意事項 ? MESSAGE命令 使用該命令的程序位置 處理說明 MESSAGE在不同程序位置對應處理列表
The message appears in a dialog box and the program terminates. When the user has confirmed the message, control returns to the next- highest area. All the internal sessions are deleted from the stack. The message appears in the status line. Then PAI terminates and the system returns to the current screen. All the screen fields combined using FIELD or CHAIN are now ready for input. The user must enter new values. The system triggers the PAI event again, with the new values. The message appears in a dialog box. Once the user has confirmed the message, the program continues immediately after the MESSAGE statement. The message appears in the status line of the next screen. The program continues immediately after the message statement. The message appears in the status line. Then the system continues as in 2, except that the user can quit the message using ENTER without having to enter new values. The system continues handling the PAI event from immediately after the message statement. No message is displayed and a runtime error, MESSAGE_TYPE_X, is triggered. The short dump text contains the message identification. The program terminates with a runtime error DYNPRO_MSG_IN_HELP. While F1 and F4 are processed, the system cannot send error messages or warnings. The message appears in the status line. Then the system stops selection screen processing and returns to the selection screen itself. The screen fields specified in the additions to the AT SELECTION-SCREEN statement are now ready for input. The user must enter new values. The system then starts processing the selection screen again with the new values. The message appears in the status line. Then the system continues as in 8, except the the user can quit the message using ENTER, without having to enter new values. The system continues handling the PAI event from immediately after the message statement. The message appears in the status line and the processing block terminates. The list level is displayed as before. The message appears in the status line and the processing block terminates. The system then returns to the program call. 注意事項 ? ?
| A | E | I | S | W | X | |
| PAI Module | 1 | 2 | 3 | 4 | 5 | 6 |
| PAI Module for POH | 1 | 7 | 3 | 4 | 7 | 6 |
| PAI Module for POV | 1 | 7 | 3 | 4 | 7 | 6 |
| AT SELECTION-SCREEN ... | 1 | 8 | 3 | 4 | 9 | 6 |
| AT SELECTION-SCREEN for?POH | 1 | 7 | 3 | 4 | 7 | 6 |
| AT SELECTION-SCREEN for?POV | 1 | 7 | 3 | 4 | 7 | 6 |
| AT SELECTION-SCREEN ON EXIT | 1 | 7 | 3 | 4 | 7 | 6 |
| AT LINE-SELECTION? | 1 | 10 | 3 | 4 | 10 | 6 |
| AT PFn | 1 | 10 | 3 | 4 | 10 | 6 |
| AT USER-COMMAND | 1 | 10 | 3 | 4 | 10 | 6 |
| INITIALIZATION | 1 | 11 | 3 | 4 | 11 | 6 |
| START-OF-SELECTION | 1 | 11 | 3 | 4 | 11 | 6 |
| GET | 1 | 11 | 3 | 4 | 11 | 6 |
| END-OF-SELECTION | 1 | 11 | 3 | 4 | 11 | 6 |
| TOP-OF-PAGE | 1 | 11 | 3 | 4 | 11 | 6 |
| END-OF-PAGE | 1 | 11 | 3 | 4 | 11 | 6 |
| TOP-OF-PAGE DURING ... | 1 | 10 | 3 | 4 | 10 | 6 |
| LOAD-OF-PROGRAM | 1 | 1 | 4 | 4 | 4 | 6 |
| PBO Module? | 1 | 1 | 4 | 4 | 4 | 6 |
| AT SELECTION-SCREEN OUTPUT | 1 | 1 | 4 | 4 | 4 | 6 |
轉載于:https://www.cnblogs.com/xiaomaohai/archive/2007/09/14/6157176.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的ABAP--关于ABAP流程处理的一些命令的说明(stop,exit,return,check,reject)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2007年暑期总结
- 下一篇: 今天发布了一个新的网站矩阵www.wim