C_RawChmlCompOfSuplrMatlCmpstn is a Consumption CDS View that provides data about "Component of Supplier Material Composition" in SAP S/4HANA. It reads from 3 data sources (I_ChmlComposition, I_ChmlCmplncSuplrMatlAssgmt, I_ChmlComponent) and exposes 17 fields. It has 4 associations to related views. Part of development package EHFND_CNS_CCI.
@EndUserText.label: 'Component of Supplier Material Composition'
@AbapCatalog:
{
sqlViewName: 'CCRMCSUPCMPSTN',
compiler.compareFilter: true,
preserveKey: true
}@AccessControl:
{
authorizationCheck: #CHECK,
// blocking of personal data not required (no personal data fields exposed for material (MARA))
personalData.blocking: #NOT_REQUIRED
}@ClientHandling.algorithm: #SESSION_VARIABLE@Metadata: {
allowExtensions: true
}@VDM.viewType: #CONSUMPTION@ObjectModel:
{
--Annotation for the UI
semanticKey: [ 'BusinessPartnerSupplier' ],
usageType:
{
dataClass: #MIXED,
sizeCategory: #L,
serviceQuality: #C
}
}
--Header information
@UI:
{
headerInfo:
{
typeName: 'Component',
typeNamePlural: 'Components',
title:
{
label: 'Component in Composition',
value: 'ChmlCompName'
}
},
presentationVariant:
{
sortOrder:
[
{
by: 'ChmlCompQty',
direction: #DESC
},
{
by: 'ChmlCompName',
direction: #ASC
}
]
}
}
defineview C_RawChmlCompOfSuplrMatlCmpstn
--Select data from basic view 'Chemical Component' and shrink for supplier compositions (Analytic composition, in progress)
asselectfrom I_ChmlComponent as ChemicalComponent
innerjoin I_ChmlComposition as _ChemicalComposition on ChemicalComponent.ChmlCompositionUUID = _ChemicalComposition.ChmlCompositionUUID
and _ChemicalComposition.ChmlCompositionType = 'ANALYTIC1'
and _ChemicalComposition.ChmlCompositionStatus = 'IP'
innerjoin I_ChmlCmplncSuplrMatlAssgmt as _SuplrMatlAssgmt on _SuplrMatlAssgmt.ChmlSuplrMatlUUID = ChemicalComponent.ChmlSuplrMatlUUID
and _SuplrMatlAssgmt.ChmlSuplrMatlIsOutdated = ''
and _SuplrMatlAssgmt.ChmlSuplrMatlSuplrSts <> 'BL'
-----------------------------------------------------------------------------------------------------------
--Supplier Material
-----------------------------------------------------------------------------------------------------------
association [0..1] to I_ChmlSuplrMatlTP as _ChmlSuplrMatl on _ChmlSuplrMatl.ChmlSuplrMatlUUID = $projection.ChmlSuplrMatlUUID
-----------------------------------------------------------------------------------------------------------
--Additional information
-----------------------------------------------------------------------------------------------------------
association [1..1] to P_ChmlSuplrMatlData as _AdditionalData on $projection.ChmlSuplrMatlUUID = _AdditionalData.ChmlSuplrMatlUUID
association [0..1] to C_SubstanceVH as _SubstanceVH on $projection.SubstanceUUID = _SubstanceVH.SubstanceUUID
association [0..1] to C_ChmlSuplrMatlSupplierVH as _ChmlSuplrMatlSupplierVH on $projection.BusinessPartnerSupplier = _ChmlSuplrMatlSupplierVH.BusinessPartnerSupplier
{
--UUID of component
key ChemicalComponent.ChmlCompUUID,
-------------------------------------------------------------------------------------------------------
--Information of component substance
-------------------------------------------------------------------------------------------------------
--UUID of chemical compliance info
_SuplrMatlAssgmt.ChmlCmplncInfoUUID,
--UUID of supplier material
_SuplrMatlAssgmt.ChmlSuplrMatlUUID,
--UUID of composition
ChemicalComponent.ChmlCompositionUUID,
--Composition Type
_ChemicalComposition.ChmlCompositionType,
_ChemicalComposition.ChmlCompositionStatus,
--Supplier
@ObjectModel:
{
text.element: [ 'SupplierName' ],
foreignKey.association: '_ChmlSuplrMatlSupplierVH'
}
_ChmlSuplrMatl.BusinessPartnerSupplier as BusinessPartnerSupplier,
--Supplier Name
cast(_AdditionalData.BusinessPartnerFullName as ehfnd_supplier_name ) as SupplierName,
--UUID of Substance
@ObjectModel.text.element: [ 'ChmlCompName' ]
ChemicalComponent.SubstanceUUID,
--Combined Name (A: Substance Name, M: Material Name)
_SubstanceVH.SubstanceName as ChmlCompName,
--CAS Number
_SubstanceVH.CASNumber,
--Component Type
@ObjectModel.text.element: [ 'ChmlCompTypeName' ]
ChemicalComponent.ChmlCompType,
--Description of Component Type
_ComponentType._Text[1: Language = $session.system_language ].ChmlCompTypeName,
--Concentration value
@Semantics: {
quantity: {
unitOfMeasure: 'ChmlCompQtyUnit'
}
}
ChemicalComponent.ChmlCompQty as ChmlCompQty,
--Lower Limit
@Semantics: {
quantity: {
unitOfMeasure: 'ChmlCompQtyUnit'
}
}
cast( ChemicalComponent.ChmlCompQtyLowerLimit as ehfnd_cci_ccomp_lower_limit_9 ) as ChmlCompQtyLowerLimit,
@Semantics: {
quantity: {
unitOfMeasure: 'ChmlCompQtyUnit'
}
}
cast( ChemicalComponent.ChmlCompQtyUpperLimit as ehfnd_cci_ccomp_upper_limit_9 ) as ChmlCompQtyUpperLimit,
ChemicalComponent.ChmlCompQtyUnit,
-------------------------------------------------------------------------------------------------------
/*Associations*/
-------------------------------------------------------------------------------------------------------
--Association for DCL
_ChmlSuplrMatl,
--Value Helps
_ChmlSuplrMatlSupplierVH,
_SubstanceVH
}