2

I created a stored procedure in HANA and tried to call it through AMDP class.

SP as below;

PROCEDURE "SAPABAP1"."ATU.SF::TESTSPCALL" ( ) 
    LANGUAGE SQLSCRIPT
    SQL SECURITY INVOKER 
    READS SQL DATA AS
BEGIN
  SELECT 1 FROM DUMMY;
END;

AMDP Class:

CLASS /ATU/SF_CL_DAILY_MOD_RPT IMPLEMENTATION.   
  METHOD CALL_DAILY_MOD_RPT_SP by database procedure for hdb language sqlscript.
    CALL "SAPABAP1"."ATU.SF::TESTSPCALL" ( );
  ENDMETHOD.
ENDCLASS.

However, I cannot activate the above class as I am getting below error.

"ATU.SF::TESTSPCALL" is unknown. ABAP objects and DDIC objects must be declared in the METHOD statement. Local names must start with ":" here

Any idea?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Dumi
  • 1,414
  • 4
  • 21
  • 41
  • 1
    Just to say, there are many answers in [SAP Community](https://answers.sap.com/index.html) talking about `USING`. Did you try? – Sandra Rossi Jun 28 '19 at 06:32

1 Answers1

3

Call the runtime artifact instead:

"_SYS_BIC"."ATU.SF::TESTSPCALL"( );

Florian
  • 4,821
  • 2
  • 19
  • 44
  • I created the SP in "_SYS_BIC" Schema and it worked !! Thank you – Dumi Jul 03 '19 at 03:23
  • I think you don't even need to. Some of SAP HANA's artifacts are not used directly but "compiled" into runtime artifacts that are stored under the same path and name but in the different default schema `_SYS_BIC`. Creating the stored procedure in `SAPABAP1` should still produce an artifact with the same name under `_SYS_BIC`. – Florian Jul 03 '19 at 05:49