ABAP Keyword Documentation → ABAP - Reference → Calling and leaving program units → Calling 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 statement SUBMIT
accesses an
executable program rep
. The executable program is executed as described under
Flow of an Executable Program. If the called program
contains a syntax error, an exception is raised that cannot be handled. The addition AND RETURN
determines the
internal session and the behavior with respect to
SAP LUWs.
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 additions
selscreen_options
can be used to determine the selection screen for the program accessed and to supply it with values. -
The additions
list_options
allow the output medium and the page size to be specified in the basic list for the called program. -
The program can be scheduled for
background processing by specifying
job_options
.
When the statement SUBMIT
is executed, it is followed by an authorization check (using the
authorization object S_PROGRAM) for the
authorization group specified in the
program attributes.
The program attribute Start Using Variant is ignored if SUBMIT
is used.
Security Note
If the name of a program unit is specified dynamically when it is called, and this name is passed to a program from outside, the result is a serious security risk. Any names passed to a program from outside must be checked thoroughly before being used in calls. The system class CL_ABAP_DYN_PRG, for example, can be used to do this. See Dynamic Calls.
Addition
... AND RETURN
Effect
The addition AND RETURN
determines the object accessed by the runtime environment after the program has been called:
-
Without the addition
AND RETURN
, 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 of the current call sequence. The session of the calling program and the current SAP LUW are preserved. The called program runs in its own SAP LUW. Once program access is completed, program execution is continued after the statementSUBMIT
.
The number of internal session in a call sequence is restricted to nine. If this is exceeded by SUBMIT ... AND RETURN
, the program terminates and the entire call sequence is deleted.
Notes
-
SUBMIT
does not end the current database LUW (the additionAND RETURN
is irrelevant here). A database commit or database rollback in the called program works in exactly the same way as in the current program. -
The statement
SUBMIT
with the additionAND RETURN
opens a new SAP-LUW, but it does not open a new database LUW. 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. -
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 can no longer be executed. In a case like this, therefore, it is advisable to execute the statementCOMMIT WORK
orROLLBACK WORK
explicitly before the program call.
Exceptions
Non-Catchable Exceptions
-
Cause: The specified program was not found.
Runtime Error:LOAD_PROGRAM_NOT_FOUND
-
Cause: An attempt was made 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: An attempt was made to pass more than one value to a report parameter.
Runtime Error:SUBMIT_IMPORT_ONLY_PARAMETER
-
Cause: An attempt was made 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: An attempt was made 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