P_NO_SAFTTaxRatioCalculation
SAFT NO Get Sum Tax Ratio
P_NO_SAFTTaxRatioCalculation is a Composite CDS View that provides data about "SAFT NO Get Sum Tax Ratio" in SAP S/4HANA. It reads from 1 data source (I_SAFTJournalLineItem) and exposes 42 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem, Ledger. Part of development package GLO_FIN_IS_SAFT_NO.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_SAFTJournalLineItem | JournalEntryItem | from |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PNOSAFTTAXRCALC | 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 (42)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_SAFTJournalLineItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | I_SAFTJournalLineItem | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | I_SAFTJournalLineItem | AccountingDocument | Journal Entry |
| KEY | LedgerGLLineItem | I_SAFTJournalLineItem | LedgerGLLineItem | Journal Entry Item |
| KEY | Ledger | I_SAFTJournalLineItem | Ledger | Ledger |
| SourceLedger | I_SAFTJournalLineItem | SourceLedger | Source Ledger | |
| ChartOfAccounts | I_SAFTJournalLineItem | ChartOfAccounts | Node Class | |
| PostingDate | I_SAFTJournalLineItem | PostingDate | Posting Date for GR | |
| FinancialAccountType | I_SAFTJournalLineItem | FinancialAccountType | Fin. Account Type | |
| GLAccount | I_SAFTJournalLineItem | GLAccount | General Ledger | |
| AlternativeGLAccount | I_SAFTJournalLineItem | AlternativeGLAccount | Group Account | |
| ReferenceDocument | I_SAFTJournalLineItem | ReferenceDocument | Reference Document | |
| DocumentItemText | I_SAFTJournalLineItem | DocumentItemText | Text | |
| CompanyCodeCurrency | I_SAFTJournalLineItem | CompanyCodeCurrency | Local Currency | |
| TransactionCurrency | I_SAFTJournalLineItem | TransactionCurrency | Transaction Currency | |
| TaxCodeelseendasTaxCode | ||||
| TaxRate1020else0endasTaxRate | ||||
| fltpelse0endasTaxRatioCalculated | ||||
| fltpelse0endasTaxBaseRatioCalculated | ||||
| fltpelse0endasTaxBaseRatioCalculatedTC | ||||
| Quantity | ||||
| CostCenter | I_SAFTJournalLineItem | CostCenter | Cost Center | |
| ControllingArea | I_SAFTJournalLineItem | ControllingArea | Controlling Area | |
| CentralFinanceSalesDocument | I_SAFTJournalLineItem | CentralFinanceSalesDocument | ||
| Customer | I_SAFTJournalLineItem | Customer | Sold-to Party | |
| Supplier | I_SAFTJournalLineItem | Supplier | Supplier | |
| ReferenceDocumentType | I_SAFTJournalLineItem | ReferenceDocumentType | Reference Document Type | |
| LogicalSystem | I_SAFTJournalLineItem | LogicalSystem | Logical System | |
| ReferenceSDDocument | I_SAFTJournalLineItem | ReferenceSDDocument | Reference Doc. | |
| ExchangeRate | I_SAFTJournalLineItem | ExchangeRate | Exchange rate | |
| _CompanyCode | I_SAFTJournalLineItem | _CompanyCode | ||
| _FiscalYear | I_SAFTJournalLineItem | _FiscalYear | ||
| _JournalEntry | I_SAFTJournalLineItem | _JournalEntry | ||
| _Ledger | I_SAFTJournalLineItem | _Ledger | ||
| _Supplier | I_SAFTJournalLineItem | _Supplier | ||
| _Customer | I_SAFTJournalLineItem | _Customer | ||
| _CustomerToBP | I_SAFTJournalLineItem | _CustomerToBP | ||
| _SupplierToBP | I_SAFTJournalLineItem | _SupplierToBP | ||
| _CFinPurchasingDocHistory | I_SAFTJournalLineItem | _CFinPurchasingDocHistory | ||
| _CompanyCodeCurrency | I_SAFTJournalLineItem | _CompanyCodeCurrency | ||
| _CostCenter | I_SAFTJournalLineItem | _CostCenter | ||
| _ControllingArea | I_SAFTJournalLineItem | _ControllingArea |
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_NO_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: PNOSAFTTAXRCALC
CREATE VIEW P_NO_SAFTTaxRatioCalculation AS
SELECT
JournalEntryItem.CompanyCode AS CompanyCode,
JournalEntryItem.FiscalYear AS FiscalYear,
JournalEntryItem.AccountingDocument AS AccountingDocument,
JournalEntryItem.LedgerGLLineItem AS LedgerGLLineItem,
JournalEntryItem.Ledger AS Ledger,
JournalEntryItem.SourceLedger AS SourceLedger,
JournalEntryItem.ChartOfAccounts AS ChartOfAccounts,
JournalEntryItem.PostingDate AS PostingDate,
JournalEntryItem.FinancialAccountType AS FinancialAccountType,
JournalEntryItem.GLAccount AS GLAccount,
JournalEntryItem.AlternativeGLAccount AS AlternativeGLAccount,
JournalEntryItem.ReferenceDocument AS ReferenceDocument,
JournalEntryItem.DocumentItemText AS DocumentItemText,
JournalEntryItem.CompanyCodeCurrency AS CompanyCodeCurrency,
JournalEntryItem.TransactionCurrency AS TransactionCurrency,
case when JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.ReconciliationAccountType <> 'V' and JournalEntryItem.FinancialAccountType = 'S' and SpecialGLAmountSum.AccountingDocument is null then JournalEntryItem.TaxCode when SpecialGLAmountSum.AccountingDocument is not null and JournalEntryItem.TransactionTypeDetermination = 'MWS' then JournalEntryItem.TaxCode else ' ' end as TaxCode AS TaxCodeelseendasTaxCode,
case when JournalEntryItem.TransactionTypeDetermination = ' ' and JournalEntryItem.ReconciliationAccountType <> 'V' and JournalEntryItem.FinancialAccountType = 'S' and SpecialGLAmountSum.AccountingDocument is null then coalesce(division(abs(TaxAmountSum.TaxRate),10,2) , 0) when SpecialGLAmountSum.AccountingDocument is not null and TaxSpGLSum.TaxRate is not initial and JournalEntryItem.TransactionTypeDetermination = 'MWS' then coalesce(division(abs(TaxSpGLSum.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.ReconciliationAccountType <> 'V' and JournalEntryItem.FinancialAccountType = 'S' and SpecialGLAmountSum.AccountingDocument is null then ( cast( TaxAmountSum.TaxAmountInCoCodeCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInCompanyCodeCurrency) as abap.fltp) / cast( JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy as abap.fltp))) when SpecialGLAmountSum.AccountingDocument is not null and TaxSpGLSum.TaxAmountInCoCodeCrcy is not initial and JournalEntryItem.TransactionTypeDetermination = 'MWS' then ( cast( TaxSpGLSum.TaxAmountInCoCodeCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInCompanyCodeCurrency) as abap.fltp) / cast( SpecialGLAmountSum.AmountInCompanyCodeCurrency 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.ReconciliationAccountType <> 'V' and JournalEntryItem.FinancialAccountType = 'S' and SpecialGLAmountSum.AccountingDocument is null then ( cast( TaxAmountSum.TaxBaseAmountInCoCodeCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInCompanyCodeCurrency) as abap.fltp) / cast( JournalItemTaxSum.TotalGrossAmountInCoCodeCrcy as abap.fltp))) when SpecialGLAmountSum.AccountingDocument is not null and TaxSpGLSum.TaxBaseAmountInCoCodeCrcy is not initial and JournalEntryItem.TransactionTypeDetermination = 'MWS' then ( cast( TaxSpGLSum.TaxBaseAmountInCoCodeCrcy as abap.fltp) * (cast( abs(JournalEntryItem.AmountInCompanyCodeCurrency) as abap.fltp) / cast( SpecialGLAmountSum.AmountInCompanyCodeCurrency 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.ReconciliationAccountType <> 'V' 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.CostCenter AS CostCenter,
JournalEntryItem.ControllingArea AS ControllingArea,
JournalEntryItem.CentralFinanceSalesDocument AS CentralFinanceSalesDocument,
JournalEntryItem.Customer AS Customer,
JournalEntryItem.Supplier AS Supplier,
JournalEntryItem.ReferenceDocumentType AS ReferenceDocumentType,
JournalEntryItem.LogicalSystem AS LogicalSystem,
JournalEntryItem.ReferenceSDDocument AS ReferenceSDDocument,
JournalEntryItem.ExchangeRate AS ExchangeRate,
JournalEntryItem._CompanyCode AS _CompanyCode,
JournalEntryItem._FiscalYear AS _FiscalYear,
JournalEntryItem._JournalEntry AS _JournalEntry,
JournalEntryItem._Ledger AS _Ledger,
JournalEntryItem._Supplier AS _Supplier,
JournalEntryItem._Customer AS _Customer,
JournalEntryItem._CustomerToBP AS _CustomerToBP,
JournalEntryItem._SupplierToBP AS _SupplierToBP,
JournalEntryItem._CFinPurchasingDocHistory AS _CFinPurchasingDocHistory,
JournalEntryItem._CompanyCodeCurrency AS _CompanyCodeCurrency,
JournalEntryItem._CostCenter AS _CostCenter,
JournalEntryItem._ControllingArea AS _ControllingArea
FROM I_SAFTJournalLineItem AS JournalEntryItem
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA