I_CollectionsInvoice

DDL: I_COLLECTIONSINVOICE Type: view COMPOSITE

Collections Invoices

I_CollectionsInvoice is a Composite CDS View that provides data about "Collections Invoices" in SAP S/4HANA. It reads from 2 data sources (I_CollsSgmtCompanyCodeAssgmt, I_OperationalAcctgDocItem) and exposes 76 fields with key fields CollectionSegment, CompanyCode, FiscalYear, AccountingDocument, AccountingDocumentItem. It has 9 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_CollsSgmtCompanyCodeAssgmt I_CollsSgmtCompanyCodeAssgmt from
I_OperationalAcctgDocItem I_OperationalAcctgDocItem inner

Associations (9)

CardinalityTargetAliasCondition
[0..1] I_CollectionSegment _CollectionSegment $projection.CollectionSegment = _CollectionSegment.CollectionSegment
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_Customer _BranchAccount $projection.BranchAccount = _BranchAccount.Customer
[0..1] I_BillingDocument _BillingDocument $projection.BillingDocument = _BillingDocument.BillingDocument
[0..1] I_DunningBlockingReasonCode _DunningBlockingReasonCode $projection.DunningBlockingReason = _DunningBlockingReasonCode.DunningBlockingReason
[0..1] I_CollsPromiseToPayStatus _PromiseToPayStatus $projection.PromiseToPayStatus = _PromiseToPayStatus.PromiseToPayStatus
[0..1] I_PaymentMethod _PaymentMethod $projection.PaymentMethod = _PaymentMethod.PaymentMethod and $projection.Country = _PaymentMethod.Country
[0..1] I_OperationalAcctgDocItem _OperationalAcctgDocItem $projection.CompanyCode = _OperationalAcctgDocItem.CompanyCode and $projection.AccountingDocument = _OperationalAcctgDocItem.AccountingDocument and $projection.FiscalYear = _OperationalAcctgDocItem.FiscalYear and $projection.AccountingDocumentItem = _OperationalAcctgDocItem.AccountingDocumentItem
[0..1] I_CollsInvcPaytDelayPrediction _CollsInvcPaytDelayPrediction $projection.CompanyCode = _CollsInvcPaytDelayPrediction.CompanyCode and $projection.AccountingDocument = _CollsInvcPaytDelayPrediction.AccountingDocument and $projection.FiscalYear = _CollsInvcPaytDelayPrediction.FiscalYear and $projection.AccountingDocumentItem = _CollsInvcPaytDelayPrediction.AccountingDocumentItem

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName ICOLLSINV view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Collections Invoices view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey AccountingDocument view

Fields (76)

KeyFieldSource TableSource FieldDescription
KEY CollectionSegment CollectionSegment Segment
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
Customer Customer Sold-to Party
BranchAccount BranchAccount Branch Account No.
DocumentDate _OperationalAcctgDocItem DocumentDate Journal Entry Date
PostingDate PostingDate Posting Date for GR
DunningLevel DunningLevel Dunning Level
LastDunningDate LastDunningDate Last Dunned
NetDueDate NetDueDate Net Due Date
Reference1InDocumentHeader _JournalEntry Reference1InDocumentHeader Reference 1
Reference2InDocumentHeader _JournalEntry Reference2InDocumentHeader Reference 2
PaymentMethod PaymentMethod Pymt Meth.
FinancialAccountType FinancialAccountType Fin. Account Type
OverdueDays
CashDiscount1Days
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
PaidAmount
DunnedAmount
OpenAmountInDocumentCurrency
CashDiscountAmtInTransacCrcy
TransactionCurrency TransactionCurrency Transaction Currency
PaymentDate
DunningBlockingReason DunningBlockingReason Set Dunning Block
SpecialGLCode SpecialGLCode Special G/L Ind
OperationalGLAccount OperationalGLAccount Operational G/L Acct
FiscalPeriod FiscalPeriod Tax period
BillingDocument BillingDocument SD Document
PostingKey PostingKey Posting Key
DocumentItemText DocumentItemText Text
DocumentReferenceID _JournalEntry DocumentReferenceID Reference
InvoiceReference InvoiceReference Invoice Reference
InvoiceReferenceFiscalYear InvoiceReferenceFiscalYear Invoice Reference Fiscal Year
InvoiceItemReference InvoiceItemReference Item
FollowOnDocumentType FollowOnDocumentType Follow-On Document Type
ClearingDate ClearingDate Clearing Date
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem Ref. Doc. Lgcl Syst.
LastDunningDurationInDays
CaseStatus
CaseStatusName
CaseReason
ReasonCodeName
PromiseToPayStatus
DisputeCase
PromiseToPay
NumberOfResubmissions
ResubmissionUUID
ResubmissionDueDate
ResubmissionReason
NumberOfDaysSinceResubmission
ArrangedAmount
PromisedAmount
PromiseToPayLevel
PromiseToPayDueDate
DisputedAmount
CreditedAmount
ObjectKey
Country _Customer Country Venue: Ctry/Reg
CaseUniqueID
LatePaymentRisk
_CollectionSegment _CollectionSegment
_CompanyCode I_OperationalAcctgDocItem _CompanyCode
_Customer _Customer
_BranchAccount _BranchAccount
_BillingDocument _BillingDocument
_DunningBlockingReasonCode _DunningBlockingReasonCode
_SpecialGLCode I_OperationalAcctgDocItem _SpecialGLCode
_PostingKey _PostingKey
_JournalEntry _JournalEntry
_PromiseToPayStatus _PromiseToPayStatus
_PaymentMethod _PaymentMethod
_OperationalAcctgDocItem _OperationalAcctgDocItem
_CollsInvcPaytDelayPrediction _CollsInvcPaytDelayPrediction

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 I_CollectionsInvoice.
-- 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 I_CollectionsInvoice AS
SELECT
  CollectionSegment,
  I_OperationalAcctgDocItem.CompanyCode AS CompanyCode,
  FiscalYear,
  AccountingDocument,
  AccountingDocumentItem,
  Customer,
  BranchAccount,
  _OperationalAcctgDocItem.DocumentDate AS DocumentDate,
  PostingDate,
  DunningLevel,
  LastDunningDate,
  NetDueDate,
  _JournalEntry.Reference1InDocumentHeader AS Reference1InDocumentHeader,
  _JournalEntry.Reference2InDocumentHeader AS Reference2InDocumentHeader,
  PaymentMethod,
  FinancialAccountType,
  cast( 0 as verzn ) AS OverdueDays,
  cast( '00000000' as sk1dt ) AS CashDiscount1Days,
  AmountInTransactionCurrency,
  cast( '0' as bdm_paid_amount ) AS PaidAmount,
  cast( 0 as fdm_dunning_amount ) AS DunnedAmount,
  cast( 0 as fdm_open_amount ) AS OpenAmountInDocumentCurrency,
  cast( 0 as wskto_cs ) AS CashDiscountAmtInTransacCrcy,
  TransactionCurrency,
  cast( '00000000' as fdm_last_payment_date ) AS PaymentDate,
  DunningBlockingReason,
  SpecialGLCode,
  OperationalGLAccount,
  FiscalPeriod,
  BillingDocument,
  PostingKey,
  DocumentItemText,
  _JournalEntry.DocumentReferenceID AS DocumentReferenceID,
  InvoiceReference,
  InvoiceReferenceFiscalYear,
  InvoiceItemReference,
  FollowOnDocumentType,
  ClearingDate,
  AccountingDocumentCategory,
  ReferenceDocumentLogicalSystem,
  cast( 0 as coll_pr_days_since_dunning ) AS LastDunningDurationInDays,
  cast( '00' as scmgstatusonr ) AS CaseStatus,
  cast( '' as scmgstat_descr ) AS CaseStatusName,
  cast( '0' as scmg_reason_code ) AS CaseReason,
  cast( '' as text60 ) AS ReasonCodeName,
  cast( '' as bdm_promise_state ) AS PromiseToPayStatus,
  cast( 0 as fdm_ext_key ) AS DisputeCase,
  cast( 0 as fdm_ext_key ) AS PromiseToPay,
  cast( 0 as fdm_inv_no_of_rsm ) AS NumberOfResubmissions,
  cast( 0 as scmg_case_guid ) AS ResubmissionUUID,
  cast( '' as bdm_rsm_date ) AS ResubmissionDueDate,
  cast( '' as bdm_rsm_reason ) AS ResubmissionReason,
  cast( 0 as coll_rsm_days_since_rsm ) AS NumberOfDaysSinceResubmission,
  cast( 0 as fdm_payment_arranged ) AS ArrangedAmount,
  cast( 0 as fdm_current_p2p_amount ) AS PromisedAmount,
  cast( 0 as bdm_promise_level ) AS PromiseToPayLevel,
  cast( '00000000' as bdm_promise_due_date ) AS PromiseToPayDueDate,
  cast( 0 as fdm_disputed_amount ) AS DisputedAmount,
  cast( 0 as fdm_credit_amount ) AS CreditedAmount,
  cast ( '' as swo_typeid ) AS ObjectKey,
  _Customer.Country AS Country,
  cast ( '' as scmg_case_guid ) AS CaseUniqueID,
  cast ( '' as udm_coll_late_payment_risk ) AS LatePaymentRisk,
  I_OperationalAcctgDocItem._CompanyCode AS _CompanyCode,
  I_OperationalAcctgDocItem._SpecialGLCode AS _SpecialGLCode
FROM I_CollsSgmtCompanyCodeAssgmt
INNER JOIN I_OperationalAcctgDocItem ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CollectionSegment AS _CollectionSegment ON CollectionSegment = _CollectionSegment.CollectionSegment  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _BranchAccount ON BranchAccount = _BranchAccount.Customer  -- association [0..1]
LEFT OUTER JOIN I_BillingDocument AS _BillingDocument ON BillingDocument = _BillingDocument.BillingDocument  -- association [0..1]
LEFT OUTER JOIN I_DunningBlockingReasonCode AS _DunningBlockingReasonCode ON DunningBlockingReason = _DunningBlockingReasonCode.DunningBlockingReason  -- association [0..1]
LEFT OUTER JOIN I_CollsPromiseToPayStatus AS _PromiseToPayStatus ON PromiseToPayStatus = _PromiseToPayStatus.PromiseToPayStatus  -- association [0..1]
LEFT OUTER JOIN I_PaymentMethod AS _PaymentMethod ON PaymentMethod = _PaymentMethod.PaymentMethod AND Country = _PaymentMethod.Country  -- association [0..1]
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _OperationalAcctgDocItem ON CompanyCode = _OperationalAcctgDocItem.CompanyCode AND AccountingDocument = _OperationalAcctgDocItem.AccountingDocument AND FiscalYear = _OperationalAcctgDocItem.FiscalYear AND AccountingDocumentItem = _OperationalAcctgDocItem.AccountingDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_CollsInvcPaytDelayPrediction AS _CollsInvcPaytDelayPrediction ON CompanyCode = _CollsInvcPaytDelayPrediction.CompanyCode AND AccountingDocument = _CollsInvcPaytDelayPrediction.AccountingDocument AND FiscalYear = _CollsInvcPaytDelayPrediction.FiscalYear AND AccountingDocumentItem = _CollsInvcPaytDelayPrediction.AccountingDocumentItem  -- association [0..1]
;