P_PrepaymentRefDocTotalAmtPO

DDL: P_PREPAYMENTREFDOCTOTALAMTPO Type: view_entity COMPOSITE

Prepayment Document Total Amount

P_PrepaymentRefDocTotalAmtPO is a Composite CDS View that provides data about "Prepayment Document Total Amount" in SAP S/4HANA. It reads from 4 data sources (I_PrepayWrkCtrAllowedDocTypes, I_PurchasingDocument, I_PurchasingDocumentItem, I_PrepaymentMaterial) and exposes 18 fields with key fields PrepaymentAgrmtWorkCenterType, PrepaymentAgrmtRefDocumentCat, PrepaymentAgrmtRefBusObject, DocNumber, DocumentItemNumber. It has 2 associations to related views.

Data Sources (4)

SourceAliasJoin Type
I_PrepayWrkCtrAllowedDocTypes DocTypes from
I_PurchasingDocument Document inner
I_PurchasingDocumentItem DocumentItem inner
I_PrepaymentMaterial Material inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] P_PrepayDocVersLogPrcgValPO CMMPrice CMMPrice.PrepaymentWrkCtrDocPricingOptn = WCPrcConfig.PrepaymentWrkCtrDocPricingOptn and Material.Commodity is not initial and CMMPrice.PrepaymentAgrmtRefBusObject = 'BUS2012' and CMMPrice.PrepaymentDocumentNumber = Document.PurchasingDocument and CMMPrice.PurchasingDocumentItem = DocumentItem.PurchasingDocumentItem and CMMPrice.CompanyCode = Document.CompanyCode and CMMPrice.Counterparty = Document.Supplier -- CPE Price
[0..1] I_PrepayDocumentMarketDataPO CPEPrice CPEPrice.PrepaymentWrkCtrDocPricingOptn = WCPrcConfig.PrepaymentWrkCtrDocPricingOptn and CPEPrice.PurchasingDocument = Document.PurchasingDocument and Material.Commodity is not initial and CPEPrice.PrepaymentRefDocCondition = Document.PurchasingDocumentCondition and CPEPrice.PurchasingDocumentItem = DocumentItem.PurchasingDocumentItem and CPEPrice.CompanyCode = Document.CompanyCode and CPEPrice.Counterparty = Document.Supplier

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Prepayment Document Total Amount view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY PrepaymentAgrmtWorkCenterType I_PrepayWrkCtrAllowedDocTypes PrepaymentAgrmtWorkCenterType Dashboard Type
KEY PrepaymentAgrmtRefDocumentCat I_PrepayWrkCtrAllowedDocTypes PrepaymentAgrmtRefDocumentCat Document Category
KEY PrepaymentAgrmtRefBusObject
KEY DocNumber I_PurchasingDocument PurchasingDocument Purchasing Document
KEY DocumentItemNumber
PurchasingDocumentITem I_PurchasingDocumentItem PurchasingDocumentItem Purchasing Doc. Item
PrepaymentAgrmtRefDocument
CompanyCode I_PurchasingDocument CompanyCode Receiver Company Code
DocumentType I_PurchasingDocument PurchasingDocumentType RFQ Type
Counterparty I_PurchasingDocument Supplier Supplier
PrepaymentRefDocItmValdFromDte I_PurchasingDocument ValidityStartDate Validity Start Date
PrepaymentRefDocItmValdToDte I_PurchasingDocument ValidityEndDate ValidTo
Material I_PurchasingDocumentItem Material Vehicle Model
Commodity I_PrepaymentMaterial Commodity Commodity Code
OrderQuantity I_PurchasingDocumentItem OrderQuantity Quantity
OrderQuantityUnit I_PurchasingDocumentItem OrderQuantityUnit Sales Unit
curr232asPrepaymentTotalAmt
PrepaymentTotalAmtCrcy I_PurchasingDocument 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_PrepaymentRefDocTotalAmtPO.
-- 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.

CREATE VIEW P_PrepaymentRefDocTotalAmtPO AS
SELECT
  DocTypes.PrepaymentAgrmtWorkCenterType AS PrepaymentAgrmtWorkCenterType,
  DocTypes.PrepaymentAgrmtRefDocumentCat AS PrepaymentAgrmtRefDocumentCat,
  'BUS2012' AS PrepaymentAgrmtRefBusObject,
  Document.PurchasingDocument AS DocNumber,
  cast( DocumentItem.PurchasingDocumentItem as abap.char(6) ) AS DocumentItemNumber,
  DocumentItem.PurchasingDocumentItem AS PurchasingDocumentITem,
  lpad( Document.PurchasingDocument, 25, '0' ) AS PrepaymentAgrmtRefDocument,
  Document.CompanyCode AS CompanyCode,
  Document.PurchasingDocumentType AS DocumentType,
  Document.Supplier AS Counterparty,
  Document.ValidityStartDate AS PrepaymentRefDocItmValdFromDte,
  Document.ValidityEndDate AS PrepaymentRefDocItmValdToDte,
  DocumentItem.Material AS Material,
  Material.Commodity AS Commodity,
  DocumentItem.OrderQuantity AS OrderQuantity,
  DocumentItem.OrderQuantityUnit AS OrderQuantityUnit,
  Document.DocumentCurrency AS PrepaymentTotalAmtCrcy
FROM I_PrepayWrkCtrAllowedDocTypes AS DocTypes
INNER JOIN I_PurchasingDocument AS Document ON /* join condition not captured in parsed metadata */
INNER JOIN I_PurchasingDocumentItem AS DocumentItem ON /* join condition not captured in parsed metadata */
INNER JOIN I_PrepaymentMaterial AS Material ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_PrepayDocVersLogPrcgValPO AS CMMPrice ON CMMPrice.PrepaymentWrkCtrDocPricingOptn = WCPrcConfig.PrepaymentWrkCtrDocPricingOptn AND Material.Commodity is not initial AND CMMPrice.PrepaymentAgrmtRefBusObject = 'BUS2012' AND CMMPrice.PrepaymentDocumentNumber = Document.PurchasingDocument AND CMMPrice.PurchasingDocumentItem = DocumentItem.PurchasingDocumentItem AND CMMPrice.CompanyCode = Document.CompanyCode AND CMMPrice.Counterparty = Document.Supplier  -- association [0..1]
LEFT OUTER JOIN I_PrepayDocumentMarketDataPO AS CPEPrice ON CPEPrice.PrepaymentWrkCtrDocPricingOptn = WCPrcConfig.PrepaymentWrkCtrDocPricingOptn AND CPEPrice.PurchasingDocument = Document.PurchasingDocument AND Material.Commodity is not initial AND CPEPrice.PrepaymentRefDocCondition = Document.PurchasingDocumentCondition AND CPEPrice.PurchasingDocumentItem = DocumentItem.PurchasingDocumentItem AND CPEPrice.CompanyCode = Document.CompanyCode AND CPEPrice.Counterparty = Document.Supplier  -- association [0..1]
;