avatar image
Former Member

Convert array values to comma delimited in stored procedure HANA

Hello everyone,

I have one stored procedure below and its giving output in table as OUTTAB.

CALL "BI"."kgm.dtp.blt::Z_BLT_FWD_LOOP_10.05.2017" (:IPBATCH,:IPPLANT,:IPMATERIAL,OUTTAB);

Now i m selecting data from OUTTAB in one more procedure 'Z_BLT_FWD_LOOP_09.05.2017'and getting new list of Materials, batches and Plant and want to pass it to original procedure('Z_BLT_FWD_LOOP_10.05.2017') again to get output.

But issue i am getting here is getting materials batches and plants in table form but i need to convert these table values into NVARCHAR input parameter values so that i can pass into original procedure.

Any pointers?

So below code i have written. (This is mine new procedure 'Z_BLT_FWD_LOOP_09.05.2017)

CALL"BI"."kgm.dtp.blt::Z_BLT_FWD_LOOP_10.05.2017"

(:IPBATCH,:IPPLANT,:IPMATERIAL,OUTTAB);

IPBATCH1 := ARRAY_AGG(:INPUT_NEW.CHARG);

BATCH_LIST = UNNEST(:IPBATCH1) AS ("V_BATCH"); --> How to pass these list of values again to above stored procedure ?

IPPLANT1 := ARRAY_AGG(:INPUT_NEW.WERKS);

PLANT_LIST = UNNEST(:IPPLANT1) AS ("V_PLANT"); --> How to pass these list of values again to above stored procedure ?

IPMATERIAL1 := ARRAY_AGG(:INPUT_NEW.MATNR);

MATERIAL_LIST = UNNEST(:IPMATERIAL1) AS ("V_MATERIAL"); --> How to pass these list of values again to above stored procedure ?

Br
Sumeet

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content