P_PT_BOPInvoiceDocumentItem

DDL: P_PT_BOPINVOICEDOCUMENTITEM Type: view_entity COMPOSITE

P_PT_BOPInvoiceDocumentItem is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_PT_BOPAccountingDocumentItem, P_PT_BOPAcctgDocItmMinimum) and exposes 35 fields with key fields CompanyCode, FiscalYear, AccountingDocument, InvoiceReference, InvoiceReferenceFiscalYear.

Data Sources (2)

SourceAliasJoin Type
P_PT_BOPAccountingDocumentItem PaymentItem inner
P_PT_BOPAcctgDocItmMinimum PaymentMin inner

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_PT_BOPAccountingDocumentItem CompanyCode Receiver Company Code
KEY FiscalYear P_PT_BOPAccountingDocumentItem FiscalYear G/L Fiscal Year
KEY AccountingDocument P_PT_BOPAccountingDocumentItem AccountingDocument Journal Entry
KEY InvoiceReference InvoiceItem AccountingDocument Journal Entry
KEY InvoiceReferenceFiscalYear InvoiceItem FiscalYear G/L Fiscal Year
KEY InvoiceItemReference InvoiceItem AccountingDocumentItem Posting View Item
FinancialAccountType P_PT_BOPAccountingDocumentItem FinancialAccountType Fin. Account Type
ClearingJournalEntry P_PT_BOPAccountingDocumentItem ClearingJournalEntry Clrng doc.
ClearingJournalEntryFiscalYear P_PT_BOPAccountingDocumentItem ClearingJournalEntryFiscalYear Fiscal Year of Clearing Journal Entry
ClearingItem P_PT_BOPAccountingDocumentItem ClearingItem Clearing Item
AccountingDocumentType P_PT_BOPAccountingDocumentItem AccountingDocumentType Journal Entry Type
Postingdate P_PT_BOPAccountingDocumentItem Postingdate Posting Date for GR
DocumentDate P_PT_BOPAccountingDocumentItem DocumentDate Journal Entry Date
GLAccount P_PT_BOPAccountingDocumentItem GLAccount General Ledger
Customer P_PT_BOPAccountingDocumentItem Customer Sold-to Party
Supplier P_PT_BOPAccountingDocumentItem Supplier Supplier
CompanyCodeCurrency InvoiceItem CompanyCodeCurrency Local Currency
TransactionCurrency InvoiceItem TransactionCurrency Transaction Currency
HouseBank P_PT_BOPAccountingDocumentItem HouseBank House Bank
HouseBankAccount P_PT_BOPAccountingDocumentItem HouseBankAccount House Bank Account
SupplierCountry
CustomerCountry
OneTimeVendor
OneTimeCustomer
OneTimeCountry
PT_BOPBankNumber P_PT_BOPAccountingDocumentItem PT_BOPBankNumber
BankCountryIsoCode P_PT_BOPAccountingDocumentItem BankCountryIsoCode
PT_BOPAccountType P_PT_BOPAccountingDocumentItem PT_BOPAccountType
FollowOnDocumentType P_PT_BOPAccountingDocumentItem FollowOnDocumentType Follow-On Document Type
IsSalesRelated P_PT_BOPAccountingDocumentItem IsSalesRelated Is Sales Related
VATRegistrationelseendasVATRegistration
AmountInCompanyCodeCurrency
WithholdingTaxAmount
CashDiscountAmount
AmountInTransactionCurrency

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_PT_BOPInvoiceDocumentItem.
-- 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.

CREATE VIEW P_PT_BOPInvoiceDocumentItem AS
SELECT
  PaymentItem.CompanyCode AS CompanyCode,
  PaymentItem.FiscalYear AS FiscalYear,
  PaymentItem.AccountingDocument AS AccountingDocument,
  InvoiceItem.AccountingDocument AS InvoiceReference,
  InvoiceItem.FiscalYear AS InvoiceReferenceFiscalYear,
  InvoiceItem.AccountingDocumentItem AS InvoiceItemReference,
  PaymentItem.FinancialAccountType AS FinancialAccountType,
  PaymentItem.ClearingJournalEntry AS ClearingJournalEntry,
  PaymentItem.ClearingJournalEntryFiscalYear AS ClearingJournalEntryFiscalYear,
  PaymentItem.ClearingItem AS ClearingItem,
  PaymentItem.AccountingDocumentType AS AccountingDocumentType,
  PaymentItem.Postingdate AS Postingdate,
  PaymentItem.DocumentDate AS DocumentDate,
  PaymentItem.GLAccount AS GLAccount,
  PaymentItem.Customer AS Customer,
  PaymentItem.Supplier AS Supplier,
  InvoiceItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  InvoiceItem.TransactionCurrency AS TransactionCurrency,
  PaymentItem.HouseBank AS HouseBank,
  PaymentItem.HouseBankAccount AS HouseBankAccount,
  InvoiceItem._Supplier.Country AS SupplierCountry,
  InvoiceItem._Customer.Country AS CustomerCountry,
  InvoiceItem._Supplier.IsOneTimeAccount AS OneTimeVendor,
  InvoiceItem._Customer.IsOneTimeAccount AS OneTimeCustomer,
  InvoiceItem._OneTimeAccountBP.Country AS OneTimeCountry,
  PaymentItem.PT_BOPBankNumber AS PT_BOPBankNumber,
  PaymentItem.BankCountryIsoCode AS BankCountryIsoCode,
  PaymentItem.PT_BOPAccountType AS PT_BOPAccountType,
  PaymentItem.FollowOnDocumentType AS FollowOnDocumentType,
  PaymentItem.IsSalesRelated AS IsSalesRelated,
  case when InvoiceItem.VATRegistration <> '' then InvoiceItem.VATRegistration when InvoiceItem.FinancialAccountType = 'K' then InvoiceItem._Supplier.VATRegistration when InvoiceItem.FinancialAccountType = 'D' then InvoiceItem._Customer.VATRegistration else '' end as VATRegistration AS VATRegistrationelseendasVATRegistration,
  abs(InvoiceItem.AmountInCompanyCodeCurrency) AS AmountInCompanyCodeCurrency,
  abs(InvoiceItem.WithholdingTaxAmount) AS WithholdingTaxAmount,
  abs(InvoiceItem.CashDiscountAmount) AS CashDiscountAmount,
  abs(InvoiceItem.AmountInTransactionCurrency) AS AmountInTransactionCurrency
INNER JOIN P_PT_BOPAcctgDocItmMinimum AS PaymentMin ON /* join condition not captured in parsed metadata */
INNER JOIN P_PT_BOPAccountingDocumentItem AS PaymentItem ON /* join condition not captured in parsed metadata */
;