Skip to Content

AMDP OR ADBC?

Hi Experts,

Our project need to call run-time decided hana stored procedure.

I have two choice, using ADBC or AMDP.

Which one is better on performance measure? And which one is better for dynamic programming?


Can anyone please share some lights on it? Thanks a lot:).

Add comment
10|10000 characters needed characters exceeded

  • The topic description is ambiguous. Some clarification here. We are building finance consolidation product for global company consolidate their finance data from sub companies.

    For run-time performance's purpose, we want to push logic to HANA. And we need user input to determine the business logic run at run-time. So we want generate AMDP/Pure Procedure, the generate of amdp/procedure is not necessary for comparing, they are both quick.

    The topic is regarding using AMDP/ADBC to call the procedure, focusing on below two points:

    1. Dynamic programming

    2. Performance on calling the procedure

  • Get RSS Feed

6 Answers

  • Best Answer
    Mar 23, 2017 at 12:28 PM

    Which one is better on performance measure?

    There shouldn't be a a difference. Both execute the SQLScript of the DB procedure. Only when an AMDP method is called the first time, the framework has to do some setup work.

    And which one is better for dynamic programming?

    • ADBC is purely dynamic Native SQL. You pass arbitrary SQL statements as strings to ADBC objects.
    • AMDP wraps DB procedure calls in ABAP Objects classes. The classes and with it their procedure implementations are defined at compile time. For object instantiation and calling AMDP methods you have the same dynamic possiblities as for normal classes.
    Add comment
    10|10000 characters needed characters exceeded

    • "because I learned from my colleague that we cannot call CDS view with input parameter(table function in hana) inside a AMDP"

      That would be new to me. Inside an AMDP you are in Native SQLScript as in an ADBC generated procedure. You can call anything you want as long it follows the AMDP rules for the usage of objects of DB schemas.

  • Mar 24, 2017 at 07:02 AM

    I use AMDP in most cases. However, I've not worked out how to get the implicit results from a call to a stored procedure using these, so for that I use ADBC. (See here for what I mean https://answers.sap.com/questions/51380/index.html ).

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Matthew,

      I just got what you mean:). This is a good share on how to get implicit result. Although we don't have this kind of case, but thanks for sharing.

  • Mar 23, 2017 at 11:31 AM
    -2

    Hi Steve,

    I think you're want to compare using DB procedure with AMDP, since ADBC is only the DB connectivity way.

    I think there is no much performance difference between DB procedure and AMDP if you're trying to use SQL script in AMDP.

    while, in AMDP you have chance to use other language,e.g. R lang. which might be better from performance side.

    and furthermore, using AMDP, you will really benefit from lifecycle and calling AMDP in ABAP. because AMDP could be easily consumed by ABAP similar as Class, and the transport is in the same way as ABAP objects.

    with latest Netweaver, you could even possible directly debug in AMDP procedure directly, which might be amazing feature.

    However, AMDP has to be on HANA up to now. if it's not HANA, then you have to got normal DB procedure.

    Best Regards,
    Sean

    Add comment
    10|10000 characters needed characters exceeded

    • Just to mention it, R is not supported by AMDP.

      AMDP supports L for SAP internal usage but not R.

  • avatar image
    Former Member
    Mar 26, 2017 at 05:35 AM
    -2

    Hi steve, The simple answer for your query is that...Use AMDP rather than ADBC.

    Performance would depend on the work you are doing inside the AMDP.

    "Actually the exact thing I am doing here is build an API for our team member to deaI with HANA stored procedure. They can use the API to create/drop/call procedures/table types." - Please elaborate the task you are up to

    The API would create/drop PROCEDURES ?? I did not get that...:)

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 24, 2017 at 07:16 PM

    Hi Steve,

    More to say which one is better on performance measure or which one is better for dynamic programming, i think, you need to decide based on your experience(working with AMDP or ADBC), because in project you will find scenarios complicated, if you don´t has clear the concepts probably, you will have several issues.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 25, 2017 at 07:58 PM

    AMDP because of syntax checks and auto-completion :)

    Kr,

    Wouter

    Add comment
    10|10000 characters needed characters exceeded