I_PhysInvtryDocSrlNmbr
Physical Inventory Doc Serial Number
I_PhysInvtryDocSrlNmbr is a Composite CDS View that provides data about "Physical Inventory Doc Serial Number" in SAP S/4HANA. It reads from 4 data sources (P_PhysInvtryDocSrlNmbr, P_PhysInvtryDocSrlNmbr, P_PhysInvtryDocSrlNmbr, P_PhysInvtryDocSrlNmbr) and exposes 20 fields with key fields PhysicalInventoryDocument, FiscalYear, PhysicalInventoryDocumentItem, SerialNumber, FiscalYear. Part of development package MM_IM_VDM_PI.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| P_PhysInvtryDocSrlNmbr | act | left_outer |
| P_PhysInvtryDocSrlNmbr | act | union |
| P_PhysInvtryDocSrlNmbr | exp | from |
| P_PhysInvtryDocSrlNmbr | exp | left_outer |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| EndUserText.label | Physical Inventory Doc Serial Number | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PhysicalInventoryDocument | P_PhysInvtryDocSrlNmbr | PhysicalInventoryDocument | |
| KEY | FiscalYear | P_PhysInvtryDocSrlNmbr | FiscalYear | |
| KEY | PhysicalInventoryDocumentItem | P_PhysInvtryDocSrlNmbr | PhysicalInventoryDocumentItem | |
| KEY | SerialNumber | P_PhysInvtryDocSrlNmbr | SerialNumber | |
| Equipment | P_PhysInvtryDocSrlNmbr | Equipment | ||
| Material | P_PhysInvtryDocSrlNmbr | Material | ||
| Plant | P_PhysInvtryDocSrlNmbr | Plant | ||
| DocumentDate | P_PhysInvtryDocSrlNmbr | DocumentDate | ||
| DocumentType | ||||
| SerialNumberIsInBooks | ||||
| PhysicalInventoryDocument | ||||
| KEY | FiscalYear | P_PhysInvtryDocSrlNmbr | FiscalYear | |
| KEY | PhysicalInventoryDocumentItem | P_PhysInvtryDocSrlNmbr | PhysicalInventoryDocumentItem | |
| KEY | SerialNumber | P_PhysInvtryDocSrlNmbr | SerialNumber | |
| Equipment | P_PhysInvtryDocSrlNmbr | Equipment | ||
| Material | P_PhysInvtryDocSrlNmbr | Material | ||
| Plant | P_PhysInvtryDocSrlNmbr | Plant | ||
| DocumentDate | P_PhysInvtryDocSrlNmbr | DocumentDate | ||
| DocumentType | ||||
| SerialNumberIsCounted |
@Metadata.ignorePropagatedAnnotations: true
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@EndUserText.label: 'Physical Inventory Doc Serial Number'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #COMPOSITE
define view entity I_PhysInvtryDocSrlNmbr
as select from P_PhysInvtryDocSrlNmbr as exp
left outer join P_PhysInvtryDocSrlNmbr as act on exp.PhysicalInventoryDocument = act.PhysicalInventoryDocument
and exp.FiscalYear = act.FiscalYear
and exp.PhysicalInventoryDocumentItem = act.PhysicalInventoryDocumentItem
and exp.Equipment = act.Equipment
and act.PhysInvtrySerialNmbrListType = '2' //Counted stock object list
{
key exp.PhysicalInventoryDocument,
key exp.FiscalYear,
key exp.PhysicalInventoryDocumentItem,
key exp.SerialNumber,
exp.Equipment,
exp.Material,
exp.Plant,
exp.DocumentDate,
cast( 'I' as sn_history_doc_type preserving type ) as DocumentType, //Inventory Document
cast('X' as boolean preserving type ) as SerialNumberIsInBooks,
case when act.SerialNumber is null then cast( ' ' as boolean preserving type )
else cast( 'X' as boolean preserving type ) end as SerialNumberIsCounted
}
where exp.PhysInvtrySerialNmbrListType = '1' //Inventory balance object list
union select from P_PhysInvtryDocSrlNmbr as act
left outer join P_PhysInvtryDocSrlNmbr as exp on exp.PhysicalInventoryDocument = act.PhysicalInventoryDocument
and exp.FiscalYear = act.FiscalYear
and exp.PhysicalInventoryDocumentItem = act.PhysicalInventoryDocumentItem
and exp.Equipment = act.Equipment
and exp.PhysInvtrySerialNmbrListType = '1' //Inventory balance object list
{
key act.PhysicalInventoryDocument,
key act.FiscalYear,
key act.PhysicalInventoryDocumentItem,
key act.SerialNumber,
act.Equipment,
act.Material,
act.Plant,
act.DocumentDate,
cast( 'I' as sn_history_doc_type preserving type ) as DocumentType, //Inventory Document
case when exp.SerialNumber is null then cast( ' ' as boolean preserving type )
else cast( 'X' as boolean preserving type ) end as SerialNumberIsInBooks,
cast( 'X' as boolean preserving type ) as SerialNumberIsCounted
}
where act.PhysInvtrySerialNmbrListType = '2' //Counted stock object list
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