凡尘clsoho™的博客

E-mail & MSN: clsoho@hotmail.com
QQ1超级群: <101817641已满> QQ2群:<110722895已满>
QQ3超级群:<23765855>QQ4超级群:<85338969>

   SUBMIT 的用法

 

SUBMIT

Syntax

SUBMIT {rep|(name)} [selscreen_options] 
       #程序名       [ list_options ]
                    [ job_options]
                    [AND RETURN].

Addition:

... AND RETURN

Effect 作用

The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports.

The program name rep can either be specified directly or as the content of a character-like data object name. The data object name must contain the name of the program to be accessed in block capitals. If the program specified in name is not found, an irretrievable exception is generated.

SUBMIT语句调用一个可执行程序rep。这个可执行程序是在调用可执行报表的情况下被执行的。

程序各rep可以被直接指定也可以作为一个字段内容-像数据对象name。数据对象name必须包含大写字母的程序名称。如果指定在name中的程序没有找到,将会产生一个无法挽救的异常。

    selscreen_options条件可以用来决定调用程序的选择屏幕并且为程序提供数据。

  • The list_options additions allow you to influence the output medium and the page size in the basic list for the program accessed.

          list_options 条件充许你改变调用程序的基础列表中的输出值和页面大小。  

Addition

... AND RETURN

Effect 作用

The AND RETURN addition determines the object accessed by the runtime environment after program access is completed:

AND RETURN选项决定被调用对象在程序调用后的运行环境已经完成。

  • Without the AND RETURN addition, the internal session of the program accessed replaces the internal session of the calling program in the same position in the call sequence. Once program access is completed, the system returns to before the position from which the calling program was started.
    As of Release 6.10, the content of the system field sy-calld at SUBMIT is copied by the calling program without AND RETURN. Before 6.10, the system entered the value "X", which was incorrect when the program was accessed from the first program in a call sequence.

        没有and return选项,被访问程序的内部会话在调用序列的相同位置代替调用程序的内部会话。一旦访问程序完成,系统返回到调用程序开始的位置。对于版本6.10,当程序从调用序列中的第一个程序被调用时,系统输入值'X'是错误的。

  • The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.

           and return选项在一个新的内部会话中运行可执行程序。调用程序的会话将被保留。一旦访问程序完成,调用程序将在submit语句后继续执行。  

Note 注

When the SUBMIT statement is executed, the system runs an authorization check for the authorization group specified in the program attributes.

当submit语句执行时,系统为在程序属性中指定的权限组运行权限检查。

Exceptions

Non-Catchable Exceptions 不可捕捉的异常

  • Cause: The specified program was not found. 指定程序未找到
    Runtime Error: LOAD_PROGRAM_NOT_FOUND  运行错误
  • Cause: You tried to transfer an invalid value to a selection using the addition SIGN. 你试图为SIGN赋一个无效的值
    Runtime Error: SUBMIT_WRONG_SIGN
  • Cause: The specified program is not a report. 指定的程序不是报表程序。
    Runtime Error: SUBMIT_WRONG_TYPE
  • Cause: You tried to transfer more than one value to a report parameter. 你试图传输多值到一个报表参数
    Runtime Error: SUBMIT_IMPORT_ONLY_PARAMETER
  • Cause: You tried to use WITH sel IN itab to transfer a table that does not have the appropriate structure to a selection.  你试图用with sel in itab 传输一个没有表匹配结构的表到一个选择条件。
    Runtime Error: SUBMIT_IN_ITAB_ILL_STRUCTURE
  • Cause: You tried to transfer a parameter that cannot be converted to the target field to the selection screen.
    Runtime Error: SUBMIT_PARAM_NOT_CONVERTIBLE 你试图传输一个不能转换成目标字段的参数到选择屏幕

以上为SAP帮助文件中对SUBMIT的解释。以下为SUBMIT的调用示例

IF SY-BATCH IS INITIAL.
  SUBMIT RVKRED07 WITH KKBER IN KKBER
                  WITH KNKLI IN KNKLI
                  WITH PROTB EQ PROTB
                  WITH TRACS EQ TRACS
                  WITH NOBLOCK EQ NOBLOCK
                  WITH DD_VBELN IN DD_VBELN.
ELSE.
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
            NO_DIALOG      = 'X'
            MODE           = 'CURRENT'
       IMPORTING
            OUT_PARAMETERS = PARAMS.
  SUBMIT RVKRED07 TO SAP-SPOOL SPOOL PARAMETERS PARAMS
                  WITHOUT SPOOL DYNPRO
                  WITH KKBER IN KKBER
                  WITH KNKLI IN KNKLI
                  WITH PROTB EQ PROTB
                  WITH TRACS EQ TRACS
                  WITH NOBLOCK EQ NOBLOCK
                  WITH DD_VBELN IN DD_VBELN.
ENDIF.

 

posted on 2010-01-18 13:54  凡尘clsoho  阅读(3913)  评论(0编辑  收藏  举报