P_LU_SAFTTaxRatioCalculation

DDL: P_LU_SAFTTAXRATIOCALCULATION SQL: PLUSAFTTAXRATCAL Type: view COMPOSITE Package: GLO_FIN_IS_SAFT_LU

SAFT LU Tax Ratio Calculation

P_LU_SAFTTaxRatioCalculation is a Composite CDS View that provides data about "SAFT LU Tax Ratio Calculation" in SAP S/4HANA. It reads from 2 data sources (P_LU_SAFTTAXRATIODPCALC, I_LU_SAFTJournalEntry) and exposes 57 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem, Ledger. Part of development package GLO_FIN_IS_SAFT_LU.

Data Sources (2)

SourceAliasJoin Type
P_LU_SAFTTAXRATIODPCALC DP union
I_LU_SAFTJournalEntry JournalEntryItem from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PLUSAFTTAXRATCAL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (57)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_LU_SAFTJournalEntry CompanyCode Receiver Company Code
KEY FiscalYear I_LU_SAFTJournalEntry FiscalYear G/L Fiscal Year
KEY AccountingDocument I_LU_SAFTJournalEntry AccountingDocument Journal Entry
KEY LedgerGLLineItem I_LU_SAFTJournalEntry LedgerGLLineItem Journal Entry Item
KEY Ledger I_LU_SAFTJournalEntry Ledger Ledger
ChartOfAccounts I_LU_SAFTJournalEntry ChartOfAccounts Node Class
PostingDate I_LU_SAFTJournalEntry PostingDate Posting Date for GR
FinancialAccountType I_LU_SAFTJournalEntry FinancialAccountType Fin. Account Type
GLAccount I_LU_SAFTJournalEntry GLAccount General Ledger
DocumentItemText I_LU_SAFTJournalEntry DocumentItemText Text
CompanyCodeCurrency I_LU_SAFTJournalEntry CompanyCodeCurrency Local Currency
TransactionCurrency I_LU_SAFTJournalEntry TransactionCurrency Transaction Currency
TaxCodeelseendasTaxCode
TaxRate1020else0endasTaxRate
fltpelse0endasTaxRatioCalculated
fltpelse0endasTaxBaseRatioCalculated
fltpelse0endasTaxBaseRatioCalculatedTC
Quantity Value
Customer I_LU_SAFTJournalEntry Customer Sold-to Party
Supplier I_LU_SAFTJournalEntry Supplier Supplier
ExchangeRate I_LU_SAFTJournalEntry ExchangeRate Exchange rate
CAIsDownPaymentRequest Down Payment
IsReversal I_LU_SAFTJournalEntry IsReversal Reversal doc.
AccountingDocumentItemType I_LU_SAFTJournalEntry AccountingDocumentItemType Line Item ID
AccountingDocumentType I_LU_SAFTJournalEntry AccountingDocumentType Journal Entry Type
AlternativeGLAccount I_LU_SAFTJournalEntry AlternativeGLAccount Group Account
CompanyCode Receiver Company Code
KEY FiscalYear P_LU_SAFTTAXRATIODPCALC FiscalYear G/L Fiscal Year
KEY AccountingDocument P_LU_SAFTTAXRATIODPCALC AccountingDocument Journal Entry
KEY LedgerGLLineItem P_LU_SAFTTAXRATIODPCALC LedgerGLLineItem Journal Entry Item
KEY Ledger P_LU_SAFTTAXRATIODPCALC Ledger Ledger
ChartOfAccounts P_LU_SAFTTAXRATIODPCALC ChartOfAccounts Node Class
PostingDate P_LU_SAFTTAXRATIODPCALC PostingDate Posting Date for GR
FinancialAccountType P_LU_SAFTTAXRATIODPCALC FinancialAccountType Fin. Account Type
GLAccount P_LU_SAFTTAXRATIODPCALC GLAccount General Ledger
DocumentItemText P_LU_SAFTTAXRATIODPCALC DocumentItemText Text
CompanyCodeCurrency P_LU_SAFTTAXRATIODPCALC CompanyCodeCurrency Local Currency
TransactionCurrency P_LU_SAFTTAXRATIODPCALC TransactionCurrency Transaction Currency
AmountInCompanyCodeCurrency P_LU_SAFTTAXRATIODPCALC AmountInCompanyCodeCurrency Local Crcy Amt
AmountInTransactionCurrency P_LU_SAFTTAXRATIODPCALC AmountInTransactionCurrency Pt Crcy Amt
DebitCreditCode P_LU_SAFTTAXRATIODPCALC DebitCreditCode Single-Character Flag
TaxCode P_LU_SAFTTAXRATIODPCALC TaxCode Tax Code
TaxRate P_LU_SAFTTAXRATIODPCALC TaxRate Tax Rate
TaxRatioCalculated P_LU_SAFTTAXRATIODPCALC TaxRatioCalculated
TaxRatioCalculatedTransCrcy P_LU_SAFTTAXRATIODPCALC TaxRatioCalculatedTransCrcy
TaxBaseRatioCalculated P_LU_SAFTTAXRATIODPCALC TaxBaseRatioCalculated
TaxBaseRatioCalculatedTC P_LU_SAFTTAXRATIODPCALC TaxBaseRatioCalculatedTC
Quantity P_LU_SAFTTAXRATIODPCALC Quantity Value
Customer P_LU_SAFTTAXRATIODPCALC Customer Sold-to Party
Supplier P_LU_SAFTTAXRATIODPCALC Supplier Supplier
ExchangeRate P_LU_SAFTTAXRATIODPCALC ExchangeRate Exchange rate
CAIsDownPaymentRequest P_LU_SAFTTAXRATIODPCALC CAIsDownPaymentRequest Down Payment
IsReversal Reversal doc.
AccountingDocumentItemType Line Item ID
AccountingDocumentType Journal Entry Type
AlternativeGLAccount Group Account
_CompanyCodeCurrency _CompanyCodeCurrency

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_LU_SAFTTaxRatioCalculation.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PLUSAFTTAXRATCAL

CREATE VIEW P_LU_SAFTTaxRatioCalculation AS
SELECT
  JournalEntryItem.CompanyCode AS CompanyCode,
  JournalEntryItem.FiscalYear AS FiscalYear,
  JournalEntryItem.AccountingDocument AS AccountingDocument,
  JournalEntryItem.LedgerGLLineItem AS LedgerGLLineItem,
  JournalEntryItem.Ledger AS Ledger,
  JournalEntryItem.ChartOfAccounts AS ChartOfAccounts,
  JournalEntryItem.PostingDate AS PostingDate,
  JournalEntryItem.FinancialAccountType AS FinancialAccountType,
  JournalEntryItem.GLAccount AS GLAccount,
  JournalEntryItem.DocumentItemText AS DocumentItemText,
  JournalEntryItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  JournalEntryItem.TransactionCurrency AS TransactionCurrency,
  case when JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.FinancialAccountType = 'S' then JournalEntryItem.TaxCode else ' ' end as TaxCode AS TaxCodeelseendasTaxCode,
  case when JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.FinancialAccountType = 'S' then coalesce(division(abs(TaxAmountSum.TaxRate),10,2) , 0) else 0 end as TaxRate AS TaxRate1020else0endasTaxRate,
  case when TaxAmountSum.TaxAmountInCoCodeCrcy is not initial and TaxAmountSum.TaxAmountInCoCodeCrcy is not null and JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy is not initial and JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy is not null and JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.FinancialAccountType = 'S' then ( cast( TaxAmountSum.TaxAmountInCoCodeCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInCompanyCodeCurrency) as abap.fltp) / cast( JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy as abap.fltp))) else 0 end as TaxRatioCalculated AS fltpelse0endasTaxRatioCalculated,
  case when TaxAmountSum.TaxBaseAmountInCoCodeCrcy is not initial and TaxAmountSum.TaxBaseAmountInCoCodeCrcy is not null and JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy is not initial and JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy is not null and JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.FinancialAccountType = 'S' then ( cast( TaxAmountSum.TaxBaseAmountInCoCodeCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInCompanyCodeCurrency) as abap.fltp) / cast( JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy as abap.fltp))) else 0 end as TaxBaseRatioCalculated AS fltpelse0endasTaxBaseRatioCalculated,
  case when TaxAmountSum.TaxBaseAmountInTransCrcy is not initial and TaxAmountSum.TaxBaseAmountInTransCrcy is not null and JournalItemTaxSum.TotalGrossAmountInTransCrcy is not initial and JournalItemTaxSum.TotalGrossAmountInTransCrcy is not null and JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.FinancialAccountType = 'S' then ( cast( TaxAmountSum.TaxBaseAmountInTransCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInTransactionCurrency) as abap.fltp) / cast( JournalItemTaxSum.TotalGrossAmountInTransCrcy as abap.fltp))) else 0 end as TaxBaseRatioCalculatedTC AS fltpelse0endasTaxBaseRatioCalculatedTC,
  cast( abs(round( JournalEntryItem.Quantity, 0)) as abap.int8 ) AS Quantity,
  JournalEntryItem.Customer AS Customer,
  JournalEntryItem.Supplier AS Supplier,
  JournalEntryItem.ExchangeRate AS ExchangeRate,
  ' ' AS CAIsDownPaymentRequest,
  JournalEntryItem.IsReversal AS IsReversal,
  JournalEntryItem.AccountingDocumentItemType AS AccountingDocumentItemType,
  JournalEntryItem.AccountingDocumentType AS AccountingDocumentType,
  JournalEntryItem.AlternativeGLAccount AS AlternativeGLAccount,
  DP.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  DP.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  DP.DebitCreditCode AS DebitCreditCode,
  DP.TaxCode AS TaxCode,
  DP.TaxRate AS TaxRate,
  DP.TaxRatioCalculated AS TaxRatioCalculated,
  DP.TaxRatioCalculatedTransCrcy AS TaxRatioCalculatedTransCrcy,
  DP.TaxBaseRatioCalculated AS TaxBaseRatioCalculated,
  DP.TaxBaseRatioCalculatedTC AS TaxBaseRatioCalculatedTC
FROM I_LU_SAFTJournalEntry AS JournalEntryItem
-- UNION with additional select branch(es): P_LU_SAFTTAXRATIODPCALC
;