C_ChmlCmplncPckgdProdAssgmt

DDL: C_CHMLCMPLNCPCKGDPRODASSGMT Type: view_entity CONSUMPTION Package: EHFND_CNS_CCI

Packaged Product Assignment

C_ChmlCmplncPckgdProdAssgmt is a Consumption CDS View that provides data about "Packaged Product Assignment" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncProdAssgmt) and exposes 17 fields with key field ChmlCmplncProdAssgmtUUID. It has 2 associations to related views. Part of development package EHFND_CNS_CCI.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncProdAssgmt I_ChmlCmplncProdAssgmt from

Associations (2)

CardinalityTargetAliasCondition
[1..1] C_ChmlCmplncMatlAssgmtTP _MatAss _MatAss.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
[0..1] C_ChmlCmplncPrimMatl _UnpckgdProdMatDataPrimary _UnpckgdProdMatDataPrimary.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID

Annotations (9)

NameValueLevelField
EndUserText.label Packaged Product Assignment view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #C view
Metadata.allowExtensions true view
Search.searchable true view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY ChmlCmplncProdAssgmtUUID ChmlCmplncProdAssgmtUUID
ChmlCmplncInfoUUID ChmlCmplncInfoUUID
ChmlCmplncProdUUID ChmlCmplncProdUUID
Material _MatAss Material
MaterialName _MatAss MaterialName
MaterialGroup _MatAss MaterialGroup
MaterialGroupName _MatAss MaterialGroupName
ChmlCmplncInfoType
ProdStewardshipRespUnit
MaterialIsTransported
MaterialIsSold
MaterialIsProduced
MaterialIsSourced
ChmlCmplncChgLogsRoleIsAllwd
_ChmlCmplncInfoProduct _ChmlCmplncInfoProduct
_MatAss _MatAss
_UnpckgdProdMatDataPrimary _UnpckgdProdMatDataPrimary
@EndUserText.label: 'Packaged Product Assignment'

@AccessControl:
{
  authorizationCheck: #MANDATORY,
  // blocking of personal data not required (no personal data fields exposed for material (MARA))

  personalData.blocking: #NOT_REQUIRED
}

@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  semanticKey:  [ 'MaterialName' ],
  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: #MASTER,
    sizeCategory: #M,
    serviceQuality: #C
  }
}

@Metadata.allowExtensions: true

@Search.searchable: true
define view entity C_ChmlCmplncPckgdProdAssgmt as select from I_ChmlCmplncProdAssgmt 
  association [1..1] to C_ChmlCmplncMatlAssgmtTP as _MatAss                    on _MatAss.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
  association [0..1] to C_ChmlCmplncPrimMatl     as _UnpckgdProdMatDataPrimary on _UnpckgdProdMatDataPrimary.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID
{
  key ChmlCmplncProdAssgmtUUID,

      @ObjectModel.mandatory: true

      ChmlCmplncInfoUUID,

      @ObjectModel.mandatory: true
      ChmlCmplncProdUUID,

      @ObjectModel.readOnly: true
      @ObjectModel.text.element: ['MaterialName']
      @Search: {
        defaultSearchElement : true,
        fuzzinessThreshold: 0.7,
        ranking: #MEDIUM
      }
      _MatAss.Material,

      @ObjectModel.readOnly: true
      @Search: {
        defaultSearchElement : true,
        fuzzinessThreshold: 0.7,
        ranking: #MEDIUM
      }
      @Semantics.text:true
      _MatAss.MaterialName,

      @ObjectModel:
      {
        readOnly: true,
        text.element:  [ 'MaterialGroupName' ]
      }
      _MatAss.MaterialGroup,

      @ObjectModel.readOnly: true
      _MatAss.MaterialGroupName,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      -- CCI Type and Roles
      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      --Chemical Compliance Information Type
      @ObjectModel.readOnly: true
      _ChmlCmplncInfo.ChmlCmplncInfoType,

      --Responsible Unit
      @ObjectModel.readOnly: true
      _ChmlCmplncInfo.ProdStewardshipRespUnit,

      --Indicator: Chemical Compliance Information is transported
      @ObjectModel.readOnly: true
      _ChmlCmplncInfo.MaterialIsTransported,

      --Indicator: Chemical Compliance Information is sold
      @ObjectModel.readOnly: true
      _ChmlCmplncInfo.MaterialIsSold,

      --Indicator: Chemical Compliance Information is produced
      @ObjectModel.readOnly: true
      _ChmlCmplncInfo.MaterialIsProduced,

      --Indicator: Chemical Compliance Information is sourced
      @ObjectModel.readOnly: true
      _ChmlCmplncInfo.MaterialIsSourced,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      -- Logistics Roles Info
      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_CHGROLE_CALC_EXIT'
      @ObjectModel.readOnly: true
      cast('' as ehfnd_cci_log_role_info)                  as ChmlCmplncCurLogsRole,

      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_CHGROLE_CALC_EXIT'
      @ObjectModel.readOnly: true
      cast('' as ehfnd_cci_chg_role_allwd preserving type) as ChmlCmplncChgLogsRoleIsAllwd,

      /* Associations */
      _ChmlCmplncInfoProduct,
      _MatAss,
      _UnpckgdProdMatDataPrimary
}
 where _ChmlCmplncInfo.ChmlCmplncInfoType = 'PP'