P_InvtryMgmtMatlMstrVH
Invtry Management Materials
P_InvtryMgmtMatlMstrVH is a Composite CDS View that provides data about "Invtry Management Materials" in SAP S/4HANA. It reads from 2 data sources (mara, marc) and exposes 15 fields with key fields Material, Plant, Batch, BatchValuationType, InventoryValuationType. It has 6 associations to related views. Part of development package MM_IM_VDM_VALUE_HELP.
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | I_MaterialText | _MaterialText | $projection.Material = _MaterialText.Material |
| [1..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [1..*] | I_MaterialTypeText | _MaterialTypeText | $projection.MaterialType = _MaterialTypeText.MaterialType |
| [1..*] | I_BatchPlant | _BatchPlant | $projection.Material = _BatchPlant.Material and $projection.Plant = _BatchPlant.Plant and $projection.IsBatchManagementRequired = 'X' |
| [1..*] | I_InvtryMgmtValuationTypeVH | _ValuationType | $projection.Material = _ValuationType.Material and $projection.Plant = _ValuationType.Plant and $projection.IsBatchManagementRequired = '' |
| [1..1] | I_BatchCrossPlant | _BatchCrossPlant | $projection.Material = _BatchCrossPlant.Material and $projection.batch = _BatchCrossPlant.Batch |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| Search.searchable | true | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | mara | matnr | |
| KEY | Plant | marc | werks | |
| KEY | Batch | _BatchPlant | Batch | |
| KEY | BatchValuationType | _BatchPlant | InventoryValuationType | |
| KEY | InventoryValuationType | _ValuationType | InventoryValuationType | |
| MaterialName | ||||
| PlantName | _Plant | PlantName | ||
| MaterialType | mara | mtart | ||
| MaterialTypeName | ||||
| ProductHierarchy | mara | prdha | ||
| AuthorizationGroup | mara | begru | ||
| SerialNumberProfile | marc | sernp | ||
| MaterialExternalID | ||||
| IsBatchManagementRequired | marc | xchpf | ||
| _BatchCrossPlant | _BatchCrossPlant |
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ObjectModel.usageType.sizeCategory: #S
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass:#MASTER
@Metadata: {
ignorePropagatedAnnotations: true
}
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Search.searchable: true
define view entity P_InvtryMgmtMatlMstrVH
as select from mara as ma inner join marc as mc on ma.matnr = mc.matnr
association [1..*] to I_MaterialText as _MaterialText on $projection.Material = _MaterialText.Material
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..*] to I_MaterialTypeText as _MaterialTypeText on $projection.MaterialType = _MaterialTypeText.MaterialType
association [1..*] to I_BatchPlant as _BatchPlant on $projection.Material = _BatchPlant.Material
and $projection.Plant = _BatchPlant.Plant
and $projection.IsBatchManagementRequired = 'X'
association [1..*] to I_InvtryMgmtValuationTypeVH as _ValuationType on $projection.Material = _ValuationType.Material
and $projection.Plant = _ValuationType.Plant
and $projection.IsBatchManagementRequired = ''
association [1..1] to I_BatchCrossPlant as _BatchCrossPlant on $projection.Material = _BatchCrossPlant.Material
and $projection.batch = _BatchCrossPlant.Batch
{
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
key ma.matnr as Material,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
key mc.werks as Plant,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
key _BatchPlant.Batch,
key _BatchPlant.InventoryValuationType as BatchValuationType, // from mcha
key _ValuationType.InventoryValuationType as InventoryValuationType, // from mbew etc.
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
_MaterialText[1: Language=$session.system_language].MaterialName,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
_Plant.PlantName as PlantName,
@UI.hidden: true
case when _BatchPlant.BatchIsMarkedForDeletion is null
then ''
else _BatchPlant.BatchIsMarkedForDeletion
end as BatIsMrkdForDeltnInPlnt,
// _BatchPlant.BatchIsMarkedForDeletion as BatIsMrkdForDeltnInPlnt,
@UI.hidden: true
case when _BatchPlant.ShelfLifeExpirationDate is null
then '00000000'
else _BatchPlant.ShelfLifeExpirationDate
end as ShelfLifeExpirationDate,
// _BatchPlant.ShelfLifeExpirationDate,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
ma.mtart as MaterialType,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
_MaterialTypeText[1: Language=$session.system_language].MaterialTypeName,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
ma.prdha as ProductHierarchy,
@UI.hidden: true
ma.begru as AuthorizationGroup,
@UI.hidden: true
mc.sernp as SerialNumberProfile,
@UI.hidden: true
cast(ma.matnr_external as nsdm_mat_external preserving type ) as MaterialExternalID,
@UI.hidden: true
mc.xchpf as IsBatchManagementRequired,
_BatchCrossPlant
}
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