C_ChmlCmplncMktCountryVH

DDL: C_CHMLCMPLNCMKTCOUNTRYVH Type: view CONSUMPTION Package: EHPMA_CNS_ASSESS_MARKETABILITY

Country / Region Value Help with Filter

C_ChmlCmplncMktCountryVH is a Consumption CDS View that provides data about "Country / Region Value Help with Filter" in SAP S/4HANA. It reads from 2 data sources (I_Country, I_ChmlCmplncMktCvrgDraft) and exposes 5 fields. It has 1 association to related views. Part of development package EHPMA_CNS_ASSESS_MARKETABILITY.

Data Sources (2)

SourceAliasJoin Type
I_Country Country from
I_ChmlCmplncMktCvrgDraft Coverage left_outer

Parameters (1)

NameTypeDefault
P_ChmlCmplncInfoUUID sysuuid_x

Associations (1)

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

Annotations (16)

NameValueLevelField
EndUserText.label Country / Region Value Help with Filter view
AbapCatalog.sqlViewName CCCMKTCNTRYVH view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.representativeKey ChmlCmplncInfoUUID view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #C view
UI.headerInfo.typeName Country/Region view
UI.headerInfo.typeNamePlural Countries/Regions view
Search.searchable true view
Consumption.ranked true view

Fields (5)

KeyFieldSource TableSource FieldDescription
P_ChmlCmplncInfoUUIDasChmlCmplncInfoUUID
Country
ActiveChmlCmplncInfoUUID
CountryNameasCountryName
_ChmlCmplncInfo _ChmlCmplncInfo
@EndUserText.label: 'Country / Region Value Help with Filter'

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

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

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

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

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

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

--Search
@Search.searchable : true
@Consumption.ranked: true


define view C_ChmlCmplncMktCountryVH
  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 for draft market requests to exclude the assigned countries
    left outer join I_ChmlCmplncMktCvrgDraft as Coverage            on  Country.Country             = Coverage.Country
                                                                    and Coverage.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:
      {
        lineItem.position: 10,
        textArrangement: #TEXT_ONLY
      }
      @ObjectModel.text.element:  [ 'CountryName' ]
      
      @Semantics.text: true
      @Search:
      {
         defaultSearchElement: true,
         fuzzinessThreshold: 0.8,
         ranking: #HIGH
      }

  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
  Coverage.ChmlCmplncInfoUUID is null