Ansicht
Dokumentation

ABAPCALL_FUNCTION_DYNAMIC - CALL FUNCTION DYNAMIC

ABAPCALL_FUNCTION_DYNAMIC - CALL FUNCTION DYNAMIC

CPI1466 during Backup   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

CALL FUNCTION, parameter_tables

Short Reference



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

Additions

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 function module and return values to the non-class-based exceptions dynamically.

Addition 1

... PARAMETER-TABLE ptab ...

Effect

PARAMETER-TABLE can be used to assign actual parameters to all formal parameters of the called function module. ptab expects a sorted table of table type abap_func_parmbind_tab or line type abap_func_parmbind from the type pool ABAP. When the statement CALL FUNCTION is executed, the table must contain exactly one line for each non-optional formal parameter. This line is optional for each optional formal parameter. The table columns are:

  • name of type c and length 30
for the name of the corresponding formal parameter in uppercase letters. If a nonexistent formal parameter is specified, a catchable exception is raised.
  • kind of type i
for the type of the formal parameter. kind must contain the value of one of the following constants of the type pool ABAP:
  • abap_func_exporting for input parameters

  • abap_func_importing for output parameters

  • abap_func_tables for table parameters

  • abap_func_changing for input/output parameters

If the type specified from the caller perspective does not match the actual type of the formal parameter, a catchable exception is raised.
  • value of the 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.
  • tables_wa of type REF TO data
as a pointer to a suitable work area if the column kind contains the value abap_func_tables. If tables_wa is not initial, the data object to which the reference variable points in tables_wa is passed to the header line of the table parameter specified in name.

The columns name and kind form the unique key of the table ptab. A line with a parameter name, that is not defined in the function module's parameter interface, is ignored.

Addition 2

... EXCEPTION-TABLE etab ...

Effect

EXCEPTION-TABLE can be used to assign return values to exceptions of the called function module that are not marked as exception classes in the Function Builder. etab expects a hashed table of table type abap_func_excpbind_tab or of line type abap_func_excpbind from the type pool ABAP. The table can contain exactly one line for each non-class-based exception of the function module when the statement CALL FUNCTION is executed. The table columns are:

  • name of type c and length 30
For the name of the respective exception, or error_message, or specifies 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 handled

The column name is the unique key of table etab. A line with an exception name, that is not in the function module's parameter interface, is ignored.

Call of the function module GUI_DOWNLOAD with dynamic pass by parameter The name of the function module is specified in the string func and the interface is supplied with data using the internal tables ptab and etab.








CL_GUI_FRONTEND_SERVICES - Frontend Services   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 6069 Date: 20240427 Time: 014719     sap01-206 ( 82 ms )