SAP Knowledge Base Article - Public

3396583 - Error using ADD_WORKDAYS or WORKDAYS_BETWEEN function in Datasphere

Symptom

When ADD_WORKDAYS or WORKDAYS_BETWEEN function in used within an underlying view to the Analytic Model, one of the following error occurs during the preview: 

  • "The query executed with errors. Caught exception : exception 70002048: column store error: exception 334060: Could not read working days information from TFACS table "SPACE#XXX"."TFACS" - invalid table name: Could not find table/view TFACS in schema [....]"
  • "The query executed with errors. Caught exception : exception 70002048: column store error: exception 334060: Could not read working days information from TFACS table "SPACE"."TFACS" - insufficient privilege: Detailed info for this error can be found with guid 'xxxx' at Authorization/insuffPriv/impl/InsufficientPrivilegeThrow.cpp:343" 

Environment

SAP Datasphere

Resolution

Wrap the table TFACS in a view and mark this view as exposed for consumption.

Important considerations:

  • Ensure that the table being used as source inside the view is named TFACS
  • Ensure to rename the columns of the view to match the technical names of the TFACS table in the source system
  • Ensure you add a suffix to the name of the view. Eg: TFACS_ABC

Reference this view in your corresponding calculation. You can see the available parameters in help pages:

ADD_WORKDAYS: ADD_WORKDAYS Function (Datetime)

WORKDAYS_BETWEEN: WORKDAYS_BETWEEN Function (Datetime)

When referencing the view in the calculation, ensure to include the <schema> (that is, the space) and the <suffix> of the view.

Example, if the view is in space TEST and the view is named TFACS_ABC: 
ADD_WORKDAYS('01', '2014-01-09', 1, 'TEST', '_ABC'

By including the <schema> and the <suffix> parameters, you ensure that the calculation uses the view exposed for consumption, and not the original TFACS table

See Also

Preliminary Currency Conversion in SAP Data Warehouse Cloud

Keywords

dwc, WORKDAYS_BETWEEN, priviledge  , KBA , DS-MD , Modeling (Data Builder) , Problem

Product

SAP Datasphere all versions