I_ExistenceCheckOnMatlDocItem
Existence Check on Material Doc Item
I_ExistenceCheckOnMatlDocItem is a Composite CDS View that provides data about "Existence Check on Material Doc Item" in SAP S/4HANA. It reads from 1 data source (I_MaterialDocumentRecord) and exposes 3 fields with key fields MaterialDocument, MaterialDocumentItem, MaterialDocumentYear. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | I_MaterialDocumentRecord | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_MatDocOvwItmSerialNumber | _SerialNo | $projection.MaterialDocument = _SerialNo.MaterialDocument and $projection.MaterialDocumentItem = _SerialNo.MaterialDocumentItem and $projection.MaterialDocumentYear = _SerialNo.MaterialDocumentYear |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| EndUserText.label | Existence Check on Material Doc Item | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (3)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocument | MaterialDocument | ||
| KEY | MaterialDocumentItem | MaterialDocumentItem | ||
| KEY | MaterialDocumentYear | MaterialDocumentYear |
//-- This CDS View is intended to check if Material Document Item consists specific fields --
//-- At the moment based on Material Document Number, Material Document Item and Material Document Year --
//-- existence of Serial Number is being check, this is open for any further improvements/additions --
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl: { authorizationCheck: #NOT_REQUIRED,
personalData.blocking: #NOT_REQUIRED }
@EndUserText.label: 'Existence Check on Material Doc Item'
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #XL,
dataClass: #TRANSACTIONAL
}
define view entity I_ExistenceCheckOnMatlDocItem
as select from I_MaterialDocumentRecord
association [0..*] to I_MatDocOvwItmSerialNumber as _SerialNo on $projection.MaterialDocument = _SerialNo.MaterialDocument
and $projection.MaterialDocumentItem = _SerialNo.MaterialDocumentItem
and $projection.MaterialDocumentYear = _SerialNo.MaterialDocumentYear
{
key MaterialDocument,
key MaterialDocumentItem,
key MaterialDocumentYear,
// cast(
// min(case when _SerialNo.SerialNumber is null
// then 'X'
// else '' end
// ) as boolean preserving type) as MatlDocHasNoSerializedMaterial,
// @Semantics.booleanIndicator: true
// case min(_SerialNo.PhysicalInventoryDocumentItem)
// when '000'
// then 'X'
// else ''
// end as MatDocHasNoSrlNmbrForPInv
cast(
// This field is 'X' when either the material in the material document is NOT serialized or
// the Material is Serialized but it is related to a Physical inventory document, in which case
// the field below (MatDocHasNoSrlNmbrForPInv) is blank. These fields toggle de visibility
// of the two different facets for SNs in the Material Documents Overview App. Therefore, ONLY ONE OF THESE
// CAN BE BLANK AT A GIVEN TIME
min(case when ( ( _SerialNo.SerialNumber is not null and _SerialNo.PhysicalInventoryDocumentItem <> '000' )
or ( _SerialNo.SerialNumber is null )
)
then 'X'
else '' end
) as boolean preserving type) as MatlDocHasNoSerializedMaterial,
@Semantics.booleanIndicator: true
min( case when ( _SerialNo.PhysicalInventoryDocumentItem is null or _SerialNo.PhysicalInventoryDocumentItem = '000' )
then 'X'
else ''
end
) as MatDocHasNoSrlNmbrForPInv
}
group by
MaterialDocument,
MaterialDocumentItem,
MaterialDocumentYear,
_SerialNo.PhysicalInventoryDocumentItem
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