Skip to Content
0
Former Member
Nov 23, 2011 at 12:49 AM

Analytic View activation fails because of a Calculated Measure

233 Views

I'm working with HANA SPS02 here.

Step 1

I have an Analytic View where I have CALDAY among Private Attributes and VALUE in Measures. I add an Attribute View with UCALDAY (whatever it means) and implement a new calculated measure CALCVAL with logic as follows: if( (date("CALDAY") <= date("ATV_SEL_UCALDAY")), "VALUE", 0). It works fine.

Step 2

I added another Attribute View where the key attribute is its own CALDAY field, making a join by that field. Activated the Analytic View failed with the error log as follows:

Error preparing and executing OLAP column view DDL: SAP DBTech JDBC: [2048] (at 15): column store error: <?xml version="1.0" encoding="utf-8"?><createCubeResult version="1.0"><status><message>The scenario XML is not valid</message><errorCode>2112</errorCode></status><details><errors><detail><element>CalculationNode (finalAggregation) -> attributes -> calculatedAttribute (CALCVAL) -> expression</element><code>46</code><message>Attribute 'CALDAY' is missing in node finalAggregation</message></detail></errors><warnings><detail><element>cubeSchema</element><code>46</code><message>Default language not set. Use 'en'</message></detail></warnings></details></createCubeResult>
 Exception: class com.sap.db.jdbc.exceptions.JDBCDriverException
com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:284)
com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:149)
com.sap.db.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:98)
com.sap.db.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.java:1124)
com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:774)
com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:639)
com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:433)
com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:309)
com.sap.db.jdbc.trace.PreparedStatement.execute(PreparedStatement.java:153)
com.sap.ndb.studio.sdk.resource.deployment.bi.DeploymentExecutor.getAndExecuteActivationDDl(Unknown Source)
com.sap.ndb.studio.bi.deployment.DeploymentJob.activateObjects(Unknown Source)
com.sap.ndb.studio.bi.deployment.DeploymentJob.run(Unknown Source)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Step 3

If I delete that CALCVAR measure, Analytic View can be activated just fine.

No hints in OSS Notes so far. Any ideas what went wrong?