ABAP--关于ABAP流程处理的一些命令的说明(stop,exit,return,check,reject)
生活随笔
收集整理的這篇文章主要介紹了
ABAP--关于ABAP流程处理的一些命令的说明(stop,exit,return,check,reject)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Stop 命令 使用該命令的程序位置 INITIALIZATION, AT SELECTION-SCREEN, START-OF-SELECTION和GET 事件中 處理說明 1、?當在INITIALIZATION事件執(zhí)行該命令,系統(tǒng)將直接觸發(fā)應(yīng)用服務(wù)器和客戶端屏幕元素的發(fā)送; 2、?在其他事件中將直接觸發(fā)END-OF-SELECTION事件的執(zhí)行,如果不想執(zhí)行END-OF-SELECTION,請使用RETURN或者 EXIT. 注意事項 EXIT命令 使用該命令的程序位置 用于循環(huán)和程序模塊中:DO和其他處理模塊中(event block, dialog module, procedure (function module, method, subroutine))...ENDDO,WHILE...ENDWHILE,LOOP...ENDLOOP,SELECT...ENDSELECT 處理說明 1、?循環(huán)處理中,EXIT只跳出當前的循環(huán); 2、?在START-OF-SELECTION, GET, END-OF-SELECTION事件中,將直接觸發(fā)List輸出,將不執(zhí)行END-OF-SELECTION事件;如果沒有List輸出,系統(tǒng)將直接返回選擇屏幕; 3、?對于procedure系統(tǒng)返回調(diào)用處; 注意事項 Sap推薦EXIT只是用于循環(huán)處理,對于處理模塊請使用Return。 RETURN命令 使用該命令的程序位置 用于處理模塊中(event block, dialog module, procedure (function module, method, subroutine)) 處理說明 1、?對于procedure ,RETURN將無條件退出當前的處理模塊,不影響后續(xù)模塊的執(zhí)行; 2、?對于START-OF-SELECTION, GET, END-OF-SELECTION事件中,將直接觸發(fā)List輸出,將不執(zhí)行END-OF-SELECTION事件;如果沒有List輸出,系統(tǒng)將直接返回選擇屏幕; 注意事項 RETURN不管存在多少層次的循環(huán),將直接退出當前處理模塊,這一點和EXIT不同 CHECK命令 使用該命令的程序位置 用于循環(huán)和程序模塊中:DO和其他處理模塊中(event block, dialog module, procedure (function module, method, subroutine))...ENDDO,WHILE...ENDWHILE,LOOP...ENDLOOP,SELECT...ENDSELECT 處理說明 1、?循環(huán)處理中,CHECK只是不執(zhí)行本次循環(huán)的后續(xù)處理,繼續(xù)調(diào)到下一次循環(huán); 2、?在START-OF-SELECTION, GET, END-OF-SELECTION事件中,只是中斷本事件內(nèi)的后續(xù)代碼的執(zhí)行 ,不影響其他后續(xù)模塊的處理,這和EXIT,RETURN是不同的; 3、?對于沒有循環(huán)procedure系統(tǒng)返回調(diào)用處; 4、?對邏輯數(shù)據(jù)庫的GET事件,系統(tǒng)退出本次紀錄和子節(jié)點的讀取處理,將繼續(xù)下一條紀錄的處理; 注意事項 Sap推薦CHECK只是用于循環(huán)處理,對于處理模塊請使用Return。 REJECT命令 使用該命令的程序位置 用于邏輯數(shù)據(jù)庫的GET處理事件中 處理說明 REJECT的處理類似CHECK,但和CHECK不同的是:REJECT如果在循環(huán)內(nèi)也同樣退出本次的處理,而CHECK只是退出循環(huán),不退出處理 注意事項 ? MESSAGE命令 使用該命令的程序位置 處理說明 MESSAGE在不同程序位置對應(yīng)處理列表
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 |
轉(zhuǎn)載于:https://www.cnblogs.com/xiaomaohai/archive/2007/09/14/6157176.html
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的ABAP--关于ABAP流程处理的一些命令的说明(stop,exit,return,check,reject)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2007年暑期总结
- 下一篇: 今天发布了一个新的网站矩阵www.wim