Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP Database Accesses →  ABAP and SAP HANA →  Database Procedure Proxies for SQLScript Procedures 

Database Procedure Proxy

For each standalone SQLScript procedure in the SAP HANA database, database procedure proxies can be created as repository objects in ABAP Dictionary. This makes it possible to address the database procedure in the statement CALL DATABASE PROCEDURE. A database procedure proxy can be created as follows:

  • In the program, using an API. This API makes it possible to create and delete database procedure proxies. It is based on objects from the class CL_DBPROC_PROXY, accessed using the interface IF_DBPROC_PROXY_PUBLIC_API. A API of this type is created using the factory method GET_PROXY_PUBLIC_API from the factory class CL_DBPROC_PROXY_FACTORY. A further factory method, GET_PROXY_QUERY_API, makes it possible to create another API, which is used to get information about SQLScript procedures and database procedure proxies.

The database procedure proxy defines the mapping between the database types of the parameter interface of the SQLScript procedure and ABAP data types. The parameter names can also be changed here. A database procedure interface is generated for each database procedure proxy. Appropriate ABAP types are declared in this interface.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • The interfaces and classes from the database procedure proxy library are documented in Class Builder. They are accessed most easily from the factory class CL_DBPROC_PROXY_FACTORY.

  • If, when mapping of parameter types between database types and ABAP types, a reference is made for the latter to data types of ABAP Dictionary and such a dictionary type like this is modified, the database procedure proxy cannot be generated automatically. This can cause database inconsistencies. In such a case, the database procedure proxy must be generated again explicitly.

  • ABAP Managed Database Procedures (AMDP) do not need any database procedure proxies and can be used whenever SQLScript procedures are created only for calls from ABAP and the central database of the current AS ABAP is an SAP HANA database. Any SAPScript procedure can be called from AMDP, which means they can replace database procedure proxies (except when a secondary database connection is needed to access an SAP HANA database.

  • It is possible to create database procedure proxies for database procedures managed by AMDP, but this is not a good idea.

Example

The example Database Procedure Call uses a database procedure proxy created in the program to call a database procedure from the SAP HANA database created using ADBC.