P_ChmlCmplncPrimaryMaterial

DDL: P_CHMLCMPLNCPRIMARYMATERIAL Type: view CONSUMPTION

P_ChmlCmplncPrimaryMaterial is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 15 fields.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncInfo ChemicalComplianceInfo from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PCCMATLPRIMARY 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
VDM.private true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view

Fields (15)

KeyFieldSource TableSource FieldDescription
ChmlCmplncInfoUUID
MaterialasMaterial
ProductNameasMaterialName
ChmlCmplncProdIsResearched I_ChmlCmplncInfo ChmlCmplncProdIsResearched
ChmlCmplncInternalName I_ChmlCmplncInfo ChmlCmplncInternalName
ChmlCmplncInfoCombinedName
ChmlCmplncInfoCombinedID
ChmlCmplncInfoType I_ChmlCmplncInfo ChmlCmplncInfoType
MaterialIsProduced
MaterialIsSold I_ChmlCmplncInfo MaterialIsSold
MaterialIsSourced I_ChmlCmplncInfo MaterialIsSourced
MaterialIsTransported I_ChmlCmplncInfo MaterialIsTransported
MaterialIsDisposed I_ChmlCmplncInfo MaterialIsDisposed
MaterialIsEmissionRelevant I_ChmlCmplncInfo MaterialIsEmissionRelevant
ProdStewardshipRespUnit I_ChmlCmplncInfo ProdStewardshipRespUnit
@AbapCatalog:
{
  sqlViewName: 'PCCMATLPRIMARY',
  compiler.compareFilter: true,
  preserveKey: true
}

@AccessControl:
{
  // authorization check should not be needed as view should be used only in SADL exit 

  // where authorization is already checked but we want to be on the safe side

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

  personalData.blocking: #NOT_REQUIRED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #CONSUMPTION -- consumption views may use virtual elements
@VDM.private: true

@ObjectModel:
{
//  semanticKey:  [ 'Material' ],

  usageType:
  {
    dataClass: #MIXED,
    sizeCategory: #L,
    serviceQuality: #C
  }
  
}

// Private view for the determination of ChmlCmplncInfoCombinedName. Can be used if sorting and filtering is not needed 


define view P_ChmlCmplncPrimaryMaterial
  --Select data from master table 'Chemical Compliance Info'
  as select from           I_ChmlCmplncInfo       as ChemicalComplianceInfo

  --Is Researched DTEL Text
    left outer to one join I_ChmlCmplncIsResearchedText as ProdIsResearchedText on ProdIsResearchedText.Language = $session.system_language

  --Join data from primary material assignment
    left outer to one join I_ChmlCmplncMatlAssgmt as PrimaryMaterial on  ChemicalComplianceInfo.ChmlCmplncInfoUUID = PrimaryMaterial.ChmlCmplncInfoUUID
                                                                     and PrimaryMaterial.MatlAssgmtIsPrimary       = 'X'
  --Join data from product name
    left outer to one join I_ProductText          as MaterialData    on  PrimaryMaterial.Material = MaterialData.Product
                                                                     and MaterialData.Language    = $session.system_language

{
      --UUID of Chemical Compliance Info
  key ChemicalComplianceInfo.ChmlCmplncInfoUUID,

      --Material
      PrimaryMaterial.Material                                                           as Material,

      --Material Name
      MaterialData.ProductName                                                           as MaterialName,

      ChemicalComplianceInfo.ChmlCmplncProdIsResearched,
      ChemicalComplianceInfo.ChmlCmplncInternalName,
      
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_PRIMMATL_EXIT'
      cast( '' as ehfnd_phrs_text )                                                              as ChmlCmplncInfoCombinedName,
      
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CCI_PRIMMATL_EXIT'
      cast( '' as ehfnd_phrs_text )                                                              as ChmlCmplncInfoCombinedID,
      

      ChemicalComplianceInfo.ChmlCmplncInfoType,

      --Roles and Responsible Unit for DCL
      ChemicalComplianceInfo.MaterialIsProduced,
      ChemicalComplianceInfo.MaterialIsSold,
      ChemicalComplianceInfo.MaterialIsSourced,
      ChemicalComplianceInfo.MaterialIsTransported,
      ChemicalComplianceInfo.MaterialIsDisposed, 
      ChemicalComplianceInfo.MaterialIsEmissionRelevant, 

      ChemicalComplianceInfo.ProdStewardshipRespUnit
 }