P_PrepaymentCPEContractAmount

DDL: P_PREPAYMENTCPECONTRACTAMOUNT SQL: PPMGCTRCPEAMT Type: view COMPOSITE

Prepayment Contract CPE Amount

P_PrepaymentCPEContractAmount is a Composite CDS View that provides data about "Prepayment Contract CPE Amount" in SAP S/4HANA. It reads from 5 data sources (I_PreAgrmtTradingContractStat, I_PrepayWrkCtrAllowedDocTypes, I_PreAgrmtTradingContract, I_PreAgrmtTradingContractItem, I_PrepaymentMaterial) and exposes 20 fields with key fields PrepaymentAgrmtWorkCenterType, PrepaymentAgrmtRefDocumentCat, PrepaymentAgrmtRefBusObject, DocNumber, DocumentItemNumber. It has 1 association to related views.

Data Sources (5)

SourceAliasJoin Type
I_PreAgrmtTradingContractStat ContractApplicationStatus inner
I_PrepayWrkCtrAllowedDocTypes DocTypes from
I_PreAgrmtTradingContract Document inner
I_PreAgrmtTradingContractItem DocumentItem inner
I_PrepaymentMaterial Material inner

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_PrepaymentDocumentMarketVal CPEPrice CPEPrice.TradingContract = Document.TradingContract and CPEPrice.TradingContractItem = DocumentItem.TradingContractItem and CPEPrice.PrepaymentRefDocCondition = Document.PrepaymentRefDocCondition and Material.Commodity is not initial

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPMGCTRCPEAMT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Prepayment Contract CPE Amount view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY PrepaymentAgrmtWorkCenterType I_PrepayWrkCtrAllowedDocTypes PrepaymentAgrmtWorkCenterType Dashboard Type
KEY PrepaymentAgrmtRefDocumentCat I_PrepayWrkCtrAllowedDocTypes PrepaymentAgrmtRefDocumentCat Document Category
KEY PrepaymentAgrmtRefBusObject
KEY DocNumber I_PreAgrmtTradingContract TradingContract Trading Contract
KEY DocumentItemNumber I_PreAgrmtTradingContractItem TradingContractItem Item Number
PrepaymentAgrmtRefDocument
CompanyCode I_PreAgrmtTradingContract CompanyCode Receiver Company Code
DocumentType I_PreAgrmtTradingContract TradingContractType Contract Type
PrepaymentTotalAmt
PrepaymentTotalAmtCrcy I_PreAgrmtTradingContractItem TrdgContrTotalNetAmountCrcy
PrepaymentTotalAmtIsFixedPrice CPEPrice PrepaymentTotalAmtIsFixedPrice
PrepaymentWrkCtrDocPricingOptn CPEPrice PrepaymentWrkCtrDocPricingOptn
Counterparty I_PreAgrmtTradingContract Counterparty Supplier
TrdgContrApplicationStatus I_PreAgrmtTradingContract TrdgContrApplicationStatus Only Copy Appr.TC
PrepaymentRefDocItmValdFromDte I_PreAgrmtTradingContractItem PrepaymentRefDocItmValdFromDte Validity Start Date
PrepaymentRefDocItmValdToDte I_PreAgrmtTradingContractItem PrepaymentRefDocItmValdToDte Validity End Date
Material I_PreAgrmtTradingContractItem Material Vehicle Model
Commodity I_PrepaymentMaterial Commodity Commodity Code
OrderQuantity I_PreAgrmtTradingContractItem TradingContractItemQuantity
OrderQuantityUnit I_PreAgrmtTradingContractItem TrdgContractItemUnitOfMeasure

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_PrepaymentCPEContractAmount.
-- 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: PPMGCTRCPEAMT

CREATE VIEW P_PrepaymentCPEContractAmount AS
SELECT
  DocTypes.PrepaymentAgrmtWorkCenterType AS PrepaymentAgrmtWorkCenterType,
  DocTypes.PrepaymentAgrmtRefDocumentCat AS PrepaymentAgrmtRefDocumentCat,
  cast( 'BUS2124' as ppmgac_e_link_bus ) AS PrepaymentAgrmtRefBusObject,
  Document.TradingContract AS DocNumber,
  DocumentItem.TradingContractItem AS DocumentItemNumber,
  lpad( Document.TradingContract, 25, '0' ) AS PrepaymentAgrmtRefDocument,
  Document.CompanyCode AS CompanyCode,
  Document.TradingContractType AS DocumentType,
  cast( CPEPrice.PrepaymentTotalAmt as abap.curr(23,2) ) AS PrepaymentTotalAmt,
  DocumentItem.TrdgContrTotalNetAmountCrcy AS PrepaymentTotalAmtCrcy,
  CPEPrice.PrepaymentTotalAmtIsFixedPrice AS PrepaymentTotalAmtIsFixedPrice,
  CPEPrice.PrepaymentWrkCtrDocPricingOptn AS PrepaymentWrkCtrDocPricingOptn,
  Document.Counterparty AS Counterparty,
  Document.TrdgContrApplicationStatus AS TrdgContrApplicationStatus,
  DocumentItem.PrepaymentRefDocItmValdFromDte AS PrepaymentRefDocItmValdFromDte,
  DocumentItem.PrepaymentRefDocItmValdToDte AS PrepaymentRefDocItmValdToDte,
  DocumentItem.Material AS Material,
  Material.Commodity AS Commodity,
  DocumentItem.TradingContractItemQuantity AS OrderQuantity,
  DocumentItem.TrdgContractItemUnitOfMeasure AS OrderQuantityUnit
FROM I_PrepayWrkCtrAllowedDocTypes AS DocTypes
INNER JOIN I_PreAgrmtTradingContract AS Document ON /* join condition not captured in parsed metadata */
INNER JOIN I_PreAgrmtTradingContractStat AS ContractApplicationStatus ON /* join condition not captured in parsed metadata */
INNER JOIN I_PreAgrmtTradingContractItem 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_PrepaymentDocumentMarketVal AS CPEPrice ON CPEPrice.TradingContract = Document.TradingContract AND CPEPrice.TradingContractItem = DocumentItem.TradingContractItem AND CPEPrice.PrepaymentRefDocCondition = Document.PrepaymentRefDocCondition AND Material.Commodity is not initial  -- association [0..1]
;