P_COLLSACCTDOC
Collections Accounting Documents
P_COLLSACCTDOC is a CDS View in S/4HANA. Collections Accounting Documents. It contains 4 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_CollsAcctDocInStrCrcy | view | inner | COMPOSITE | Collections Acct. Doc in Strat. Curr |
Fields (4)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | 1 |
| KEY | AccountingDocumentItem | AccountingDocumentItem | 1 |
| KEY | CompanyCode | CompanyCode | 1 |
| KEY | FiscalYear | FiscalYear | 1 |
@AbapCatalog: { sqlViewName: 'PCOLLSACCTDOC',
compiler: { compareFilter: true },
preserveKey: true }
@AccessControl: { authorizationCheck: #NOT_REQUIRED,
personalData: { blocking: #BLOCKED_DATA_EXCLUDED } }
@VDM: { viewType: #COMPOSITE,
private: true }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #A,
sizeCategory: #L,
dataClass: #TRANSACTIONAL },
representativeKey: 'AccountingDocument' }
define view P_CollsAcctDoc
as select from I_CollsSgmtCompanyCodeAssgmt
inner join I_OperationalAcctgDocItem on I_CollsSgmtCompanyCodeAssgmt.CompanyCode = I_OperationalAcctgDocItem.CompanyCode
{
// VDM Fields
key CollectionSegment,
key I_CollsSgmtCompanyCodeAssgmt.CompanyCode,
key AccountingDocument,
key FiscalYear,
key AccountingDocumentItem,
Customer,
NetDueDate,
@Semantics: { amount: { currencyCode: 'TransactionCurrency' } }
AmountInTransactionCurrency,
@Semantics: { currencyCode: true }
TransactionCurrency,
// Calculate due/Overdue dates (Positive -> Due in, Negative -> Overdue since
dats_days_between( tstmp_to_dats( tstmp_current_utctimestamp(),
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ), NetDueDate ) as DaysToDueDate
}
where
FinancialAccountType = 'D'
and ClearingDate = '00000000'
and TransactionCurrency is not initial