Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling ABAP Programs →  Calling Executable Programs 

SUBMIT

Short Reference

Other versions: 7.31 | 7.40 | 7.54

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. 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.


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 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.


Notes

  • 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 remain in the database, but can no longer be executed. In a case like this, you should therefore execute the statement COMMIT WORK or ROLLBACK WORK explicitly before the program call.
  • The statement SUBMIT with the addition AND 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 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.

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

Continue

SUBMIT - selscreen_options

SUBMIT - list_options

SUBMIT - job_options