@AbapCatalog.sqlViewName: 'PSAFTGENLEOTDBP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking : #NOT_REQUIRED
define view P_SAFT_GeneralLedgerOneTimeBP
as select from I_JournalEntryItem as a
inner join P_SAFT_GLMaxBuPa as GLMaxBusinessPartner on GLMaxBusinessPartner.CompanyCode = a.CompanyCode
and GLMaxBusinessPartner.FiscalYear = a.FiscalYear
and GLMaxBusinessPartner.AccountingDocument = a.AccountingDocument
and GLMaxBusinessPartner.LedgerGLLineItem = a.LedgerGLLineItem
and GLMaxBusinessPartner.Ledger = a.Ledger
{
key a.CompanyCode as CompanyCode,
key a.FiscalYear as FiscalYear,
key a.AccountingDocument as AccountingDocument,
key a.LedgerGLLineItem as LedgerGLLineItem,
key a.Ledger as Ledger,
cast (case when a.Supplier is initial then '0001' else '0002' end as abap.char(4)) as BusinessPartnerType,
case when a.Supplier is initial then a.Customer else a.Supplier end as BusinessPartnerNumber
}
where
(
a.FinancialAccountType = 'D'
or a.FinancialAccountType = 'K'
)
and(
a._Customer.IsOneTimeAccount = 'X'
or a._Supplier.IsOneTimeAccount = 'X'
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMER",
"I_JOURNALENTRYITEM",
"I_SUPPLIER",
"P_SAFT_GLMAXBUPA"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/