C_TW_TaxItemQuery

DDL: C_TW_TAXITEMQUERY SQL: CTWTAXITEMQUERY Type: view CONSUMPTION

Tax Item Query

C_TW_TaxItemQuery is a Consumption CDS View that provides data about "Tax Item Query" in SAP S/4HANA. It reads from 1 data source (I_TW_TaxItemCube) and exposes 52 fields with key fields CompanyCode, BusinessPlace, AccountingDocumentClass, AccountingDocument, TaxCode.

Data Sources (1)

SourceAliasJoin Type
I_TW_TaxItemCube I_TW_TaxItemCube from

Parameters (4)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_StatryRptRunType srf_report_run_type

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName CTWTAXITEMQUERY view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Tax Item Query view
Analytics.query true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Cube CompanyCode Receiver Company Code
KEY BusinessPlace Cube BusinessPlace Business place
KEY AccountingDocumentClass
KEY AccountingDocument Cube AccountingDocument Journal Entry
KEY TaxCode Cube TaxCode Tax Code
KEY TaiwaneseCalendarYear
KEY DebitCreditCode Cube DebitCreditCode Debit/Credit Indicator
TaxGroup
CE2005
ReferenceDocumentType
LogicalDocumentClass Document Class
TaxItem Line Item
AssignmentReference Cube AssignmentReference Assignment
JrnlEntryCntrySpecificRef1 Cube JrnlEntryCntrySpecificRef1 Reference Key 1
JrnlEntryCntrySpecificRef2 Cube JrnlEntryCntrySpecificRef2 Reference Key 2
JrnlEntryCntrySpecificRef3 Cube JrnlEntryCntrySpecificRef3 Reference Key 3
ReportingDate Cube ReportingDate
DocumentDate Cube DocumentDate Journal Entry Date
SourceReferenceDocument
PostingDate Cube PostingDate Posting Date for GR
Supplier Cube Supplier Supplier
SupplierCountry Cube SupplierCountry Supplier Country/Region
Customer Cube Customer Sold-to Party
CustomerCountry Cube CustomerCountry Customer Country/Region
FiscalYear Cube FiscalYear G/L Fiscal Year
BusinessPartner Cube BusinessPartner Issuing Authority
DocumentReferenceID GUI Number
SupplierTaxID2 Seller
SequenceNumber
FiscalPeriod
CustomerTaxID1 Purchaser Bus. Admin. No./Invc. End. No.
SupplierTaxID1 Seller Business Administration Number
TaxRate Cube TaxRate Tax Rate
TaxRateValidityStartDate Cube TaxRateValidityStartDate Valid-From Date of Tax Rate
TaxType Cube TaxType Tax Type
ControllingObjectType Cube ControllingObjectType Control of Official Doc. Numbering
NmbrOfPages
TaxCategory Taxation Type
DeductionType Cube DeductionType
IndustrialTaxRateCategory Cube IndustrialTaxRateCategory
MultipleInvoiceType
GoodsAreCleared Cube GoodsAreCleared
IsMarkedForDeletion Reversed Document Item
ReverseDocument Cube ReverseDocument Reversed With
ReverseDocumentFiscalYear Cube ReverseDocumentFiscalYear Year
SalesAmtInCompanyCodeCurrency
TaxBaseAmountInCoCodeCrcy
TaxAmountassychar30asTaxAmount Calculated Tax Amount
TaxAmount
GrossTaxAmount
TW_EDocGvmntUniformInvcNumber Cube TW_EDocGvmntUniformInvcNumber
CompanyCodeCurrency Cube CompanyCodeCurrency Local Currency

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_TW_TaxItemQuery.
-- 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: CTWTAXITEMQUERY
-- Parameters: P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_StatryRptRunType : srf_report_run_type

CREATE VIEW C_TW_TaxItemQuery AS
SELECT
  Cube.CompanyCode AS CompanyCode,
  Cube.BusinessPlace AS BusinessPlace,
  cast(Cube.AccountingDocumentClass as idtw_formatcode) AS AccountingDocumentClass,
  Cube.AccountingDocument AS AccountingDocument,
  Cube.TaxCode AS TaxCode,
  cast(Cube.TaiwaneseCalendarYear as idtw_year) AS TaiwaneseCalendarYear,
  Cube.DebitCreditCode AS DebitCreditCode,
  add the key TaxGroup as I_STRPTAXITEMBOXCUBE add it as key to improve performance (avoid to use DISTINCT) Cube.ReferenceDocumentType AS ReferenceDocumentType,
  Cube.AssignmentReference AS AssignmentReference,
  Cube.JrnlEntryCntrySpecificRef1 AS JrnlEntryCntrySpecificRef1,
  Cube.JrnlEntryCntrySpecificRef2 AS JrnlEntryCntrySpecificRef2,
  Cube.JrnlEntryCntrySpecificRef3 AS JrnlEntryCntrySpecificRef3,
  Cube.ReportingDate AS ReportingDate,
  Cube.DocumentDate AS DocumentDate,
  cast(Cube.SourceReferenceDocument as idtw_xblnr) AS SourceReferenceDocument,
  Cube.PostingDate AS PostingDate,
  Cube.Supplier AS Supplier,
  Cube.SupplierCountry AS SupplierCountry,
  Cube.Customer AS Customer,
  Cube.CustomerCountry AS CustomerCountry,
  Cube.FiscalYear AS FiscalYear,
  Cube.BusinessPartner AS BusinessPartner,
  cast(Cube.DocumentReferenceID as fis_xblnr) AS DocumentReferenceID,
  's Logic Serial Number' Cube.SupplierTaxID2 AS SupplierTaxID2,
  cast(Cube.SequenceNumber as idtw_numbering) AS SequenceNumber,
  cast(Cube.FiscalPeriod as idtw_month) AS FiscalPeriod,
  cast(Cube.CustomerTaxID1 as idtw_buyerguid) AS CustomerTaxID1,
  cast(Cube.SupplierTaxID1 as idtw_sellergui) AS SupplierTaxID1,
  Cube.TaxRate AS TaxRate,
  Cube.TaxRateValidityStartDate AS TaxRateValidityStartDate,
  Cube.TaxType AS TaxType,
  Cube.ControllingObjectType AS ControllingObjectType,
  cast(Cube.NmbrOfPages as idtw_numpg) AS NmbrOfPages,
  Cube.DeductionType AS DeductionType,
  Cube.IndustrialTaxRateCategory AS IndustrialTaxRateCategory,
  cast(Cube.MultipleInvoiceType as idtw_remark) AS MultipleInvoiceType,
  Cube.GoodsAreCleared AS GoodsAreCleared,
  cast(Cube.IsMarkedForDeletion as idtw_mark_deleted) AS IsMarkedForDeletion,
  Cube.ReverseDocument AS ReverseDocument,
  Cube.ReverseDocumentFiscalYear AS ReverseDocumentFiscalYear,
  cast(Cube.TaxBaseAmountInCoCodeCrcy as idtw_tax_base_amount) AS TaxBaseAmountInCoCodeCrcy,
  cast(Cube.GrossTaxAmount as idtw_gross_amount ) AS GrossTaxAmount,
  Cube.TW_EDocGvmntUniformInvcNumber AS TW_EDocGvmntUniformInvcNumber,
  Cube.CompanyCodeCurrency AS CompanyCodeCurrency
FROM I_TW_TaxItemCube
;