Skip to Content
0
Jun 23, 2020 at 07:08 AM

Value-set associations are not allowed

497 Views

Hi all

I have the following CDS view that does not compile:

define view YGAC_I_ENVIRONMENT
  as select distinct from YGAC_I_ROLE
  association[0..*] to YGAC_I_ROLE_STATUS as _Status on $projection.RoleStatus = _Status.RoleStatus
{
  key BusinessProcess,
  key JobProfile,
  key RoleStatus,
  _Status._Text.Description as Description,
  _Status
} where RoleType = 'BUS'
  and  _Status._Text.Language = $session.system_language   

The compiler complains:

Value-set associations are not allowed

I would like to constraint the view to session language.

Thanks