SAP Knowledge Base Article - Public

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

Symptom

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>

Environment

S/4HANA Cloud

Cause

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.)

Resolution

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>

Example: YY1_ABC_DEF(Date: $session.system_date ).GHI

Keywords

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

Product

SAP S/4HANA Cloud all versions