P_StkPostgHistCancelBasic01
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)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | matdoc | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_StartDate | sydate | |
| P_EndDate | sydate |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA