C_ChmlCmplncReqMktCntry

DDL: C_CHMLCMPLNCREQMKTCNTRY Type: view CONSUMPTION Package: EHPMA_CNS_CRQ

Market Overview of a Chemical Compliance Request

C_ChmlCmplncReqMktCntry is a Consumption CDS View that provides data about "Market Overview of a Chemical Compliance Request" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncReqMktCntry) and exposes 15 fields with key fields ChmlCmplncRequestUUID, ChmlCmplncBusinessProcess. It has 1 association to related views. Part of development package EHPMA_CNS_CRQ.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncReqMktCntry _ChmlCmplncReqMktCntry from

Associations (1)

CardinalityTargetAliasCondition
[1..1] C_ChmlCmplncReqProcMkt _ChmlCmplncReq $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID

Annotations (16)

NameValueLevelField
EndUserText.label Market Overview of a Chemical Compliance Request view
AbapCatalog.sqlViewName CCREQMREQCTRY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
UI.headerInfo.typeName Country/Region to Verify view
UI.headerInfo.typeNamePlural Countries/Regions to Verify view
UI.headerInfo.title.value CountryName view
UI.lineItem.criticality Criticality view
Search.searchable true view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY ChmlCmplncRequestUUID I_ChmlCmplncReqMktCntry ChmlCmplncRequestUUID
Country
KEY ChmlCmplncBusinessProcess I_ChmlCmplncReqMktCntry ChmlCmplncBusinessProcess
CountryName
ChmlCmplncReqMktUUID ChmlCmplncReqMktUUID
ChmlCmplncInfoUUID _ChmlCmplncReq ChmlCmplncInfoUUID
ChmlCmplncProdUUID _ChmlCmplncReq ChmlCmplncProdUUID
ChmlCmplncReqChgTypeName
ChmlCmplncProdnAllwd
ChmlCmplncSalesAllwd
ChmlCmplncBusProcAllwdText
ChmlCmplncBusProcAllwdCritlty
ChmlCmplncMktCvrgRemark
_ChmlCmplncReq _ChmlCmplncReq
_Country I_ChmlCmplncReqMktCntry _Country
@EndUserText.label: 'Market Overview of a Chemical Compliance Request'

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

@AccessControl:
{
  authorizationCheck: #CHECK,
  // blocking of personal data not required

  personalData.blocking: #NOT_REQUIRED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  semanticKey:  [ 'Country' ],
  usageType:
  {
    /*Service Quality - reflects the quality of service with respect to the expected performance of the CDS view:
      #A: may be consumed within business logic for high volume transactions or background processing
      #B: may be consumed within business logic for transactions or background processing
    */
    dataClass: #MIXED,
    sizeCategory: #XL,
    serviceQuality: #C
  }
}

@UI : {
 headerInfo: {
  typeName: 'Country/Region to Verify',
  typeNamePlural: 'Countries/Regions to Verify',
  title.value: 'CountryName'
 },
 presentationVariant : {
  --sortOrder: [ {by: 'ChmlCmplncRequestSortOrder', direction : #ASC}, {by: 'CountryName', direction: #ASC }], --sorting is done on client side
  groupBy: ['ChmlCmplncReqChgTypeName'],
  requestAtLeast: ['ChmlCmplncReqMktUUID',
                    'ChmlCmplncReqChgType',
                    'Country',
                    'CountryName',
                    'ChmlCmplncMktCvrgRemark',
                    'ChmlCmplncProdnAllwd',
                    'ChmlCmplncSalesAllwd',
                    'ChmlCmplncBusProcAllwdText',
                    'ChmlCmplncBusProcAllwdCritlty',
                    'ChmlCmplncProdUUID',
                    'ChmlCmplncRequestSortOrder',
                    'ChmlCmplncBusProcAllwdCritlty',
                    'Criticality' ]

  },
  -- used for the table line highlight indicator
  lineItem:
  {
    criticality: 'Criticality'
  }
}

--Search
@Search.searchable : true

define view C_ChmlCmplncReqMktCntry
  as select from           I_ChmlCmplncReqMktCntry as _ChmlCmplncReqMktCntry
    left outer to one join I_ChmlCmplncReqMkt      as _ChmlCmplncReqMkt on  _ChmlCmplncReqMktCntry.ChmlCmplncRequestUUID = _ChmlCmplncReqMkt.ChmlCmplncRequestUUID
                                                                        and _ChmlCmplncReqMktCntry.Country               = _ChmlCmplncReqMkt.Country

  association [1..1] to C_ChmlCmplncReqProcMkt as _ChmlCmplncReq on $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID

{

      @UI:
      {
        -- Facet Annotations
        facet:
        [
          -- Facet 'Market Requests'
          {
            label: 'Market Request',
            id: 'MktReq',
            type: #COLLECTION,
            position: 10
          },
            -- Facet 'Market Requests' - Identification
            {
              label: 'Market Request',
              id: 'MktReqID',
              parentId: 'MktReq',
              position: 10,
              type: #IDENTIFICATION_REFERENCE
            }
        ],
        hidden: true
      }
      @ObjectModel.readOnly: true
  key _ChmlCmplncReqMktCntry.ChmlCmplncRequestUUID,

      -- Country
      @UI: {
        lineItem:
        {
          position: 10,
          importance: #HIGH
        },
        textArrangement: #TEXT_ONLY
      }
      @ObjectModel:
      {
        readOnly: true,
        text.element: ['CountryName']
      }
  key _ChmlCmplncReqMktCntry.Country,

      @UI.hidden: true
      @ObjectModel.readOnly: true
  key _ChmlCmplncReqMktCntry.ChmlCmplncBusinessProcess,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      @Semantics.text: true
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
      _ChmlCmplncReqMktCntry._Country._Text[1: Language = $session.system_language].CountryName,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      ChmlCmplncReqMktUUID,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      _ChmlCmplncReq.ChmlCmplncInfoUUID,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      _ChmlCmplncReq.ChmlCmplncProdUUID,

      -- Change Type
      @UI: {
        textArrangement: #TEXT_ONLY
      }
      @ObjectModel:
      {
        readOnly: true,
        text.element:  [ 'ChmlCmplncReqChgTypeName' ]
      }
      cast( case
        when _ChmlCmplncReqMkt.ChmlCmplncReqMktUUID is not null then
          _ChmlCmplncReqMkt.ChmlCmplncReqChgType
        else
          'EXISTING'
      end as ehfnd_crq_change_type )                        as ChmlCmplncReqChgType,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      @Semantics.text:true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_MKT_CALC_EXIT'
      cast('' as val_text)                                  as ChmlCmplncReqChgTypeName,

      -- Item criticality
      @UI.hidden: true
      case
          when _ChmlCmplncReqMkt.ChmlCmplncReqMktUUID is not null then
            case _ChmlCmplncReqMkt.ChmlCmplncReqChgType
              when 'MANUAL' then 3
              else 0
            end
          else 0
      end                                                   as Criticality,

      -- Internal sort order
      @UI.hidden: true
      case
          when _ChmlCmplncReqMkt.ChmlCmplncReqMktUUID is not null then
            case _ChmlCmplncReqMkt.ChmlCmplncReqChgType
              when 'MANUAL' then 0
              when 'REQUESTED' then 1
              else 2
            end
          else 2
      end                                                   as ChmlCmplncRequestSortOrder,

      // Production Allowed Indicator

      @UI.hidden: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_MKT_CALC_EXIT'
      cast( '' as ehfnd_cci_prod_allowed preserving type )  as ChmlCmplncProdnAllwd,

      // Sales Allowed Indicator

      @UI.hidden: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_MKT_CALC_EXIT'
      cast( '' as ehfnd_cci_sales_allowed preserving type ) as ChmlCmplncSalesAllwd,

      // Business process Allowed Name

      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_MKT_CALC_EXIT'
      cast('' as val_text)                                  as ChmlCmplncBusProcAllwdText,

      // Business process Allowed Criticality

      @UI.hidden
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_MKT_CALC_EXIT'
      @ObjectModel.readOnly: true
      cast( 0 as integer )                                  as ChmlCmplncBusProcAllwdCritlty,

      // Comment

      @UI.hidden: true
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_MKT_CALC_EXIT'
      cast('' as ehfnd_cci_mcov_remark)                     as ChmlCmplncMktCvrgRemark,

      /* Associations */
      _ChmlCmplncReq,

      _ChmlCmplncReqMktCntry._Country
}