cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with calling a HDB-Procedure from AMDP

joachim_gross
Advisor
Advisor
0 Kudos
1,663

Hi,

i hope someone can help me.

I have created a procedure within HANA-WebIDE:

It is callable by another proc without any problem.

But when I try to call it via my AMDP i get some strange error messages:

Any ideas what these messages want to tell me?

System is on 750SP3  HDB Rel 1.00.112.

TIA

Joachim

Accepted Solutions (1)

Accepted Solutions (1)

kilian_kilger
Employee
Employee
0 Kudos

Hi Joachim,

you have to declare all objects you use inside your AMDP procedure via the USING addition. Please see the ABAP help for AMDP. There are also articles in SCN where you can see "USING" in action:

http://scn.sap.com/docs/DOC-51612

If the objects are in another schema, not managed by the ABAP, then they don't have to be declared. There really is an excellent ABAP help, so no need to ask these questions here ... Just search for "USING" and click on "METHOD ... USING ...".

Best regards,

Kilian.

joachim_gross
Advisor
Advisor
0 Kudos

Hi Kilian,

sorry but as you can see in my snippet i only call another non-amdp-procedure!

  METHOD set_rdl_table BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT.

call "CVPM_CFM::SET_CF_RDL" ( it_wl_key  => :it_wl_key,

                              rt_out     => :lt_out ,

                              rt_key_fig => :lt_key_fig,

                              rt_key     => :lt_key,

                              rt_error   => :lt_error );

  ENDMETHOD.

***

If the objects are in another schema, not managed by the ABAP, then they don't have to be declared. There really is an excellent ABAP help, so no need to ask these questions here ... Just search for "USING" and click on "METHOD ... USING ...".

***

So to take your answer, there is nothing to be declared. So no need to cite the old RTFM.

Let me cite the ABAP Help:

Addition 4  

... USING db_entities  
 

  Effect

Declares the database objects managed by ABAP accessed in the AMDP procedure or function. The following must be specified after USING:

    • All database tables and views from ABAP Dictionary 
    • All procedures and functions managed by AMDP        


Neither is valid in my snippet. So the question is both valid and not answered.



Kind regards;

Joachim


                                                                                                                                                                                                   

joachim_gross
Advisor
Advisor
0 Kudos

HI,

triggered by Kilians answer i investigated in the help in deep and tried something:

create a procedure with name and without any package: "/1BCAMDP/ZCVPM_SET_RDL"  as there is a hint of this namespace in the ABAP Help.

With the exception of the namespace /1BCAMDP/, database objects from the current database schema can be accessed in a database procedure or database function managed by AMDP only if they are managed by ABAP and specified after USING.

et voila: No error messages any more.

The error messages are totally misleading. Only procedures with the mentioned namespace are allowed.

Kind regards;

Joachim

kilian_kilger
Employee
Employee
0 Kudos

Hi Joachim,

this principally has nothing to do with the namespace. This namespace is just some hack for rare uses (mostly SAP internal). You normally have to put the procedure in a different schema (with the exception of the above mentioned hack).

The ABAP believes all objects in the SAPSID schema as being managed by ABAP.

If all objects in the ABAP schema could also be unmanaged, then the check would not make any sense at all. Then we wouldn't need any USING clause at all. But the namespace is a valid option, too.

But, as I said, everything mentioned in the ABAP help :-).


Best regards,
Kilian.

Answers (1)

Answers (1)

thomasgauweiler
Active Participant
0 Kudos

Hi Joachim,

your orginal problem is that the procedure is defined in the HANA repository (the Content folder),

but from AMDP you can only refer to Catalog entities.

Your repository procedure gets deployed into the _SYS_BIC schema. You should be able to call this as _SYS_BIC."CVPM_CFM::SET_CF_RDL"

Regards, Thomas