on 2012 Nov 19 7:24 PM
Hi All,
I'm having issues in below script based calculation view query when i try to retrieve Private Attritutes and Measures from Analytical view
If you look at the Below KUNNR and Matnr are coming from the attribute view with in the analytical view and net revenue is the calculated measure of the analytical view
VV010 is the MEASURE of the analytical view - If i remove that than i activate the script but if i don't i get the below message
/********* Begin Procedure Script ************/
BEGIN
var_tab = ce_olap_view("_SYS_BIC"."student99/CEA1_99",[KUNNR, MATNR, NETREVENUE]);
var_out =
--CE_PROJECTION(:var_tab, [KUNNR, MATNR, NETREVENUE, CE_CALC('midstr( "TEST", 2, 5)', string) ]);
--CE_PROJECTION( :var_tab, ["KUNNR", "MATNR", "NETREVENUE", CE_CALC('midstr("MATNR",2,5)', NVARCHAR(10) as "TEST") ]);
CE_PROJECTION( :var_tab
, ["KUNNR"
, "MATNR"
, "NETREVENUE"
, "VV010"
, CE_CALC('midstr("KUNNR",2,5)', NVARCHAR(10)) as "TEST" ]);
--out = CE_PROJECTION( :proj_tab, ["A", "B", "C", CE_CALC('midstr( "D" , 2, 5)', string) ]);
END /********* End Procedure Script ************/
<info>Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: transaction rolled back by an internal error: Attribute not found in column table: VV010: line 13 col 17 (at pos 692) (ptime/query/checker/proc_check_cefunc.cc:511) nSet Schema DDL statement: set schema "ECC6"nType DDL: create type "_SYS_BIC"."student999/CVS_52/proc/tabletype/VAR_OUT" as table ("KUNNR" NVARCHAR(10), "MATNR" NVARCHAR(18), "NETREVENUE" DECIMAL(15,0), "VV010" DECIMAL(15,2), "TEST" NVARCHAR(10))nProcedure DDL: create procedure "_SYS_BIC"."student999/CVS_52/proc" ( OUT var_out "_SYS_BIC"."student999/CVS_52/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ************/ n BEGIN n nvar_tab = ce_olap_view("_SYS_BIC"."student99/CEA1_99",[KUNNR, MATNR, NETREVENUE]); n var_out = n--CE_PROJECTION(:var_tab, [KUNNR, MATNR, NETREVENUE, CE_CALC('midstr( "TEST", 2, 5)', string) ]);n--CE_PROJECTION( :var_tab, ["KUNNR", "MATNR", "NETREVENUE", CE_CALC('midstr("MATNR",2,5)', NVARCHAR(10) as "TEST") ]);nCE_PROJECTION( :var_tabn , ["KUNNR"n , "MATNR"n , "NETREVENUE"n , "VV010"n , CE_CALC('midstr("KUNNR",2,5)', NVARCHAR(10)) as "TEST" ]);n--out = CE_PROJECTION( :proj_tab, ["A", "B", "C", CE_CALC('midstr( "D" , 2, 5)', string) ]);nEND /********* End Procedure Script ************/nVersion: 71n</info>
Hi,
I have a similar Scenario; DIFF_IN_DAYS is a calculated column in AT_DSO_BSID. I am using Capital Letters everywhere but still I am getting the error "
Message :
Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: transaction rolled back by an internal error: Attribute not found in column table: DIFF_IN_DAYS: line 8 col 14 (at pos 648)nSet Schema"
My Query is;
/********* Begin Procedure Script ************/
BEGIN
IT_SELECT = CE_JOIN_VIEW("_SYS_BIC"."ZHANA_BSOH.Model.WorkingCapital.DSO/AT_DSO_BSID",["BUKRS","GJAHR", "MONAT","DMBTR","DIFF_IN_DAYS"]);
IT_FILTER = CE_PROJECTION(:IT_SELECT,["BUKRS","GJAHR","MONAT","DMBTR",
CE_CALC('"DIFF_IN_DAYS" - :IN_DSO_DAYS'
,integer) AS "CALC_DIFF_DAYS"],
'"BUKRS"= :IN_BUKRS AND "GJAHR" = :IN_FISCAL_YEAR AND "MONAT" <= :IN_FROM_PERIOD AND "MONAT" >= :IN_TO_PERIOD');
IT_FINAL = CE_PROJECTION(:IT_FILTER,["BUKRS",CE_CALC('if("CALC_DIFF_DAYS" >= 0 AND "CALC_DIFF_DAYS" <= 30,"0-30d",if("CALC_DIFF_DAYS" >= 31 AND "CALC_DIFF_DAYS" <= 60,"31-60d",if("CALC_DIFF_DAYS" >= 61 AND "CALC_DIFF_DAYS" <= 90,"61-90d",if("CALC_DIFF_DAYS" >= 91 AND "CALC_DIFF_DAYS" <= 120,"91-120d","Not Due"))))',NVARCHAR(8)) AS "PERIOD", "DMBTR"]);
IT_AGG = CE_AGGREGATION(:IT_FINAL,[SUM("DMBTR") AS "DMBTR"],["BUKRS","PERIOD"]);
VAR_OUT = CE_PROJECTION(:IT_AGG,["BUKRS", "PERIOD", "DMBTR"]);
END /********* End Procedure Script ************/
Please suggest.
Regards, Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
11 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.