Hi Expert,
I was trying to create one simple calculation view using SQL script but getting below error.
/********* Begin Procedure Script ************/
BEGIN
create type var_out1 as table (ebeln varchar(10),menge decimal);
var_out = CE_COLUMN_TABLE ("SAPEH2"."EKKO",[EBELN,AEDAT] );
var_out1 = CE_COLUMN_TABLE ("SAPEH2"."EKPO",[EBELN,MENGE] );
var_out2 - CE_UNION_ALL (:var_out1,:var_out2);
END
/********* End Procedure Script ************/
I thought , i might need to declare a table type for output table var_out1 and var_out2. I tried by declaring table like below couldn't get any success.
create type var_out1 as table (ebeln varchar(10),menge decimal);
create type var_out2 as table (ebeln varchar(10), aedat DATE ,menge decimal);
error:
Message :
Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: CREATE TYPE is not allowed in SQLScript: line 5 col 2 (at pos 277)nSet Schema DDL statement: set schema "SAPEH2"nType DDL: create type "_SYS_BIC"."pkg-sapuser03.test_giri/CA_SALES1/proc/tabletype/VAR_OUT" as table ("EBELN" VARCHAR(10), "AEDAT" DATE, "MENGE" DECIMAL(13,3))nProcedure DDL: create procedure "_SYS_BIC"."pkg-sapuser03.test_giri/CA_SALES1/proc" ( OUT var_out "_SYS_BIC"."pkg-sapuser03.test_giri/CA_SALES1/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ***********/ n BEGIN n n create type var_out1 as table (ebeln varchar(10),menge decimal);n create type var_out2 as table (ebeln varchar(10), aedat DATE ,menge decimal);n n t var_out = CE_COLUMN_TABLE ("SAPEH2"."EKKO",[EBELN,AEDAT] );n t var_out1 = CE_COLUMN_TABLE ("SAPEH2"."EKPO",[EBELN,MENGE] );n t var_out2 - CE_UNION_ALL (:var_out1,:var_out2);nnEND /******** End Procedure Script ************/n
Could you please help me to understand the cause of this?
Thanks,
Girdhari