ABAP Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Native SQL → ADBC - ABAP Database Connectivity → CL_SQL_STATEMENT - Execution of SQL Statements
Stored Procedures
Stored procedures can be executed using the following instance method of the class CL_SQL_STATEMENT
- EXECUTE_PROCEDURE
The method has an mandatory input parameter PROC_NAME of type string
, which must be passed the name of an existing stored procedure statement. In the same way as in
DML statements, it is possible to bind ABAP data objects
as actual parameters to the formal parameters of the stored procedure using the method SET_PARAM. The
type of parameter must be specified using the additional parameter INOUT
.
Possible values are defined in the constants C_PARAM_IN, C_PARAM_OUT, and C_PARAM_INOUT of the class
CL_SQL_STATEMENT. C_PARAM_IN is the default value. The order of the calls determines the assignment to the formal parameters from left to right.
Other versions: 7.31 | 7.40 | 7.54
Note
On the SAP HANA database, the stored procedures are
database procedures written in
SQLScript. In ABAP, these procedures can be managed and called using
ABAP Managed Database Procedures (AMDP) and the special statement
CALL DATABASE PROCEDURE
. This statement enables access using a secondary database connection.
Example