on 10-25-2016 1:48 PM
There is a document showing how to call an HANA procedure from ABAP.
I'd like to know if we can call an HANA function (UDF) from ABAP ?
Thanks
Hi Marc,
ideally, in this case, you would not implement your UDF directly in HANA but rather implement an ABAP managed CDS Table Function. ABAP CDS Table Functions are available since SAP NetWeaver AS ABAP 7.50. You can find more details here. The advantage of using CDS Table Functions is that they are optimally integrated into the ABAP lifecycle management and the ABAP runtime.
If you need to call an existing UDF and don't want to migrate it to an ABAP CDS Table Function, then I would still suggest to wrap the UDF with an ABAP CDS Table Function or ABAP Managed Database Procedure (see here). You will still have to sychronise the lifecycle of the UDF (HANA managed) and CDS Table Function (ABAP managed) yourself, but with this wrapper you won't have to implement native SQL, e.g. ADBC, in your ABAP programs to call the UDF. ABAP CDS Table Functions can be used in OPEN SQL statements and also be called in the SQL Script of ABAP managed AMDPs. AMDPs can be called as ABAP methods in ABAP programs.
Kind regards
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Christian. Would you recommend the same approach wih a scalar HANA function returning a single value ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.