cancel
Showing results for 
Search instead for 
Did you mean: 

stored procedure in HANA

raghavendra_k1
Explorer
0 Kudos

Can anybody solve this stored procedure ? I AM GETTING ERROR 😞 CREATE  PROCEDURE SP_TABLE_NAMES_BOFC_TO_CCR_BW_AC_USD_CF(OUT RETURNVAL NVARCHAR(50), Category NVARCHAR(255), DataEntryPeriod NVARCHAR(255), scope NVARCHAR(25), GV_VARIANT NVARCHAR(255), Currency NVARCHAR(10)) LANGUAGE SQLSCRIPT   AS   Table_Names nvarchar(255);   Category :=  'AC-USD';   DataEntryPeriod := '2011.12';   GV_VARIANT := 'ARE-ORIGINAL';   Scope := 'KO';   Currency := 'USD'; BEGIN  SELECT COALESCE(:Table_Names || +',\', '\') || 'ct_co\' || RIGHT('0000\' || CAST("id" AS varchar(4)), 4) INTO Table_Names FROM "BFC"."ct_coref" WHERE phase := (SELECT id FROM "BFC"."ct_phase" WHERE name := :Category)                 AND updper := (CAST(LEFT(:DataEntryPeriod, 4) AS integer) - 1900) * 262144 + (CAST(RIGHT(:DataEntryPeriod, 2) AS integer) * 8192)                 AND scope := (SELECT id FROM "BFC"."ct_scope_code" WHERE name := :Scope)                 AND variant IN (SELECT id FROM "BFC"."ct_variant" WHERE name := :GV_VARIANT)                 AND curncy = (SELECT id FROM "BFC"."ct_curncy" WHERE name := :Currency);                 RETURNVAL := (:Table_Names); END;

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member226419
Contributor
0 Kudos

What are you trying to do here?  Please share your code

lbreddemann
Active Contributor
0 Kudos

Sorry, but what is anyone supposed to do here?

We don't know the error you get, nor the SAP HANA revision you're using let alone what this procedure should do.

Please prepare the question properly and share your findings.

- Lars

raghavendra_k1
Explorer
0 Kudos

OK