P_StkPostgHistCancelBasic01

DDL: P_STKPOSTGHISTCANCELBASIC01 Type: view_entity COMPOSITE

Stock posting history cancel documents part 1

P_StkPostgHistCancelBasic01 is a Composite CDS View that provides data about "Stock posting history cancel documents part 1" in SAP S/4HANA. It reads from 1 data source (I_MaterialDocumentRecord) and exposes 37 fields with key fields MaterialDocument, MaterialDocumentYear, MaterialDocumentItem. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaterialDocumentRecord matdoc from

Parameters (2)

NameTypeDefault
P_StartDate sydate
P_EndDate sydate

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_MaterialDocumentRecord matdoc_successor matdoc.MaterialDocument = matdoc_successor.ReversedMaterialDocument and matdoc.MaterialDocumentYear = matdoc_successor.ReversedMaterialDocumentYear and matdoc.MaterialDocumentItem = matdoc_successor.ReversedMaterialDocumentItem and matdoc_successor.ReversedMaterialDocument <> '' and matdoc.StockIdentifyingMaterial = matdoc_successor.StockIdentifyingMaterial and matdoc.Plant = matdoc_successor.Plant and matdoc.StockIdfgStorageLocation = matdoc_successor.StockIdfgStorageLocation and matdoc.StockIdentifyingBatch = matdoc_successor.StockIdentifyingBatch and matdoc.SpecialStockIdfgSupplier = matdoc_successor.SpecialStockIdfgSupplier and matdoc.SpecialStockIdfgSalesOrder = matdoc_successor.SpecialStockIdfgSalesOrder and matdoc.SpecialStockIdfgSalesOrderItem = matdoc_successor.SpecialStockIdfgSalesOrderItem and matdoc.SpecialStockIdfgWBSElement = matdoc_successor.SpecialStockIdfgWBSElement and matdoc.SpecialStockIdfgCustomer = matdoc_successor.SpecialStockIdfgCustomer and matdoc.InventoryStockType = matdoc_successor.InventoryStockType and matdoc.InventorySpecialStockType = matdoc_successor.InventorySpecialStockType and matdoc.SpecialStockIdfgStockOwner = matdoc_successor.SpecialStockIdfgStockOwner and matdoc.ResourceID = matdoc_successor.ResourceID and matdoc_successor.GoodsMovementCancellationType = '2'

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Stock posting history cancel documents part 1 view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (37)

KeyFieldSource TableSource FieldDescription
KEY MaterialDocument MaterialDocument Material Doc.
KEY MaterialDocumentYear MaterialDocumentYear Material Document Year
KEY MaterialDocumentItem MaterialDocumentItem Material Document Item
CostEstimate CostEstimate Cost EstimateNo
CompanyCode I_MaterialDocumentRecord CompanyCode Receiver Company Code
Material StockIdentifyingMaterial Stock Mat.
Plant Plant Valuation Area
StorageLocation StockIdfgStorageLocation Stor. Location SID
Batch StockIdentifyingBatch Batch SID
Supplier SpecialStockIdfgSupplier Supplier SID
SalesOrder SpecialStockIdfgSalesOrder Stock Ident Header
SalesOrderItem SpecialStockIdfgSalesOrderItem Stock Ident Item
WBSElementInternalID SpecialStockIdfgWBSElement WBS Internal ID
Customer SpecialStockIdfgCustomer Customer SID
InventoryStockType InventoryStockType Stock Type
InventorySpecialStockType InventorySpecialStockType Special Stock Type
SpecialStockIdfgStockOwner SpecialStockIdfgStockOwner
ResourceID ResourceID Vehicle ID
InventoryValuationType InventoryValuationType Valuation Type
MaterialBaseUnit MaterialBaseUnit Valuation Unit
MatlStkChangeQtyInBaseUnit MatlStkChangeQtyInBaseUnit
CompanyCodeCurrency CompanyCodeCurrency Local Currency
GoodsMovementStkAmtInCCCrcy GoodsMovementStkAmtInCCCrcy
PurchaseOrder PurchaseOrder Purchasing Document
PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
ManufacturingOrder ManufacturingOrder Order
ManufacturingOrderItem ManufacturingOrderItem Manufacturing Order Item
DeliveryDocument DeliveryDocument Outbound Delivery
DeliveryDocumentItem DeliveryDocumentItem Outb. Delivery Item
Reservation Reservation Reservation
ReservationItem ReservationItem Reservation Item
GoodsMovementType GoodsMovementType Movement Type
GoodsMovementRefDocType GoodsMovementRefDocType Reference Doc. Type
GoodsReceiptType GoodsReceiptType Receipt Ind.
ConsumptionPosting ConsumptionPosting Consumption Posting
PostingDate PostingDate Posting Date for GR
SuccessorPostingDate matdoc_successor PostingDate Posting Date for GR

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_StkPostgHistCancelBasic01.
-- 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.
-- Parameters: P_StartDate : sydate, P_EndDate : sydate

