cancel
Showing results for 
Search instead for 
Did you mean: 

How to create AMDP's for sub stored procedures

0 Kudos

Hi,

I am migrating Hana data base procedure to AMDP.

I have HANA DP like below.

procedure1.

   call procedure 2.

endof procedure1.

how to create AMDP in this case, i have created AMDP methods for both procedure1 and procedure2 but when i am calling AMDP of stored procedure2 in AMDP of stored procedure1  it's giving sqlscript syntax error since call method is an abap statement.

can any one help me how to achieve this.

Thanks

Viswamurthy

View Entire Topic
sundaresan_k
Explorer
0 Kudos

Dear Viswamurthy,

You cannot use  CALL METHOD statements inside an AMDP Method as AMDP methods would not understand ABAP syntax.

You need to use SQLScript CALL statements to call an AMDP method from an other AMDP method like below

METHOD increase_price BY DATABASE PROCEDURE

                      FOR HDB LANGUAGE SQLSCRIPT

                      USING cl_demo_amdp_call_amdp=>increase_price_amdp.

  call "CL_DEMO_AMDP_CALL_AMDP=>INCREASE_PRICE_AMDP"(

    CLNT => :CLNT, INCPRICE => :INCPRICE );

ENDMETHOD.



You can find an example in the below link

ABAP Keyword Documentation

Hope this helps.

Thanks

Sundar

0 Kudos

Hi Sundar,

Thanks for the solution provided.

It worked for me.

Thanks & regards,

Viswamurthy