What does it do? In dynamic method calls>, these additions assign actual parameters and exceptions to the formal parameters and non-class-based exceptions using the special internal tables ptab> and etab>.
ABAP Addition
What does it do? PARAMETER-TABLE> can be used to assign actual parameters to all formal parameters of a dynamically called method. ptab> expects a hashed table> of table type abap_parmbind_tab> or line type abap_parmbind> from the type pool> ABAP>>. When the statement CALL METHOD> is executed, the table must contain exactly one line for each non-optional formal parameter. For each optional formal parameter, the table can contain one line. The table columns are:
NAME> of type c> and length 30 For the name of the relevant formal parameter in uppercase letters. If a nonexistent formal parameter is specified, a catchable exception is raised.
KIND> of type c> of length 1. For the type of the formal parameter. This column is used to verify the interface. The type of the formal parameter is determined in the declaration of the called method. If KIND> is initial, no check is performed. If KIND> contains the value of a constant EXPORTING >, IMPORTING>, CHANGING>, or RECEIVING> of the class CL_ABAP_OBJECTDESCR>, the system checks (from the perspective of the caller) whether the formal parameter specified in NAME> is an input, output, input/output parameter, or a return value, and raises the catchable exception CX_SY_DYN_CALL_ILLEGAL_TYPE> if an error occurs.
VALUE> of the type REF TO data> For 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 the table ptab>. The table must not contain a line with a parameter name that does not exist in the method's parameter interface.
ABAP Addition
What does it do? EXCEPTION-TABLE> can be used to assign return values to all non-class-based exceptions> of a dynamically called method. etab> expects a hashed table> of table type abap_excpbind_tab> or of line type abap_excpbind> from the type pool> ABAP>>. When the statement CALL METHOD > is executed, this table can contain exactly one line 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 that is to be available in sy-subrc> after the exception specified in NAME > is raised. The column NAME> is the unique key of table etab>. The table must not contain a line with a exception name that does not exist in the method's parameter interface.
ABAP_EXAMPLE_VX Dynamic method call with parameter and exception table. ABEXA 00075 ABAP_EXAMPLE_END
ABAP_EXAMPLE_V5 Dynamic method call with parameter and exception table. In ABAP_FOR_CLOUD , non-class-based exceptions cannot be defined anymore. Passing an exception table is necessary when calling methods of classes written in ABAP_STANDARD . ABEXA 01626 ABAP_EXAMPLE_END