cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax Error or missing attribute- on CE function

former_member196080
Participant
0 Kudos

Hi Guys,

I'm trying to create Calc view via CE function and written a code for the same below.

Not sure why I'm getting syntax error or attribute error:-

ot_products = CE_COLUMN_TABLE("SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::products", ["ProductId","Category","NameId"] );

ot_purchaseorderitem = CE_COLUMN_TABLE("SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::purchaseOrderItem", ["ProductId","GrossAmount","Quantity","Currency"] );

ot_purchaseorderitem1 = CE_PROJECTION(:ot_purchaseorderitem, ["ProductId","GrossAmount","Quantity","Currency" AS "crcy"] );

var_out = CE_JOIN (:ot_products,:ot_purchaseorderitem1,["ProductId"], ["ProductId","Category","NameId","GrossAmount","Quantity","Currency"] );

error I'm getting:-

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: Currency: line 11 col 129 (at pos 824)nSet Schema DDL

Pls help

Thx

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rubane,

Try as below. I think it will work ,with out errors.(remove  "crcy" in your script).

ot_purchaseorderitem1 = CE_PROJECTION(:ot_purchaseorderitem, ["ProductId","GrossAmount","Quantity","Currency"  );


Thanks

Basha

former_member196080
Participant
0 Kudos

Hi Basha,

I removed but I'm still getting error below,pls see

ot_products = CE_COLUMN_TABLE("SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::products", ["ProductId","Category","NameId"] );

ot_purchaseorderitem = CE_COLUMN_TABLE("SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::purchaseOrderItem", ["ProductId","GrossAmount","Quantity","Currency"] );

ot_purchaseorderitem1 = CE_PROJECTION(:ot_purchaseorderitem, ["ProductId","GrossAmount","Quantity", "Currency"]);

var_out = CE_JOIN (:ot_products,:ot_purchaseorderitem1,["ProductId"], ["ProductId","Category","NameId","GrossAmount","Quantity","Currency"] );

however error has been changed, also if I don't need to change the name then I don't need projection function.

erro log:-

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: return type mismatch: Attribute name "Currency"  different from Attribute name: "GrossAmount" : line 11 col 1
Former Member
0 Kudos

Hi Rubane,

If you want to change name of the currency , give same name in both the places(projection &var_out).

"Currency" as "crcy".

2.Please check the  data types of currency and Gross amount(check once again in table)

3.if you get a chance, attach screen shot 


Thanks

Basha


former_member196080
Participant
0 Kudos

Thx Basha,

I solved this actually I was not following the sequence ,but thx for your help though.

Answers (0)