P_PlantReferences
Reference Store and Distribution Centre
P_PlantReferences is a Basic CDS View that provides data about "Reference Store and Distribution Centre" in SAP S/4HANA. It reads from 1 data source (t001w) and exposes 5 fields with key field Plant. Part of development package VDM_MD_PRODUCT.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| t001w | t001w | from |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PLANTREF | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
@AbapCatalog.sqlViewName: 'PLANTREF'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory : #S
@ObjectModel.usageType.dataClass: #MASTER
@AbapCatalog.compiler.compareFilter:true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PlantReferences as select from t001w
left outer to one join tvkov on t001w.vkorg = tvkov.vkorg
and t001w.vtweg = tvkov.vtweg
left outer to one join twpa on t001w.mandt = twpa.mandt
{
key t001w.werks as Plant,
t001w.vkorg as SalesOrganization,
t001w.vtweg as DistributionChannel,
// t001w.spart,
t001w.vlfkz as PlantCategory,
cast (
case
when t001w.vlfkz = 'B' and twpa.vlgvz = t001w.werks
then ''
when t001w.vlfkz = 'B' //twpa.vlgvz <> t001w.werks
then twpa.vlgvz
else ''
end as vlgvz ) as ReferenceDistributionCenter,
cast (
case
when tvkov.vlgfi = t001w.werks and t001w.vlfkz = 'A'
then '' //t001w.werks is reference store
when tvkov.vlgfi <> '' and t001w.vlfkz = 'A' //twpa.vlgfi <> t001w.werks
then tvkov.vlgfi
when tvkov.vlgfi = '' and t001w.vlfkz = 'A' and twpa.vlgfi = t001w.werks
then '' //t001w.werks is reference store
when tvkov.vlgfi = '' and t001w.vlfkz = 'A' and twpa.vlgfi<> t001w.werks
then twpa.vlgfi
else '' //no reference store maintained
end as vlgfi ) as ReferenceStore,
cast (
case
when t001w.vlfkz = 'B' and twpa.vlgvz = t001w.werks
then 'X'
else ''
end as boole_d ) as IsReferenceDistributionCenter,
cast (
case
when tvkov.vlgfi = t001w.werks and t001w.vlfkz = 'A'
then 'X'
when tvkov.vlgfi = '' and twpa.vlgfi = t001w.werks and t001w.vlfkz = 'A'
then 'X'
else ''
end as boole_d ) as IsReferenceStore
}
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