P_APLineItemForCorrespondence

DDL: P_APLINEITEMFORCORRESPONDENCE SQL: PAPLIITFORCOR Type: view COMPOSITE

P_APLineItemForCorrespondence is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 173 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem, AccountingDocument. It has 1 association to related views.

Data Sources (6)

SourceAliasJoin Type
I_OperationalAcctgDocItem I_OperationalAcctgDocItem from
I_OperationalAcctgDocItem I_OperationalAcctgDocItem union_all
I_ParkedPayablesItem I_ParkedPayablesItem union_all
I_ParkedReceivablesItem I_ParkedReceivablesItem union_all
P_SupplierAsCustomer P_SupplierAsCustomer inner
P_SupplierAsCustomer P_SupplierAsCustomer inner

Parameters (2)

NameTypeDefault
P_KeyDate vdm_v_key_date
P_TodayDate abap.dats

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_ParkedAccountingDocument _ParkedAccountingDocument $projection.AccountingDocument = _ParkedAccountingDocument.AccountingDocument and $projection.FiscalYear = _ParkedAccountingDocument.FiscalYear and $projection.CompanyCode = _ParkedAccountingDocument.CompanyCode

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PAPLIITFORCOR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #M view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (173)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
FinancialAccountType FinancialAccountType Fin. Account Type
CustomerSupplierAccount Supplier Debtor
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
AccountingDocumentCreationDate Journal Entry Date
TransactionCurrency TransactionCurrency Transaction Currency
CompanyCodeCurrency CompanyCodeCurrency Local Currency
DocumentReferenceID Reference
AccountingDocumentType AccountingDocumentType Journal Entry Type
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
BranchAccount BranchAccount Branch Account No.
FiscalPeriod FiscalPeriod Tax period
PostingKey PostingKey Posting Key
SpecialGLCode SpecialGLCode Special G/L Ind
Customer Customer Sold-to Party
Supplier Supplier Supplier
ClearingDate ClearingDate Clearing Date
ClearingAccountingDocument ClearingJournalEntry Clrng doc.
AssignmentReference AssignmentReference Assignment Reference
DebitCreditCode DebitCreditCode Single-Character Flag
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
BalanceTransactionCurrency BalanceTransactionCurrency Currency
AmountInBalanceTransacCrcy AmountInBalanceTransacCrcy Amount in Balance Transaction Currency
NetDueDate NetDueDate Net Due Date
DocumentItemText DocumentItemText Text
ItemTypeBranch
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
CashDiscount1DueDate CashDiscount1DueDate Cash Discount 1
CashDiscount2DueDate CashDiscount2DueDate Cash Discount 2
BillingDocument BillingDocument SD Document
Reference1IDByBusinessPartner Reference1IDByBusinessPartner Reference Key 1
Reference2IDByBusinessPartner Reference2IDByBusinessPartner Reference Key 2
Reference3IDByBusinessPartner Reference3IDByBusinessPartner Reference Key 3
BPBankAccountInternalID BPBankAccountInternalID BP Bank Account
PaymentReference PaymentReference Payment Reference
ReferenceDocumentType ReferenceDocumentType Reference Document Type
CustomerkeyCompanyCode
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
FinancialAccountType FinancialAccountType Fin. Account Type
CustomerSupplierAccount I_OperationalAcctgDocItem Customer Debtor
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
AccountingDocumentCreationDate Journal Entry Date
TransactionCurrency TransactionCurrency Transaction Currency
CompanyCodeCurrency CompanyCodeCurrency Local Currency
DocumentReferenceID Reference
AccountingDocumentType AccountingDocumentType Journal Entry Type
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
BranchAccount BranchAccount Branch Account No.
FiscalPeriod FiscalPeriod Tax period
PostingKey PostingKey Posting Key
SpecialGLCode SpecialGLCode Special G/L Ind
Customer P_SupplierAsCustomer Customer Sold-to Party
Supplier P_SupplierAsCustomer Supplier Supplier
ClearingDate ClearingDate Clearing Date
ClearingAccountingDocument ClearingJournalEntry Clrng doc.
AssignmentReference AssignmentReference Assignment Reference
DebitCreditCode DebitCreditCode Single-Character Flag
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
BalanceTransactionCurrency BalanceTransactionCurrency Currency
AmountInBalanceTransacCrcy AmountInBalanceTransacCrcy Amount in Balance Transaction Currency
NetDueDate NetDueDate Net Due Date
DocumentItemText DocumentItemText Text
ItemTypeBranch
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
CashDiscount1DueDate CashDiscount1DueDate Cash Discount 1
CashDiscount2DueDate CashDiscount2DueDate Cash Discount 2
BillingDocument BillingDocument SD Document
Reference1IDByBusinessPartner Reference1IDByBusinessPartner Reference Key 1
Reference2IDByBusinessPartner Reference2IDByBusinessPartner Reference Key 2
Reference3IDByBusinessPartner Reference3IDByBusinessPartner Reference Key 3
BPBankAccountInternalID BPBankAccountInternalID BP Bank Account
PaymentReference PaymentReference Payment Reference
ReferenceDocumentType ReferenceDocumentType Reference Document Type
CompanyCodekeyCompanyCode
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
FinancialAccountType Fin. Account Type
CustomerSupplierAccount I_ParkedPayablesItem Creditor Debtor
PostingDate _ParkedAccountingDocument PostingDate Posting Date for GR
DocumentDate _ParkedAccountingDocument DocumentDate Journal Entry Date
AccountingDocumentCreationDate _ParkedAccountingDocument AccountingDocumentCreationDate Journal Entry Date
TransactionCurrency TransactionCurrency Transaction Currency
CompanyCodeCurrency CompanyCodeCurrency Local Currency
DocumentReferenceID _ParkedAccountingDocument DocumentReferenceID Reference
AccountingDocumentType _ParkedAccountingDocument AccountingDocumentType Journal Entry Type
AccountingDocumentCategory _ParkedAccountingDocument AccountingDocumentCategory Journal Entry Category
BranchAccount I_ParkedPayablesItem BranchAccount Branch Account No.
FiscalPeriod _ParkedAccountingDocument FiscalPeriod Tax period
PostingKey PostingKey Posting Key
SpecialGLCode SpecialGLCode Special G/L Ind
Customer Sold-to Party
Supplier I_ParkedPayablesItem Creditor Supplier
ClearingDate Clearing Date
ClearingAccountingDocument Clrng doc.
AssignmentReference AssignmentReference Assignment Reference
DebitCreditCode DebitCreditCode Single-Character Flag
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
BalanceTransactionCurrency Currency
AmountInBalanceTransacCrcy 0 Amount in Balance Transaction Currency
NetDueDate NetDueDate Net Due Date
DocumentItemText DocumentItemText Text
ItemTypeBranch
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
CashDiscount1DueDate CashDiscount1DueDate Cash Discount 1
CashDiscount2DueDate CashDiscount2DueDate Cash Discount 2
BillingDocument SD Document
Reference1IDByBusinessPartner Reference1IDByBusinessPartner Reference Key 1
Reference2IDByBusinessPartner Reference2IDByBusinessPartner Reference Key 2
Reference3IDByBusinessPartner Reference3IDByBusinessPartner Reference Key 3
BPBankAccountInternalID BPBankAccountInternalID BP Bank Account
PaymentReference PaymentReference Payment Reference
ReferenceDocumentType ReferenceDocumentType Reference Document Type
CompanyCodekeyCompanyCode
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
FinancialAccountType Fin. Account Type
CustomerSupplierAccount I_ParkedReceivablesItem Debtor Debtor
PostingDate _ParkedAccountingDocument PostingDate Posting Date for GR
DocumentDate _ParkedAccountingDocument DocumentDate Journal Entry Date
AccountingDocumentCreationDate _ParkedAccountingDocument AccountingDocumentCreationDate Journal Entry Date
TransactionCurrency TransactionCurrency Transaction Currency
CompanyCodeCurrency CompanyCodeCurrency Local Currency
DocumentReferenceID _ParkedAccountingDocument DocumentReferenceID Reference
AccountingDocumentType _ParkedAccountingDocument AccountingDocumentType Journal Entry Type
AccountingDocumentCategory _ParkedAccountingDocument AccountingDocumentCategory Journal Entry Category
BranchAccount I_ParkedReceivablesItem BranchAccount Branch Account No.
FiscalPeriod _ParkedAccountingDocument FiscalPeriod Tax period
PostingKey PostingKey Posting Key
SpecialGLCode SpecialGLCode Special G/L Ind
Customer P_SupplierAsCustomer Customer Sold-to Party
Supplier P_SupplierAsCustomer Supplier Supplier
ClearingDate Clearing Date
ClearingAccountingDocument Clrng doc.
AssignmentReference AssignmentReference Assignment Reference
DebitCreditCode DebitCreditCode Single-Character Flag
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
BalanceTransactionCurrency Currency
AmountInBalanceTransacCrcy 0 Amount in Balance Transaction Currency
NetDueDate NetDueDate Net Due Date
DocumentItemText DocumentItemText Text
ItemTypeBranch
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
CashDiscount1DueDate CashDiscount1DueDate Cash Discount 1
CashDiscount2DueDate CashDiscount2DueDate Cash Discount 2
BillingDocument SD Document
Reference1IDByBusinessPartner Reference1IDByBusinessPartner Reference Key 1
Reference2IDByBusinessPartner Reference2IDByBusinessPartner Reference Key 2
Reference3IDByBusinessPartner Reference3IDByBusinessPartner Reference Key 3
BPBankAccountInternalID BPBankAccountInternalID BP Bank Account
PaymentReference PaymentReference Payment Reference
ReferenceDocumentType ReferenceDocumentType Reference Document Type
OriginalReferenceDocument OriginalReferenceDocument Reference Key

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_APLineItemForCorrespondence.
-- 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: PAPLIITFORCOR
-- Parameters: P_KeyDate : vdm_v_key_date, P_TodayDate : abap.dats

