C_TW_VATDeclarationItem

DDL: C_TW_VATDECLARATIONITEM SQL: CTWVATDECITEM Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_TW

Taiwan VAT Declaration Item

C_TW_VATDeclarationItem is a Consumption CDS View that provides data about "Taiwan VAT Declaration Item" in SAP S/4HANA. It reads from 1 data source (P_TW_TaxItemReversal) and exposes 30 fields with key fields CompanyCode, AccountingDocument, TaxItem, SupplierTaxID1, SupplierTaxID2. It has 2 associations to related views. Part of development package GLO_FIN_IS_VAT_TW.

Data Sources (1)

SourceAliasJoin Type
P_TW_TaxItemReversal P_TW_TaxItemReversal from

Parameters (6)

NameTypeDefault
P_Language syst_langu
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_StatryRptRunType srf_report_run_type
P_StatryRptRefNmbrPrefixValue idtw_ref_num_prefix

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_Address_2 _Address_2 $projection.AddressID = _Address_2.AddressID and _Address_2.AddressRepresentationCode = 'M'
[0..*] I_ODNDocumentClassText _DocClassText $projection.AccountingDocumentClass = _DocClassText.ODNDocumentClass and _DocClassText.CountryCode = 'TW'

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CTWVATDECITEM view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Taiwan VAT Declaration Item view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view

Fields (30)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY TaxItem TaxItem Tax Item
KEY SupplierTaxID1 SupplierTaxID1 VAT Reg. No.
KEY SupplierTaxID2 SupplierTaxID2
KEY AccountingDocumentClass AccountingDocumentClass
KEY TaxGroup TaxGroup Tax Group
KEY TaiwaneseCalendarYear TaiwaneseCalendarYear
BusinessPlace BusinessPlace Business place
FiscalPeriod FiscalPeriod Tax period
TaxType TaxType Tax Type
DeductionType DeductionType
DocumentDate DocumentDate Journal Entry Date
PostingDate PostingDate Posting Date for GR
ReportingDate ReportingDate
TaxReportingDate TaxReportingDate Tax Reporting Date
TaxCode TaxCode Tax Code
DocumentReferenceID DocumentReferenceID Reference
Customer Customer Sold-to Party
CustomerCountry CustomerCountry
Supplier Supplier Supplier
SupplierCountry SupplierCountry
AddressID AddressID Ship-to address
CompanyCodeNameendasCompanyCodeName
StreetName1endasStreetName
CompanyCodeCurrency CompanyCodeCurrency Local Currency
TaxBaseAmountInCoCodeCrcy TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxAmountInCoCodeCrcy TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
ZeroTaxBaseAmountInCoCodeCrcy ZeroTaxBaseAmountInCoCodeCrcy
ExemptTaxBaseAmtInCoCodeCrcy ExemptTaxBaseAmtInCoCodeCrcy

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_VATDeclarationItem.
-- 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: CTWVATDECITEM
-- Parameters: P_Language : syst_langu, P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_StatryRptRunType : srf_report_run_type, P_StatryRptRefNmbrPrefixValue : idtw_ref_num_prefix

CREATE VIEW C_TW_VATDeclarationItem AS
SELECT
  CompanyCode,
  AccountingDocument,
  TaxItem,
  SupplierTaxID1,
  SupplierTaxID2,
  AccountingDocumentClass,
  TaxGroup,
  TaiwaneseCalendarYear,
  BusinessPlace,
  FiscalPeriod,
  TaxType,
  DeductionType,
  DocumentDate,
  PostingDate,
  ReportingDate,
  TaxReportingDate,
  TaxCode,
  DocumentReferenceID,
  Customer,
  CustomerCountry,
  Supplier,
  SupplierCountry,
  AddressID,
  case when _Address_2.AddresseeFullName <> '' then _Address_2.AddresseeFullName else _CompanyCode.CompanyCodeName end as CompanyCodeName AS CompanyCodeNameendasCompanyCodeName,
  case when _Address_2.CityName <> '' or _Address_2.StreetName <> '' then concat_with_space(_Address_2.CityName, _Address_2.StreetName, 1) else concat_with_space(_CompanyCode._Address.CityName, _CompanyCode._Address.StreetName, 1) end as StreetName AS StreetName1endasStreetName,
  CompanyCodeCurrency,
  TaxBaseAmountInCoCodeCrcy,
  TaxAmountInCoCodeCrcy,
  ZeroTaxBaseAmountInCoCodeCrcy,
  ExemptTaxBaseAmtInCoCodeCrcy
FROM P_TW_TaxItemReversal
LEFT OUTER JOIN I_Address_2 AS _Address_2 ON AddressID = _Address_2.AddressID AND _Address_2.AddressRepresentationCode = 'M'  -- association [0..1]
LEFT OUTER JOIN I_ODNDocumentClassText AS _DocClassText ON AccountingDocumentClass = _DocClassText.ODNDocumentClass AND _DocClassText.CountryCode = 'TW'  -- association [0..*]
;