I_CN_GoldenTaxDocumentBasic
China Golden Tax Document
I_CN_GoldenTaxDocumentBasic is a Basic CDS View that provides data about "China Golden Tax Document" in SAP S/4HANA. It reads from 1 data source (eiv_gtd_hdr) and exposes 52 fields with key field CN_GoldenTaxUUID. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| eiv_gtd_hdr | eiv_gtd_hdr | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_CN_GoldenTaxDocumentItmBasic | _GTDItem | $projection.CN_GoldenTaxUUID = _GTDItem.CN_GoldenTaxUUID |
| [1..*] | I_CN_GoldenTaxDocumentMapping | _GTDMapping | $projection.CN_GoldenTaxDocument = _GTDMapping.CN_GoldenTaxDocument |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.sqlViewName | ICNGTDHEADBAS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| EndUserText.label | China Golden Tax Document | view |
Fields (52)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CN_GoldenTaxUUID | gtd_header_uuid | GT Doc. Header UUID | |
| CN_GoldenTaxDocument | gtd_nmbr | GT Doc No | ||
| CN_GoldenTaxDocumentStatus | gtd_status | GT Doc. Status | ||
| CN_TaxInvoiceCategory | invc_cat | GTS Inv. Categroy | ||
| CN_TaxInvcType | invc_type | VAT Invoice Type | ||
| CN_GoldenTaxInvoiceMedium | invc_medium | Invoice Medium | ||
| CN_GoldenTaxPositiveInvcNumber | pos_gtvbeln | VAT Invoice No. | ||
| CN_GoldenTaxPositiveInvcCode | pos_typcode | VAT Invoice Code | ||
| CN_GoldenTaxSendType | send_type | Transfr Typ | ||
| CN_GoldenTaxDocumentIsCanceled | is_cancel_ind | Cancelled | ||
| CN_GoldenTaxIsGoodsList | is_goods_list | GT Goods List | ||
| CN_ReferenceGoldenTaxDocument | ref_gtd_nmbr | GT Doc No | ||
| CN_TaxInvcNetAmtInLocalCrcy | net_value | Own Net Val | ||
| CN_TaxInvcTaxAmtInLocalCrcy | tax_amount | VAT Amount Type | ||
| CN_TaxInvcDiscNetAmtInLoclCrcy | disc_amount | Discount | ||
| CN_TaxInvcDiscTaxAmtInLoclCrcy | disc_tax_amount | Tax Amount | ||
| LocalCurrency | currency | Valuation Crcy | ||
| TaxRate | tax_rate | WithholdingRate | ||
| PayerParty | buyer_nmbr | Customer | ||
| PayerPartyName | buyer_name | Customer Name | ||
| CN_TaxBuyerRegnNmbr | Unfd Socl Crdt Code | |||
| CN_GoldenTaxPyrPtyAddrTelText | buyer_addr_tel | Customer Address | ||
| CN_GoldenTaxPyrPtyBankText | buyer_bank | Customer Bank | ||
| CN_GoldenTaxPyrPtyBusinessType | buyer_bustyp | Cust. Business Type | ||
| CN_GoldenTaxPayerPartyPhone | buyer_phone | Cust. Telephone No. | ||
| CN_GoldenTaxPyrPtyMobilePhone | buyer_mobile | Customer Mobile No. | ||
| CN_GoldenTaxPyrPartyProvince | buyer_province | Customer Province | ||
| CN_GoldenTaxPayerPartyEmail | buyer_email | Supplier: Email | ||
| CN_GoldenTaxSellerName | seller_name | Seller Name | ||
| CN_GoldenTaxSellerBankText | seller_bank | Customer Bank | ||
| CN_GoldenTaxSellerAddrTelText | seller_addr_tel | Customer Address | ||
| CN_GoldenTaxSellerPhone | seller_phone | Seller Telephone No. | ||
| CN_GoldenTaxNote | note | TradeRequest Comment | ||
| CN_GoldenTaxAdditionalNote | note2 | Additional Note | ||
| CN_GoldenTaxRedNoteNumber | red_note_nmbr | Red-Ltr. Notif. No. | ||
| CN_GoldenTaxIsWithRedNoteNmbr | red_note_ind | Red-Ltr Invc. Indic. | ||
| CN_GoldenTaxIssuer | issuer | User Name | ||
| CN_GoldenTaxReviewer | reviewer | User Name | ||
| CN_GoldenTaxReceiver | receiver | Recipient | ||
| CN_GoldenTaxSourceDocumentDate | doc_date | Document Date | ||
| CN_GoldenTaxSentDate | sent_date | Inv Sent to GT | ||
| CN_GoldenTaxNumberOfPrinting | print_times | Printing Times | ||
| CN_GoldenTaxLastPrintDate | last_print_date | Print Date | ||
| ExchangeRate | Exchange Rate | |||
| CN_TaxInvcNetAmtInInvcCrcy | frgn_amount | Amount in For. Crcy | ||
| CN_TaxInvcCrcy | frgn_crcy | Foreign Currency | ||
| CreatedByUser | create_user | User Name | ||
| CreationDateTime | create_time | Time | ||
| LastChangedByUser | change_user | User Name | ||
| ChangedDateTime | change_time | Time Stamp | ||
| _GTDMapping | _GTDMapping | |||
| _GTDItem | _GTDItem |
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 I_CN_GoldenTaxDocumentBasic.
-- 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.
CREATE VIEW I_CN_GoldenTaxDocumentBasic AS
SELECT
gtd_header_uuid AS CN_GoldenTaxUUID,
gtd_nmbr AS CN_GoldenTaxDocument,
gtd_status AS CN_GoldenTaxDocumentStatus,
invc_cat AS CN_TaxInvoiceCategory,
invc_type AS CN_TaxInvcType,
invc_medium AS CN_GoldenTaxInvoiceMedium,
pos_gtvbeln AS CN_GoldenTaxPositiveInvcNumber,
pos_typcode AS CN_GoldenTaxPositiveInvcCode,
send_type AS CN_GoldenTaxSendType,
is_cancel_ind AS CN_GoldenTaxDocumentIsCanceled,
is_goods_list AS CN_GoldenTaxIsGoodsList,
ref_gtd_nmbr AS CN_ReferenceGoldenTaxDocument,
net_value AS CN_TaxInvcNetAmtInLocalCrcy,
tax_amount AS CN_TaxInvcTaxAmtInLocalCrcy,
disc_amount AS CN_TaxInvcDiscNetAmtInLoclCrcy,
disc_tax_amount AS CN_TaxInvcDiscTaxAmtInLoclCrcy,
currency AS LocalCurrency,
tax_rate AS TaxRate,
buyer_nmbr AS PayerParty,
buyer_name AS PayerPartyName,
cast(buyer_tax_reg_nmbr as ficntax_buyr_reg_nmbr) AS CN_TaxBuyerRegnNmbr,
buyer_addr_tel AS CN_GoldenTaxPyrPtyAddrTelText,
buyer_bank AS CN_GoldenTaxPyrPtyBankText,
buyer_bustyp AS CN_GoldenTaxPyrPtyBusinessType,
buyer_phone AS CN_GoldenTaxPayerPartyPhone,
buyer_mobile AS CN_GoldenTaxPyrPtyMobilePhone,
buyer_province AS CN_GoldenTaxPyrPartyProvince,
buyer_email AS CN_GoldenTaxPayerPartyEmail,
seller_name AS CN_GoldenTaxSellerName,
seller_bank AS CN_GoldenTaxSellerBankText,
seller_addr_tel AS CN_GoldenTaxSellerAddrTelText,
seller_phone AS CN_GoldenTaxSellerPhone,
note AS CN_GoldenTaxNote,
note2 AS CN_GoldenTaxAdditionalNote,
red_note_nmbr AS CN_GoldenTaxRedNoteNumber,
red_note_ind AS CN_GoldenTaxIsWithRedNoteNmbr,
issuer AS CN_GoldenTaxIssuer,
reviewer AS CN_GoldenTaxReviewer,
receiver AS CN_GoldenTaxReceiver,
doc_date AS CN_GoldenTaxSourceDocumentDate,
sent_date AS CN_GoldenTaxSentDate,
print_times AS CN_GoldenTaxNumberOfPrinting,
last_print_date AS CN_GoldenTaxLastPrintDate,
cast( exch_rate as fis_exchange_rate preserving type ) AS ExchangeRate,
frgn_amount AS CN_TaxInvcNetAmtInInvcCrcy,
frgn_crcy AS CN_TaxInvcCrcy,
create_user AS CreatedByUser,
create_time AS CreationDateTime,
change_user AS LastChangedByUser,
change_time AS ChangedDateTime
FROM eiv_gtd_hdr
LEFT OUTER JOIN I_CN_GoldenTaxDocumentItmBasic AS _GTDItem ON CN_GoldenTaxUUID = _GTDItem.CN_GoldenTaxUUID -- association [0..*]
LEFT OUTER JOIN I_CN_GoldenTaxDocumentMapping AS _GTDMapping ON CN_GoldenTaxDocument = _GTDMapping.CN_GoldenTaxDocument -- association [1..*]
;
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