Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Calling and leaving program units →  Calling Processing Blocks →  Calling Procedures →  PERFORM 

PERFORM - general

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


PERFORM subr_identifier [
parameter_list]. 

Effect

This statement calls the subroutine specified with the name subr_identifier and assigns the actual parameters specified in parameter_list to the formal parameters of the subroutine.


Notes

  • Subroutines are obsolete. Do not create new subroutines in new programs. Subroutines created in existing programs for internal modularization can continue to be called. Whenever possible, however, external subroutine calls from other programs should be avoided.
  • Information about the behavior of class-based exceptions in subroutines can be found in Class-Based Exceptions in Procedures.

Example

Old function modules such as GUI_DOWNLOAD, whose function groups have not been switched to using local classes, still contain a large number of PERFORM statements.

Exceptions

Handleable Exceptions

CX_SY_NO_HANDLER

CX_SY_PROGRAM_NOT_FOUND

  • Cause: The specified program was not found.
    Runtime error: LOAD_PROGRAM_NOT_FOUND
  • Cause: The specified program cannot exist because the program name is longer than 40 characters.
    Runtime error: PERFORM_PROGRAM_NAME_TOO_LONG

CX_SY_DYN_CALL_ILLEGAL_FORM

  • Cause: The specified subroutine was not found.
    Runtime error: PERFORM_NOT_FOUND
  • Cause: The specified index was too small.
    Runtime error: PERFORM_INDEX_0
  • Cause: The specified index was negative.
    Runtime error: PERFORM_INDEX_NEGATIVE
  • Cause: The specified index was too large.
    Runtime error: PERFORM_INDEX_TOO_LARGE

CX_SY_DYN_CALL_PARAM_MISSING

  • Cause: The called FORM expects more parameters than were specified.
    Runtime error: PERFORM_PARAMETER_MISSING

CX_SY_DYN_CALL_PARAM_NOT_FOUND

  • Cause: More parameters were specified than expected by FORM.
    Runtime error: PERFORM_TOO_MANY_PARAMETERS

CX_SY_DYN_CALL_ILLEGAL_TYPE

  • Cause: In parameter passing using the addition STRUCTURE, the addressing offsets do not match in the actual and target structures.
    Runtime error: PERFORM_BASE_WRONG_ALIGNMENT
  • Cause: The deep components contained in the actual and target structures cannot be passed to each other. This error occurs only in parameter passing using STRUCTURE.
    Runtime error: PERFORM_CAST_DEEP_MISMATCH
  • Cause: When passing a generically defined type to the form, a type conflict occurred.
    Runtime error: PERFORM_CONFLICT_GENERIC_TYPE
  • Cause: The table type of the actual parameter does not match the table type of the parameter defined in the form.
    Runtime error: PERFORM_CONFLICT_TAB_TYPE
  • Cause: The type of the actual parameter does not match the type of parameter defined in the form.
    Runtime error: PERFORM_CONFLICT_TYPE
  • Cause: The actual parameter occupies less memory space than the target parameter defined in the form. This error occurs only in parameter passing using STRUCTURE.
    Runtime error: PERFORM_PARAMETER_TOO_SHORT
  • Cause: In parameter passing using the addition STRUCTURE, the fragment views of the actual and target parameters do not match.
    Runtime error: PERFORM_CONFLICT_UC_STRUCT
  • Cause: When the form is called, an internal table is expected as the actual parameter.
    Runtime error: PERFORM_TABLE_REQUIRED
  • Cause: A hashed table was passed to a parameter defined using TABLES.
    Runtime error: PERFORM_STD_TAB_REQUIRED

Continue

PERFORM - subr_identifier