C_ChmlCmplncMktCvrgCmplncInfo

DDL: C_CHMLCMPLNCMKTCVRGCMPLNCINFO Type: view CONSUMPTION Package: EHPMA_CNS_ASSESS_MARKETABILITY

Compliance Information - For Products

C_ChmlCmplncMktCvrgCmplncInfo is a Consumption CDS View that provides data about "Compliance Information - For Products" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfo, I_ChmlCmplncMatlAssgmt) and exposes 38 fields. It has 12 associations to related views. Part of development package EHPMA_CNS_ASSESS_MARKETABILITY.

Data Sources (2)

SourceAliasJoin Type
I_ChmlCmplncInfo ChmlCmplncInfo from
I_ChmlCmplncMatlAssgmt MatlAssgmt inner

Associations (12)

CardinalityTargetAliasCondition
[0..1] C_ChmlCmplncProdAssgmt _ChmlCmplncProdAssgmt $projection.ChmlCmplncInfoUUID = _ChmlCmplncProdAssgmt.ChmlCmplncInfoUUID and _ChmlCmplncProdAssgmt.ChmlCmplncInfoParentType = 'BU' -- Branded Product
[0..1] C_ChmlCmplncProdAssgmt _BrandedChmlCmplncProdAssgmt $projection.ChmlCmplncInfoUUID = _BrandedChmlCmplncProdAssgmt.ChmlCmplncInfoUUID and _BrandedChmlCmplncProdAssgmt.ChmlCmplncInfoParentType = 'BP'
[0..1] I_ProductGroup_2 _ProductGroupVH $projection.MaterialGroup = _ProductGroupVH.ProductGroup -- DG specific associations
[0..*] C_ChmlCmplncMktProdAssgmt _PackagedProducts _PackagedProducts.ChmlCmplncProdUUID = ChmlCmplncInfo.ChmlCmplncInfoUUID
[0..*] C_ChmlCmplncInfoTransptPrmssn _ChmlCmplncInfoTransptPrmssn ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChmlCmplncInfoTransptPrmssn.ChmlCmplncInfoUUID
[0..*] C_ChCoInfoIntlTransptPrmssn _ChCoInfoIntlTransptPrmssn ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChCoInfoIntlTransptPrmssn.ChmlCmplncInfoUUID
[0..1] C_ChmlCmplncInfoDngrsGdsDets _ChmlCmplncInfoDngrsGdsDets ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChmlCmplncInfoDngrsGdsDets.ChmlCmplncInfoUUID
[0..1] C_ChmlCmplncInfoQuickView _ChmlCmplncInfoQuickVw $projection.Specification = _ChmlCmplncInfoQuickVw.Specification
[0..1] C_ChmlCmplncInfoQuickView _ChmlCmplncInfoQuickVwUnpckgd $projection.UnpckgdChemicalComplianceInfo = _ChmlCmplncInfoQuickVwUnpckgd.Specification
[0..*] C_LgsPaInsnMktCvrgCmplncInfo _ChmlCmplncInfoPaInsn $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfoPaInsn.ChmlCmplncInfoUUID and $projection.Product = _ChmlCmplncInfoPaInsn.Product -- Quickview for BP
[0..1] C_ChmlCmplncInfoQuickView _BrnddChmlCmplncInfoQuickVw $projection.ChmlCmplncBrnddInternalNumber = _BrnddChmlCmplncInfoQuickVw.Specification
[0..1] I_PckgdDngrsGoodEnclosureDets _PckgdDngrsGoodEnclosureDets $projection.ChmlCmplncInfoUUID = _PckgdDngrsGoodEnclosureDets.ChmlCmplncInfoUUID

Annotations (13)

NameValueLevelField
EndUserText.label Compliance Information - For Products view
AbapCatalog.sqlViewName CCCMKTCVRGCPLINF view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
Consumption.semanticObject PackagedChemicalInfo view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view
Metadata.allowExtensions true view
Search.searchable true view

Fields (38)

