C_ChmlCmplncReqCountryVH

DDL: C_CHMLCMPLNCREQCOUNTRYVH Type: view CONSUMPTION

Value Help for Countries/Regions with Filter

C_ChmlCmplncReqCountryVH is a Consumption CDS View that provides data about "Value Help for Countries/Regions with Filter" in SAP S/4HANA. It reads from 1 data source (I_Country) and exposes 3 fields. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_Country Country from

Parameters (1)

NameTypeDefault
P_ChmlCmplncRequestUUID sysuuid_x

Associations (1)

CardinalityTargetAliasCondition
[1..1] C_ChmlCmplncReqProcMkt _ChmlCmplncReq _ChmlCmplncReq.ChmlCmplncRequestUUID = $parameters.P_ChmlCmplncRequestUUID

Annotations (18)

NameValueLevelField
EndUserText.label Value Help for Countries/Regions with Filter view
AbapCatalog.sqlViewName CCCREQCNTRYVH view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.representativeKey Country view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL 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
Consumption.ranked true view

Fields (3)

KeyFieldSource TableSource FieldDescription
Country
CountryNameasCountryName
_ChmlCmplncReq _ChmlCmplncReq
@EndUserText.label: 'Value Help for Countries/Regions with Filter'

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

--Access Control: Authorization checks
@AccessControl:
{
  authorizationCheck: #MANDATORY,
  // blocking of personal data not required (no personal data fields exposed for businesspartner (BUT000); user data can not be blocked and no BP info from user exposed)

  personalData.blocking: #NOT_REQUIRED
}

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

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

@ObjectModel:
{
  dataCategory: #VALUE_HELP,
  representativeKey: 'Country',
//  semanticKey:  [ 'Country' ],

  usageType:
  {
    dataClass: #MIXED,
    // set to sizeCategory XL because of SizeCategory XL of underlying views

    sizeCategory: #XL,
    serviceQuality: #C
  }
}

@Metadata.ignorePropagatedAnnotations: true

--Header information
@UI:
{
  headerInfo:
  {
    typeName: 'Country/Region',
    typeNamePlural: 'Countries/Regions'
  }
}
@UI.presentationVariant: [ {
   requestAtLeast:  [ 'CountryName' ],
   sortOrder: [ {by: 'CountryName', direction: #ASC } ]
 }]
------

--Search
@Search.searchable : true

@Consumption.ranked: true

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

  --Join market request to shrink on business process
    join                    C_ChmlCmplncReqProcMkt  as _Request         on _Request.ChmlCmplncRequestUUID = $parameters.P_ChmlCmplncRequestUUID

  --Join data of market countries to exclude the assigned countries
    left outer to many join C_ChmlCmplncReqMktCntry as _MarketCountries on  Country.Country                            = _MarketCountries.Country
                                                                        and _MarketCountries.ChmlCmplncRequestUUID     = $parameters.P_ChmlCmplncRequestUUID
                                                                        and _MarketCountries.ChmlCmplncBusinessProcess = _Request.ChmlCmplncBusinessProcess
  -- needed for DCL
  association [1..1] to C_ChmlCmplncReqProcMkt as _ChmlCmplncReq on _ChmlCmplncReq.ChmlCmplncRequestUUID = $parameters.P_ChmlCmplncRequestUUID

{

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

      --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,

      -- Chemical Compliance Request UUID
      @UI.hidden: true
      $parameters.P_ChmlCmplncRequestUUID                                 as ChmlCmplncRequestUUID,

      /* Associations */
      _ChmlCmplncReq

}
where
  --Select countries which are not assigned in market requests in the current table
  _MarketCountries.ChmlCmplncRequestUUID is null