C_MatlBasedCmpstnCompVH
Value Help for Components of Material Based Composition
C_MatlBasedCmpstnCompVH is a Consumption CDS View that provides data about "Value Help for Components of Material Based Composition" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfoVH, I_MatlBasedCompositionDraft) and exposes 14 fields with key fields ChmlCompositionUUID, ChmlCmplncInfoUUID. Part of development package EHFND_CNS_CMPS_MATLBASED.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_ChmlCmplncInfoVH | _ChemicalComplianceInfo | from |
| I_MatlBasedCompositionDraft | _MatlBasedCompositionDraft | inner |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_ChmlCompositionUUID | sysuuid_x |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Value Help for Components of Material Based Composition | view | |
| AbapCatalog.sqlViewName | CMCCOMPVH | 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 | ChmlCmplncInfoUUID | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Search.searchable | true | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ChmlCompositionUUID | |||
| KEY | ChmlCmplncInfoUUID | I_ChmlCmplncInfoVH | ChmlCmplncInfoUUID | |
| ChmlCmplncInfoCombinedName | ChmlCmplncInfoCombinedName | |||
| Material | Material | |||
| ProductName | ProductName | |||
| ChmlCmplncInternalName | ChmlCmplncInternalName | |||
| ProdStewardshipRespUnit | ProdStewardshipRespUnit | |||
| ChmlCmplncInfoType | ChmlCmplncInfoType | |||
| MaterialIsSold | MaterialIsSold | |||
| MaterialIsTransported | MaterialIsTransported | |||
| MaterialIsDisposed | MaterialIsDisposed | |||
| MaterialIsEmissionRelevant | MaterialIsEmissionRelevant | |||
| MaterialIsSourced | MaterialIsSourced | |||
| MaterialIsProduced | MaterialIsProduced |
@EndUserText.label: 'Value Help for Components of Material Based Composition'
@AbapCatalog:
{
sqlViewName: 'CMCCOMPVH',
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: 'ChmlCmplncInfoUUID',
semanticKey: ['ChmlCmplncInfoCombinedName']
}
@Metadata.ignorePropagatedAnnotations: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@UI:{
presentationVariant: [{
sortOrder: [{ by: 'ChmlCmplncInfoCombinedName', direction: #ASC }],
requestAtLeast: ['Material',
'ProductName',
'MaterialIsProduced',
'MaterialIsSourced'
]
}]
}
@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_MatlBasedCmpstnCompVH
with parameters
P_ChmlCompositionUUID : sysuuid_x
-- select Raw Material
as select from I_ChmlCmplncInfoVH as _ChemicalComplianceInfo
--Join data with draft compositions
inner join I_MatlBasedCompositionDraft as _MatlBasedCompositionDraft on _MatlBasedCompositionDraft.ChmlCompositionUUID = $parameters.P_ChmlCompositionUUID
--Join data of draft components of material based composition that are already assigned
left outer to one join I_MatlBsdBeforeProdnCompDraft as _MatlBsdBeforeProdnCompDraft on _ChemicalComplianceInfo.ChmlCmplncInfoUUID = _MatlBsdBeforeProdnCompDraft.CompChmlCmplncInfoUUID
and _MatlBsdBeforeProdnCompDraft.ChmlCompositionUUID = $parameters.P_ChmlCompositionUUID
{
@UI.hidden: true
key $parameters.P_ChmlCompositionUUID as ChmlCompositionUUID,
@UI.hidden: true
key _ChemicalComplianceInfo.ChmlCmplncInfoUUID,
@UI.lineItem: [{ position: 10, importance: #HIGH }]
@Consumption.filter.hidden: true
ChmlCmplncInfoCombinedName,
@UI.lineItem: [{ position: 20, importance: #HIGH }]
Material,
@Search:
{
defaultSearchElement: true,
fuzzinessThreshold: 0.7,
ranking: #HIGH
}
@UI.hidden: true
ProductName,
@Search:
{
defaultSearchElement: true,
fuzzinessThreshold: 0.7,
ranking: #MEDIUM
}
@UI.lineItem: [{ position: 30, importance: #HIGH }]
ChmlCmplncInternalName,
// needed for DCL
@UI.hidden: true
ProdStewardshipRespUnit,
@UI.hidden: true
ChmlCmplncInfoType,
@UI.hidden: true
MaterialIsSold,
@UI.hidden: true
MaterialIsTransported,
@UI.hidden: true
MaterialIsDisposed,
@UI.hidden: true
MaterialIsEmissionRelevant,
@Search:
{
defaultSearchElement: true,
fuzzinessThreshold: 0.7,
ranking: #LOW
}
@UI.lineItem: [{ position: 40, importance: #HIGH }]
MaterialIsSourced,
@Search:
{
defaultSearchElement: true,
fuzzinessThreshold: 0.7,
ranking: #LOW
}
@UI.lineItem: [{ position: 50, importance: #HIGH }]
MaterialIsProduced
}
-- Only for CCI type 'Bulk' and CCI role 'Sourced' or 'Produced'
where
(
ChmlCmplncInfoType = 'BU'
and(
MaterialIsSourced = 'X'
or MaterialIsProduced = 'X'
)
)
and --Select components which are not assigned in before production in the current draft table
_MatlBsdBeforeProdnCompDraft.ChmlCompositionUUID is null
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