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 21 fields with key fields PhysicalInventoryDocument, FiscalYear, PhysicalInventoryDocumentItem, SerialNumber, FiscalYear.
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 (11)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | IPIDOCSN | view | |
| EndUserText.label | Physical Inventory Doc Serial Number | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (21)
| 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 | ||||
| SerialNumberIsInBooks | ||||
| SerialNumberIsCounted |
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'IPIDOCSN'
@EndUserText.label: 'Physical Inventory Doc Serial Number'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
define view 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
'X' as SerialNumberIsInBooks,
case when act.SerialNumber is null then ' ' else 'X' 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 ' ' else 'X' end as SerialNumberIsInBooks,
'X' as SerialNumberIsCounted
}
where act.PhysInvtrySerialNmbrListType = '2' //Counted stock object list
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_PHYSINVTRYDOCSRLNMBR"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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