CREATE VIEW P_StkPostgHistCancelBasic01 AS
SELECT
  MaterialDocument,
  MaterialDocumentYear,
  MaterialDocumentItem,
  CostEstimate,
  matdoc.CompanyCode AS CompanyCode,
  StockIdentifyingMaterial AS Material,
  Plant,
  StockIdfgStorageLocation AS StorageLocation,
  StockIdentifyingBatch AS Batch,
  SpecialStockIdfgSupplier AS Supplier,
  SpecialStockIdfgSalesOrder AS SalesOrder,
  SpecialStockIdfgSalesOrderItem AS SalesOrderItem,
  SpecialStockIdfgWBSElement AS WBSElementInternalID,
  SpecialStockIdfgCustomer AS Customer,
  InventoryStockType,
  InventorySpecialStockType,
  SpecialStockIdfgStockOwner,
  ResourceID,
  InventoryValuationType,
  MaterialBaseUnit,
  MatlStkChangeQtyInBaseUnit,
  CompanyCodeCurrency,
  GoodsMovementStkAmtInCCCrcy,
  PurchaseOrder,
  PurchaseOrderItem,
  ManufacturingOrder,
  ManufacturingOrderItem,
  DeliveryDocument,
  DeliveryDocumentItem,
  Reservation,
  ReservationItem,
  GoodsMovementType,
  GoodsMovementRefDocType,
  GoodsReceiptType,
  ConsumptionPosting,
  PostingDate,
  matdoc_successor.PostingDate AS SuccessorPostingDate
FROM I_MaterialDocumentRecord AS matdoc
LEFT OUTER JOIN I_MaterialDocumentRecord AS matdoc_successor ON matdoc.MaterialDocument = matdoc_successor.ReversedMaterialDocument AND matdoc.MaterialDocumentYear = matdoc_successor.ReversedMaterialDocumentYear AND matdoc.MaterialDocumentItem = matdoc_successor.ReversedMaterialDocumentItem AND matdoc_successor.ReversedMaterialDocument <> '' AND matdoc.StockIdentifyingMaterial = matdoc_successor.StockIdentifyingMaterial AND matdoc.Plant = matdoc_successor.Plant AND matdoc.StockIdfgStorageLocation = matdoc_successor.StockIdfgStorageLocation AND matdoc.StockIdentifyingBatch = matdoc_successor.StockIdentifyingBatch AND matdoc.SpecialStockIdfgSupplier = matdoc_successor.SpecialStockIdfgSupplier AND matdoc.SpecialStockIdfgSalesOrder = matdoc_successor.SpecialStockIdfgSalesOrder AND matdoc.SpecialStockIdfgSalesOrderItem = matdoc_successor.SpecialStockIdfgSalesOrderItem AND matdoc.SpecialStockIdfgWBSElement = matdoc_successor.SpecialStockIdfgWBSElement AND matdoc.SpecialStockIdfgCustomer = matdoc_successor.SpecialStockIdfgCustomer AND matdoc.InventoryStockType = matdoc_successor.InventoryStockType AND matdoc.InventorySpecialStockType = matdoc_successor.InventorySpecialStockType AND matdoc.SpecialStockIdfgStockOwner = matdoc_successor.SpecialStockIdfgStockOwner AND matdoc.ResourceID = matdoc_successor.ResourceID AND matdoc_successor.GoodsMovementCancellationType = '2'  -- association [1..1]
;