P_PaymentOrder

DDL: P_PAYMENTORDER SQL: PPAYMENTRORDER Type: view BASIC

P_PaymentOrder is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (fqmc_activation, pyordp) and exposes 29 fields with key fields PaymentOrder, CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
fqmc_activation fqmc_activation inner
pyordp pyordp left_outer

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_AccountingDocument _AccountingDocument $projection.AccountingDocument = _AccountingDocument.AccountingDocument and $projection.FiscalYear = _AccountingDocument.FiscalYear and $projection.CompanyCode = _AccountingDocument.CompanyCode --
[0..*] P_PlanningTypeText _PlanningType $projection.PlanningType = _PlanningType.PlanningType --
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode --
[0..1] I_Currency _Currency $projection.TransactionCurrency = _Currency.Currency

Annotations (6)

NameValueLevelField
VDM.private true view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PPAYMENTRORDER view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropogatedAnnotations true view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY PaymentOrder pyordh pyord Payment Order
KEY CompanyCode pyordp bukrs Value
KEY AccountingDocument pyordp belnr SD Document
KEY FiscalYear pyordp gjahr Settlement Year
KEY AccountingDocumentItem pyordp buzei Posting View Item
PaymentRunDate pyordh laufd Run On
PaymentRunIdentification pyordh laufi Settlement ID
PaymentMethod pyordh rzawe Pymt Meth.
TransactionCurrency pyordh waers Transaction Currency
PayingCompanyCode pyordh zbukr Paying CoCd
HouseBank pyordh hbkid House Bank
HouseBankAccount pyordh hktid House Bank Account
TotalAmountInDocCurrency
Vendor pyordh lifnr Vendor no.
Customer pyordh kunnr Stock customer
ValueDate pyordh valut Value date
PlanningLevel pyordh fdlev Planning Level
GLAccount pyordh bnkko G/L account
PlannedCurrency pyordh curra Currency
AmountInLocalCurrency
BusinessArea pyordh srtgb Business Area
DirectDebitPreNotification pyordh x_dd_prenotif Direct Debit Pre-Notifications
AmountInTransactionCurrency
CashDiscountAmount
WithholdingTaxAmount
AccountType pyordp koart Account type
OpenItemAccountNumber pyordp konko Account
SelectedCashDiscountDays pyordp zbdxt Cash Disc.Days
SelectedCashDiscountRate pyordp zbdxp Cash Discount %

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_PaymentOrder.
-- 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: PPAYMENTRORDER

CREATE VIEW P_PaymentOrder AS
SELECT
  pyordh.pyord AS PaymentOrder,
  pyordp.bukrs AS CompanyCode,
  pyordp.belnr AS AccountingDocument,
  pyordp.gjahr AS FiscalYear,
  pyordp.buzei AS AccountingDocumentItem,
  pyordh.laufd AS PaymentRunDate,
  pyordh.laufi AS PaymentRunIdentification,
  pyordh.rzawe AS PaymentMethod,
  pyordh.waers AS TransactionCurrency,
  pyordh.zbukr AS PayingCompanyCode,
  pyordh.hbkid AS HouseBank,
  pyordh.hktid AS HouseBankAccount,
  cast(pyordh.rwbtr as abap.dec( 23, 2 )) AS TotalAmountInDocCurrency,
  pyordh.lifnr AS Vendor,
  pyordh.kunnr AS Customer,
  pyordh.valut AS ValueDate,
  pyordh.fdlev AS PlanningLevel,
  pyordh.bnkko AS GLAccount,
  pyordh.curra AS PlannedCurrency,
  cast(pyordh.rbetr as abap.dec( 23, 2 )) AS AmountInLocalCurrency,
  pyordh.srtgb AS BusinessArea,
  pyordh.x_dd_prenotif AS DirectDebitPreNotification,
  cast(pyordp.wrbtr as abap.dec( 23, 2 )) AS AmountInTransactionCurrency,
  cast(pyordp.wskto as abap.dec( 23, 2 )) AS CashDiscountAmount,
  cast(pyordp.qbshb as abap.dec( 23, 2 )) AS WithholdingTaxAmount,
  pyordp.koart AS AccountType,
  pyordp.konko AS OpenItemAccountNumber,
  pyordp.zbdxt AS SelectedCashDiscountDays,
  pyordp.zbdxp AS SelectedCashDiscountRate
LEFT OUTER JOIN pyordp ON /* join condition not captured in parsed metadata */
INNER JOIN fqmc_activation ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_AccountingDocument AS _AccountingDocument ON AccountingDocument = _AccountingDocument.AccountingDocument AND FiscalYear = _AccountingDocument.FiscalYear AND CompanyCode = _AccountingDocument.CompanyCode  -- association [0..1]
LEFT OUTER JOIN P_PlanningTypeText AS _PlanningType ON PlanningType = _PlanningType.PlanningType  -- association [0..*]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _Currency ON TransactionCurrency = _Currency.Currency  -- association [0..1]
;