KeyFieldSource TableSource FieldDescription
ChmlCmplncInfoUUIDasChmlCmplncInfoUUID
MaterialasMaterial
MaterialasProduct
ProductName
ProductGroupasMaterialGroup
MaterialGroupNameasMaterialGroupName
ChmlCmplncApplication
ChmlCmplncCustMultiAddrIsActv
SemanticObject
MatlIsNotProdSafetyRlvt I_ChmlCmplncInfo MatlIsNotProdSafetyRlvt
Specification
ProdStewardshipRespUnit I_ChmlCmplncInfo ProdStewardshipRespUnit
ChmlCmplncInfoType I_ChmlCmplncInfo ChmlCmplncInfoType
MaterialIsSold I_ChmlCmplncInfo MaterialIsSold
MaterialIsTransported I_ChmlCmplncInfo MaterialIsTransported
MaterialIsProduced I_ChmlCmplncInfo MaterialIsProduced
MaterialIsSourced I_ChmlCmplncInfo MaterialIsSourced
MatlIsMultiComponentProduct I_ChmlCmplncInfo MatlIsMultiComponentProduct
ChmlCmplncProdIsResearched I_ChmlCmplncInfo ChmlCmplncProdIsResearched
ChmlCmplncProdUUIDasChmlCmplncProdUUID
SpecificationendasSpecificationNavgnLink
char255asChmlCmplncTypeImageURL
PckgdChmlCmplncInfoIsHidn _ChmlCmplncInfoQuickVw PckgdChmlCmplncInfoIsHidn
UnpckgdChmlCmplncInfoIsHidn _ChmlCmplncInfoQuickVw UnpckgdChmlCmplncInfoIsHidn
_ProductGroupVH
_PurposeAssignment I_ChmlCmplncInfo _PurposeAssignment
_Application I_ChmlCmplncInfo _Application
_RespUnitForProductStewardship I_ChmlCmplncInfo _RespUnitForProductStewardship
_PackagedProducts _PackagedProducts
_ChmlCmplncInfoTransptPrmssn _ChmlCmplncInfoTransptPrmssn
_ChCoInfoIntlTransptPrmssn _ChCoInfoIntlTransptPrmssn
_ChmlCmplncInfoDngrsGdsDets _ChmlCmplncInfoDngrsGdsDets
_ChmlCmplncInfoProduct _ChmlCmplncProdAssgmt _ChmlCmplncInfoProduct
_Product I_ChmlCmplncMatlAssgmt _Product
_ChmlCmplncInfoQuickVw _ChmlCmplncInfoQuickVw
_ChmlCmplncInfoQuickVwUnpckgd _ChmlCmplncInfoQuickVwUnpckgd
_BrnddChmlCmplncInfoQuickVw _BrnddChmlCmplncInfoQuickVw
_ChmlCmplncInfoPaInsn _ChmlCmplncInfoPaInsn
@EndUserText: {
  label: 'Compliance Information - For Products'
}
@AbapCatalog:
{
  sqlViewName: 'CCCMKTCVRGCPLINF',
  compiler.compareFilter: true
}

-- Access Control: Authorizations Checks
@AccessControl:
{
  authorizationCheck: #CHECK,
  // blocking of personal data not required (no personal data fields exposed for material; user can not be blocked)

  personalData.blocking: #NOT_REQUIRED
}

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

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

@Consumption: {
  semanticObject: 'PackagedChemicalInfo'
}

@ObjectModel:
{
  usageType:
  {
    dataClass: #MASTER,
    sizeCategory: #L,
    serviceQuality: #C
  },
  -- Semantic key MATERIAL is used as navigation in the UI since it is defined as nav. parameter in
  -- the target mapping of the application. Don't change the 'Product' as navigation from product master to this app does not work.
  semanticKey:  [ 'Material' ]
}

@Metadata.allowExtensions: true

@Search.searchable : true

