2023年11月29日发(作者:)

SUBMIT的⽤法

SUBMIT 的⽤法

SUBMIT

Syntax

SUBMIT {rep|(name)} []

#程序名 [ ]

[]

[AND RETURN].

Addition:

Effect 作⽤

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

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中的程序没有找到,将会产⽣

⼀个⽆法挽救的异常。

The additions can be used to determine the for the program accessed and to supply it with values.

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

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

条件充许你改变调⽤程序的基础列表中的输出值和页⾯⼤⼩。

You can schedule the program for by specifying .

你可以把程序安排成后台运⾏通过指定

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 of the program accessed replaces the internal session of the calling program in the same position in the .

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 .

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

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