@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
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COLLSSGMTCOMPANYCODEASSGMT",
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/