P_Arbsitmopenitem
Open Receivable Items
P_Arbsitmopenitem is a Composite CDS View that provides data about "Open Receivable Items" in SAP S/4HANA. It reads from 5 data sources (adrc, P_ARBSITMCOMPANY, I_Customer, I_ReceivablesPayablesItem, I_Supplier) and exposes 54 fields. Part of development package FINS_AR_MACHINE_LEARNING.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| adrc | Address | left_outer |
| P_ARBSITMCOMPANY | CompanyCtryKey | left_outer |
| I_Customer | cust | left_outer |
| I_ReceivablesPayablesItem | OpenItem | from |
| I_Supplier | supl | left_outer |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_FinAccTyp | koart |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (54)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| CompanyCode | I_ReceivablesPayablesItem | CompanyCode | ||
| CountryKey | P_ARBSITMCOMPANY | CountryKey | ||
| FiscalYear | I_ReceivablesPayablesItem | FiscalYear | ||
| AccountingDocument | I_ReceivablesPayablesItem | AccountingDocument | ||
| AccountingDocumentItem | I_ReceivablesPayablesItem | AccountingDocumentItem | ||
| AccountingDocumentType | I_ReceivablesPayablesItem | AccountingDocumentType | ||
| PostingDate | I_ReceivablesPayablesItem | PostingDate | ||
| DocumentReferenceID | ||||
| AssignmentReference | I_ReceivablesPayablesItem | AssignmentReference | ||
| PaymentReference | I_ReceivablesPayablesItem | PaymentReference | ||
| BillingDocument | I_ReceivablesPayablesItem | BillingDocument | ||
| ClearingDocFiscalYear | I_ReceivablesPayablesItem | ClearingDocFiscalYear | ||
| ClearingAccountingDocument | I_ReceivablesPayablesItem | ClearingAccountingDocument | ||
| ClearingDate | I_ReceivablesPayablesItem | ClearingDate | ||
| CompanyCodeCurrency | I_ReceivablesPayablesItem | CompanyCodeCurrency | ||
| TransactionCurrency | I_ReceivablesPayablesItem | TransactionCurrency | ||
| AmountInCompanyCodeCurrency | I_ReceivablesPayablesItem | AmountInCompanyCodeCurrency | ||
| AmountInTransactionCurrency | I_ReceivablesPayablesItem | AmountInTransactionCurrency | ||
| TaxAmountInCoCodeCrcy | I_ReceivablesPayablesItem | TaxAmountInCoCodeCrcy | ||
| TaxAmount | I_ReceivablesPayablesItem | TaxAmount | ||
| CashDiscountAmtInCoCodeCrcy | I_ReceivablesPayablesItem | CashDiscountAmtInCoCodeCrcy | ||
| CashDiscountAmount | I_ReceivablesPayablesItem | CashDiscountAmount | ||
| DebitCreditCode | I_ReceivablesPayablesItem | DebitCreditCode | ||
| DocumentItemText | I_ReceivablesPayablesItem | DocumentItemText | ||
| FinancialAccountType | I_ReceivablesPayablesItem | FinancialAccountType | ||
| InvoiceReference | I_ReceivablesPayablesItem | InvoiceReference | ||
| InvoiceReferenceFiscalYear | I_ReceivablesPayablesItem | InvoiceReferenceFiscalYear | ||
| InvoiceItemReference | I_ReceivablesPayablesItem | InvoiceItemReference | ||
| FollowOnDocumentType | I_ReceivablesPayablesItem | FollowOnDocumentType | ||
| Debtor | ||||
| OrganizationBPName1 | ||||
| OrganizationBPName2 | ||||
| OrganizationBPName3 | ||||
| OrganizationBPName4 | ||||
| CityName | ||||
| Country | ||||
| AccountingDocumentHeaderText | ||||
| PartnerCompany | I_ReceivablesPayablesItem | PartnerCompany | ||
| NetDueDate | I_ReceivablesPayablesItem | NetDueDate | ||
| CashDiscount1Percent | I_ReceivablesPayablesItem | CashDiscount1Percent | ||
| CashDiscount1DueDate | I_ReceivablesPayablesItem | CashDiscount1DueDate | ||
| CashDiscount2Percent | I_ReceivablesPayablesItem | CashDiscount2Percent | ||
| CashDiscount2DueDate | I_ReceivablesPayablesItem | CashDiscount2DueDate | ||
| Reference1IDByBusinessPartner | I_ReceivablesPayablesItem | Reference1IDByBusinessPartner | ||
| Reference2IDByBusinessPartner | I_ReceivablesPayablesItem | Reference2IDByBusinessPartner | ||
| Reference3IDByBusinessPartner | I_ReceivablesPayablesItem | Reference3IDByBusinessPartner | ||
| SpecialGLCode | I_ReceivablesPayablesItem | SpecialGLCode | ||
| ReceivableKey | ||||
| nation | adrc | nation | ||
| name1 | adrc | name1 | ||
| name2 | adrc | name2 | ||
| name3 | adrc | name3 | ||
| name4 | adrc | name4 | ||
| CustomerFullName | I_Customer | CustomerFullName |
//@AbapCatalog.sqlViewName: 'PARBSITMOI'
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
define view entity P_Arbsitmopenitem
with parameters
P_FinAccTyp : koart
as select from I_ReceivablesPayablesItem as OpenItem
left outer join I_Customer as cust
on OpenItem.Debtor = cust.Customer
left outer join I_Supplier as supl
on OpenItem.Creditor = supl.Supplier
left outer join adrc as Address on ( Address.addrnumber = cust.AddressID or Address.addrnumber = supl.AddressID ) and Address.nation = 'I'
left outer join P_ARBSITMCOMPANY as CompanyCtryKey
on OpenItem.CompanyCode = CompanyCtryKey.CompanyCode {
OpenItem.CompanyCode,
CompanyCtryKey.CountryKey,
OpenItem.FiscalYear,
OpenItem.AccountingDocument,
OpenItem.AccountingDocumentItem,
OpenItem.AccountingDocumentType,
OpenItem.PostingDate,
OpenItem._JournalEntry.DocumentReferenceID,
OpenItem.AssignmentReference,
OpenItem.PaymentReference,
OpenItem.BillingDocument,
OpenItem.ClearingDocFiscalYear,
OpenItem.ClearingAccountingDocument,
OpenItem.ClearingDate,
OpenItem.CompanyCodeCurrency,
OpenItem.TransactionCurrency,
OpenItem.AmountInCompanyCodeCurrency,
OpenItem.AmountInTransactionCurrency,
OpenItem.TaxAmountInCoCodeCrcy,
OpenItem.TaxAmount,
OpenItem.CashDiscountAmtInCoCodeCrcy,
OpenItem.CashDiscountAmount,
OpenItem.DebitCreditCode,
OpenItem.DocumentItemText,
OpenItem.FinancialAccountType,
OpenItem.InvoiceReference,
OpenItem.InvoiceReferenceFiscalYear,
OpenItem.InvoiceItemReference,
OpenItem.FollowOnDocumentType,
case when OpenItem.FinancialAccountType='K' then OpenItem.Creditor else OpenItem.Debtor end as Debtor,
case when OpenItem.FinancialAccountType='K' then OpenItem._Supplier.OrganizationBPName1 else OpenItem._Customer.OrganizationBPName1 end as OrganizationBPName1,
case when OpenItem.FinancialAccountType='K' then OpenItem._Supplier.OrganizationBPName2 else OpenItem._Customer.OrganizationBPName2 end as OrganizationBPName2,
'' as OrganizationBPName3,
'' as OrganizationBPName4,
case when OpenItem.FinancialAccountType='K' then OpenItem._Supplier.CityName else OpenItem._Customer.CityName end as CityName,
case when OpenItem.FinancialAccountType='K' then OpenItem._Supplier.Country else OpenItem._Customer.Country end as Country,
OpenItem._JournalEntry.AccountingDocumentHeaderText,
OpenItem.PartnerCompany,
OpenItem.NetDueDate,
OpenItem.CashDiscount1Percent,
OpenItem.CashDiscount1DueDate,
OpenItem.CashDiscount2Percent,
OpenItem.CashDiscount2DueDate,
OpenItem.Reference1IDByBusinessPartner,
OpenItem.Reference2IDByBusinessPartner,
OpenItem.Reference3IDByBusinessPartner,
OpenItem.SpecialGLCode,
cast('' as abap.sstring( 64)) as ReceivableKey,
Address.nation,
Address.name1,
Address.name2,
Address.name3,
Address.name4,
cust.CustomerFullName
}
where OpenItem.ClearingAccountingDocument = ''
and OpenItem.FinancialAccountType = $parameters.P_FinAccTyp
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA