P_PaymentOrder
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)
| Source | Alias | Join Type |
|---|---|---|
| fqmc_activation | fqmc_activation | inner |
| pyordp | pyordp | left_outer |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA