P_RBLSITMFORKEYDTEPERD2A_WSJ
Open Accounts Receivables for Smart Business Apps 2
P_RBLSITMFORKEYDTEPERD2A_WSJ is a CDS View in S/4HANA. Open Accounts Receivables for Smart Business Apps 2. It contains 23 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_RblsItmForKeyDtePerd2_WSJ | view | inner | COMPOSITE | Open Accounts Receivables for Smart Business Apps 2 |
Fields (23)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | 1 |
| KEY | AccountingDocumentItem | AccountingDocumentItem | 1 |
| KEY | CompanyCode | CompanyCode | 1 |
| KEY | FiscalYear | FiscalYear | 1 |
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | 1 | |
| ClearingDate | ClearingDate | 1 | |
| CompanyCodeCurrency | CompanyCodeCurrency | 1 | |
| Customer | Customer | 1 | |
| DebitCreditCode | DebitCreditCode | 1 | |
| DisplayCurrency | DisplayCurrency | 1 | |
| DocumentDate | DocumentDate | 1 | |
| FinancialAccountType | FinancialAccountType | 1 | |
| FollowOnDocumentType | FollowOnDocumentType | 1 | |
| GLAccount | GLAccount | 1 | |
| InvoiceItemReference | InvoiceItemReference | 1 | |
| InvoiceReference | InvoiceReference | 1 | |
| InvoiceReferenceFiscalYear | InvoiceReferenceFiscalYear | 1 | |
| NetDueDate | NetDueDate | 1 | |
| PostingDate | PostingDate | 1 | |
| RefInvcDocumentDate | RefInvcDocumentDate | 1 | |
| RefInvcInvoiceReference | RefInvcInvoiceReference | 1 | |
| RefInvcNetDueDate | RefInvcNetDueDate | 1 | |
| SpecialGLCode | SpecialGLCode | 1 |
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view entity P_RblsItmForKeyDtePerd2A_WSJ
as select from P_RblsItmForKeyDtePerd1_WSJ as OpenReceivables
left outer to one join I_OperationalAcctgDocItem as ReferencedInvoices on OpenReceivables.CompanyCode = ReferencedInvoices.CompanyCode
and OpenReceivables.InvoiceReference = ReferencedInvoices.AccountingDocument
and OpenReceivables.InvoiceItemReference = ReferencedInvoices.AccountingDocumentItem
and OpenReceivables.InvoiceReferenceFiscalYear = ReferencedInvoices.FiscalYear
and OpenReceivables.FinancialAccountType = ReferencedInvoices.FinancialAccountType
and OpenReceivables.AccountingDocumentCategory = ReferencedInvoices.AccountingDocumentCategory
and ReferencedInvoices.FinancialAccountType = 'D'
{
key OpenReceivables.CompanyCode as CompanyCode,
key OpenReceivables.AccountingDocument as AccountingDocument,
key OpenReceivables.AccountingDocumentItem as AccountingDocumentItem,
key OpenReceivables.FiscalYear as FiscalYear,
OpenReceivables.InvoiceReference as InvoiceReference,
OpenReceivables.InvoiceItemReference as InvoiceItemReference,
OpenReceivables.InvoiceReferenceFiscalYear as InvoiceReferenceFiscalYear,
OpenReceivables.ClearingDate as ClearingDate,
OpenReceivables.PostingDate as PostingDate,
OpenReceivables.DocumentDate as DocumentDate,
OpenReceivables.FinancialAccountType as FinancialAccountType,
OpenReceivables.DebitCreditCode as DebitCreditCode,
OpenReceivables.Customer as Customer,
OpenReceivables.FollowOnDocumentType as FollowOnDocumentType,
OpenReceivables.SpecialGLCode as SpecialGLCode,
OpenReceivables.GLAccount as GLAccount,
OpenReceivables.CompanyCodeCurrency as DisplayCurrency,
OpenReceivables.CompanyCodeCurrency as CompanyCodeCurrency,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
OpenReceivables.AmountInCompanyCodeCurrency as AmountInCompanyCodeCurrency,
// OpenReceivables.ReportingPeriodStartDate ,
// OpenReceivables.ReportingPeriodEndDate,
ReferencedInvoices.DocumentDate as RefInvcDocumentDate,
ReferencedInvoices.FinancialAccountType as RefInvcFinancialAccountType,
ReferencedInvoices.DebitCreditCode as RefInvcDebitCreditCode,
ReferencedInvoices.NetPaymentDays as RefInvcNetPaymentDays,
ReferencedInvoices.CashDiscount2Days as RefInvcCashDiscount2Days,
ReferencedInvoices.CashDiscount1Days as RefInvcCashDiscount1Days,
ReferencedInvoices.DueCalculationBaseDate as RefInvcDueCalculationBaseDate,
ReferencedInvoices.InvoiceReference as RefInvcInvoiceReference,
ReferencedInvoices.NetDueDate as RefInvcNetDueDate,
case
// unltimate safety net: relevant reference which is not valid (e.g. down payment referencing to a (statistical) down payment request; DPR not selected due to join condition)
// - in case of performance issues one may replace the calculation by another branch caring for relevant, but invalid references (see AR grid based on ACDOCA where the calculation
// yielded to a high runtime due higher data volume of ACDOCA compared to BSEG; there another branch was introduced w/o calculation of net due date for relevant but invalid references)
when ReferencedInvoices.NetDueDate is null or ReferencedInvoices.NetDueDate is initial
then OpenReceivables.NetDueDate
else
ReferencedInvoices.NetDueDate
end as NetDueDate
}