sapdev logo background
sapdev logo sapdev logo
Comments

ABAP SUBMIT Statement syntax, information and example SAP source code



Return to Statement index



SUBMIT

Short Reference

ABAP Syntax SUBMIT {rep|(name)} [
selscreen_options ]
[ list_options ]

[ job_options ]
[AND RETURN].

ABAP_ADDITION:
... AND RETURN

What does it do? The SUBMIT statement 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 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 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 SUBMIT statement 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 with SUBMIT .

Latest notes: SUBMIT does not end the current database LUW (the addition
AND 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.
If there are still procedures registered in the current SAP LUW in a SUBMIT , without AND 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 statement
COMMIT WORK or ROLLBACK WORK explicitly before the program call.
Specifying the program name in name is one of the dynamic programming techniques. See Dynamic Calls .

ABAP_ADDITION ... AND RETURN

What does it do? 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 field sy-calld at SUBMIT is copied by the calling program without AND 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 the SUBMIT statement.

Latest notes: The statement SUBMIT with the addition AND 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 statements CALL FUNCTION IN UPDATE TASK or CALL FUNCTION IN BACKGROUND TASK in the tables VB... or ARFCSSTATE
and ARFCSDATA . Under certain circumstances, the statement ROLLBACK 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 .



Runtime Exceptions
Non-catchable Exceptions

Reason for error: The specified program was not found.
Runtime error: LOAD_PROGRAM_NOT_FOUND
Reason for error: An attempt was made to pass an invalid value to a selection using the addition SIGN .
Runtime error: SUBMIT_WRONG_SIGN
Reason for error: The specified program is not a report.
Runtime error: SUBMIT_WRONG_TYPE
Reason for error: An attempt was made to pass more than one value to a report parameter.
Runtime error: SUBMIT_IMPORT_ONLY_PARAMETER
Reason for error: 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
Reason for error: 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
Reason for error: The called program contains a syntax error.
Runtime error: SYNTAX_ERROR
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




STOP
SUBMIT_INTERFACE




comments powered by Disqus