cancel
Showing results for 
Search instead for 
Did you mean: 

Convert array values to comma delimited in stored procedure HANA

former_member226419
Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (0)