zoukankan      html  css  js  c++  java
  • 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命令
    使用该命令的程序位置
    处理说明
    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命令
    使用该命令的程序位置
    处理说明
    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在不同程序位置对应处理列表
     
    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
    1. 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.
    2. 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.
    3. The message appears in a dialog box. Once the user has confirmed the message, the program continues immediately after the MESSAGE statement.
    4. The message appears in the status line of the next screen. The program continues immediately after the message statement.
    5. 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.
    6. No message is displayed and a runtime error, MESSAGE_TYPE_X, is triggered. The short dump text contains the message identification.
    7. 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.
    8. 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.
    9. 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.
    10. The message appears in the status line and the processing block terminates. The list level is displayed as before.
    11. The message appears in the status line and the processing block terminates. The system then returns to the program call.
  • 相关阅读:
    docker部署nginx文件服务器
    local variable 'a' referenced before assignment
    函数嵌套的顺序
    动态参数
    函数——函数接收不定个数的数字实参,将数字之和返回给调用者
    函数——函数接收四个参数分别是:姓名,性别,年龄,学历。用户通过输入这四个内容,然后将这四个内容传入到函数中, 此函数接收到这四个内容,将内容追加到一个student msg文件中
    函数——此函数只接收一个参数且此参数必须是列表数据类型,此函数完成的功能是返回给调用者一个字典, 此字典的键值对为此列表的索引及对应元素。例如传入的列表为:[11,22,33]返回的字典为{0:11,1:22,2:33}
    函数——检查传入列表的长度,如果大于2,那么仅保留前两个长度的内容,并将新内容返回给调用者
    函数—判断用户传入的对象(字符串、列表、元组)长度是否大于5
    Python中深拷贝与浅拷贝的区别
  • 原文地址:https://www.cnblogs.com/ruingy/p/3440899.html
Copyright © 2011-2022 走看看