ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Calling ABAP Programs → Calling Executable Programs
SUBMIT
Other versions: 7.31 | 7.40 | 7.54
Syntax
SUBMIT {rep|(name)} [selscreen_options]
[list_options]
[job_options]
[AND RETURN].
Addition
Effect
The SUBMIT
statement accesses an
executable program rep
. The executable program is executed as described under
Calling Executable Reports. If the called program contains a syntax error, an exception is raised that cannot be handled.
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 uppercase letters. If the program specified in name
is not found, a non-handleable exception is raised.
-
The
selscreen_options
additions can be used to determine the selection screen for the program accessed and to supply it with values. -
The
list_options
additions allow you to specify the output medium and the page size in the basic list for the program accessed. -
You can schedule the program for
background processing by specifying
job_options
.
Note
When the SUBMIT
statement is executed, it is not followed by an authorization check for the
authorization group specified in the
program attributes.
An authorization check of this type is performed only if the program is executed as a dialog program,
for example from the development environment or by choosing System → Services → Reporting
Addition
... AND RETURN
Effect
The AND RETURN
addition determines the object accessed by the runtime environment after the program has been called:
-
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, with the current SAP LUW being exited. Once program access is completed, the system returns to before the position from which the calling program was started. The content of the system fieldsy-calld
atSUBMIT
is copied by the calling program withoutAND RETURN
. -
The addition
AND RETURN
starts the executable program in a new internal session. The session of the calling program and the current SAP LUW are retained. The called program runs in its own SAP LUW. Once program access is completed, program execution is continued after theSUBMIT
statement.
Notes
-
If there are still procedures registered in the current
SAP LUW in a
SUBMIT
, withoutAND RETURN
, the SAP LUW exits without calling or rolling back the procedures. Registered update function modules remain in the database, but can no longer be executed. In a case like this, you should therefore execute the statementCOMMIT WORK
orROLLBACK WORK
explicitly before the program call. -
The statement
SUBMIT
with the additionAND RETURN
opens a new SAP-LUW, but note that this does not open a new database LUW automatically. This means that a database rollback in this SAP LUW can roll back all registration entries made by the statementsCALL FUNCTION IN UPDATE TASK
orCALL FUNCTION IN BACKGROUND TASK
in the tables VB... or ARFCSSTATE and ARFCSDATA. Under certain circumstances, the statementROLLBACK WORK
in the called program can also affect the interrupted SAP LUW. To prevent this, an explicit database commit must be executed before the program is called. This problem does not occur in local updates.
Exceptions
Non-Catchable Exceptions
-
Cause: The specified program was not found.
Runtime Error:LOAD_PROGRAM_NOT_FOUND
-
Cause: You tried to pass an invalid value to a selection using the addition
SIGN
.
Runtime Error:SUBMIT_WRONG_SIGN
-
Cause: The specified program is not a report.
Runtime Error:SUBMIT_WRONG_TYPE
-
Cause: You tried to pass more than one value to a report parameter.
Runtime Error:SUBMIT_IMPORT_ONLY_PARAMETER
-
Cause: You tried to use
WITH sel IN itab
to pass a table that does not have the appropriate structure to a selection.
Runtime Error:SUBMIT_IN_ITAB_ILL_STRUCTURE
-
Cause: You tried to pass a parameter that cannot be converted to the target field to the selection screen.
Runtime Error:SUBMIT_PARAM_NOT_CONVERTIBLE
-
Cause: The called program contains a syntax error.
Runtime Error:SYNTAX_ERROR