P_StockMTM_AbsNetQuantityData

DDL: P_STOCKMTM_ABSNETQUANTITYDATA SQL: PSTKMTMABSAJDQTY Type: view COMPOSITE

P_StockMTM_AbsNetQuantityData is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_StockMTM_Delta_Data, P_StockMTM_NetQuantityData) and exposes 28 fields with key fields PricingKey, Version, PricingDocumentItem, ConditionType, SubConditionType.

Data Sources (2)

SourceAliasJoin Type
P_StockMTM_Delta_Data P_StockMTM_Delta_Data from
P_StockMTM_NetQuantityData P_StockMTM_NetQuantityData inner

Parameters (5)

NameTypeDefault
P_EvaluationDate cmm_eval_keydate
P_ExchRateEvaluationDate cmm_eval_keydate
P_EndOfDaySnapshotFromDate cmm_eval_keydate
P_EndOfDaySnapshotToDate cmm_eval_keydate
P_MTMDataSelectionType cmm_vlogp_consumptiontype

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PSTKMTMABSAJDQTY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (28)

KeyFieldSource TableSource FieldDescription
KEY PricingKey StockMTMData PricingKey Pricing Key
KEY Version StockMTMData Version XML Vers.
KEY PricingDocumentItem StockMTMData PricingDocumentItem Item
KEY ConditionType StockMTMData ConditionType Condition type
KEY SubConditionType StockMTMData SubConditionType
KEY VersStockRecordUUID StockMTMData VersStockRecordUUID
CompanyCode StockMTMData CompanyCode Receiver Company Code
Material StockMTMData Material Vehicle Model
PhysicalCommodity StockMTMData PhysicalCommodity
Plant StockMTMData Plant Valuation Area
StorageLocation StockMTMData StorageLocation StorageLocation
MTMDataSourceType StockMTMData MTMDataSourceType Type of Data Record
SourceDocument StockMTMData SourceDocument Document
SourceDocumentItem StockMTMData SourceDocumentItem
ReferenceDocument StockMTMData ReferenceDocument Reference Document
ReferenceDocumentItem StockMTMData ReferenceDocumentItem Reference item
LoadDataCaptureObjectID StockMTMData LoadDataCaptureObjectID
QuantityRepositoryUUID StockMTMData QuantityRepositoryUUID
QuantityRepositoryVersion StockMTMData QuantityRepositoryVersion
AdjustedQuantityendasAdjustedQuantity
Commodityquantity StockMTMData Commodityquantity Commodity Quantity
CommodityUnit StockMTMData CommodityUnit Order Unit
NetPriceExpsrQuantity StockMTMData NetPriceExpsrQuantity
DiscPremQtyScheduleType StockMTMData DiscPremQtyScheduleType
NetDryErrorCode StockMTMData NetDryErrorCode
DiscPremVolSchedEvalIsRqd StockMTMData DiscPremVolSchedEvalIsRqd
StorageGrossQtyInCmmdtyUnit StockMTMData StorageGrossQtyInCmmdtyUnit
MaterialBaseUnit StockMTMData MaterialBaseUnit Valuation Unit

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_StockMTM_AbsNetQuantityData.
-- 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.
-- SQL view name: PSTKMTMABSAJDQTY
-- Parameters: P_EvaluationDate : cmm_eval_keydate, P_ExchRateEvaluationDate : cmm_eval_keydate, P_EndOfDaySnapshotFromDate : cmm_eval_keydate, P_EndOfDaySnapshotToDate : cmm_eval_keydate, P_MTMDataSelectionType : cmm_vlogp_consumptiontype

CREATE VIEW P_StockMTM_AbsNetQuantityData AS
SELECT
  StockMTMData.PricingKey AS PricingKey,
  StockMTMData.Version AS Version,
  StockMTMData.PricingDocumentItem AS PricingDocumentItem,
  StockMTMData.ConditionType AS ConditionType,
  StockMTMData.SubConditionType AS SubConditionType,
  StockMTMData.VersStockRecordUUID AS VersStockRecordUUID,
  StockMTMData.CompanyCode AS CompanyCode,
  StockMTMData.Material AS Material,
  StockMTMData.PhysicalCommodity AS PhysicalCommodity,
  StockMTMData.Plant AS Plant,
  StockMTMData.StorageLocation AS StorageLocation,
  StockMTMData.MTMDataSourceType AS MTMDataSourceType,
  StockMTMData.SourceDocument AS SourceDocument,
  StockMTMData.SourceDocumentItem AS SourceDocumentItem,
  StockMTMData.ReferenceDocument AS ReferenceDocument,
  StockMTMData.ReferenceDocumentItem AS ReferenceDocumentItem,
  StockMTMData.LoadDataCaptureObjectID AS LoadDataCaptureObjectID,
  StockMTMData.QuantityRepositoryUUID AS QuantityRepositoryUUID,
  StockMTMData.QuantityRepositoryVersion AS QuantityRepositoryVersion,
  case when StockMTMData.DiscPremQtyScheduleType = 'P' or ( StockMTMData.NetPriceExpsrQuantity is not null and StockMTMData.NetPriceExpsrQuantity is not initial ) then StockMTMData.NetPriceExpsrQuantity else ABS( NetQuan.AdjustedQuantity ) end as AdjustedQuantity AS AdjustedQuantityendasAdjustedQuantity,
  StockMTMData.Commodityquantity AS Commodityquantity,
  StockMTMData.CommodityUnit AS CommodityUnit,
  StockMTMData.NetPriceExpsrQuantity AS NetPriceExpsrQuantity,
  StockMTMData.DiscPremQtyScheduleType AS DiscPremQtyScheduleType,
  StockMTMData.NetDryErrorCode AS NetDryErrorCode,
  StockMTMData.DiscPremVolSchedEvalIsRqd AS DiscPremVolSchedEvalIsRqd,
  StockMTMData.StorageGrossQtyInCmmdtyUnit AS StorageGrossQtyInCmmdtyUnit,
  StockMTMData.MaterialBaseUnit AS MaterialBaseUnit
FROM P_StockMTM_Delta_Data
INNER JOIN P_StockMTM_NetQuantityData ON /* join condition not captured in parsed metadata */
;