P_StkPostgHistBasic_Union

DDL: P_STKPOSTGHISTBASIC_UNION Type: view_entity COMPOSITE

Stock posting documents union view

P_StkPostgHistBasic_Union is a Composite CDS View that provides data about "Stock posting documents union view" in SAP S/4HANA. It reads from 2 data sources (P_StkPostgHistBasic, P_StkPostgHistBasicNoReversal) and exposes 80 fields.

Data Sources (2)

SourceAliasJoin Type
P_StkPostgHistBasic P_StkPostgHistBasic from
P_StkPostgHistBasicNoReversal P_StkPostgHistBasicNoReversal union_all

Parameters (2)

NameTypeDefault
P_StartDate sydate
P_EndDate sydate

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Stock posting documents union view view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (80)

KeyFieldSource TableSource FieldDescription
StockLevelIsValuated StockLevelIsValuated
ReversalMovementIsSelected
MaterialDocument MaterialDocument Material Doc.
MaterialDocumentYear MaterialDocumentYear Material Document Year
MaterialDocumentItem MaterialDocumentItem Material Document Item
AccountingDocument AccountingDocument Journal Entry
FiscalYear FiscalYear G/L Fiscal Year
CostEstimate CostEstimate Cost EstimateNo
CompanyCode CompanyCode Receiver Company Code
Material Material Vehicle Model
Plant Plant Valuation Area
StorageLocation StorageLocation StorageLocation
Batch Batch Lot No.
Supplier Supplier Supplier
SalesOrder SalesOrder SD Document
SalesOrderItem SalesOrderItem Sales Order Item
WBSElementInternalID WBSElementInternalID WBS Internal ID
Customer Customer Sold-to Party
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
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
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
ConsumptionPosting ConsumptionPosting Consumption Posting
P_StartDate
P_EndDateStockLevelIsValuated
ReversalMovementIsSelected
MaterialDocument MaterialDocument Material Doc.
MaterialDocumentYear MaterialDocumentYear Material Document Year
MaterialDocumentItem MaterialDocumentItem Material Document Item
AccountingDocument AccountingDocument Journal Entry
FiscalYear FiscalYear G/L Fiscal Year
CostEstimate CostEstimate Cost EstimateNo
CompanyCode CompanyCode Receiver Company Code
Material Material Vehicle Model
Plant Plant Valuation Area
StorageLocation StorageLocation StorageLocation
Batch Batch Lot No.
Supplier Supplier Supplier
SalesOrder SalesOrder SD Document
SalesOrderItem SalesOrderItem Sales Order Item
WBSElementInternalID WBSElementInternalID WBS Internal ID
Customer Customer Sold-to Party
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
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
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
ConsumptionPosting ConsumptionPosting Consumption Posting
PostingDate 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_StkPostgHistBasic_Union.
-- 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_StkPostgHistBasic_Union AS
SELECT
  StockLevelIsValuated,
  '0' AS ReversalMovementIsSelected,
  MaterialDocument,
  MaterialDocumentYear,
  MaterialDocumentItem,
  AccountingDocument,
  FiscalYear,
  CostEstimate,
  CompanyCode,
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SalesOrder,
  SalesOrderItem,
  WBSElementInternalID,
  Customer,
  InventoryStockType,
  InventorySpecialStockType,
  SpecialStockIdfgStockOwner,
  ResourceID,
  InventoryValuationType,
  MaterialBaseUnit,
  MatlStkChangeQtyInBaseUnit,
  CompanyCodeCurrency,
  AmountInCompanyCodeCurrency,
  PurchaseOrder,
  PurchaseOrderItem,
  ManufacturingOrder,
  ManufacturingOrderItem,
  DeliveryDocument,
  DeliveryDocumentItem,
  Reservation,
  ReservationItem,
  GoodsMovementType,
  GoodsMovementRefDocType,
  GoodsReceiptType,
  ConsumptionPosting,
  PostingDate AS P_StartDate,
  PostingDate
FROM P_StkPostgHistBasic
-- UNION ALL with additional select branch(es): P_StkPostgHistBasicNoReversal
;