Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling Processing Blocks →  Calling procedures →  CALL METHOD 

CALL METHOD - parameter_tables

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


... [PARAMETER-TABLE ptab] 
    [EXCEPTION-TABLE etab].

Extras

1. ... PARAMETER-TABLE ptab

2. ... EXCEPTION-TABLE etab

Effect

These additions use the special internal tables ptab and etab to assign actual parameters to the formal parameters of the parameter interface of method meth or to assign return values using non-class-based exceptions.

Addition 1

... PARAMETER-TABLE ptab

Effect

Use PARAMETER-TABLE to assign actual parameters to all formal parameters of a dynamically called method. For ptab, specify a hashed table of table type ABAP_PARMBIND_TAB or of row type ABAP_PARMBIND from the type group ABAP.

ABAP. During execution of the CALL METHOD statement, this table must contain exactly one row for every non-optional formal parameter and can contain exactly one row for every optional formal parameter. The table columns are:

  • NAME of type c and length 30
    for the name of the respective formal parameter in uppercase letters. Specification of a formal paramter that does not exist leads to a treatable exception.
  • KIND of type c of length 1
    for the kind of the formal parameter. This column is used to check the interface. The kind of the formal parameter is determined in the declaration of the called method. If KIND is initial, no check is executed. If KIND contains the value of a constant EXPORTING, IMPORTING, CHANGING, RECEIVING of class CL_ABAP_OBJECTDESCR, a check is executed (from caller viewpoint), whether the formal parameter specified in NAME is an input value, output value, input/output value or a return value; in case of an error, the treatable exception CX_SY_DYN_CALL_ILLEGAL_TYPE is triggered.
  • VALUE of type REF TO data
    as a pointer to an appropriate actual parameter. The data object to which the reference variable in VALUE points, is assigned to the formal parameter specified in NAME.

The column NAME is the unique key of table ptab.

Addition 2

... EXCEPTION-TABLE etab

Effect

Use EXCEPTION-TABLE to assign return values to all non-class-based exceptions of a dynamically called method. For etab, specify a hashed table of table type ABAP_EXCPBIND_TAB or of row type ABAP_EXCPBIND from the type group ABAP. During execution of the statement CALL METHOD, this table can contain exactly one row for every non-class-based exception of the method. The table columns are:

  • NAME of type c and length 30
    for the name of the respective exception or OTHERS in uppercase letters.
  • VALUE of type i
    for the numeric value to be available in sy-subrc after the exception specified in NAME occurred.

The column NAME is the unique key of table etab.