C_ChmlCmplncMktTP

DDL: C_CHMLCMPLNCMKTTP Type: view CONSUMPTION

Marketability of Unpackaged Product

C_ChmlCmplncMktTP is a Consumption CDS View that provides data about "Marketability of Unpackaged Product" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfoTP) and exposes 31 fields with key field ChmlCmplncInfoUUID. It has 6 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncInfoTP _ComplianceInfo from

Associations (6)

CardinalityTargetAliasCondition
[0..*] C_ChmlCmplncMktCvrgTP _MarketCoverage _MarketCoverage.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID -- Additional Information -- Material Data for Primary Material
[0..1] C_ChmlCmplncPrimMatl _MaterialDataPrimary _MaterialDataPrimary.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID -- Specific Marketability
[0..*] C_ChmlCmplncMktSpcfcCvrg _SpecificCoverage _SpecificCoverage.ChmlCmplncProdUUID = $projection.ActiveChmlCmplncInfoUUID -- Packaged Products
[0..*] C_ChmlCmplncMktProdAssgmt _PackagedProducts _PackagedProducts.ChmlCmplncProdUUID = $projection.ActiveChmlCmplncInfoUUID -- Marketability related Key Figures
[0..1] I_ChmlCmplncMktKeyFig _MarketKeyFig _MarketKeyFig.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID
[0..1] C_ChmlCmplncRespUnitDngrsGdsVH _RespDangerousGoodsVH _RespDangerousGoodsVH.ResponsibleUnit = $projection.DngrsGdsRespUnit

Annotations (18)

NameValueLevelField
EndUserText.label Marketability of Unpackaged Product view
AbapCatalog.sqlViewName CCCMKTTP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.allowExtensions true view
VDM.viewType #CONSUMPTION view
ObjectModel.compositionRoot true view
ObjectModel.transactionalProcessingDelegated true view
ObjectModel.createEnabled false view
ObjectModel.updateEnabled EXTERNAL_CALCULATION view
ObjectModel.deleteEnabled EXTERNAL_CALCULATION view
ObjectModel.draftEnabled true view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #C view
Search.searchable true view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY ChmlCmplncInfoUUID ChmlCmplncInfoUUID
ActiveChmlCmplncInfoUUID I_ChmlCmplncInfoTP ActiveChmlCmplncInfoUUID
CmplRqRsltNavgnLink I_ChmlCmplncInfoTP ActiveChmlCmplncInfoUUID
MaterialasMaterial
MaterialName _MaterialDataPrimary MaterialName
ChmlCmplncInfoCombinedName _MaterialDataPrimary ChmlCmplncInfoCombinedName
NmbrOfChmlCmplncReqOpn _MarketKeyFig NmbrOfChmlCmplncReqOpn
NmbrOfChmlCmplncPckgdProducts _MarketKeyFig NmbrOfChmlCmplncPckgdProducts
NmbrOfChmlCmplncReqOpnWithTot _MarketKeyFig NmbrOfChmlCmplncReqOpnWithTot
ChmlCmplncApplication
NmbrOfChmlCmplncMktCountries _MarketKeyFig NmbrOfChmlCmplncMktCountries
NmbrOfChmlCmplncReqProcd _MarketKeyFig NmbrOfChmlCmplncReqProcd
NmbrOfInProcessCmplRqRslts _MarketKeyFig NmbrOfInProcessCmplRqRslts
NmbrOfReleasedCmplRqRslts _MarketKeyFig NmbrOfReleasedCmplRqRslts
NmbrOfCmplRqRslts _MarketKeyFig NmbrOfCmplRqRslts
ReleasedCmplRqRsltsCritlty 0
ReleasedCmplRqRsltsPctName _MarketKeyFig ReleasedCmplRqRsltsPctName
ReleasedCmplRqRsltsPct _MarketKeyFig ReleasedCmplRqRsltsPct
InProcessCmplRqRsltsCritlty 0
InProcessCmplRqRsltsPctName _MarketKeyFig InProcessCmplRqRsltsPctName
InProcessCmplRqRsltsPct _MarketKeyFig InProcessCmplRqRsltsPct
ProdStewardshipRespUnit ProdStewardshipRespUnit
ResponsibleUnitName
LastChangeUTCDateTime LastChangeUTCDateTime
LastChangedByUser LastChangedByUser
UserDescription _LastChangedByUser UserDescription
_MarketCoverage _MarketCoverage
_SpecificCoverage _SpecificCoverage
_PackagedProducts _PackagedProducts
_MaterialDataPrimary _MaterialDataPrimary
_RespDangerousGoodsVH _RespDangerousGoodsVH
@EndUserText.label: 'Marketability of Unpackaged Product'

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

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

  personalData.blocking: #NOT_REQUIRED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@Metadata :
{
  allowExtensions: true
}

