P_APJrnlEntrItmOpenPay2_WSJ

DDL: P_APJRNLENTRITMOPENPAY2_WSJ Type: view_entity Package: FINS_FIS_AP_APPS

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)

SourceAliasJoin Type
P_APJrnlEntrItmOpenPay1 P_APJrnlEntrItmOpenPay1 from
P_APJrnlEntrItmOpenPay1 P_APJrnlEntrItmOpenPay1 union_all
I_ReceivablesPayablesItem ReferencedInvoices inner

Parameters (1)

NameTypeDefault
P_KeyDate sydate

Fields (67)

KeyFieldSource TableSource FieldDescription
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
;