Skip to Content

AMDP Error: Invalid function or procedure


i have this AMDP class which is activated and have no issue at all.

However while debugging i'm noticing an error as shown below.

Even though i can see activated class method in SE24 but it is giving this error. Could anybody please let me know reason for this.


hana02.jpg (95.5 kB)
hana01.jpg (156.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • i did as below and it worked:

    i) for each of my AMDP method there are two version in schema (SAP<sysid>). one is <method_name> and another one is <method_name#timestamp>. i believe this timestamp is nothing but time of last activation.

    ii) i was calling <method_name> from my report program but it did not work.

    iii) for once i call <method_name#timestamp> directly from SQL console. it worked.

    iv) lastly i called <method_name> from my report program. now its working here as well.

    what i concluded here is that last activated version should be called at least once before calling it in report (i have read same in standard document also). Of course what i did is not a proper way of doing this so please let me know your comments.

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Posted on Mar 09, 2017 at 07:06 AM

    This is not an "error" and it shouldn't concern you.

    The method PARSE_HDB_MSG_FOR_STACK is part of the AMDP-framework. It should only be reached during the first call of an AMDP-method when the DB objects generated by the AMDP-framework are not yet available.

    After the first succesful call you shouldn't reach that method in the debugger any more. Do you?

    Add comment
    10|10000 characters needed characters exceeded

    • Absolutely correct ! but it never returned any data to me as well. however as i mentioned above when i executed it (<Method#Timestamp>) from console once and after that it started giving me data even from report pgm as well.

      Thanks for your comment !

  • Posted on Mar 07, 2017 at 06:31 PM

    What are you debugging and after which actions? The question is rather: Can you call your method and if not, what is the exception? Are you running at HANA as standard database?

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 08, 2017 at 10:27 AM


    i) i put a break point in procedure in ABAP perspective and running it as 'ABAP application'. i debugged it from my report program as well wherein im calling this method.

    ii) yes, i can see method is getting called but it is not taking me inside the method. From the first line (METHOD GET_MATERIAL BY DATABASE PROCEDURE FOR HDB...) it is taking me to some standard code and there it is giving me error as i mentioned initially.

    iii) yes, im on AS ABAP 750 with HDB as primary.


    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 08, 2017 at 04:57 PM

    What happens if you call your method without debugging? Is there an exception? Which?

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 13, 2019 at 12:16 PM

    Hi guys I know it's been a while since you had this issue but I'm getting the same one.

    I'm running an AMDP that executes a simple SQL statement and I get following error:

    An error occurred when the database procedure ZBAA_CL_AMDP_EXEC=>LQ_BACKWARDS_INTERFACE was called. It is possible that ZBAA_CL_AMDP_EXEC=>LQ_BACKWARDS_INTERFACE was called by another database procedure.

    invalid data source name: "SAPHANADB"."ZBAA_CL_AMDP_EXEC=>LQ_BACKWARDS_INTERFACE#stb2#20190811131033":
    line 9 col 3 (at pos 228): "SAPHANADB"."ZBAA_CL_AMDP_EXEC=>LQ_BACKWARDS_INTERFACE": line 18 col 1 (at pos 612): Invalid DataSource

    If I create a break point in eclipse and run it, it works. After doing that I can re run as many times I want and always works until a few days later it stops working again (I guess now due to your thread that might be when a new version of the method is transported).

    Is there a way to avoid this? it's kind of anoying and I don't see the same problems in standard so maybe I'm missing something before calling the AMDP.

    This is abap code.

    DATA: lr_exc TYPE REF TO cx_amdp_execution_failed,
    lv_msg TYPE string.

    zbaa_cl_amdp_exec=>lq_backwards_interface( EXPORTING inclient = sy-mandt
    indate = p_date ).
    CATCH cx_amdp_execution_failed INTO lr_exc.
    lv_msg = lr_exc->get_longtext( ).WRITE: / lv_msg.

    Thanks in advance for your help.

    Add comment
    10|10000 characters needed characters exceeded