C_MatlBsdSubstInRmngCompVH
Substances in Aft Prod Comp of MbC
C_MatlBsdSubstInRmngCompVH is a Consumption CDS View that provides data about "Substances in Aft Prod Comp of MbC" in SAP S/4HANA. It reads from 3 data sources (I_MatlBsdAfterProdnCompDraft, I_ChmlComposition, I_ChmlComponent) and exposes 19 fields with key field ChmlCompUUID. It has 2 associations to related views. Part of development package EHFND_CNS_CMPS_MATLBASED.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_MatlBsdAfterProdnCompDraft | _AfterProdnComp | inner |
| I_ChmlComposition | _ChemicalComposition | inner |
| I_ChmlComponent | ChmlComponent | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_ChmlCompositionUUID | sysuuid_x |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | C_ChmlCmplncPrimMatl | _PrimaryMaterial | ChmlComponent.ChmlCmplncInfoUUID = _PrimaryMaterial.ChmlCmplncInfoUUID --Substance |
| [0..1] | I_SubstanceTP | _Substance | ChmlComponent.SubstanceUUID = _Substance.SubstanceUUID |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Substances in Aft Prod Comp of MbC | view | |
| AbapCatalog.sqlViewName | MBCREMCOMPSUBVH | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.dataCategory | #VALUE_HELP | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.representativeKey | ChmlCompUUID | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Search.searchable | true | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ChmlCompUUID | I_ChmlComponent | ChmlCompUUID | |
| ChmlCompositionUUID | I_ChmlComponent | ChmlCompositionUUID | ||
| ChmlCmplncInfoUUID | I_ChmlComponent | ChmlCmplncInfoUUID | ||
| ChmlCompositionUUIDasMatlBsdCompUUID | ||||
| SubstanceUUID | I_ChmlComponent | SubstanceUUID | ||
| SubstanceName | _Substance | SubstanceName | ||
| CASNumber | ||||
| ChmlCompQty | I_ChmlComponent | ChmlCompQty | ||
| ChmlCompQtyAsText | I_ChmlComponent | ChmlCompQtyAsText | ||
| ChmlCompQtyUnit | I_ChmlComponent | ChmlCompQtyUnit | ||
| ChmlCompOperatorLowerLimit | I_ChmlComponent | ChmlCompOperatorLowerLimit | ||
| ChmlCompQtyLowerLimit | I_ChmlComponent | ChmlCompQtyLowerLimit | ||
| ChmlCompQtyLowerLimitAsText | I_ChmlComponent | ChmlCompQtyLowerLimitAsText | ||
| ChmlCompOperatorUpperLimit | I_ChmlComponent | ChmlCompOperatorUpperLimit | ||
| ChmlCompQtyUpperLimit | I_ChmlComponent | ChmlCompQtyUpperLimit | ||
| ChmlCompQtyUpperLimitAsText | I_ChmlComponent | ChmlCompQtyUpperLimitAsText | ||
| ResponsibleUnit | _Substance | ResponsibleUnit | ||
| _PrimaryMaterial | _PrimaryMaterial | |||
| _Substance | _Substance |
@EndUserText.label: 'Substances in Aft Prod Comp of MbC'
@AbapCatalog:
{
sqlViewName: 'MBCREMCOMPSUBVH',
compiler.compareFilter: true
}
@AccessControl:
{
authorizationCheck: #MANDATORY,
// blocking of personal data not required (no personal data fields exposed for material)
personalData.blocking: #NOT_REQUIRED
}
@VDM.viewType: #CONSUMPTION
@ObjectModel:
{
dataCategory: #VALUE_HELP,
usageType:
{
dataClass: #MIXED,
sizeCategory: #L,
serviceQuality: #C
},
representativeKey: 'ChmlCompUUID',
semanticKey: ['SubstanceName']
}
@Metadata.ignorePropagatedAnnotations: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@UI:{
presentationVariant: [{
sortOrder: [{ by: 'SubstanceName', direction: #ASC }],
requestAtLeast: ['SubstanceUUID',
'ChmlCmplncInfoCombinedName',
'Material',
'SubstanceName',
'CASNumber',
'ChmlCompQtyAsText',
'ChmlCompQtyUnit',
'ChmlCompOperatorLowerLimit',
'ChmlCompQtyLowerLimitAsText',
'ChmlCompOperatorUpperLimit',
'ChmlCompQtyUpperLimitAsText'
]
}]
}
@Search.searchable: true
/*
* This view is used in the object page of the material based composition
* to diplay all CCIs with type = 'Bulk' and role 'Produced' or 'Sourced'
* in a value help
*/
define view C_MatlBsdSubstInRmngCompVH
with parameters
P_ChmlCompositionUUID : sysuuid_x
-- select Raw Material
as select from I_ChmlComponent as ChmlComponent
inner join I_MatlBsdAfterProdnCompDraft as _AfterProdnComp on ChmlComponent.ChmlCmplncInfoUUID = _AfterProdnComp.CompChmlCmplncInfoUUID
inner join I_ChmlComposition as _ChemicalComposition on ChmlComponent.ChmlCompositionUUID = _ChemicalComposition.ChmlCompositionUUID
and _ChemicalComposition.ChmlCompositionType = 'ANALYTIC1'
and _ChemicalComposition.ChmlCompositionStatus = 'RE'
--------------------------------------------------------------------------------------------------------------------
--Nodes/Detaildata
--------------------------------------------------------------------------------------------------------------------
association [0..1] to C_ChmlCmplncPrimMatl as _PrimaryMaterial on ChmlComponent.ChmlCmplncInfoUUID = _PrimaryMaterial.ChmlCmplncInfoUUID
--Substance
association [0..1] to I_SubstanceTP as _Substance on ChmlComponent.SubstanceUUID = _Substance.SubstanceUUID
{
key ChmlComponent.ChmlCompUUID,
ChmlComponent.ChmlCompositionUUID,
ChmlComponent.ChmlCmplncInfoUUID,
-- MatlBsdComp of Root
_AfterProdnComp.ChmlCompositionUUID as MatlBsdCompUUID,
-- Preferred Material of Component
@ObjectModel.readOnly: true
@ObjectModel.text.element: ['ChmlCmplncInfoCombinedName']
@Semantics.text:true
cast( _PrimaryMaterial.Material as matnr preserving type) as Material,
-- Combined component name
@ObjectModel.readOnly: true
@Semantics.text: true
@Search: {
defaultSearchElement: true,
fuzzinessThreshold: 0.8,
ranking: #HIGH
}
cast(_PrimaryMaterial.ChmlCmplncInfoCombinedName as ehfnd_cci_component_name preserving type ) as ChmlCmplncInfoCombinedName,
ChmlComponent.SubstanceUUID,
_Substance.SubstanceName,
@UI: {
lineItem: [{
position: 20 ,
importance: #MEDIUM
}]
}
_Substance._ListedSubstance.CASNumber,
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChmlComponent.ChmlCompQty,
ChmlComponent.ChmlCompQtyAsText,
ChmlComponent.ChmlCompQtyUnit,
ChmlComponent.ChmlCompOperatorLowerLimit,
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChmlComponent.ChmlCompQtyLowerLimit,
ChmlComponent.ChmlCompQtyLowerLimitAsText,
ChmlComponent.ChmlCompOperatorUpperLimit,
@Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
ChmlComponent.ChmlCompQtyUpperLimit,
ChmlComponent.ChmlCompQtyUpperLimitAsText,
// @ObjectModel.readOnly: true
// @ObjectModel.virtualElement
// @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_MCMPS_APC_SUB_AC_EXIT'
// cast( 0 as ehfnd_cci_ccomp_qty_ch ) as ChmlCompAbsQtyAsText,
@UI.hidden: true
_Substance.ResponsibleUnit as ResponsibleUnit,
/* Associations */
_PrimaryMaterial,
_Substance
}
where
_AfterProdnComp.ChmlCompositionUUID = $parameters.P_ChmlCompositionUUID
and _AfterProdnComp.ChmlCompIsRemoved <> 'X'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA