Search code examples
stored-proceduresabaphana-sql-scriptamdp

Calling SP throws "ABAP objects and DDIC objects must be declared in the METHOD statement"


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?


Solution

  • Call the runtime artifact instead:

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