P_MY_TDTTAXRATE
Get Tax Percentage
P_MY_TDTTAXRATE is a Composite CDS View that provides data about "Get Tax Percentage" in SAP S/4HANA. It reads from 1 data source (I_StRpTaxReturnBoxCube) and exposes 141 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TransactionTypeDetermination. Part of development package GLO_FIN_IS_VAT_MY.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_StRpTaxReturnBoxCube | I_StRpTaxReturnBoxCube | from |
Parameters (7)
| Name | Type | Default |
|---|---|---|
| P_TaxIsDeferredRelevant | figen_deferred_check | |
| P_TaxIsMossRelevant | figen_moss_check | |
| P_StatryRptgEntity | srf_reporting_entity | |
| P_StatryRptCategory | srf_rep_cat_id | |
| P_StatryRptRunID | srf_report_run_id | |
| P_ReportingCountry | land1 | |
| P_TaxBoxConfiguration | figen_tdt_taxbox_config |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.sqlViewName | PMYTDTTAXRATE | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (141)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | P_StRpCalTaxReturnBox | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | P_StRpCalTaxReturnBox | AccountingDocument | Journal Entry |
| KEY | FiscalYear | P_StRpCalTaxReturnBox | FiscalYear | G/L Fiscal Year |
| KEY | TaxItem | P_StRpCalTaxReturnBox | TaxItem | Tax Item |
| KEY | TransactionTypeDetermination | P_StRpCalTaxReturnBox | TransactionTypeDetermination | Transaction Key |
| KEY | DebitCreditCode | P_StRpCalTaxReturnBox | DebitCreditCode | Single-Character Flag |
| KEY | AccountingDocumentType | P_StRpCalTaxReturnBox | AccountingDocumentType | Journal Entry Type |
| KEY | SupplierAccountGroup | P_StRpCalTaxReturnBox | SupplierAccountGroup | Account group |
| KEY | TaxBox | P_StRpCalTaxReturnBox | TaxBox | Tax.Bs.Gp.No. |
| KEY | TaxDeclnAmountType | P_StRpCalTaxReturnBox | TaxDeclnAmountType | |
| KEY | TaxBoxStrucValidityStartDate | P_StRpCalTaxReturnBox | TaxBoxStrucValidityStartDate | |
| KEY | UnifiedTaxBoxStructureType | P_StRpCalTaxReturnBox | UnifiedTaxBoxStructureType | |
| KEY | TaxGroup | P_StRpCalTaxReturnBox | TaxGroup | Tax Group |
| KEY | TaxItemGrpgDebitCreditCode | P_StRpCalTaxReturnBox | TaxItemGrpgDebitCreditCode | |
| KEY | TaxItemGrpgAcctgDocumentType | TaxItemGrpgAcctgDocumentType | ||
| KEY | TaxItemGrpgSupplierAcctGroup | TaxItemGrpgSupplierAcctGroup | ||
| KEY | TaxItemGrpgSpecialGLCode | P_StRpCalTaxReturnBox | TaxItemGrpgSpecialGLCode | |
| KEY | StatryRptgEntity | P_StRpCalTaxReturnBox | StatryRptgEntity | Reporting Entity |
| KEY | StatryRptCategory | P_StRpCalTaxReturnBox | StatryRptCategory | Report ID |
| KEY | StatryRptRunID | P_StRpCalTaxReturnBox | StatryRptRunID | Report Run ID |
| StatryRptRun | P_StRpCalTaxReturnBox | StatryRptRun | ||
| ValidFrom | P_StRpCalTaxReturnBox | ValidFrom | Vers.Valid From | |
| Country | P_StRpCalTaxReturnBox | Country | Venue: Ctry/Reg | |
| TaxCode | P_StRpCalTaxReturnBox | TaxCode | Tax Code | |
| TaxItemGroupingVersion | P_StRpCalTaxReturnBox | TaxItemGroupingVersion | Tax Grping Ver. | |
| TaxBoxStructureType | P_StRpCalTaxReturnBox | TaxBoxStructureType | ||
| ValidTo | P_StRpCalTaxReturnBox | ValidTo | Vers.Valid To | |
| TaxBoxStrucValidityEndDate | TaxBoxStrucValidityEndDate | |||
| TaxCalculationProcedure | TaxCalculationProcedure | Tax Procedure | ||
| TaxRate | TaxRate | Tax Rate | ||
| TaxRateValidityStartDate | P_StRpCalTaxReturnBox | TaxRateValidityStartDate | Tax Rate Validity Start Date | |
| IPITaxRate | IPITaxRate | |||
| dec521002endasTaxCodeRatePointer | ||||
| Customer | Customer | Sold-to Party | ||
| GLAccount | GLAccount | General Ledger | ||
| TaxItemGroup | TaxItemGroup | Tax doc. item number | ||
| BusinessPlace | BusinessPlace | Business place | ||
| TaxJurisdiction | P_StRpCalTaxReturnBox | TaxJurisdiction | Tax Jurisdiction | |
| LowestLevelTaxJurisdiction | LowestLevelTaxJurisdiction | Jurisdict. Code | ||
| ReferenceDocumentType | ReferenceDocumentType | Reference Document Type | ||
| AlternativeReferenceDocument | AlternativeReferenceDocument | Alternative Reference Document | ||
| ReverseDocument | ReverseDocument | Reversed With | ||
| ReverseDocumentFiscalYear | ReverseDocumentFiscalYear | Year | ||
| ConditionRecord | ConditionRecord | Cond.Record No. | ||
| RoundingDecimalPlaces | RoundingDecimalPlaces | |||
| DocumentReferenceID | DocumentReferenceID | Reference | ||
| Ledger | Ledger | Ledger | ||
| LedgerGroup | LedgerGroup | Ledger Group | ||
| PostingDate | PostingDate | Posting Date for GR | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| TaxReportingDate | TaxReportingDate | Tax Reporting Date | ||
| ReportingDate | ReportingDate | |||
| TaxReportingDocumentDate | TaxReportingDocumentDate | |||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| IsReversal | IsReversal | Reversal doc. | ||
| IsReversed | IsReversed | Reversed? | ||
| AccountingDocumentHeaderText | AccountingDocumentHeaderText | Doc.Header Text | ||
| CompanyCodeCountry | CompanyCodeCountry | Reporting Ctry/Reg. | ||
| ReportingCountry | ReportingCountry | |||
| TaxReturnCountry | TaxReturnCountry | Reporting C/R | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| CountryCurrency | CountryCurrency | Currency | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| ReportingCurrency | ReportingCurrency | Currency | ||
| AdditionalCurrency1 | AdditionalCurrency1 | Local curr. 2 | ||
| AdditionalCurrency2 | AdditionalCurrency2 | Local curr. 3 | ||
| TaxBaseAmountInRptgCrcy | TaxBaseAmountInRptgCrcy | Base Amount | ||
| TaxAmountInRptgCrcy | TaxAmountInRptgCrcy | Tax Rept. Crcy | ||
| AmountInReportingCurrency | AmountInReportingCurrency | |||
| TaxBaseAmountInCoCodeCrcy | TaxBaseAmountInCoCodeCrcy | TxBaseAmt CoCodeCrcy | ||
| TaxAmountInCoCodeCrcy | TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | ||
| TaxBaseAmountInTransCrcy | TaxBaseAmountInTransCrcy | Value-Added Tax | ||
| TaxAmount | TaxAmount | Tax Amt in Rptg Crcy | ||
| TaxBaseAmountInCountryCrcy | TaxBaseAmountInCountryCrcy | Base Amount | ||
| TaxAmountInCountryCrcy | TaxAmountInCountryCrcy | Tax Rept. Crcy | ||
| TaxBaseAmtInAdditionalCrcy1 | TaxBaseAmtInAdditionalCrcy1 | LC 2 Base | ||
| TaxBaseAmtInAdditionalCrcy2 | TaxBaseAmtInAdditionalCrcy2 | LC 3 Base | ||
| TaxAmountInAdditionalCurrency1 | TaxAmountInAdditionalCurrency1 | LC 2 Tax | ||
| TaxAmountInAdditionalCurrency2 | TaxAmountInAdditionalCurrency2 | LC 3 Tax | ||
| DifferenceTaxAmtInCoCodeCrcy | DifferenceTaxAmtInCoCodeCrcy | |||
| DiffTaxBaseAmountInCoCodeCrcy | DiffTaxBaseAmountInCoCodeCrcy | |||
| TotalGrossAmountInCoCodeCrcy | TotalGrossAmountInCoCodeCrcy | Amount in LC | ||
| TotalGrossAmount | TotalGrossAmount | Total Gross Amount | ||
| TotalGrossAmountInTransCrcy | TotalGrossAmountInTransCrcy | Total Amt In Tr Crcy | ||
| TaxType | TaxType | Tax Type | ||
| BPTaxNumber | BPTaxNumber | Tax Number | ||
| ReportingVATRegistration | ReportingVATRegistration | Reporting VAT Number | ||
| TaxNumber1 | TaxNumber1 | VAT Reg. No. | ||
| ShippingPointCountry | ShippingPointCountry | Venue: Ctry/Reg | ||
| TargetTaxCode | TargetTaxCode | |||
| TaxNumber2 | TaxNumber2 | Tax Number 2 | ||
| ActiveTaxType | ActiveTaxType | |||
| TaxNumber3 | TaxNumber3 | |||
| TaxIsDeferredRelevant | TaxIsDeferredRelevant | |||
| TaxIsMossRelevant | TaxIsMossRelevant | |||
| CalculatedTxAmtInCoCodeCrcy | CalculatedTxAmtInCoCodeCrcy | |||
| CalculatedTaxAmountInTransCrcy | CalculatedTaxAmountInTransCrcy | |||
| CalculatedTxBaseAmtInTransCrcy | CalculatedTxBaseAmtInTransCrcy | |||
| AmountInTransactionCurrency | AmountInTransactionCurrency | Pt Crcy Amt | ||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | Local Crcy Amt | ||
| CalcdTxBaseAmtInCoCodeCrcy | CalcdTxBaseAmtInCoCodeCrcy | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | Amount in Additional Currency 1 | ||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | LC2 Amount | ||
| BusinessPartner | BusinessPartner | Issuing Authority | ||
| CAReconciliationKey | CAReconciliationKey | Reconcil. Key | ||
| NonDeductibleInputTaxAmount | NonDeductibleInputTaxAmount | Non-deductible | ||
| DcblVATIncrdCostInRptgCrcy | DcblVATIncrdCostInRptgCrcy | |||
| BusinessPartnerName | BusinessPartnerName | Extracted Customer Name | ||
| BusinessPartnerCountry | BusinessPartnerCountry | BP Ctry/Reg. | ||
| TaxTypeName | TaxTypeName | |||
| CustomerSupplierAddress | CustomerSupplierAddress | |||
| TaxIsNotDeductible | P_StRpCalTaxReturnBox | TaxIsNotDeductible | Non-Deductible | |
| SenderCompanyCode | SenderCompanyCode | Sender Company Code | ||
| SenderAccountingDocument | SenderAccountingDocument | Sender Journal Entry | ||
| SenderFiscalYear | SenderFiscalYear | Sender FiscalYr | ||
| BalanceAmountInTransacCurrency | BalanceAmountInTransacCurrency | |||
| TaxBoxStructure | P_StRpCalTaxReturnBox | TaxBoxStructure | ||
| TaxBoxStructureName | TaxBoxStructureName | |||
| TaxBoxName | P_StRpCalTaxReturnBox | TaxBoxName | ||
| TaxBoxCondition | P_StRpCalTaxReturnBox | TaxBoxCondition | ||
| TaxBoxAggregationOperation | P_StRpCalTaxReturnBox | TaxBoxAggregationOperation | ||
| TaxGroupOperation | P_StRpCalTaxReturnBox | TaxGroupOperation | ||
| ConditionType | ConditionType | Condition type | ||
| IsVATRelevant | IsVATRelevant | VAT on int.mat. | ||
| IsNegativePosting | IsNegativePosting | Negative Posting | ||
| TaxCountry | P_StRpCalTaxReturnBox | TaxCountry | Tax Ctry/Reg. | |
| TaxCntryOrCompanyCodeCntry | TaxCntryOrCompanyCodeCntry | |||
| _ReportedItemsLog | _ReportedItemsLog | |||
| _ReportingCurrency | _ReportingCurrency | |||
| _OneTimeAccountBP | _OneTimeAccountBP | |||
| _JournalEntry | _JournalEntry | |||
| _AccountingDocument | _AccountingDocument | |||
| _GLAccount | _GLAccount | |||
| _TaxJurisdiction | _TaxJurisdiction | |||
| _DebtorCreditorRblsPyblsItem | _DebtorCreditorRblsPyblsItem | |||
| _ReceivablesPayablesItem | _ReceivablesPayablesItem | |||
| _TaxReceivablesPayablesItem | _TaxReceivablesPayablesItem | |||
| _CompanyCodeCountry | _CompanyCodeCountry | |||
| _TaxTypeText | _TaxTypeText | |||
| _TaxCodeText | _TaxCodeText |
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_MY_TDTTAXRATE.
-- 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.
-- Parameters: P_TaxIsDeferredRelevant : figen_deferred_check, P_TaxIsMossRelevant : figen_moss_check, P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_ReportingCountry : land1, P_TaxBoxConfiguration : figen_tdt_taxbox_config
CREATE VIEW P_MY_TDTTAXRATE AS
SELECT
P_StRpCalTaxReturnBox.CompanyCode AS CompanyCode,
P_StRpCalTaxReturnBox.AccountingDocument AS AccountingDocument,
P_StRpCalTaxReturnBox.FiscalYear AS FiscalYear,
P_StRpCalTaxReturnBox.TaxItem AS TaxItem,
P_StRpCalTaxReturnBox.TransactionTypeDetermination AS TransactionTypeDetermination,
P_StRpCalTaxReturnBox.DebitCreditCode AS DebitCreditCode,
P_StRpCalTaxReturnBox.AccountingDocumentType AS AccountingDocumentType,
P_StRpCalTaxReturnBox.SupplierAccountGroup AS SupplierAccountGroup,
P_StRpCalTaxReturnBox.TaxBox AS TaxBox,
P_StRpCalTaxReturnBox.TaxDeclnAmountType AS TaxDeclnAmountType,
P_StRpCalTaxReturnBox.TaxBoxStrucValidityStartDate AS TaxBoxStrucValidityStartDate,
P_StRpCalTaxReturnBox.UnifiedTaxBoxStructureType AS UnifiedTaxBoxStructureType,
P_StRpCalTaxReturnBox.TaxGroup AS TaxGroup,
P_StRpCalTaxReturnBox.TaxItemGrpgDebitCreditCode AS TaxItemGrpgDebitCreditCode,
TaxItemGrpgAcctgDocumentType,
TaxItemGrpgSupplierAcctGroup,
P_StRpCalTaxReturnBox.TaxItemGrpgSpecialGLCode AS TaxItemGrpgSpecialGLCode,
P_StRpCalTaxReturnBox.StatryRptgEntity AS StatryRptgEntity,
P_StRpCalTaxReturnBox.StatryRptCategory AS StatryRptCategory,
P_StRpCalTaxReturnBox.StatryRptRunID AS StatryRptRunID,
P_StRpCalTaxReturnBox.StatryRptRun AS StatryRptRun,
P_StRpCalTaxReturnBox.ValidFrom AS ValidFrom,
P_StRpCalTaxReturnBox.Country AS Country,
P_StRpCalTaxReturnBox.TaxCode AS TaxCode,
P_StRpCalTaxReturnBox.TaxItemGroupingVersion AS TaxItemGroupingVersion,
P_StRpCalTaxReturnBox.TaxBoxStructureType AS TaxBoxStructureType,
P_StRpCalTaxReturnBox.ValidTo AS ValidTo,
TaxBoxStrucValidityEndDate,
TaxCalculationProcedure,
TaxRate,
P_StRpCalTaxReturnBox.TaxRateValidityStartDate AS TaxRateValidityStartDate,
IPITaxRate,
case when I_AdvancedTaxReportingCountry.Country is null or TaxGroupOperation = '' then P_StRpCalTaxReturnBox.TaxCodeRatePointer else division ( cast( cast (TaxGroupFreeClassification as abap.numc( 5 )) as abap.dec(5,2) ) ,100,2) end as TaxCodeRatePointer AS dec521002endasTaxCodeRatePointer,
Customer,
GLAccount,
TaxItemGroup,
BusinessPlace,
P_StRpCalTaxReturnBox.TaxJurisdiction AS TaxJurisdiction,
LowestLevelTaxJurisdiction,
ReferenceDocumentType,
AlternativeReferenceDocument,
ReverseDocument,
ReverseDocumentFiscalYear,
ConditionRecord,
RoundingDecimalPlaces,
DocumentReferenceID,
Ledger,
LedgerGroup,
PostingDate,
DocumentDate,
TaxReportingDate,
ReportingDate,
TaxReportingDocumentDate,
FiscalPeriod,
ExchangeRate,
IsReversal,
IsReversed,
AccountingDocumentHeaderText,
CompanyCodeCountry,
ReportingCountry,
TaxReturnCountry,
CompanyCodeCurrency,
CountryCurrency,
DocumentCurrency,
ReportingCurrency,
AdditionalCurrency1,
AdditionalCurrency2,
TaxBaseAmountInRptgCrcy,
TaxAmountInRptgCrcy,
AmountInReportingCurrency,
TaxBaseAmountInCoCodeCrcy,
TaxAmountInCoCodeCrcy,
TaxBaseAmountInTransCrcy,
TaxAmount,
TaxBaseAmountInCountryCrcy,
TaxAmountInCountryCrcy,
TaxBaseAmtInAdditionalCrcy1,
TaxBaseAmtInAdditionalCrcy2,
TaxAmountInAdditionalCurrency1,
TaxAmountInAdditionalCurrency2,
DifferenceTaxAmtInCoCodeCrcy,
DiffTaxBaseAmountInCoCodeCrcy,
TotalGrossAmountInCoCodeCrcy,
TotalGrossAmount,
TotalGrossAmountInTransCrcy,
TaxType,
BPTaxNumber,
ReportingVATRegistration,
TaxNumber1,
ShippingPointCountry,
TargetTaxCode,
TaxNumber2,
ActiveTaxType,
TaxNumber3,
TaxIsDeferredRelevant,
TaxIsMossRelevant,
CalculatedTxAmtInCoCodeCrcy,
CalculatedTaxAmountInTransCrcy,
CalculatedTxBaseAmtInTransCrcy,
AmountInTransactionCurrency,
AmountInCompanyCodeCurrency,
CalcdTxBaseAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
BusinessPartner,
CAReconciliationKey,
NonDeductibleInputTaxAmount,
DcblVATIncrdCostInRptgCrcy,
BusinessPartnerName,
BusinessPartnerCountry,
TaxTypeName,
CustomerSupplierAddress,
P_StRpCalTaxReturnBox.TaxIsNotDeductible AS TaxIsNotDeductible,
SenderCompanyCode,
SenderAccountingDocument,
SenderFiscalYear,
BalanceAmountInTransacCurrency,
P_StRpCalTaxReturnBox.TaxBoxStructure AS TaxBoxStructure,
TaxBoxStructureName,
P_StRpCalTaxReturnBox.TaxBoxName AS TaxBoxName,
P_StRpCalTaxReturnBox.TaxBoxCondition AS TaxBoxCondition,
P_StRpCalTaxReturnBox.TaxBoxAggregationOperation AS TaxBoxAggregationOperation,
P_StRpCalTaxReturnBox.TaxGroupOperation AS TaxGroupOperation,
ConditionType,
IsVATRelevant,
IsNegativePosting,
P_StRpCalTaxReturnBox.TaxCountry AS TaxCountry,
TaxCntryOrCompanyCodeCntry
FROM I_StRpTaxReturnBoxCube
;
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