Skip to Content
0

How to Call a HANA user Defined Function from ABAP

Oct 25, 2016 at 12:48 PM

562

avatar image
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member
Oct 25, 2016 at 02:36 PM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Marc DANIAU
Oct 27, 2016 at 08:47 AM
0

Thanks Christian. Would you recommend the same approach wih a scalar HANA function returning a single value ?

Share
10 |10000 characters needed characters left characters exceeded
Marc DANIAU
Nov 10, 2016 at 03:21 PM
0

Thanks so much.

Share
10 |10000 characters needed characters left characters exceeded