define view C_ChmlCmplncMktCvrgCmplncInfo
  as select from I_ChmlCmplncInfo       as ChmlCmplncInfo

    inner join   I_ChmlCmplncMatlAssgmt as MatlAssgmt on  ChmlCmplncInfo.ChmlCmplncInfoUUID = MatlAssgmt.ChmlCmplncInfoUUID
                                                      and MatlAssgmt.Material               is not null

  -----------------------------------------------------------------------------------------------------------------------------------------------------------------
  -- Additional Information
  -----------------------------------------------------------------------------------------------------------------------------------------------------------------
  -- Cardinality is okay as one PP has only one UP assigned
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to C_ChmlCmplncProdAssgmt        as _ChmlCmplncProdAssgmt         on  $projection.ChmlCmplncInfoUUID                 = _ChmlCmplncProdAssgmt.ChmlCmplncInfoUUID
                                                                                       and _ChmlCmplncProdAssgmt.ChmlCmplncInfoParentType = 'BU'

  -- Branded Product
  association [0..1] to C_ChmlCmplncProdAssgmt        as _BrandedChmlCmplncProdAssgmt  on  $projection.ChmlCmplncInfoUUID                        = _BrandedChmlCmplncProdAssgmt.ChmlCmplncInfoUUID
                                                                                       and _BrandedChmlCmplncProdAssgmt.ChmlCmplncInfoParentType = 'BP'

  association [0..1] to I_ProductGroup_2              as _ProductGroupVH               on  $projection.MaterialGroup = _ProductGroupVH.ProductGroup

  -- DG specific associations
  association [0..*] to C_ChmlCmplncMktProdAssgmt     as _PackagedProducts             on  _PackagedProducts.ChmlCmplncProdUUID = ChmlCmplncInfo.ChmlCmplncInfoUUID

  association [0..*] to C_ChmlCmplncInfoTransptPrmssn as _ChmlCmplncInfoTransptPrmssn  on  ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChmlCmplncInfoTransptPrmssn.ChmlCmplncInfoUUID

  association [0..*] to C_ChCoInfoIntlTransptPrmssn   as _ChCoInfoIntlTransptPrmssn    on  ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChCoInfoIntlTransptPrmssn.ChmlCmplncInfoUUID

  association [0..1] to C_ChmlCmplncInfoDngrsGdsDets  as _ChmlCmplncInfoDngrsGdsDets   on  ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChmlCmplncInfoDngrsGdsDets.ChmlCmplncInfoUUID

  association [0..1] to C_ChmlCmplncInfoQuickView     as _ChmlCmplncInfoQuickVw        on  $projection.Specification = _ChmlCmplncInfoQuickVw.Specification

  association [0..1] to C_ChmlCmplncInfoQuickView     as _ChmlCmplncInfoQuickVwUnpckgd on  $projection.UnpckgdChemicalComplianceInfo = _ChmlCmplncInfoQuickVwUnpckgd.Specification

  association [0..*] to C_LgsPaInsnMktCvrgCmplncInfo  as _ChmlCmplncInfoPaInsn         on  $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfoPaInsn.ChmlCmplncInfoUUID and
                                                                                           $projection.Product = _ChmlCmplncInfoPaInsn.Product

  -- Quickview for BP
  association [0..1] to C_ChmlCmplncInfoQuickView     as _BrnddChmlCmplncInfoQuickVw   on  $projection.ChmlCmplncBrnddInternalNumber = _BrnddChmlCmplncInfoQuickVw.Specification

  association [0..1] to I_PckgdDngrsGoodEnclosureDets as _PckgdDngrsGoodEnclosureDets  on  $projection.ChmlCmplncInfoUUID = _PckgdDngrsGoodEnclosureDets.ChmlCmplncInfoUUID
{
      -- UUID of Chemical Compliance Information
  key ChmlCmplncInfo.ChmlCmplncInfoUUID                                                                                     as ChmlCmplncInfoUUID,

      -- Material of Chemical Compliance Information (assigned in material - either Related Products in Product Master OR Compliance Views for Related Packaged Products)
      @ObjectModel.readOnly: true
      @ObjectModel.text.element: [ 'ProductName' ]
      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #MEDIUM
  key MatlAssgmt.Material                                                                                                   as Material,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      // Product Master

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      @Consumption.semanticObject: 'Material'
      MatlAssgmt.Material                                                                                                   as Product,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #HIGH
      @Semantics.text: true
      MatlAssgmt._Product._Text[1: Language = $session.system_language].ProductName                                         as ProductName,

      -- Product group
      @ObjectModel.text.element: [ 'MaterialGroupName' ]
      @Search.defaultSearchElement: false
      MatlAssgmt._Product.ProductGroup                                                                                      as MaterialGroup,

      -- Material Group Name
      @Search.defaultSearchElement: true
      MatlAssgmt._Product._ProductGroup._Text[1: Language = $session.system_language].MaterialGroupName                     as MaterialGroupName,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      // Compliance view

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      -- Internal name of chemical compliance information
      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #LOW
      @Semantics.text: true
      ChmlCmplncInfo.ChmlCmplncInternalName                                                                                 as ChmlCmplncInternalName,

      @ObjectModel.virtualElement: true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT4'
      cast('' as ehpma_application)                                                                                         as ChmlCmplncApplication,

      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement: true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT4'
      cast('' as ehfnd_boolean)                                                                                             as ChmlCmplncCustMultiAddrIsActv,

      @ObjectModel.virtualElement: true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_TYPE_IMAGE_CALC_EXT'
      @UI.hidden: true
      cast('' as /ui2/semantic_object)                                                                                      as SemanticObject,

      ChmlCmplncInfo.MatlIsNotProdSafetyRlvt                                                                                as MatlIsNotProdSafetyRlvt,

      @ObjectModel.foreignKey.association: '_ChmlCmplncInfoQuickVw'
      @ObjectModel.readOnly: true
      @ObjectModel.text.element: [ 'ChmlCmplncInternalName' ]
      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #MEDIUM
      cast(ChmlCmplncInfo.Specification as ehfnd_compliance_view preserving type)                                           as Specification,

      ChmlCmplncInfo.ProdStewardshipRespUnit                                                                                as ProdStewardshipRespUnit,

      ChmlCmplncInfo.ChmlCmplncInfoType                                                                                     as ChmlCmplncInfoType,

      ChmlCmplncInfo.MaterialIsSold                                                                                         as MaterialIsSold,

      ChmlCmplncInfo.MaterialIsTransported                                                                                  as MaterialIsTransported,

      ChmlCmplncInfo.MaterialIsProduced                                                                                     as MaterialIsProduced,

      ChmlCmplncInfo.MaterialIsSourced                                                                                      as MaterialIsSourced,

      ChmlCmplncInfo.MatlIsMultiComponentProduct                                                                            as MatlIsMultiComponentProduct,

      ChmlCmplncInfo.ChmlCmplncProdIsResearched                                                                             as ChmlCmplncProdIsResearched,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      // Packaged Product Data

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      _PckgdDngrsGoodEnclosureDets.DngrsGoodIsPartiallyPackaged                                                             as DngrsGoodIsPartiallyPackaged,
      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      // Unpackaged Product Data

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      @Consumption.semanticObject: 'UnpackagedChemicalInfo'
      @ObjectModel.foreignKey.association: '_ChmlCmplncInfoQuickVwUnpckgd'
      @ObjectModel.readOnly: true
      @ObjectModel.text.element: [ 'ChmlCmplncInfoUnpckgdProdName' ]
      _ChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.Specification                                                            as UnpckgdChemicalComplianceInfo,

      -- Combined Name of Unpackaged Product
      @ObjectModel.readOnly: true
      @Semantics.text: true
      cast(_ChmlCmplncProdAssgmt._UnpckgdProdMatDataPrimary.ChmlCmplncInfoCombinedName as ehfnd_cci_up preserving type)     as ChmlCmplncInfoUnpckgdProdName,

      -- UUID of Unpackaged Product - Used in CL_EHPMA_MKT_CALC_EXIT4 for Calculation of Applications
      @ObjectModel.readOnly: true
      _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID                                                                              as ChmlCmplncProdUUID,

      -- UUID of Unpackaged Product - Used for Navigation on Object Page to UP Basic Data
      @ObjectModel.readOnly: true
      case
        when _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID is not null
            then _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID
        else ChmlCmplncInfo.ChmlCmplncInfoUUID
      end                                                                                                                   as ChmlCmplncInfoNavgnLink,

      -- UUID of MCP - used for navigation
      @UI.hidden: true
      ChmlCmplncInfo.ChmlCmplncInfoUUID                                                                                     as MultiComponentProductUUID,

      -- UUID of Unpackaged Product - Used for Navigation on Object Page to UP Compliance Assessment
      //      @ObjectModel.readOnly: true

      //      case

      //        when _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID is not null

      //            then _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID

      //        else ChmlCmplncInfo.ChmlCmplncInfoUUID

      //      end                                                                                                                                as CmplRqRsltNavgnLink,


      @ObjectModel.readOnly: true
      case
        when _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID is not null
            then _ChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.Specification
        else ChmlCmplncInfo.Specification
      end                                                                                                                   as SpecificationNavgnLink,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      // Branded Product Data

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      @ObjectModel.foreignKey.association: null
      _BrandedChmlCmplncProdAssgmt.ChmlCmplncProdUUID                                                                       as BrnddChmlCmplncInfoUUID,

      -- Branded Product -- Internal Number
      @Consumption.semanticObject: 'BrandedChemicalInfo'
      @Consumption.semanticObjectMapping.additionalBinding: [ { localElement: 'BrnddChmlCmplncInfoUUID',
                                                                element: 'ChmlCmplncInfoNavgnLink' } ]
      @ObjectModel.foreignKey.association: '_BrnddChmlCmplncInfoQuickVw'
      @ObjectModel.mandatory: true
      @ObjectModel.readOnly: true
      @ObjectModel.text.element: [ 'ChmlCmplncBrnddProdName' ]
      cast(_BrandedChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.Specification as  ehfnd_compliance_view_bp  preserving type) as ChmlCmplncBrnddInternalNumber,

      -- Branded Product -- Internal Name
      @ObjectModel.readOnly: true
      @Semantics.text: true
      _BrandedChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.ChmlCmplncInternalName                                            as ChmlCmplncBrnddProdName,

      -- Branded Product -- Material is not a Branded Product
      case
        when _BrandedChmlCmplncProdAssgmt.ChmlCmplncProdUUID is null
        then cast('X' as ehfnd_cci_is_not_bp preserving type)
        else cast('' as ehfnd_cci_is_not_bp preserving type)
      end                                                                                                                   as MatlIsNotBrandedProduct,

      -------------------------------------------------------------------------------------------------------
      // Type Image URL

      -------------------------------------------------------------------------------------------------------
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_TYPE_IMAGE_CALC_EXT'
      cast('' as abap.char(255))                                                                                            as ChmlCmplncTypeImageURL,

      _ChmlCmplncInfoQuickVw.PckgdChmlCmplncInfoIsHidn,
      _ChmlCmplncInfoQuickVw.UnpckgdChmlCmplncInfoIsHidn,


      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      // Associations

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      _ProductGroupVH,
      ChmlCmplncInfo._PurposeAssignment,
      ChmlCmplncInfo._Application,
      ChmlCmplncInfo._RespUnitForProductStewardship,
      _PackagedProducts,
      _ChmlCmplncInfoTransptPrmssn,
      _ChCoInfoIntlTransptPrmssn,
      _ChmlCmplncInfoDngrsGdsDets,
      _ChmlCmplncProdAssgmt._ChmlCmplncInfoProduct,
      MatlAssgmt._Product,

      _ChmlCmplncInfoQuickVw,
      _ChmlCmplncInfoQuickVwUnpckgd,
      _BrnddChmlCmplncInfoQuickVw,
      _ChmlCmplncInfoPaInsn
}

where
        ChmlCmplncInfo.MaterialIsSold        = 'X'
  or    ChmlCmplncInfo.MaterialIsProduced    = 'X'
  or(
        ChmlCmplncInfo.MaterialIsSourced     = 'X'
    and ChmlCmplncInfo.MaterialIsTransported = 'X'
  )