P_APJrnlEntrItmOpenPay2_WSJ
P_APJrnlEntrItmOpenPay2_WSJ With self-join
P_APJrnlEntrItmOpenPay2_WSJ is a CDS View that provides data about "P_APJrnlEntrItmOpenPay2_WSJ With self-join" in SAP S/4HANA. It reads from 3 data sources (P_APJrnlEntrItmOpenPay1, P_APJrnlEntrItmOpenPay1, I_ReceivablesPayablesItem) and exposes 67 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem, FiscalYear. Part of development package FINS_FIS_AP_APPS.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_APJrnlEntrItmOpenPay1 | P_APJrnlEntrItmOpenPay1 | from |
| P_APJrnlEntrItmOpenPay1 | P_APJrnlEntrItmOpenPay1 | union_all |
| I_ReceivablesPayablesItem | ReferencedInvoices | inner |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | sydate |
Fields (67)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | OpenPayables | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | OpenPayables | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | OpenPayables | AccountingDocument | Journal Entry |
| KEY | LedgerGLLineItem | OpenPayables | LedgerGLLineItem | Journal Entry Item |
| AccountingDocumentCategory | OpenPayables | AccountingDocumentCategory | Journal Entry Category | |
| AccountingDocumentType | OpenPayables | AccountingDocumentType | Journal Entry Type | |
| AccountingDocumentItem | OpenPayables | AccountingDocumentItem | Posting View Item | |
| InvoiceReference | OpenPayables | InvoiceReference | Invoice Reference | |
| InvoiceItemReference | OpenPayables | InvoiceItemReference | Item | |
| InvoiceReferenceFiscalYear | OpenPayables | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | |
| ClearingDate | OpenPayables | ClearingDate | Clearing Date | |
| PostingDate | OpenPayables | PostingDate | Posting Date for GR | |
| DocumentDate | OpenPayables | DocumentDate | Journal Entry Date | |
| FinancialAccountType | OpenPayables | FinancialAccountType | Fin. Account Type | |
| Supplier | OpenPayables | Supplier | Supplier | |
| FollowOnDocumentType | OpenPayables | FollowOnDocumentType | Follow-On Document Type | |
| SpecialGLCode | OpenPayables | SpecialGLCode | Special G/L Ind | |
| GLAccount | OpenPayables | GLAccount | General Ledger | |
| CostCenter | OpenPayables | CostCenter | Cost Center | |
| ProfitCenter | OpenPayables | ProfitCenter | Profit Center | |
| FunctionalArea | OpenPayables | FunctionalArea | Sendr Fctl Area | |
| BusinessArea | OpenPayables | BusinessArea | Business Area | |
| Segment | OpenPayables | Segment | Segment number | |
| PurchasingDocument | OpenPayables | PurchasingDocument | Purchasing Document | |
| AssignmentReference | OpenPayables | AssignmentReference | Assignment Reference | |
| CompanyCodeCurrency | OpenPayables | CompanyCodeCurrency | Local Currency | |
| AmountInCompanyCodeCurrency | OpenPayables | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| RefInvcDocumentDate | I_ReceivablesPayablesItem | DocumentDate | Journal Entry Date | |
| RefInvcFinancialAccountType | I_ReceivablesPayablesItem | FinancialAccountType | Fin. Account Type | |
| RefInvcDebitCreditCode | I_ReceivablesPayablesItem | DebitCreditCode | Single-Character Flag | |
| RefInvcNetPaymentDays | I_ReceivablesPayablesItem | NetPaymentDays | Net Pmt Terms Period | |
| RefInvcInvoiceReference | I_ReceivablesPayablesItem | InvoiceReference | Invoice Reference | |
| RefInvcNetDueDate | I_ReceivablesPayablesItem | NetDueDate | Net Due Date | |
| CompanyCodeasCompanyCode | ||||
| KEY | FiscalYear | OpenPayables | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | OpenPayables | AccountingDocument | Journal Entry |
| KEY | LedgerGLLineItem | OpenPayables | LedgerGLLineItem | Journal Entry Item |
| AccountingDocumentCategory | OpenPayables | AccountingDocumentCategory | Journal Entry Category | |
| AccountingDocumentType | OpenPayables | AccountingDocumentType | Journal Entry Type | |
| AccountingDocumentItem | OpenPayables | AccountingDocumentItem | Posting View Item | |
| InvoiceReference | OpenPayables | InvoiceReference | Invoice Reference | |
| InvoiceItemReference | OpenPayables | InvoiceItemReference | Item | |
| InvoiceReferenceFiscalYear | OpenPayables | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | |
| ClearingDate | OpenPayables | ClearingDate | Clearing Date | |
| PostingDate | OpenPayables | PostingDate | Posting Date for GR | |
| DocumentDate | OpenPayables | DocumentDate | Journal Entry Date | |
| FinancialAccountType | OpenPayables | FinancialAccountType | Fin. Account Type | |
| Supplier | OpenPayables | Supplier | Supplier | |
| FollowOnDocumentType | OpenPayables | FollowOnDocumentType | Follow-On Document Type | |
| SpecialGLCode | OpenPayables | SpecialGLCode | Special G/L Ind | |
| GLAccount | OpenPayables | GLAccount | General Ledger | |
| CostCenter | OpenPayables | CostCenter | Cost Center | |
| ProfitCenter | OpenPayables | ProfitCenter | Profit Center | |
| FunctionalArea | OpenPayables | FunctionalArea | Sendr Fctl Area | |
| BusinessArea | OpenPayables | BusinessArea | Business Area | |
| Segment | OpenPayables | Segment | Segment number | |
| PurchasingDocument | OpenPayables | PurchasingDocument | Purchasing Document | |
| AssignmentReference | OpenPayables | AssignmentReference | Assignment Reference | |
| CompanyCodeCurrency | OpenPayables | CompanyCodeCurrency | Local Currency | |
| AmountInCompanyCodeCurrency | OpenPayables | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| RefInvcDocumentDate | I_ReceivablesPayablesItem | DocumentDate | Journal Entry Date | |
| RefInvcFinancialAccountType | I_ReceivablesPayablesItem | FinancialAccountType | Fin. Account Type | |
| RefInvcDebitCreditCode | I_ReceivablesPayablesItem | DebitCreditCode | Single-Character Flag | |
| RefInvcNetPaymentDays | I_ReceivablesPayablesItem | NetPaymentDays | Net Pmt Terms Period | |
| RefInvcInvoiceReference | I_ReceivablesPayablesItem | InvoiceReference | Invoice Reference | |
| RefInvcNetDueDate | I_ReceivablesPayablesItem | NetDueDate | Net Due Date | |
| NetDueDate | OpenPayables | NetDueDate | Net Due Date |
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_APJrnlEntrItmOpenPay2_WSJ.
-- 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.
-- Parameters: P_KeyDate : sydate
CREATE VIEW P_APJrnlEntrItmOpenPay2_WSJ AS
SELECT
OpenPayables.CompanyCode AS CompanyCode,
OpenPayables.FiscalYear AS FiscalYear,
OpenPayables.AccountingDocument AS AccountingDocument,
OpenPayables.LedgerGLLineItem AS LedgerGLLineItem,
OpenPayables.AccountingDocumentCategory AS AccountingDocumentCategory,
OpenPayables.AccountingDocumentType AS AccountingDocumentType,
OpenPayables.AccountingDocumentItem AS AccountingDocumentItem,
OpenPayables.InvoiceReference AS InvoiceReference,
OpenPayables.InvoiceItemReference AS InvoiceItemReference,
OpenPayables.InvoiceReferenceFiscalYear AS InvoiceReferenceFiscalYear,
OpenPayables.ClearingDate AS ClearingDate,
OpenPayables.PostingDate AS PostingDate,
OpenPayables.DocumentDate AS DocumentDate,
OpenPayables.FinancialAccountType AS FinancialAccountType,
OpenPayables.Supplier AS Supplier,
OpenPayables.FollowOnDocumentType AS FollowOnDocumentType,
OpenPayables.SpecialGLCode AS SpecialGLCode,
OpenPayables.GLAccount AS GLAccount,
OpenPayables.CostCenter AS CostCenter,
OpenPayables.ProfitCenter AS ProfitCenter,
OpenPayables.FunctionalArea AS FunctionalArea,
OpenPayables.BusinessArea AS BusinessArea,
OpenPayables.Segment AS Segment,
OpenPayables.PurchasingDocument AS PurchasingDocument,
OpenPayables.AssignmentReference AS AssignmentReference,
OpenPayables.CompanyCodeCurrency AS CompanyCodeCurrency,
OpenPayables.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
ReferencedInvoices.DocumentDate AS RefInvcDocumentDate,
ReferencedInvoices.FinancialAccountType AS RefInvcFinancialAccountType,
ReferencedInvoices.DebitCreditCode AS RefInvcDebitCreditCode,
ReferencedInvoices.NetPaymentDays AS RefInvcNetPaymentDays,
ReferencedInvoices.InvoiceReference AS RefInvcInvoiceReference,
ReferencedInvoices.NetDueDate AS RefInvcNetDueDate,
ReferencedInvoices.NetDueDate as NetDueDate AS CompanyCodeasCompanyCode,
OpenPayables.NetDueDate AS NetDueDate
FROM P_APJrnlEntrItmOpenPay1
INNER JOIN I_ReceivablesPayablesItem AS ReferencedInvoices ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_APJrnlEntrItmOpenPay1
;
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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