cancel
Showing results for 
Search instead for 
Did you mean: 

AMDP Error: Invalid function or procedure

Former Member
0 Kudos

Hi,

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.

Rgds

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

horst_keller
Product and Topic Expert
Product and Topic Expert

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?

Former Member
0 Kudos

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 !

Answers (4)

Answers (4)

former_member376893
Discoverer

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.

TRY.
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.
ENDTRY.

Thanks in advance for your help.

munikov
Discoverer
0 Kudos

We are facing the similar issue.

Did you by any chance of having a solution to fix the same?

Regards

VJ

badan
Explorer
0 Kudos

Have you set the Option Read only in AMDP?

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

No. without debugging nothing is there. no error or exception.

Former Member
0 Kudos

Horst,

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.

Rgds

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

Try to debug in ADT.

I don't think that AMDP debugging is supported in SAP GUI debugger. If supported at all ...

Former Member
0 Kudos

im debugging it in both and have shared screenshot as well. Both ADT and GUI taking me to same standard code with same error.

Former Member
0 Kudos

interestingly, when im calling procedure directly from SQL console its giving me correct output. please check screen shot and let me know if any comment.

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

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?