CREATE VIEW P_APLineItemForCorrespondence AS
SELECT
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  AccountingDocumentItem,
  FinancialAccountType,
  Supplier AS CustomerSupplierAccount,
  PostingDate,
  DocumentDate,
  I_OperationalAcctgDocItem._JournalEntry.AccountingDocumentCreationDate AS AccountingDocumentCreationDate,
  TransactionCurrency,
  CompanyCodeCurrency,
  I_OperationalAcctgDocItem._JournalEntry.DocumentReferenceID AS DocumentReferenceID,
  AccountingDocumentType,
  AccountingDocumentCategory,
  BranchAccount,
  FiscalPeriod,
  PostingKey,
  SpecialGLCode,
  Customer,
  Supplier,
  ClearingDate,
  ClearingJournalEntry AS ClearingAccountingDocument,
  AssignmentReference,
  DebitCreditCode,
  AmountInTransactionCurrency,
  AmountInCompanyCodeCurrency,
  BalanceTransactionCurrency,
  AmountInBalanceTransacCrcy,
  NetDueDate,
  DocumentItemText,
  cast ( 'BSEG_CREDIT_SIDE_BRANCH' as char30 ) AS ItemTypeBranch,
  DueCalculationBaseDate,
  CashDiscount1Days,
  CashDiscount2Days,
  CashDiscount1DueDate,
  CashDiscount2DueDate,
  BillingDocument,
  Reference1IDByBusinessPartner,
  Reference2IDByBusinessPartner,
  Reference3IDByBusinessPartner,
  BPBankAccountInternalID,
  PaymentReference,
  ReferenceDocumentType,
  OriginalReferenceDocument AS CustomerkeyCompanyCode,
  OriginalReferenceDocument AS CompanyCodekeyCompanyCode,
  OriginalReferenceDocument
FROM I_OperationalAcctgDocItem
INNER JOIN P_SupplierAsCustomer ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ParkedAccountingDocument AS _ParkedAccountingDocument ON AccountingDocument = _ParkedAccountingDocument.AccountingDocument AND FiscalYear = _ParkedAccountingDocument.FiscalYear AND CompanyCode = _ParkedAccountingDocument.CompanyCode  -- association [1..1]
-- UNION ALL with additional select branch(es): I_OperationalAcctgDocItem, I_ParkedPayablesItem, I_ParkedReceivablesItem
;