P_PurgeStockCheck

DDL: P_PURGESTOCKCHECK Type: view_entity COMPOSITE

Stock check for purging

P_PurgeStockCheck is a Composite CDS View that provides data about "Stock check for purging" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 15 fields with key fields Material, Plant, StorageLocation, Batch, Supplier.

Data Sources (1)

SourceAliasJoin Type
I_MaterialStock_2 I_MaterialStock_2 from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Stock check for purging view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
KEY StorageLocation StorageLocation StorageLocation
KEY Batch Batch Lot No.
KEY Supplier Supplier Supplier
KEY SDDocument SDDocument SD Document
KEY SDDocumentItem SDDocumentItem
KEY WBSElementInternalID WBSElementInternalID WBS Internal ID
KEY Customer Customer Sold-to Party
KEY ResourceID ResourceID Vehicle ID
KEY SpecialStockIdfgStockOwner SpecialStockIdfgStockOwner
KEY InventoryStockType InventoryStockType Stock Type
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY MaterialBaseUnit MaterialBaseUnit Valuation Unit
MatlWrhsStkQtyInMatlBaseUnit

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_PurgeStockCheck.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW P_PurgeStockCheck AS
SELECT
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  WBSElementInternalID,
  Customer,
  ResourceID,
  SpecialStockIdfgStockOwner,
  InventoryStockType,
  InventorySpecialStockType,
  MaterialBaseUnit,
  sum(MatlWrhsStkQtyInMatlBaseUnit) AS MatlWrhsStkQtyInMatlBaseUnit
FROM I_MaterialStock_2
;