C_StRpTaxReturnQuery

DDL: C_STRPTAXRETURNQUERY SQL: CSRTAXRETURNQ Type: view CONSUMPTION

Analytical Query to Fetch all types of Tax Return details

C_StRpTaxReturnQuery is a Consumption CDS View that provides data about "Analytical Query to Fetch all types of Tax Return details" in SAP S/4HANA. It reads from 1 data source (I_StRpTaxReturnCube) and exposes 95 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxCode, TransactionTypeDetermination.

Data Sources (1)

SourceAliasJoin Type
I_StRpTaxReturnCube I_StRpTaxReturnCube from

Parameters (6)

NameTypeDefault
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

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName CSRTAXRETURNQ view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Analytical Query to Fetch all types of Tax Return details view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.query true view
AccessControl.blocking #BLOCKED_DATA_INCLUDED view

Fields (95)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY TaxCode TaxCode Tax Code
KEY TransactionTypeDetermination TransactionTypeDetermination Transaction Key
KEY StatryRptgEntity StatryRptgEntity Reporting Entity
KEY StatryRptCategory StatryRptCategory Report ID
KEY StatryRptRunID StatryRptRunID Report Run ID
KEY TaxItem TaxItem Tax Item
DebitCreditCode DebitCreditCode Single-Character Flag
TaxCalculationProcedure TaxCalculationProcedure Tax Procedure
IPITaxRate IPITaxRate
TaxRate TaxRate Tax Rate
ConditionAmount
TaxRateValidityStartDate TaxRateValidityStartDate Tax Rate Validity Start Date
Customer Customer Sold-to Party
GLAccount GLAccount General Ledger
TaxItemGroup TaxItemGroup Tax doc. item number
BusinessPlace BusinessPlace Business place
TaxJurisdiction TaxJurisdiction Tax Jurisdiction
LowestLevelTaxJurisdiction
AccountingDocumentType AccountingDocumentType Journal Entry Type
ReferenceDocumentType ReferenceDocumentType Reference Document Type
ReverseDocument ReverseDocument Reversed With
ReverseDocumentFiscalYear ReverseDocumentFiscalYear Year
ConditionRecord ConditionRecord Cond.Record No.
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
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
TaxCountry TaxCountry Tax Ctry/Reg.
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
TaxBaseAmountInCoCodeCrcy TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxAmountInCoCodeCrcy TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
TaxBaseAmountInTransCrcy TaxBaseAmountInTransCrcy Value-Added Tax
TaxAmount TaxAmount Tax Amt in Rptg Crcy
TotalGrossAmountInCoCodeCrcy TotalGrossAmountInCoCodeCrcy Amount in LC
TotalGrossAmountInTransCrcy TotalGrossAmountInTransCrcy Total Amt In Tr Crcy
TotalGrossAmount TotalGrossAmount Total Gross Amount
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
NonDeductibleInputTaxAmount NonDeductibleInputTaxAmount Non-deductible
DcblVATIncrdCostInRptgCrcy DcblVATIncrdCostInRptgCrcy
DeductibleInputTaxAmount
OutpTxDebitAmtInCntryCurrency Tax Rept. Crcy
TaxType TaxType Tax Type
TargetTaxCode TargetTaxCode
BPTaxNumber BPTaxNumber Tax Number
ReportingVATRegistration ReportingVATRegistration Reporting VAT Number
TaxNumber1 TaxNumber1 VAT Reg. No.
TaxNumber2 TaxNumber2 Tax Number 2
TaxNumber3 TaxNumber3
ActiveTaxType ActiveTaxType
Country Country Venue: Ctry/Reg
CalculatedTxAmtInCoCodeCrcy CalculatedTxAmtInCoCodeCrcy
CalculatedTaxAmountInTransCrcy CalculatedTaxAmountInTransCrcy
CalculatedTxBaseAmtInTransCrcy CalculatedTxBaseAmtInTransCrcy
CalcdTxBaseAmtInCoCodeCrcy CalcdTxBaseAmtInCoCodeCrcy
BalanceAmountInTransacCurrency BalanceAmountInTransacCurrency
TaxTypeName TaxTypeName
ConditionType ConditionType Condition type
BusinessPartner BusinessPartner Issuing Authority
BusinessPartnerName BusinessPartnerName Extracted Customer Name
BusinessPartnerCountry BusinessPartnerCountry BP Ctry/Reg.
CustomerSupplierAddress CustomerSupplierAddress
TaxIsNotDeductible TaxIsNotDeductible Non-Deductible
TaxReportingDocumentDate TaxReportingDocumentDate
TaxCntryOrCompanyCodeCntry TaxCntryOrCompanyCodeCntry
StatryRptRun StatryRptRun
CAReconciliationKey CAReconciliationKey Reconcil. Key
TaxItemIsExternal TaxItemIsExternal
_TaxTypeText _TaxTypeText

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 C_StRpTaxReturnQuery.
-- 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: CSRTAXRETURNQ
-- 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

