C_ChmlCmplncCountryVH

DDL: C_CHMLCMPLNCCOUNTRYVH Type: view CONSUMPTION Package: EHFND_CNS_CCI

Countries/Regions with Filter

C_ChmlCmplncCountryVH is a Consumption CDS View that provides data about "Countries/Regions with Filter" in SAP S/4HANA. It reads from 1 data source (I_Country) and exposes 5 fields. It has 1 association to related views. Part of development package EHFND_CNS_CCI.

Data Sources (1)

SourceAliasJoin Type
I_Country Country from

Parameters (1)

NameTypeDefault
P_ChmlCmplncInfoUUID sysuuid_x

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_ChmlCmplncInfo _ChmlCmplncInfo _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID

Annotations (14)

NameValueLevelField
EndUserText.label Countries/Regions with Filter view
AbapCatalog.sqlViewName CCCCOUNTRYVH view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #C view
Metadata.ignorePropagatedAnnotations true view
UI.headerInfo.typeName Country/Region view
UI.headerInfo.typeNamePlural Countries/Regions view
Search.searchable true view

Fields (5)

KeyFieldSource TableSource FieldDescription
P_ChmlCmplncInfoUUIDasChmlCmplncInfoUUID
Country
ActiveChmlCmplncInfoUUID
CountryNameasCountryName
_ChmlCmplncInfo _ChmlCmplncInfo
@EndUserText.label: 'Countries/Regions with Filter'

@AbapCatalog:
{
  sqlViewName: 'CCCCOUNTRYVH',
  compiler.compareFilter: true
}

--Access Control: Authorization checks
@AccessControl:
{
  authorizationCheck: #MANDATORY
}

--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE

--VDM view type
@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  dataCategory: #VALUE_HELP,
  semanticKey:  [ 'Country' ],
  usageType:
  {
    dataClass: #MIXED,
    sizeCategory: #S,
    serviceQuality: #C
  }
}

@Metadata.ignorePropagatedAnnotations: true

--Header information
@UI:
{
  headerInfo:
  {
    typeName: 'Country/Region',
    typeNamePlural: 'Countries/Regions'
  }
}

--Search
@Search.searchable : true


define view C_ChmlCmplncCountryVH
  with parameters
    P_ChmlCmplncInfoUUID : sysuuid_x
  --Select data from customizing table 'Country
  as select from    I_Country               as Country

  --Join data of draft CCI to get active CCI UUID
    join            I_ChmlCmplncInfoDraft   as ChmlCmplncInfoDraft on ChmlCmplncInfoDraft.ChmlCmplncInfoUUID = $parameters.P_ChmlCmplncInfoUUID

  --Join data of draft market requests to exclude the assigned countries
    left outer to one join I_ChmlCmplncMktReqDraft as MarketRequest       on  Country.Country                  = MarketRequest.Country
                                                                   and MarketRequest.ChmlCmplncInfoUUID = $parameters.P_ChmlCmplncInfoUUID

  -- Association to I_ChmlCmplncInfo needed for DCL
  association [1..1] to I_ChmlCmplncInfo as _ChmlCmplncInfo on _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID

{

      -- Chemical Compliance UUID
      @UI.hidden: true
  key $parameters.P_ChmlCmplncInfoUUID                                    as ChmlCmplncInfoUUID,

      --Country
      @UI:
      {
        textArrangement: #TEXT_FIRST,
        lineItem.position: 10
      }
      @ObjectModel.text.element:  [ 'CountryName' ]
  key Country.Country,

      --Active CCI UUID
      @UI.hidden: true
      ChmlCmplncInfoDraft.ActiveChmlCmplncInfoUUID,

      --Country name
      @UI.hidden: true
      @Semantics.text: true
      @Search : { defaultSearchElement : true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      Country._Text[ 1: Language = $session.system_language ].CountryName as CountryName,

      /* Associations */
      _ChmlCmplncInfo

}
where
  --Select countries which are not assigned in market requests in the current draft table
  MarketRequest.ChmlCmplncInfoUUID is null