Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calling parameterized Cal View, from HANA Stored Procedure

Hi All

I have a requirement to call a parameterized view from a Stored Procedure. This is the first time that, I am writing a stored procedure.

Hence need your help, to get me the syntax.

This was my sql script (before converting the view to parameterized)

OUT_TT_INVENTORY = SELECT "Material" as "material", "Location" as "location", "InventoryCategory" as "inventoryCategory",

  "Value" as "value" FROM "_SYS_BIC"."getInventory" p, :IN_MATERIAL m, :IN_LOCATION l

  WHERE LOWER(p."Material") = LOWER(LPAD(m."paramValue", 18, 0)) AND LOWER(p."Location") = LOWER(LPAD(l."paramValue", 10, '0'))

  ORDER BY "material", "location", "inventoryCategory";

Can someone suggest me how to modify this SQL script? (to include PLACEHOLDER for getInventory view, in the above script)

I am on SPS10

Thanks for your replies

Regards

Giri

Tags:
replied

i have used this statement.

SELECT "Material", "Location", 'Available' as "Category", "AvailableVal" as "value"

  FROM  "_SYS_BIC"."Sandbox..v5/getIntegrationCalc"

  (PLACEHOLDER."$$i_matnr$$"  => :v_MTRLS_STRING, PLACEHOLDER."$$i_location$$" => :v_LOCS_STRING, PLACEHOLDER."$$i_usr$$" => :v_USR);

And used some StringAGG function to build the exact string to pass onto Place Holder params

Regards

Giri

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question