CREATE VIEW C_StRpTaxReturnQuery AS
SELECT
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  TaxCode,
  TransactionTypeDetermination,
  StatryRptgEntity,
  StatryRptCategory,
  StatryRptRunID,
  TaxItem,
  DebitCreditCode,
  TaxCalculationProcedure,
  IPITaxRate,
  TaxRate,
  TaxRateValidityStartDate,
  Customer,
  GLAccount,
  TaxItemGroup,
  BusinessPlace,
  TaxJurisdiction,
  AccountingDocumentType,
  ReferenceDocumentType,
  ReverseDocument,
  ReverseDocumentFiscalYear,
  ConditionRecord,
  DocumentReferenceID,
  Ledger,
  LedgerGroup,
  PostingDate,
  DocumentDate,
  TaxReportingDate,
  ReportingDate,
  FiscalPeriod,
  ExchangeRate,
  IsReversal,
  IsReversed,
  AccountingDocumentHeaderText,
  CompanyCodeCountry,
  ReportingCountry,
  TaxReturnCountry,
  TaxCountry,
  CompanyCodeCurrency,
  CountryCurrency,
  DocumentCurrency,
  ReportingCurrency,
  AdditionalCurrency1,
  AdditionalCurrency2,
  TaxBaseAmountInRptgCrcy,
  TaxAmountInRptgCrcy,
  TaxBaseAmountInCoCodeCrcy,
  TaxAmountInCoCodeCrcy,
  TaxBaseAmountInTransCrcy,
  TaxAmount,
  TotalGrossAmountInCoCodeCrcy,
  TotalGrossAmountInTransCrcy,
  TotalGrossAmount,
  TaxBaseAmountInCountryCrcy,
  TaxAmountInCountryCrcy,
  TaxBaseAmtInAdditionalCrcy1,
  TaxBaseAmtInAdditionalCrcy2,
  TaxAmountInAdditionalCurrency1,
  TaxAmountInAdditionalCurrency2,
  NonDeductibleInputTaxAmount,
  DcblVATIncrdCostInRptgCrcy,
  cast(DcblVATIncrdCostInRptgCrcy as figen_summ_amounts) AS DeductibleInputTaxAmount,
  cast(TaxAmountInRptgCrcy as figen_summ_amounts) AS OutpTxDebitAmtInCntryCurrency,
  TaxType,
  TargetTaxCode,
  BPTaxNumber,
  ReportingVATRegistration,
  TaxNumber1,
  TaxNumber2,
  TaxNumber3,
  ActiveTaxType,
  Country,
  CalculatedTxAmtInCoCodeCrcy,
  CalculatedTaxAmountInTransCrcy,
  CalculatedTxBaseAmtInTransCrcy,
  CalcdTxBaseAmtInCoCodeCrcy,
  BalanceAmountInTransacCurrency,
  TaxTypeName,
  ConditionType,
  BusinessPartner,
  BusinessPartnerName,
  BusinessPartnerCountry,
  CustomerSupplierAddress,
  TaxIsNotDeductible,
  TaxReportingDocumentDate,
  TaxCntryOrCompanyCodeCntry,
  StatryRptRun,
  CAReconciliationKey,
  TaxItemIsExternal
FROM I_StRpTaxReturnCube
;