P_PH_PaytOpnReceivablePyblItm

DDL: P_PH_PAYTOPNRECEIVABLEPYBLITM SQL: PPHPATYOPRPITM Type: view COMPOSITE Package: GLO_FIN_IS_PH

Payment Open Receivable Payable Item

P_PH_PaytOpnReceivablePyblItm is a Composite CDS View that provides data about "Payment Open Receivable Payable Item" in SAP S/4HANA. It reads from 3 data sources (I_OperationalAcctgDocItem, I_OperationalAcctgDocItem, I_AccountingDocument) and exposes 32 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, InvoiceReference. Part of development package GLO_FIN_IS_PH.

Data Sources (3)

SourceAliasJoin Type
I_OperationalAcctgDocItem _InvoiceApArItem left_outer
I_OperationalAcctgDocItem _PaymentOpenItem from
I_AccountingDocument _SourceInvoiceHeader inner

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PPHPATYOPRPITM view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (32)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode Receiver Company Code
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument Journal Entry
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem I_OperationalAcctgDocItem AccountingDocumentItem Posting View Item
KEY InvoiceReference I_OperationalAcctgDocItem AccountingDocument Journal Entry
KEY InvoiceReferenceFiscalYear I_OperationalAcctgDocItem FiscalYear G/L Fiscal Year
KEY InvoiceItemReference I_OperationalAcctgDocItem AccountingDocumentItem Posting View Item
BusinessPlace
PostingDate I_OperationalAcctgDocItem PostingDate Posting Date for GR
AccountingDocumentType I_OperationalAcctgDocItem AccountingDocumentType Journal Entry Type
FinancialAccountType I_OperationalAcctgDocItem FinancialAccountType Fin. Account Type
IsUsedInPaymentTransaction I_OperationalAcctgDocItem IsUsedInPaymentTransaction Is Used In Payment Transaction
ClearingAccountingDocument I_OperationalAcctgDocItem ClearingJournalEntry Clrng doc.
ClearingDocFiscalYear I_OperationalAcctgDocItem ClearingJournalEntryFiscalYear Fiscal Year of Clearing Journal Entry
ClearingDate I_OperationalAcctgDocItem ClearingDate Clearing Date
GLAccount I_OperationalAcctgDocItem GLAccount General Ledger
DebitCreditCodeendasDebitCreditCode
Customer I_OperationalAcctgDocItem Customer Sold-to Party
Supplier I_OperationalAcctgDocItem Supplier Supplier
DocumentReferenceID I_AccountingDocument DocumentReferenceID Reference
TransactionCurrency I_OperationalAcctgDocItem TransactionCurrency Transaction Currency
AmountInTransactionCurrency I_OperationalAcctgDocItem AmountInTransactionCurrency Pt Crcy Amt
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency I_OperationalAcctgDocItem AmountInCompanyCodeCurrency Local Crcy Amt
AdditionalCurrency1 I_OperationalAcctgDocItem AdditionalCurrency1 Local curr. 2
AmountInAdditionalCurrency1 I_OperationalAcctgDocItem AmountInAdditionalCurrency1 Amount in Additional Currency 1
AdditionalCurrency2 I_OperationalAcctgDocItem AdditionalCurrency2 Local curr. 3
AmountInAdditionalCurrency2 I_OperationalAcctgDocItem AmountInAdditionalCurrency2 LC2 Amount
InvoiceCompanyCode I_OperationalAcctgDocItem CompanyCode Receiver Company Code
_Supplier I_OperationalAcctgDocItem _Supplier
_Customer I_OperationalAcctgDocItem _Customer
_OneTimeAccountBP I_OperationalAcctgDocItem _OneTimeAccountBP

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_PH_PaytOpnReceivablePyblItm.
-- 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: PPHPATYOPRPITM

CREATE VIEW P_PH_PaytOpnReceivablePyblItm AS
SELECT
  _PaymentOpenItem.CompanyCode AS CompanyCode,
  _PaymentOpenItem.AccountingDocument AS AccountingDocument,
  _PaymentOpenItem.FiscalYear AS FiscalYear,
  _PaymentOpenItem.AccountingDocumentItem AS AccountingDocumentItem,
  _InvoiceApArItem.AccountingDocument AS InvoiceReference,
  _InvoiceApArItem.FiscalYear AS InvoiceReferenceFiscalYear,
  _InvoiceApArItem.AccountingDocumentItem AS InvoiceItemReference,
  coalesce( _PaymentOpenItem.BusinessPlace, _InvoiceApArItem.BusinessPlace) AS BusinessPlace,
  _PaymentOpenItem.PostingDate AS PostingDate,
  _PaymentOpenItem.AccountingDocumentType AS AccountingDocumentType,
  _PaymentOpenItem.FinancialAccountType AS FinancialAccountType,
  _PaymentOpenItem.IsUsedInPaymentTransaction AS IsUsedInPaymentTransaction,
  _PaymentOpenItem.ClearingJournalEntry AS ClearingAccountingDocument,
  _PaymentOpenItem.ClearingJournalEntryFiscalYear AS ClearingDocFiscalYear,
  _PaymentOpenItem.ClearingDate AS ClearingDate,
  _PaymentOpenItem.GLAccount AS GLAccount,
  case _PaymentOpenItem.IsNegativePosting when 'X' then case _PaymentOpenItem.DebitCreditCode when 'H' then 'S' when 'S' then 'H' end else _PaymentOpenItem.DebitCreditCode end as DebitCreditCode AS DebitCreditCodeendasDebitCreditCode,
  _PaymentOpenItem.Customer AS Customer,
  _PaymentOpenItem.Supplier AS Supplier,
  _SourceInvoiceHeader.DocumentReferenceID AS DocumentReferenceID,
  _PaymentOpenItem.TransactionCurrency AS TransactionCurrency,
  _PaymentOpenItem.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  _PaymentOpenItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  _PaymentOpenItem.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  _PaymentOpenItem.AdditionalCurrency1 AS AdditionalCurrency1,
  _PaymentOpenItem.AmountInAdditionalCurrency1 AS AmountInAdditionalCurrency1,
  _PaymentOpenItem.AdditionalCurrency2 AS AdditionalCurrency2,
  _PaymentOpenItem.AmountInAdditionalCurrency2 AS AmountInAdditionalCurrency2,
  _InvoiceApArItem.CompanyCode AS InvoiceCompanyCode,
  _PaymentOpenItem._Supplier AS _Supplier,
  _PaymentOpenItem._Customer AS _Customer,
  _InvoiceApArItem._OneTimeAccountBP AS _OneTimeAccountBP
FROM I_OperationalAcctgDocItem AS _PaymentOpenItem
INNER JOIN I_AccountingDocument AS _SourceInvoiceHeader ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _InvoiceApArItem ON /* join condition not captured in parsed metadata */
;