Skip to Content
Former Member
Mar 08, 2013 at 12:17 AM

Date truncate function?


So I have a fact table that has a date field (datatype: TIMESTAMP and it looks like this 2012-09-03 01:00:00.0. I want to create a calculated column where i truncate the timestamp portion of this.I defined a function like this: TRUNC("PROMISE_DATE",'YYYY')

But when trying to validate, get an error like this:

  • testpkg.TEST_AV2: ABAP name validity successful
  • Server side validation
    • Activation Id:278
      • 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:Create Scenario: failed aCalcEngine.createScenario(): The following errors occured: Inconsistent calculation model (34011)nDetails (Errors):n- CalculationNode (finalAggregation) ->
          attributes ->
          calculatedAttribute (PROMISE_DATE_TRUNC) ->
          expression: Attribute 'trunc' is missing in node finalAggregation.nnnprinting XML <?xml version="1.0" encoding="utf-8"?>
          <cubeSchema version="3" operation="createCalculationScenario">
          <calculationScenario name="testpkg/TEST_AV2" schema="_SYS_BIC">
          <olapDataSource name="dataSource" schema="_SYS_BIC" view="testpkg/TEST_AV2/olap">