I_EHSLocNameFallbackLanguage

DDL: I_EHSLOCNAMEFALLBACKLANGUAGE Type: view_entity COMPOSITE Package: EHFND_BO_LOC_IMPL

Location name with a fallback language

I_EHSLocNameFallbackLanguage is a Composite CDS View that provides data about "Location name with a fallback language" in SAP S/4HANA. Part of development package EHFND_BO_LOC_IMPL.

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Location name with a fallback language view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MASTER view
VDM.viewType #COMPOSITE view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY EHSLocationUUID EHSLocationUUID
EHSLocationNameendasEHSLocationName
EHSLocationNameFreeSrch
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Location name with a fallback language'
@ObjectModel.usageType:{
  serviceQuality: #C,
  sizeCategory: #L,
  dataClass: #MASTER
}

@VDM.viewType: #COMPOSITE
define view entity I_EHSLocNameFallbackLanguage
  as select distinct from I_EHSLocationRoot
{
  key EHSLocationUUID,
      case
      // Try to return a name in the user's system language.

        when _EHSLocNameCurrentRevision[ 1:Language = $session.system_language ].EHSLocationName is not null
          then _EHSLocNameCurrentRevision[ 1:Language = $session.system_language ].EHSLocationName
      // If it doesn't exist, try to return one in English.

        when _EHSLocNameCurrentRevision[ 1:Language = 'E' ].EHSLocationName is not null
          then _EHSLocNameCurrentRevision[ 1:Language = 'E' ].EHSLocationName
      // And if neither of them exist, return the first found in any other language.

        else _EHSLocNameCurrentRevision[ 1:Language is not null ].EHSLocationName
      end                                                                                 as EHSLocationName,

      _EHSLocNameCurrentRevision[ 1:Language = $session.system_language ].EHSLocationName as EHSLocationNameFreeSrch
}