P_StkPostgHistBasicNoReversal

DDL: P_STKPOSTGHISTBASICNOREVERSAL Type: view_entity COMPOSITE

Stock posting history documents without reversal

P_StkPostgHistBasicNoReversal is a Composite CDS View that provides data about "Stock posting history documents without reversal" in SAP S/4HANA. It reads from 6 data sources and exposes 149 fields.

Data Sources (6)

SourceAliasJoin Type
I_MaterialDocumentRecord _matdoc inner
P_StkPostgHistAcctgNoStkQty acdoca union_all
I_GLAccountLineItemRawData acdoca union_all
finsc_ledger finsc_ledger inner
I_MaterialDocumentRecord matdoc from
P_StkPostgHistCancelBasic P_StkPostgHistCancelBasic union_all

Parameters (2)

NameTypeDefault
P_StartDate sydate
P_EndDate sydate

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Stock posting history documents without reversal 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 (149)

KeyFieldSource TableSource FieldDescription
StockLevelIsValuated
MaterialDocument I_MaterialDocumentRecord MaterialDocument Material Doc.
MaterialDocumentYear I_MaterialDocumentRecord MaterialDocumentYear Material Document Year
MaterialDocumentItem I_MaterialDocumentRecord MaterialDocumentItem Material Document Item
FiscalYearendasFiscalYear
CostEstimate I_MaterialDocumentRecord CostEstimate Cost EstimateNo
CompanyCode I_MaterialDocumentRecord CompanyCode Receiver Company Code
Material I_MaterialDocumentRecord StockIdentifyingMaterial Product Sold
Plant I_MaterialDocumentRecord Plant Valuation Area
StorageLocation I_MaterialDocumentRecord StockIdfgStorageLocation StorageLocation
Batch I_MaterialDocumentRecord StockIdentifyingBatch Lot No.
Supplier I_MaterialDocumentRecord SpecialStockIdfgSupplier Supplier
SalesOrder I_MaterialDocumentRecord SpecialStockIdfgSalesOrder SD Document
SalesOrderItem I_MaterialDocumentRecord SpecialStockIdfgSalesOrderItem Sales Order Item
WBSElementInternalID I_MaterialDocumentRecord SpecialStockIdfgWBSElement WBS Internal ID
Customer I_MaterialDocumentRecord SpecialStockIdfgCustomer Sold-to Party
InventoryStockType I_MaterialDocumentRecord InventoryStockType Stock Type
InventorySpecialStockType I_MaterialDocumentRecord InventorySpecialStockType Special Stock Type
SpecialStockIdfgStockOwner I_MaterialDocumentRecord SpecialStockIdfgStockOwner
ResourceID I_MaterialDocumentRecord ResourceID Vehicle ID
InventoryValuationType I_MaterialDocumentRecord InventoryValuationType Valuation Type
MaterialBaseUnit I_MaterialDocumentRecord MaterialBaseUnit Valuation UoM
MatlStkChangeQtyInBaseUnit I_MaterialDocumentRecord MatlStkChangeQtyInBaseUnit
CompanyCodeCurrency I_MaterialDocumentRecord CompanyCodeCurrency Local Currency
PurchaseOrder I_MaterialDocumentRecord PurchaseOrder Purchasing Document
PurchaseOrderItem I_MaterialDocumentRecord PurchaseOrderItem Purchasing Doc. Item
ManufacturingOrder I_MaterialDocumentRecord ManufacturingOrder Order ID
ManufacturingOrderItem I_MaterialDocumentRecord ManufacturingOrderItem Order item no.
DeliveryDocument I_MaterialDocumentRecord DeliveryDocument Outbound Delivery
DeliveryDocumentItem I_MaterialDocumentRecord DeliveryDocumentItem Outb. Delivery Item
Reservation I_MaterialDocumentRecord Reservation Reservation
ReservationItem I_MaterialDocumentRecord ReservationItem Reservation Item
GoodsMovementType I_MaterialDocumentRecord GoodsMovementType Movement Type
GoodsMovementRefDocType I_MaterialDocumentRecord GoodsMovementRefDocType Reference Doc. Type
GoodsReceiptType I_MaterialDocumentRecord GoodsReceiptType Receipt Ind.
ConsumptionPosting I_MaterialDocumentRecord ConsumptionPosting Consumption Posting
CompanyCode0asStockLevelIsValuated
MaterialDocument I_GLAccountLineItemRawData MaterialDocument Material Doc.
MaterialDocumentYear I_GLAccountLineItemRawData MaterialDocumentYear Material Document Year
MaterialDocumentItem I_GLAccountLineItemRawData MaterialDocumentItem Material Document Item
AccountingDocument I_GLAccountLineItemRawData AccountingDocument Journal Entry
FiscalYear I_GLAccountLineItemRawData FiscalYear G/L Fiscal Year
CostEstimate I_GLAccountLineItemRawData CostEstimate Cost EstimateNo
CompanyCode I_GLAccountLineItemRawData CompanyCode Receiver Company Code
Material I_MaterialDocumentRecord StockIdentifyingMaterial Product Sold
Plant I_MaterialDocumentRecord Plant Valuation Area
StorageLocation I_MaterialDocumentRecord StockIdfgStorageLocation StorageLocation
Batch I_MaterialDocumentRecord StockIdentifyingBatch Lot No.
Supplier I_MaterialDocumentRecord SpecialStockIdfgSupplier Supplier
SalesOrder I_MaterialDocumentRecord SpecialStockIdfgSalesOrder SD Document
SalesOrderItem I_MaterialDocumentRecord SpecialStockIdfgSalesOrderItem Sales Order Item
WBSElementInternalID I_MaterialDocumentRecord SpecialStockIdfgWBSElement WBS Internal ID
Customer I_MaterialDocumentRecord SpecialStockIdfgCustomer Sold-to Party
InventoryStockType I_MaterialDocumentRecord InventoryStockType Stock Type
InventorySpecialStockType I_MaterialDocumentRecord InventorySpecialStockType Special Stock Type
SpecialStockIdfgStockOwner I_MaterialDocumentRecord SpecialStockIdfgStockOwner
ResourceID I_MaterialDocumentRecord ResourceID Vehicle ID
InventoryValuationType I_MaterialDocumentRecord InventoryValuationType Valuation Type
MaterialBaseUnit I_GLAccountLineItemRawData MaterialBaseUnit Valuation UoM
MatlStkChangeQtyInBaseUnit I_GLAccountLineItemRawData MatlStkChangeQtyInBaseUnit
CompanyCodeCurrency I_GLAccountLineItemRawData CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency I_GLAccountLineItemRawData AmountInCompanyCodeCurrency Local Crcy Amt
PurchaseOrder I_MaterialDocumentRecord PurchaseOrder Purchasing Document
PurchaseOrderItem I_MaterialDocumentRecord PurchaseOrderItem Purchasing Doc. Item
ManufacturingOrder I_MaterialDocumentRecord ManufacturingOrder Order ID
ManufacturingOrderItem I_MaterialDocumentRecord ManufacturingOrderItem Order item no.
DeliveryDocument I_MaterialDocumentRecord DeliveryDocument Outbound Delivery
DeliveryDocumentItem I_MaterialDocumentRecord DeliveryDocumentItem Outb. Delivery Item
Reservation I_MaterialDocumentRecord Reservation Reservation
ReservationItem I_MaterialDocumentRecord ReservationItem Reservation Item
GoodsMovementType I_MaterialDocumentRecord GoodsMovementType Movement Type
GoodsMovementRefDocType I_MaterialDocumentRecord GoodsMovementRefDocType Reference Doc. Type
GoodsReceiptType I_MaterialDocumentRecord GoodsReceiptType Receipt Ind.
ConsumptionPosting I_MaterialDocumentRecord ConsumptionPosting Consumption Posting
P_StartDate
MaterialDocument I_MaterialDocumentRecord MaterialDocument Material Doc.
MaterialDocumentYear I_MaterialDocumentRecord MaterialDocumentYear Material Document Year
MaterialDocumentItem I_MaterialDocumentRecord MaterialDocumentItem Material Document Item
FiscalYearendasFiscalYear
CostEstimate I_MaterialDocumentRecord CostEstimate Cost EstimateNo
CompanyCode I_MaterialDocumentRecord CompanyCode Receiver Company Code
Material I_MaterialDocumentRecord Material Product Sold
Plant I_MaterialDocumentRecord Plant Valuation Area
StorageLocation I_MaterialDocumentRecord StorageLocation StorageLocation
Batch I_MaterialDocumentRecord Batch Lot No.
Supplier I_MaterialDocumentRecord Supplier Supplier
SalesOrder I_MaterialDocumentRecord SalesOrder SD Document
SalesOrderItem I_MaterialDocumentRecord SalesOrderItem Sales Order Item
WBSElementInternalID I_MaterialDocumentRecord WBSElementInternalID WBS Internal ID
Customer I_MaterialDocumentRecord Customer Sold-to Party
InventoryStockType I_MaterialDocumentRecord InventoryStockType Stock Type
InventorySpecialStockType I_MaterialDocumentRecord InventorySpecialStockType Special Stock Type
SpecialStockIdfgStockOwner I_MaterialDocumentRecord SpecialStockIdfgStockOwner
ResourceID I_MaterialDocumentRecord ResourceID Vehicle ID
InventoryValuationType I_MaterialDocumentRecord InventoryValuationType Valuation Type
MaterialBaseUnit I_MaterialDocumentRecord MaterialBaseUnit Valuation UoM
MatlStkChangeQtyInBaseUnit I_MaterialDocumentRecord MatlStkChangeQtyInBaseUnit
CompanyCodeCurrency I_MaterialDocumentRecord CompanyCodeCurrency Local Currency
PurchaseOrder I_MaterialDocumentRecord PurchaseOrder Purchasing Document
PurchaseOrderItem I_MaterialDocumentRecord PurchaseOrderItem Purchasing Doc. Item
ManufacturingOrder I_MaterialDocumentRecord ManufacturingOrder Order ID
ManufacturingOrderItem I_MaterialDocumentRecord ManufacturingOrderItem Order item no.
DeliveryDocument I_MaterialDocumentRecord DeliveryDocument Outbound Delivery
DeliveryDocumentItem I_MaterialDocumentRecord DeliveryDocumentItem Outb. Delivery Item
Reservation I_MaterialDocumentRecord Reservation Reservation
ReservationItem I_MaterialDocumentRecord ReservationItem Reservation Item
GoodsMovementType I_MaterialDocumentRecord GoodsMovementType Movement Type
GoodsMovementRefDocType I_MaterialDocumentRecord GoodsMovementRefDocType Reference Doc. Type
GoodsReceiptType I_MaterialDocumentRecord GoodsReceiptType Receipt Ind.
ConsumptionPosting I_MaterialDocumentRecord ConsumptionPosting Consumption Posting
xleadingX1asStockLevelIsValuated
MaterialDocument Material Doc.
MaterialDocumentYear Material Document Year
MaterialDocumentItem Material Document Item
AccountingDocument I_GLAccountLineItemRawData AccountingDocument Journal Entry
FiscalYear I_GLAccountLineItemRawData FiscalYear G/L Fiscal Year
CostEstimate I_GLAccountLineItemRawData CostEstimate Cost EstimateNo
CompanyCode I_GLAccountLineItemRawData CompanyCode Receiver Company Code
Material I_GLAccountLineItemRawData Product Product Sold
Plant I_GLAccountLineItemRawData Plant Valuation Area
StorageLocation StorageLocation
Batch Lot No.
Supplier Supplier
SalesOrder SD Document
SalesOrderItem Sales Order Item
WBSElementInternalID WBS Internal ID
Customer Sold-to Party
InventoryStockType Stock Type
InventorySpecialStockType Special Stock Type
SpecialStockIdfgStockOwner
ResourceID Vehicle ID
InventoryValuationType I_GLAccountLineItemRawData InventoryValuationType Valuation Type
MaterialBaseUnit I_GLAccountLineItemRawData CostSourceUnit Valuation UoM
MatlStkChangeQtyInBaseUnit I_GLAccountLineItemRawData ValuationQuantity
CompanyCodeCurrency I_GLAccountLineItemRawData CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency I_GLAccountLineItemRawData AmountInCompanyCodeCurrency Local Crcy Amt
PurchaseOrder I_GLAccountLineItemRawData PurchasingDocument Purchasing Document
PurchaseOrderItem I_GLAccountLineItemRawData PurchasingDocumentItem Purchasing Doc. Item
ManufacturingOrder I_GLAccountLineItemRawData OrderID Order ID
ManufacturingOrderItem I_GLAccountLineItemRawData OrderItem Order item no.
DeliveryDocument Outbound Delivery
DeliveryDocumentItem Outb. Delivery Item
Reservation Reservation
ReservationItem Reservation Item
GoodsMovementType Movement Type
GoodsMovementRefDocType Reference Doc. Type
GoodsReceiptType Receipt Ind.
ConsumptionPosting Consumption Posting
PostingDate I_GLAccountLineItemRawData 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_StkPostgHistBasicNoReversal.
-- 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_StkPostgHistBasicNoReversal AS
SELECT
  '0' AS StockLevelIsValuated,
  matdoc.MaterialDocument AS MaterialDocument,
  matdoc.MaterialDocumentYear AS MaterialDocumentYear,
  matdoc.MaterialDocumentItem AS MaterialDocumentItem,
  case when _MatDocAccounting.FiscalYear is null then cast('0000' as gjahr) else _MatDocAccounting.FiscalYear end as FiscalYear AS FiscalYearendasFiscalYear,
  matdoc.CostEstimate AS CostEstimate,
  matdoc.CompanyCode AS CompanyCode,
  matdoc.StockIdentifyingMaterial AS Material,
  matdoc.Plant AS Plant,
  matdoc.StockIdfgStorageLocation AS StorageLocation,
  matdoc.StockIdentifyingBatch AS Batch,
  matdoc.SpecialStockIdfgSupplier AS Supplier,
  matdoc.SpecialStockIdfgSalesOrder AS SalesOrder,
  matdoc.SpecialStockIdfgSalesOrderItem AS SalesOrderItem,
  matdoc.SpecialStockIdfgWBSElement AS WBSElementInternalID,
  matdoc.SpecialStockIdfgCustomer AS Customer,
  matdoc.InventoryStockType AS InventoryStockType,
  matdoc.InventorySpecialStockType AS InventorySpecialStockType,
  matdoc.SpecialStockIdfgStockOwner AS SpecialStockIdfgStockOwner,
  matdoc.ResourceID AS ResourceID,
  matdoc.InventoryValuationType AS InventoryValuationType,
  matdoc.MaterialBaseUnit AS MaterialBaseUnit,
  matdoc.MatlStkChangeQtyInBaseUnit AS MatlStkChangeQtyInBaseUnit,
  matdoc.CompanyCodeCurrency AS CompanyCodeCurrency,
  matdoc.PurchaseOrder AS PurchaseOrder,
  matdoc.PurchaseOrderItem AS PurchaseOrderItem,
  matdoc.ManufacturingOrder AS ManufacturingOrder,
  matdoc.ManufacturingOrderItem AS ManufacturingOrderItem,
  matdoc.DeliveryDocument AS DeliveryDocument,
  matdoc.DeliveryDocumentItem AS DeliveryDocumentItem,
  matdoc.Reservation AS Reservation,
  matdoc.ReservationItem AS ReservationItem,
  matdoc.GoodsMovementType AS GoodsMovementType,
  matdoc.GoodsMovementRefDocType AS GoodsMovementRefDocType,
  matdoc.GoodsReceiptType AS GoodsReceiptType,
  matdoc.ConsumptionPosting AS ConsumptionPosting,
  matdoc.PostingDate AS CompanyCode0asStockLevelIsValuated,
  acdoca.AccountingDocument AS AccountingDocument,
  acdoca.FiscalYear AS FiscalYear,
  acdoca.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  acdoca.PostingDate AS P_StartDate,
  matdoc.PostingDate AS xleadingX1asStockLevelIsValuated,
  acdoca.PostingDate AS PostingDate
FROM I_MaterialDocumentRecord AS matdoc
INNER JOIN I_MaterialDocumentRecord AS _matdoc ON /* join condition not captured in parsed metadata */
INNER JOIN finsc_ledger ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_StkPostgHistAcctgNoStkQty, P_StkPostgHistCancelBasic, I_GLAccountLineItemRawData
;