@AbapCatalog.sqlViewName: 'PLUSAFTZEROTAX'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.private: true
@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_LU_SAFTZeroTaxLine
as select from I_LU_SAFTJournalEntry as JournalLine
inner join I_TaxItem as TaxItem on JournalLine.AccountingDocument = TaxItem.AccountingDocument
and JournalLine.CompanyCode = TaxItem.CompanyCode
and JournalLine.FiscalYear = TaxItem.FiscalYear
and JournalLine.TaxCode = TaxItem.TaxCode
{
key JournalLine.CompanyCode as CompanyCode,
key JournalLine.FiscalYear as FiscalYear,
key JournalLine.AccountingDocument as AccountingDocument,
key JournalLine.LedgerGLLineItem as LedgerGLLineItem,
key JournalLine.Ledger as Ledger,
JournalLine.PostingDate,
JournalLine.AccountingDocumentType,
JournalLine.TaxCalculationProcedure,
JournalLine.TaxCode,
JournalLine.DebitCreditCode,
JournalLine.DocumentItemText,
JournalLine.AccountingDocumentItemType,
JournalLine.AlternativeGLAccount,
JournalLine.FinancialAccountType,
JournalLine.TransactionCurrency,
TaxItem.TaxItem,
TaxItem.GLAccount as ActiveGLAccount,
@Semantics.currencyCode:true
JournalLine.CompanyCodeCurrency,
@DefaultAggregation:#SUM
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
coalesce(TaxItem.TaxAmountInCoCodeCrcy, 0) as TaxAmount,
JournalLine.AmountInCompanyCodeCurrency,
JournalLine._CompanyCodeCurrency
}
where
JournalLine.AccountingDocumentItemType <> 'T'
and JournalLine.FinancialAccountType = 'S'
and JournalLine.TaxCode <> ''
and JournalLine.TransactionTypeDetermination = ' '
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LU_SAFTJOURNALENTRY",
"I_TAXITEM"
],
"ASSOCIATED":
[
"I_CURRENCY"
],
"BASE":
[
"I_LU_SAFTJOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/