P_ProductStorageLocationWD
P_ProductStorageLocationWD is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 42 fields with key fields Draftkey, ActiveProduct, ActivePlant, ActiveStorageLocation, ActiveProduct.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| I_ProductStorageLocation | ActiveDocument | from |
| I_DraftAdministrativeData | DraftAdministrativeData | inner |
| P_ProductStorageLocationD | DraftDocument | left_outer |
| P_ProductStorageLocationD | DraftDocument | union_all |
| P_ProductPlantD | DraftPlantDocument | inner |
| P_ProductD | DraftRootDocument | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPRDSTORAGELOCWD | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ClientDependent | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (42)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Draftkey | |||
| KEY | ActiveProduct | I_ProductStorageLocation | Product | |
| KEY | ActivePlant | I_ProductStorageLocation | Plant | |
| KEY | ActiveStorageLocation | I_ProductStorageLocation | StorageLocation | |
| ParentDraftKey | ||||
| Product | I_ProductStorageLocation | Product | ||
| Plant | I_ProductStorageLocation | Plant | ||
| StorageLocation | I_ProductStorageLocation | StorageLocation | ||
| WarehouseStorageBin | I_ProductStorageLocation | WarehouseStorageBin | ||
| MaintenanceStatus | I_ProductStorageLocation | MaintenanceStatus | ||
| IsMarkedForDeletion | I_ProductStorageLocation | IsMarkedForDeletion | ||
| PhysicalInventoryBlockInd | I_ProductStorageLocation | PhysicalInventoryBlockInd | ||
| CreationDate | I_ProductStorageLocation | CreationDate | ||
| DateOfLastPostedCntUnRstrcdStk | I_ProductStorageLocation | DateOfLastPostedCntUnRstrcdStk | ||
| InventoryCorrectionFactor | I_ProductStorageLocation | InventoryCorrectionFactor | ||
| InvtryRestrictedUseStockInd | I_ProductStorageLocation | InvtryRestrictedUseStockInd | ||
| InvtryCurrentYearStockInd | I_ProductStorageLocation | InvtryCurrentYearStockInd | ||
| InvtryQualInspCurrentYrStkInd | I_ProductStorageLocation | InvtryQualInspCurrentYrStkInd | ||
| InventoryBlockStockInd | I_ProductStorageLocation | InventoryBlockStockInd | ||
| InvtryRestStockPrevPeriodInd | I_ProductStorageLocation | InvtryRestStockPrevPeriodInd | ||
| InventoryStockPrevPeriod | I_ProductStorageLocation | InventoryStockPrevPeriod | ||
| InvtryStockQltyInspPrevPeriod | I_ProductStorageLocation | InvtryStockQltyInspPrevPeriod | ||
| HasInvtryBlockStockPrevPeriod | I_ProductStorageLocation | HasInvtryBlockStockPrevPeriod | ||
| FiscalYearCurrentPeriod | I_ProductStorageLocation | FiscalYearCurrentPeriod | ||
| FiscalMonthCurrentPeriod | I_ProductStorageLocation | FiscalMonthCurrentPeriod | ||
| FiscalYearCurrentInvtryPeriod | I_ProductStorageLocation | FiscalYearCurrentInvtryPeriod | ||
| IsActiveEntity | ||||
| HasActiveEntity | ||||
| RootDraftKey | ||||
| DraftkeyasDraftKey | ||||
| KEY | ActiveProduct | P_ProductStorageLocationD | ActiveProduct | |
| KEY | ActivePlant | P_ProductStorageLocationD | ActivePlant | |
| KEY | ActiveStorageLocation | P_ProductStorageLocationD | ActiveStorageLocation | |
| ParentDraftKey | P_ProductStorageLocationD | Parentdraftkey | ||
| product | P_ProductD | product | ||
| plant | P_ProductPlantD | plant | ||
| creationdate | P_ProductStorageLocationD | creationdate | ||
| IsActiveEntity | ||||
| HasActiveEntity | P_ProductStorageLocationD | HasActiveEntity | ||
| HasDraftEntity | ||||
| RootDraftKey | P_ProductStorageLocationD | RootDraftKey | ||
| DraftAdministrativeDataUUID |
@AbapCatalog.sqlViewName: 'PPRDSTORAGELOCWD'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
//@EndUserText.label: 'Product Storage Location Union (draft)'
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_ProductStorageLocationWD
as select from I_ProductStorageLocation as ActiveDocument
left outer join P_ProductStorageLocationD as DraftDocument on DraftDocument.ActiveProduct = ActiveDocument.Product
and DraftDocument.ActivePlant = ActiveDocument.Plant
and DraftDocument.ActiveStorageLocation = ActiveDocument.StorageLocation
{
key cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as Draftkey,
key ActiveDocument.Product as ActiveProduct,
key ActiveDocument.Plant as ActivePlant,
key ActiveDocument.StorageLocation as ActiveStorageLocation,
cast ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as ParentDraftKey,
ActiveDocument.Product,
ActiveDocument.Plant,
ActiveDocument.StorageLocation,
ActiveDocument.WarehouseStorageBin,
ActiveDocument.MaintenanceStatus,
ActiveDocument.IsMarkedForDeletion,
ActiveDocument.PhysicalInventoryBlockInd,
ActiveDocument.CreationDate,
ActiveDocument.DateOfLastPostedCntUnRstrcdStk,
ActiveDocument.InventoryCorrectionFactor,
ActiveDocument.InvtryRestrictedUseStockInd,
ActiveDocument.InvtryCurrentYearStockInd,
ActiveDocument.InvtryQualInspCurrentYrStkInd,
ActiveDocument.InventoryBlockStockInd,
ActiveDocument.InvtryRestStockPrevPeriodInd,
ActiveDocument.InventoryStockPrevPeriod,
ActiveDocument.InvtryStockQltyInspPrevPeriod,
ActiveDocument.HasInvtryBlockStockPrevPeriod,
ActiveDocument.FiscalYearCurrentPeriod,
ActiveDocument.FiscalMonthCurrentPeriod,
ActiveDocument.FiscalYearCurrentInvtryPeriod,
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 ( hextobin('00000000000000000000000000000000') as sysuuid_x ) as RootDraftKey,
cast(DraftDocument.RootDraftKey as sysuuid_x ) as DraftAdministrativeDataUUID
}
union all
select from P_ProductStorageLocationD as DraftDocument
inner join P_ProductPlantD as DraftPlantDocument on DraftPlantDocument.Draftkey = DraftDocument.Parentdraftkey
inner join P_ProductD as DraftRootDocument on DraftRootDocument.Draftkey = DraftDocument.RootDraftKey
inner join I_DraftAdministrativeData as DraftAdministrativeData on DraftAdministrativeData.DraftUUID = DraftDocument.RootDraftKey
// association [0..1] to I_DraftAdministrativeData as _DraftAdministrativeData
// on _DraftAdministrativeData.DraftEntityType = 'I_PRODUCTWD'
// and _DraftAdministrativeData.DraftUUID = $projection.DraftKey
//
{
key DraftDocument.Draftkey as DraftKey,
key DraftDocument.ActiveProduct as ActiveProduct,
key DraftDocument.ActivePlant as ActivePlant,
key DraftDocument.ActiveStorageLocation as ActiveStorageLocation,
DraftDocument.Parentdraftkey as ParentDraftKey,
DraftRootDocument.product,
DraftPlantDocument.plant,
DraftDocument.storagelocation,
DraftDocument.warehousestoragebin,
DraftDocument.maintenancestatus,
DraftDocument.ismarkedfordeletion,
DraftDocument.physicalinventoryblockind,
DraftDocument.creationdate,
DraftDocument.dateoflastpostedcntunrstrcdstk,
DraftDocument.inventorycorrectionfactor,
DraftDocument.invtryrestrictedusestockind,
DraftDocument.invtrycurrentyearstockind,
DraftDocument.invtryqualinspcurrentyrstkind,
DraftDocument.inventoryblockstockind,
DraftDocument.invtryreststockprevperiodind,
DraftDocument.inventorystockprevperiod,
DraftDocument.invtrystockqltyinspprevperiod,
DraftDocument.hasinvtryblockstockprevperiod,
DraftDocument.fiscalyearcurrentperiod,
DraftDocument.fiscalmonthcurrentperiod,
DraftDocument.fiscalyearcurrentinvtryperiod,
cast( ' ' as boole_d ) as IsActiveEntity,
DraftDocument.HasActiveEntity,
cast( ' ' as boole_d ) as HasDraftEntity,
DraftDocument.RootDraftKey,
cast(DraftDocument.RootDraftKey as sysuuid_x ) as DraftAdministrativeDataUUID
}
where
DraftAdministrativeData.CreatedByUser = $session.user
or DraftAdministrativeData.InProcessByUser = $session.user
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DRAFTADMINISTRATIVEDATA",
"I_PRODUCTSTORAGELOCATION",
"P_PRODUCTD",
"P_PRODUCTPLANTD",
"P_PRODUCTSTORAGELOCATIOND"
],
"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