DATA:
in_date TYPE if_..._proxy=>in_date,
in_sel TYPE STANDARD TABLE
OF if_..._proxy=>in_sel
WITH EMPTY KEY,
out_items TYPE STANDARD TABLE
OF if_..._proxy=>out_items
WITH EMPTY KEY.
in_date = '20120329'.
in_sel = VALUE #( ( first_name = 'Dolores' last_name = 'Oh' )
( first_name = 'Benjacomin' last_name = 'Bozart' )
( first_name = 'Johanna' last_name = 'Gnade' ) ).
IF cl_db_sys=>is_in_memory_db = abap_true.
CALL DATABASE PROCEDURE ..._proxy
EXPORTING in_date = in_date
in_sel = in_sel
IMPORTING out_items = out_items.
ENDIF.
Example
The example Database Procedure Call
uses a database procedure proxy created in the program to call a
database procedure created using ADBC .
Runtime Exceptions
Catchable Exceptions
Except for CX_SY_DB_PROCEDURE_SQL_ERROR , all the following
exception classes are subclasses of the abstract superclass
CX_SY_DB_PROCEDURE_CALL .
CX_SY_DB_PROCEDURE_SQL_ERROR
Reason for error: Error on the database when executing an SQLScript
function.
Runtime error: DBPROC_SQL_ERROR
CX_SY_DB_PROCEDURE_CONNECTION
Reason for error: The specified secondary database connection was not
found in the database table DBCON .
Runtime error: DBPROC_CONNECTION
CX_SY_DB_PROCEDURE_NOT_FOUND
Reason for error: The specified database procedure proxy does not exist.
Runtime error: DBPROC_PROXY_NOT_FOUND
CX_SY_DB_PROCEDURE_NOT_SUPP
Reason for error: The database does not support SQLScript .
Runtime error: CALL_DATABASE_NOT_SUPPORTED
CX_SY_DB_PROCEDURE_OVERFLOW
Reason for error: The value range of a parameter was exceeded.
Runtime error: DBPROC_OVERFLOW
CX_SY_DB_PROCEDURE_PARAMETER
Reason for error: One of the following exceptions was raised (abstract
superclass).
CX_SY_DB_PROCEDURE_DYN_IN_OUT
Reason for error: Input and output parameters were switched in the dynamic
call.
Runtime error: DBPROC_DYNAMIC_IN_OUT1 ,
DBPROC_DYNAMIC_IN_OUT2
CX_SY_DB_PROCEDURE_DYN_MISSING
Reason for error: Actual parameter missing for a formal parameter in a
dynamic call.
Runtime error: DBPROC_DYNAMIC_MISSING
CX_SY_DB_PROCEDURE_DYN_NOT_FND
Reason for error: Formal parameter specified incorrectly in a dynamic call.
Runtime error: DBPROC_DYNAMIC_NOT_FOUND
CX_SY_DB_PROCEDURE_TYPE_ERROR
Reason for error: Invalid type of an actual parameter in a static or dynamic
call.
Runtime error: DBPROC_ILLEGAL_TYPE ,
DBPROC_DYNAMIC_NO_SCALAR , DBPROC_DYNAMIC_NO_TABLE
Non-catchable Exceptions
Reason for error: The column KIND of the parameter table ptab
contains an invalid value.
Runtime error: DBPROC_DYNAMIC_UNKNOWN_KIND
Reason for error: The column KIND of the parameter table ptab
contains the value "C" for input/output parameters. This is
not yet supported.
Runtime error: DBPROC_DYNAMIC_NO_INOUT
Reason for error: The actual parameter associated with an output parameter
cannot be modified.
Runtime error: DBPROC_OUT_NOT_WRITABLE
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved