Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2800

Calculation View with Script - Validation Error

$
0
0

Dear All,

 

I am a starter with the Calculation views based on script.

In the projection, I want to introduce a calculated column 'PTYPE' with a constant value 'MTD'.

But I am getting an error during the validation.


The CV columns also contains this 'PTYPE' with same data type.


Any hint is well appreciated.

 

CV Script

 

 

BEGIN

  

  

SQL_MTD_A = CE_OLAP_VIEW ( "_SYS_BIC"."system-local.bw.bw2hana/Q_SC2S_1" , [ "0FISCPER", "PLANT", "D_QI", "UNIT", "COSTCTR", "SEG", "SUB", "KPI_VAL1", "KPI_VAL2"] );

 

/* MTD data */ 

  

SQL_MTD = CE_PROJECTION (:SQL_MTD_A, [ "0FISCPER", "PLANT", "D_QI", "UNIT", "COSTCTR", "SEG", "SUBSEG", CE_CALC('MTD', VARCHAR(3) ) AS "PTYPE", "KPI_VAL1" AS "VALUE"], ' "SEG" = ''7'' AND "SUB" = ''7700'' ');

  

 

var_out = CE_PROJECTION ( :SQL_MTD);

 

 

END

 

 

Validation Error

 

- calculationNode (SQL_MTD) -> attributes -> attribute (PTYPE) -> expression: Attribute 'mtd' is missing in node SQL_MTD.

 

 

Thanks,

Srini


Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>