Skip to Content
0
Former Member
Mar 24, 2013 at 10:33 PM

Script based calc view throws feature not supported error

48 Views

Hi,

Here's the script.

SQLA_VIEW= CE_OLAP_VIEW

("_SYS_BIC"."e2sc-hana/AV_ORDERS_PROM",

[

"SUPPLIER_NAME","ITEM_NAME","ITEM_DESCRIPTION","CUST_SITE_NAME",

"PO_NUMBER", "PO_CREATION_DATE", "UNIT_PRICE", "PO_LINE_ITEM_ID",

AVG("CYCLE_TIME") AS "AVG_CYCLE_TIME"

]

);

var_out = CE_PROJECTION(:SQLA_VIEW, ["ITEM_NAME","AVG_CYCLE_TIME"]);

Basic I have a calculated column defined called CYCLE_TIME in the Analytic view (AV_ORDERS_PROM) that does this: daysbetween("PO_CREATION_DATE","DATETIMESTAMP")

Once this is computed at an order/line/schedule level, I want to compute the average in the calc view.

I tried SUM("CYCLE_TIME") / COUNT("CYCLE_TIME") and somehow the / operator was not liked by the engine.

Then I tried AVG function as above and it throws the following error:

Repository: Activation failed for at least one object;At least one runtime reported an error during activation. Please see CheckResults for details

  • Activation is performed with activation mode Cascade one-phase.
  • 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: feature not supportednSet Schema DDL statement: set schema "E2SC_HANA"nType DDL: create type "_SYS_BIC"."e2sc-hana/CV_OCT3/proc/tabletype/VAR_OUT" as table ("ITEM_NAME" VARCHAR(64), "AVG_CYCLE_TIME" DOUBLE)nProcedure DDL: create procedure "_SYS_BIC"."e2sc-hana/CV_OCT3/proc" ( OUT var_out "_SYS_BIC"."e2sc-hana/CV_OCT3/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ************/ n BEGIN nnSQLA_VIEW= CE_OLAP_VIEW n("_SYS_BIC"."e2sc-hana/AV_ORDERS_PROM", n[n"SUPPLIER_NAME","ITEM_NAME","ITEM_DESCRIPTION","CUST_SITE_NAME",n"PO_NUMBER", "PO_CREATION_DATE", "UNIT_PRICE", "PO_LINE_ITEM_ID", n AVG("CYCLE_TIME") AS "AVG_CYCLE_TIME"n]n);nn--var_out = CE_PROJECTION(:SQLA_VIEW, ["SUPPLIER_NAME","ITEM_NAME","CUST_SITE_NAME","AVG_CYCLE_TIME"]);nvar_out = CE_PROJECTION(:SQLA_VIEW, ["ITEM_NAME","AVG_CYCLE_TIME"]);nnnEND /********* End Procedure Script ************/nVersion: 77n