@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  compositionRoot: true,
  transactionalProcessingDelegated: true,
  createEnabled: false,
  updateEnabled: 'EXTERNAL_CALCULATION',
  //switched delete from false to dynamic: to tackle raised exception when canceling a draft

  deleteEnabled: 'EXTERNAL_CALCULATION',
  draftEnabled: true,
  semanticKey:  [ 'ChmlCmplncInfoCombinedName' ],
  usageType:
  {
    dataClass: #MASTER,
    sizeCategory: #M,
    serviceQuality: #C
  }
}

@Search.searchable : true

// monitor and object page of marketability app

define view C_ChmlCmplncMktTP
  as select from I_ChmlCmplncInfoTP as _ComplianceInfo

  -- Nodes
  -- Market Coverage
  association [0..*] to C_ChmlCmplncMktCvrgTP          as _MarketCoverage       on _MarketCoverage.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID

  -- Additional Information
  -- Material Data for Primary Material
  association [0..1] to C_ChmlCmplncPrimMatl           as _MaterialDataPrimary  on _MaterialDataPrimary.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID
  -- Specific Marketability
  association [0..*] to C_ChmlCmplncMktSpcfcCvrg       as _SpecificCoverage     on _SpecificCoverage.ChmlCmplncProdUUID = $projection.ActiveChmlCmplncInfoUUID
  -- Packaged Products
  association [0..*] to C_ChmlCmplncMktProdAssgmt      as _PackagedProducts     on _PackagedProducts.ChmlCmplncProdUUID = $projection.ActiveChmlCmplncInfoUUID

  -- Marketability related Key Figures
  association [0..1] to I_ChmlCmplncMktKeyFig          as _MarketKeyFig         on _MarketKeyFig.ChmlCmplncInfoUUID = $projection.ActiveChmlCmplncInfoUUID

  association [0..1] to C_ChmlCmplncRespUnitDngrsGdsVH as _RespDangerousGoodsVH on _RespDangerousGoodsVH.ResponsibleUnit = $projection.DngrsGdsRespUnit
{
      @ObjectModel.readOnly: true
  key ChmlCmplncInfoUUID,

      @Consumption.hidden: true
      _ComplianceInfo.ActiveChmlCmplncInfoUUID,

      --UUID of active or draft chemical compliance info
      @ObjectModel.readOnly: true
      _ComplianceInfo.ActiveChmlCmplncInfoUUID                                                          as ChmlCmplncInfoNavgnLink,

      @ObjectModel.readOnly: true
      _ComplianceInfo.ActiveChmlCmplncInfoUUID                                                          as CmplRqRsltNavgnLink,

      --Material/Product number
      @ObjectModel:{
        readOnly: true,
        text.element: ['MaterialName']
      }
      @Consumption: {
        valueHelpDefinition: [{
          entity: {name: 'I_ProductVH', element: 'Product'} }]
      }
      _MaterialDataPrimary.Material                                                                     as Material,

      @ObjectModel.readOnly: true
      _MaterialDataPrimary.MaterialName                                                                 as MaterialName,

      @ObjectModel.readOnly: true
      _MaterialDataPrimary.ChmlCmplncInfoCombinedName                                                   as ChmlCmplncInfoCombinedName,

      --Navigation Link to Unpackaged Product App
      ChmlCmplncInternalName                                                                            as ChmlCmplncInternalName,

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfChmlCmplncReqOpn                                                              as NmbrOfChmlCmplncReqOpn,

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfChmlCmplncPckgdProducts                                                       as NmbrOfChmlCmplncPckgdProducts,

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfChmlCmplncReqOpnWithTot                                                       as NmbrOfChmlCmplncReqOpnWithTot,

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

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfChmlCmplncMktCountries                                                        as NmbrOfChmlCmplncMktCountries,

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfChmlCmplncReqProcd                                                            as NmbrOfChmlCmplncReqProcd,

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfInProcessCmplRqRslts                                                          as NmbrOfInProcessCmplRqRslts,

      @ObjectModel.readOnly: true
      _MarketKeyFig.NmbrOfReleasedCmplRqRslts                                                           as NmbrOfReleasedCmplRqRslts,

      @ObjectModel.readOnly: true
      //--Use the counter of requirements of assigned purposes in unpackaged product

      //--TODO Chemical Compliance Information -> add packaged products

      // cast(_PurposeRequirementCounter.NmbrOfCmplRqRslts as ehfnd_cci_number_of_crr preserving type )                       as  NmbrOfCmplRqRslts,

      _MarketKeyFig.NmbrOfCmplRqRslts                                                                   as NmbrOfCmplRqRslts,


      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT5'
      0                                                                                                 as ReleasedCmplRqRsltsCritlty,

      @ObjectModel.readOnly: true
      _MarketKeyFig.ReleasedCmplRqRsltsPctName                                                          as ReleasedCmplRqRsltsPctName,

      @ObjectModel.readOnly: true
      _MarketKeyFig.ReleasedCmplRqRsltsPct                                                              as ReleasedCmplRqRsltsPct,

      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT5'
      0                                                                                                 as InProcessCmplRqRsltsCritlty,

      @ObjectModel.readOnly: true
      _MarketKeyFig.InProcessCmplRqRsltsPctName                                                         as InProcessCmplRqRsltsPctName,

      @ObjectModel.readOnly: true
      _MarketKeyFig.InProcessCmplRqRsltsPct                                                             as InProcessCmplRqRsltsPct,

      --Specification with intent-based navigation
      @ObjectModel.readOnly: true
      Specification                                                                                     as Specification,

      @ObjectModel:
      {
        readOnly: true,
        text.element:  [ 'ResponsibleUnitName' ]
      }
      ProdStewardshipRespUnit                                                                           as ProdStewardshipRespUnit,

      @ObjectModel.readOnly: true
      _RespUnitForProductStewardship._Text[1: Language = $session.system_language ].ResponsibleUnitName as ResponsibleUnitName,

      -- Responsible Unit for Dangerous Goods
      @ObjectModel:
       {
         mandatory: true,
         foreignKey.association: '_RespDangerousGoodsVH',
         text.element:  [ 'DngrsGdsRespUnitName' ]
       }
      @Semantics.text: true
      DngrsGdsRespUnit                                                                                  as DngrsGdsRespUnit,

      --Description of Responsible Unit of Dangerous Goods
      @ObjectModel.readOnly: true
      @Semantics.text: true
      _RespDangerousGoodsVH.ResponsibleUnitName                                                         as DngrsGdsRespUnitName,

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      -- CCI Type and Roles
      -----------------------------------------------------------------------------------------------------------------------------------------------------------------
      --Chemical Compliance Information Type
      ChmlCmplncInfoType                                                                                as ChmlCmplncInfoType,

      --Indicator: Chemical Compliance Information is transported
      MaterialIsTransported                                                                             as MaterialIsTransported,

      --Indicator: Chemical Compliance Information is sold
      MaterialIsSold                                                                                    as MaterialIsSold,

      --Indicator: Chemical Compliance Information is produced
      MaterialIsProduced                                                                                as MaterialIsProduced,

      --Indicator: Chemical Compliance Information is sourced
      MaterialIsSourced                                                                                 as MaterialIsSourced,

      --R&D Indicator: Product under Research
      @ObjectModel.readOnly: true
      _ComplianceInfo.ChmlCmplncProdIsResearched                                                        as ChmlCmplncProdIsResearched,

      @ObjectModel.readOnly: true
      @Semantics.systemDate.lastChangedAt: true
      LastChangeUTCDateTime                                                                             as LastChangeUTCDateTime,

      //      @ObjectModel.readOnly: true

      //      @Semantics.name.fullName: true

      //      cast( _LastChangedByUser.UserDescription as ehfnd_bo_lchg_uname_enhanced preserving type )        as LastChangedByUser,


      @ObjectModel:
      {
        text.element:  [ 'UserDescription' ]
      }
      LastChangedByUser                                                                                 as LastChangedByUser,

      @ObjectModel.readOnly : true
      @Semantics.text: true
      _LastChangedByUser.UserDescription                                                                as UserDescription,

      /* Associations */
      @ObjectModel.association.type:  [ #TO_COMPOSITION_CHILD ]
      _MarketCoverage,

      _SpecificCoverage,

      _PackagedProducts,

      _MaterialDataPrimary,

      _RespDangerousGoodsVH
}
where
       ChmlCmplncInfoType    = 'BU'
  and(
       MaterialIsSold        = 'X'
    or MaterialIsTransported = 'X'
    or MaterialIsProduced    = 'X'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHMLCMPLNCPRIMMATL",
"C_CHMLCMPLNCRESPUNITDNGRSGDSVH",
"I_CHMLCMPLNCINFOTP",
"I_CHMLCMPLNCMKTKEYFIG",
"I_RESPONSIBLEUNIT",
"I_RESPONSIBLEUNITTEXT",
"I_USER"
],
"ASSOCIATED":
[
"C_CHMLCMPLNCMKTCVRGTP",
"C_CHMLCMPLNCMKTPRODASSGMT",
"C_CHMLCMPLNCMKTSPCFCCVRG",
"C_CHMLCMPLNCPRIMMATL",
"C_CHMLCMPLNCRESPUNITDNGRSGDSVH",
"I_CHMLCMPLNCMKTKEYFIG"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/