P_ProductStorageWD
Product Storage Union (draft)
P_ProductStorageWD is a Composite CDS View that provides data about "Product Storage Union (draft)" in SAP S/4HANA. It reads from 5 data sources (I_Productstorage, I_DraftAdministrativeData, P_Productstoraged, P_Productstoraged, P_ProductD) and exposes 28 fields with key fields Draftkey, ActiveProduct, ActiveProduct. Part of development package VDM_MD_PRODUCT_OBSOLETE.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_Productstorage | ActiveDocument | from |
| I_DraftAdministrativeData | DraftAdministrativeData | inner |
| P_Productstoraged | DraftDocument | left_outer |
| P_Productstoraged | DraftDocument | union_all |
| P_ProductD | DraftRootDocument | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPRDSTORAGEWD | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ClientDependent | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (28)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Draftkey | |||
| KEY | ActiveProduct | I_Productstorage | Product | |
| ParentDraftKey | ||||
| Product | I_Productstorage | Product | ||
| StorageConditions | I_Productstorage | StorageConditions | ||
| TemperatureConditionInd | I_Productstorage | TemperatureConditionInd | ||
| HazardousMaterialNumber | I_Productstorage | HazardousMaterialNumber | ||
| NmbrOfGROrGISlipsToPrintQty | I_Productstorage | NmbrOfGROrGISlipsToPrintQty | ||
| LabelType | I_Productstorage | LabelType | ||
| LabelForm | I_Productstorage | LabelForm | ||
| MinRemainingShelfLife | I_Productstorage | MinRemainingShelfLife | ||
| ExpirationDate | I_Productstorage | ExpirationDate | ||
| StorageBinInstruction | I_Productstorage | StorageBinInstruction | ||
| TotalShelfLifeStoragePercent | I_Productstorage | TotalShelfLifeStoragePercent | ||
| ShelfLifeExpirationDatePeriod | I_Productstorage | ShelfLifeExpirationDatePeriod | ||
| ShelfLifeExprtnDateRndingRule | I_Productstorage | ShelfLifeExprtnDateRndingRule | ||
| IsActiveEntity | ||||
| HasActiveEntity | ||||
| DraftKeyasDraftKey | ||||
| KEY | ActiveProduct | P_Productstoraged | ActiveProduct | |
| ParentDraftKey | P_Productstoraged | ParentDraftKey | ||
| Product | P_ProductD | product | ||
| labeltype | P_Productstoraged | labeltype | ||
| labelform | P_Productstoraged | labelform | ||
| IsActiveEntity | ||||
| HasActiveEntity | ||||
| HasDraftEntity | ||||
| DraftAdministrativeDataUUID |
@AbapCatalog.sqlViewName: 'PPRDSTORAGEWD'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
//@EndUserText.label: 'Product Storage Union (draft)'
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_ProductStorageWD
as
select from I_Productstorage as ActiveDocument
// left outer join P_ProductD as DraftRootDocument on DraftRootDocument.product = ActiveDocument.Product
left outer join P_Productstoraged as DraftDocument on DraftDocument.ActiveProduct = ActiveDocument.Product
// and DraftDocument.ParentDraftKey = DraftRootDocument.Draftkey
// and DraftDocument.ActiveProduct = DraftRootDocument.product
// inner join I_DraftAdministrativeData as DraftAdministrativeData
// on DraftAdministrativeData.DraftUUID = DraftDocument.ParentDraftKey
{
key cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as Draftkey,
key ActiveDocument.Product as ActiveProduct,
cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as ParentDraftKey,
ActiveDocument.Product,
ActiveDocument.StorageConditions,
ActiveDocument.TemperatureConditionInd,
ActiveDocument.HazardousMaterialNumber,
ActiveDocument.NmbrOfGROrGISlipsToPrintQty,
ActiveDocument.LabelType,
ActiveDocument.LabelForm,
ActiveDocument.MinRemainingShelfLife,
ActiveDocument.ExpirationDate,
// Retail Fields
ActiveDocument.StorageBinInstruction,
// ActiveDocument.TotalShelfLife, //pstat changes
ActiveDocument.TotalShelfLifeStoragePercent,
ActiveDocument.ShelfLifeExpirationDatePeriod,
ActiveDocument.ShelfLifeExprtnDateRndingRule,
cast( 'X' as boole_d ) as IsActiveEntity,
cast( ' ' as boole_d ) as HasActiveEntity,
cast(
case
when DraftDocument.DraftKey is null
then ' '
else 'X'
end as boole_d) as HasDraftEntity,
cast(DraftDocument.ParentDraftKey as sysuuid_x ) as DraftAdministrativeDataUUID
}
union all
select from P_Productstoraged as DraftDocument
inner join P_ProductD as DraftRootDocument on DraftRootDocument.Draftkey = DraftDocument.ParentDraftKey
inner join I_DraftAdministrativeData as DraftAdministrativeData on DraftAdministrativeData.DraftUUID = DraftDocument.ParentDraftKey
{
key DraftDocument.DraftKey as DraftKey,
key DraftDocument.ActiveProduct as ActiveProduct,
DraftDocument.ParentDraftKey as ParentDraftKey,
DraftRootDocument.product as Product,
DraftDocument.storageconditions,
DraftDocument.temperatureconditionind,
DraftDocument.hazardousmaterialnumber,
DraftDocument.nmbrofgrorgislipstoprintqty,
DraftDocument.labeltype,
DraftDocument.labelform,
DraftDocument.minremainingshelflife,
DraftDocument.expirationdate,
// Retail Fields
DraftDocument.storagebininstruction,
// DraftDocument.totalshelflife, //pstat changes
DraftDocument.totalshelflifestoragepercent,
DraftDocument.shelflifeexpirationdateperiod,
DraftDocument.shelflifeexprtndaterndingrule,
cast( ' ' as boole_d ) as IsActiveEntity,
cast( DraftDocument.hasactiveentity as boole_d ) as HasActiveEntity,
cast( ' ' as boole_d ) as HasDraftEntity,
cast(DraftDocument.ParentDraftKey as sysuuid_x ) as DraftAdministrativeDataUUID
}
where
DraftAdministrativeData.CreatedByUser = $session.user
or DraftAdministrativeData.InProcessByUser = $session.user
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