cancel
Showing results for 
Search instead for 
Did you mean: 

Call Store Procedure with Date parameters - SAP HANA SPS122.05

0 Kudos

Hello Everyone

I have the following stored procedure, which requests as input data a start date and an end date:

ALTER PROCEDURE OBRACURSOCOMPARATIVAFECHAS ( in FECHAINI NVARCHAR(10), in FECHAFIN NVARCHAR(10), in AREANEG NVARCHAR(6)

In Hana Studio, Its work correctly:

CALL "SBOMOINSA"."OBRACURSOCOMPARATIVAFECHAS" ('20150101','20150101','15010');

however, when I want to run it from the Query Manager, I do not get any results, nor does it cover an error message

/*SELECT * FROM ORDR T0 LEFT JOIN OPRJ T1 ON T0."Project" = T1."PrjCode" WHERE T0."DocDate" >= '[%0]' AND T0."DocDate" <='[%1]' AND T1."U_SEI_CeCoDim2" = '[%2]'*/ CALL "SBONOMBREBD"."INFORMEFECHAS" ( TO_ALPHANUM(CONCAT(CONCAT(LEFT(TO_ALPHANUM('[%0]'),4),SUBSTRING(TO_ALPHANUM('[%0]'),6,2)), SUBSTRING(TO_ALPHANUM('[%0]'),9,2))), TO_ALPHANUM(CONCAT(CONCAT(LEFT(TO_ALPHANUM('[%1]'),4),SUBSTRING(TO_ALPHANUM([%1]),6,2)), SUBSTRING(TO_ALPHANUM([%1]),9,2))), '[%2]');

What is the correct way to execute a Stored procedure from the Query Manager, which has as input parameters a range of dates?

Thanks

Accepted Solutions (0)

Answers (0)