Ansicht
Dokumentation

ABENDATABASE_PROCEDURE_PROXY - DATABASE PROCEDURE PROXY

ABENDATABASE_PROCEDURE_PROXY - DATABASE PROCEDURE PROXY

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

Database Procedure Proxy

For each standalone SQLScript procedure in the SAP HANA database, database procedure proxies can be created as repository objects in the 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:

  • Using an API in the database procedure proxy library. This makes it possible to create and delete database procedure proxies for SQLScript procedures from any database schemas. The API 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 following table lists the currently supported HANA-specific data types and indicates which ABAP Dictionary types they are mapped to by default.

The default mapping can be overwritten, but this can also modify the parameter names. A database procedure interface is generated for each database procedure proxy. Appropriate ABAP types are declared in this interface.

Notes

  • More specifically, database procedure proxies can be created for SAP HANA XSC SQLScript procedures in the SAP HANA Repository. No database procedure proxies can be used, on the other hand, for SQLScript procedures in SAP HANA XSA. Alternative methods such as AMDP or ADBC must be used instead.
  • In exceptional cases, the API of the database procedure proxy library can be used to access SQLScript procedures that are not managed in the SAP HANA Repository. The interfaces and classes from the database procedure proxy library are documented in the Class Builder. They are accessed most easily from the factory class CL_DBPROC_PROXY_FACTORY.
  • If, when mapping parameter types between database types and ABAP types, a reference is made for the latter to data types of the ABAP Dictionary and such a dictionary type is modified at a later time, the database procedure proxy cannot be generated automatically. This can cause database inconsistencies. In cases like this, the database procedure proxy must be regenerated 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 standard database of the current AS ABAP is an SAP HANA database. Any SQLScript procedure can be called from AMDP, which means they can replace database procedure proxies, except when a secondary 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.

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






ABAP Short Reference   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 5879 Date: 20240425 Time: 071611     sap01-206 ( 95 ms )