C_TW_VATDeclarationItem
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.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_TW_TaxItemReversal | P_TW_TaxItemReversal | from |
Parameters (6)
| Name | Type | Default |
|---|---|---|
| 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)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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..*]
;
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