P_BOMHeaderValidity
P_BOMHeaderValidity is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (stko, stko) and exposes 8 fields with key fields BillOfMaterialCategory, BillOfMaterial, BillOfMaterialVariant.
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PBOMHEADVALIDTO | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.type | #INHERITED | view | |
| ClientHandling.algorithm | #AUTOMATED | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #BASIC | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.private | true | view | |
| VDM.lifecycle.contract.type | #NONE | view |
Fields (8)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BillOfMaterialCategory | stko | stlty | |
| KEY | BillOfMaterial | stko | stlnr | |
| KEY | BillOfMaterialVariant | stko | stlal | |
| BOMHeaderInternalChangeCount | stko | stkoz | ||
| HeaderValidityStartDate | stko | datuv | ||
| HeaderValidityEndDate | ||||
| HeaderEngineeringChgNmbrDoc | stko | aennr | ||
| BillOfMaterialVersion | stko | bom_versn |
@AbapCatalog.sqlViewName: 'PBOMHEADVALIDTO'
@AbapCatalog.preserveKey:true
@ClientHandling.type : #INHERITED
@ClientHandling.algorithm : #AUTOMATED
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #BASIC
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.private: true
@VDM.lifecycle.contract.type: #NONE
define view P_BOMHeaderValidity as select from stko as a left outer join stko as b on
a.stlty = b.stlty
and a.stlnr = b.stlnr
and a.bom_versn = b.bom_versn
and a.stlal = b.stlal
and a.datuv < b.datuv
{
key a.stlty as BillOfMaterialCategory,
key a.stlnr as BillOfMaterial,
key a.stlal as BillOfMaterialVariant,
a.stkoz as BOMHeaderInternalChangeCount,
a.datuv as HeaderValidityStartDate,
cast ( min ( b.datuv ) as datub preserving type ) as HeaderValidityEndDate,
a.aennr as HeaderEngineeringChgNmbrDoc,
a.bom_versn as BillOfMaterialVersion
}where
a.lkenz = ''
group by
a.stlty,
a.stlnr,
a.stlal,
a.stkoz,
a.datuv,
a.aennr,
a.bom_versn ;
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