P_APVendorOpenItems2

DDL: P_APVENDOROPENITEMS2 SQL: PFIAPVNDROPITM2 Type: view COMPOSITE Package: FINS_FIS_AP_APPS

Accounts Payable Vendor Open Items. Cleared Payments

P_APVendorOpenItems2 is a Composite CDS View that provides data about "Accounts Payable Vendor Open Items. Cleared Payments" in SAP S/4HANA. It reads from 4 data sources (I_ReceivablesPayablesItem, I_ReceivablesPayablesItem, P_APVendorOpenItems1, P_APVendorOpenItems1) and exposes 31 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, AccountingDocument. Part of development package FINS_FIS_AP_APPS.

Data Sources (4)

SourceAliasJoin Type
I_ReceivablesPayablesItem Invoices inner
I_ReceivablesPayablesItem PartialPayments inner
P_APVendorOpenItems1 Payments from
P_APVendorOpenItems1 Payments1 union_all

Annotations (6)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PFIAPVNDROPITM2 view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_APVendorOpenItems1 CompanyCode Receiver Company Code
KEY AccountingDocument P_APVendorOpenItems1 AccountingDocument Journal Entry
KEY FiscalYear P_APVendorOpenItems1 FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem P_APVendorOpenItems1 AccountingDocumentItem Posting View Item
OpenAmount 0 Local Crcy Amt
ClearedAmount I_ReceivablesPayablesItem AmountInCompanyCodeCurrency Local Crcy Amt
DocumentCurrency I_ReceivablesPayablesItem TransactionCurrency Document Currency
ClearingAccountingDocument I_ReceivablesPayablesItem AccountingDocument Journal Entry
ClearingDocFiscalYear I_ReceivablesPayablesItem FiscalYear G/L Fiscal Year
ClearingAccountingDocumentItem I_ReceivablesPayablesItem AccountingDocumentItem Posting View Item
InvoiceReference P_APVendorOpenItems1 InvoiceReference Invoice Reference
InvoiceReferenceFiscalYear P_APVendorOpenItems1 InvoiceReferenceFiscalYear Invoice Reference Fiscal Year
InvoiceItemReference P_APVendorOpenItems1 InvoiceItemReference Item
Supplier P_APVendorOpenItems1 Supplier Supplier
SpecialGLTransactionType P_APVendorOpenItems1 SpecialGLTransactionType Transact.Type
CompanyCode Receiver Company Code
KEY AccountingDocument P_APVendorOpenItems1 AccountingDocument Journal Entry
KEY FiscalYear P_APVendorOpenItems1 FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem P_APVendorOpenItems1 AccountingDocumentItem Posting View Item
OpenAmount P_APVendorOpenItems1 AmountInCompanyCodeCurrency Local Crcy Amt
ClearedAmount I_ReceivablesPayablesItem AmountInCompanyCodeCurrency Local Crcy Amt
DocumentCurrency P_APVendorOpenItems1 DocumentCurrency Document Currency
ClearingAccountingDocument Journal Entry
ClearingDocFiscalYear G/L Fiscal Year
ClearingAccountingDocumentItem Posting View Item
InvoiceReference P_APVendorOpenItems1 InvoiceReference Invoice Reference
InvoiceReferenceFiscalYear P_APVendorOpenItems1 InvoiceReferenceFiscalYear Invoice Reference Fiscal Year
InvoiceItemReference P_APVendorOpenItems1 InvoiceItemReference Item
Supplier P_APVendorOpenItems1 Supplier Supplier
SpecialGLTransactionType P_APVendorOpenItems1 SpecialGLTransactionType Transact.Type
CompanyCodeCurrency P_APVendorOpenItems1 CompanyCodeCurrency Local Currency

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_APVendorOpenItems2.
-- 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: PFIAPVNDROPITM2

CREATE VIEW P_APVendorOpenItems2 AS
SELECT
  Payments.CompanyCode AS CompanyCode,
  Payments.AccountingDocument AS AccountingDocument,
  Payments.FiscalYear AS FiscalYear,
  Payments.AccountingDocumentItem AS AccountingDocumentItem,
  0 AS OpenAmount,
  PartialPayments.AmountInCompanyCodeCurrency AS ClearedAmount,
  PartialPayments.TransactionCurrency AS DocumentCurrency,
  PartialPayments.AccountingDocument AS ClearingAccountingDocument,
  PartialPayments.FiscalYear AS ClearingDocFiscalYear,
  PartialPayments.AccountingDocumentItem AS ClearingAccountingDocumentItem,
  Payments.InvoiceReference AS InvoiceReference,
  Payments.InvoiceReferenceFiscalYear AS InvoiceReferenceFiscalYear,
  Payments.InvoiceItemReference AS InvoiceItemReference,
  Payments.Supplier AS Supplier,
  Payments.SpecialGLTransactionType AS SpecialGLTransactionType,
  Payments1.CompanyCodeCurrency AS CompanyCodeCurrency
FROM P_APVendorOpenItems1 AS Payments
INNER JOIN I_ReceivablesPayablesItem AS PartialPayments ON /* join condition not captured in parsed metadata */
INNER JOIN I_ReceivablesPayablesItem AS Invoices ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_APVendorOpenItems1
;