Deprecated
This CDS view is deprecated in S/4HANA. View all deprecated CDS views →

P_PrepaymentDocVersLogPrcgVal

DDL: P_PREPAYMENTDOCVERSLOGPRCGVAL SQL: PPPMGDOCVERSLOG Type: view COMPOSITE

P_PrepaymentDocVersLogPrcgVal is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_VersionedLogisticDocument, I_VersionedLogisticDocument) and exposes 8 fields with key fields PrepaymentAgrmtRefBusObject, PrepaymentDocumentNumber, PrepaymentDocumentItemNumber.

Data Sources (2)

SourceAliasJoin Type
I_VersionedLogisticDocument FixedVal from
I_VersionedLogisticDocument MarketVal inner

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PPPMGDOCVERSLOG view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Metadata.ignorePropagatedAnnotations true view
VDM.lifecycle.status #DEPRECATED view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY PrepaymentAgrmtRefBusObject I_VersionedLogisticDocument OriginReferenceDocBusObjType Root (BOR) Obj. Type
KEY PrepaymentDocumentNumber
KEY PrepaymentDocumentItemNumber I_VersionedLogisticDocument OriginReferenceDocumentItem Root Document Item
PurchasingDocumentItem
quan133endasPrepaymentDocCmmdtyMarketQty
PrepaymentDocCmmdtyMktQtyUnit I_VersionedLogisticDocument CommodityUnit Order Unit
curr253asPrepaymentTotalAmt
PrepaymentTotalAmountCrcy I_VersionedLogisticDocument DocumentCurrency Document Currency

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_PrepaymentDocVersLogPrcgVal.
-- 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: PPPMGDOCVERSLOG

CREATE VIEW P_PrepaymentDocVersLogPrcgVal AS
SELECT
  FixedVal.OriginReferenceDocBusObjType AS PrepaymentAgrmtRefBusObject,
  right( FixedVal.OriginReferenceDocument, 10 ) AS PrepaymentDocumentNumber,
  FixedVal.OriginReferenceDocumentItem AS PrepaymentDocumentItemNumber,
  right( FixedVal.OriginReferenceDocumentItem, 5 ) AS PurchasingDocumentItem,
  sum( case when FixedVal.ConditionTermRateIsFixed = ' ' and ( FixedVal.MTMCalculationGroup = 'B' or FixedVal.MTMCalculationGroup = 'F' ) then MarketVal.CommodityQuantity else cast( 0 as abap.quan(13,3)) end ) as PrepaymentDocCmmdtyMarketQty AS quan133endasPrepaymentDocCmmdtyMarketQty,
  FixedVal.CommodityUnit AS PrepaymentDocCmmdtyMktQtyUnit,
  cast( sum( case when FixedVal.ConditionTermRateIsFixed = 'X' and FixedVal.ConditionTermRateCurrency = FixedVal.DocumentCurrency then FixedVal.ConditionTermValue when FixedVal.ConditionTermRateIsFixed = 'X' and FixedVal.ConditionTermRateCurrency <> FixedVal.DocumentCurrency then FixedVal.ConditionTermValue * FixedValRate.TargetConversionFactor when FixedVal.ConditionTermRateIsFixed = ' ' and MarketVal.ConditionTermRateCurrency = MarketVal.DocumentCurrency then MarketVal.ConditionTermValue when FixedVal.ConditionTermRateIsFixed = ' ' and MarketVal.ConditionTermRateCurrency <> MarketVal.DocumentCurrency and FixedVal.ConditionTermExchRateIsFixed = ' ' then MarketVal.ConditionTermValue * MarketValRate.TargetConversionFactor when FixedVal.ConditionTermRateIsFixed = ' ' and MarketVal.ConditionTermRateCurrency <> MarketVal.DocumentCurrency and FixedVal.ConditionTermExchRateIsFixed = 'X' then MarketVal.ConditionTermValue * FixedValRate.TargetConversionFactor else 0 end ) as abap.curr(25,3) ) as PrepaymentTotalAmt AS curr253asPrepaymentTotalAmt,
  FixedVal.DocumentCurrency AS PrepaymentTotalAmountCrcy
FROM I_VersionedLogisticDocument AS FixedVal
INNER JOIN I_VersionedLogisticDocument AS MarketVal ON /* join condition not captured in parsed metadata */
;