SAP Knowledge Base Article - Public

2968595 - How to reference a field from a data source containing a parameter in the calculated field?


In the app Custom CDS Views:

  • For the calculated field in a custom CDS view, in the calculation expression, you want to know how to reference a field from an associated data source containing a parameter.
  • You are getting error message: The entity <associated data source> requires parameter <parameter>


S/4HANA Cloud


If associated data source has parameters, the parameter values can (have to be) be specified. If the you add fields of associated data source via the element selection dialog, the maintained parameter values are taken into consideration.

In case of calculated fields where you enter an expression, parameter values need to be entered manually. The parameter values maintained for the association are not taken into consideration. (In the future releases we will add them automatically for the calculated field.)


For now, the value of the parameter needs to be specified manually. If you want to refer to a field of one associated data source which contains parameter, the syntax looks like this:

<associated data source>(<parameter>: <value>).<field>

Some examples:

When the parameter's value type is Session variable and value is System Date: YY1_ABC_DEF(Date: $session.system_date ).GHI

When the parameter's value type is Parameter and value is P_Date: YY1_ABC_DEF(Date: $parameters.P_Date ).GHI


Entity requires parameter, calculated fields , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem


SAP S/4HANA Cloud all versions