R_ES_EDCSalesInvoiceSIITaxItem
Spain SII Customer Inv TaxLines
R_ES_EDCSalesInvoiceSIITaxItem is a Composite CDS View that provides data about "Spain SII Customer Inv TaxLines" in SAP S/4HANA. It reads from 6 data sources and exposes 17 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxCode, TransactionTypeDetermination.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| P_T007B_GLO | AccountingKey | inner |
| R_ES_SIITaxCodeDetail | CompanyTaxCode | inner |
| I_ES_SIIAccountingDocType | DocumentType | inner |
| I_EDCElectronicDocAcctgDoc | EDCeDocRelationACC | from |
| I_JournalEntry | JournalEntry | inner |
| I_TaxItem | TaxItem | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| VDM.viewType | #COMPOSITE | view | |
| EndUserText.label | Spain SII Customer Inv TaxLines | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_TaxItem | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | I_TaxItem | AccountingDocument | Journal Entry |
| KEY | FiscalYear | I_TaxItem | FiscalYear | G/L Fiscal Year |
| KEY | TaxCode | I_TaxItem | TaxCode | Tax Code |
| KEY | TransactionTypeDetermination | I_TaxItem | TransactionTypeDetermination | Transaction Key |
| ES_EDocSIITaxClassification | R_ES_SIITaxCodeDetail | ES_EDocSIITaxClassification | ||
| ES_EDocSIITaxRegime | R_ES_SIITaxCodeDetail | ES_EDocSIITaxRegime | ||
| ES_SIIInvoiceTypeCode | I_ES_SIIAccountingDocType | ES_SIIInvoiceTypeCode | SAF-T Inv. Type | |
| ES_SIITaxRegimeCode | I_ES_SIIAccountingDocType | ES_SIITaxRegimeCode | Tax Regime Scenario | |
| TaxRate10endasTaxRate | ||||
| CompanyCodeCurrencyendendasCurrency | ||||
| AccountKeyForGLAccount | EqualizationTax | AccountKeyForGLAccount | Account Key | |
| EDCRepresentationType | I_EDCElectronicDocAcctgDoc | EDCRepresentationType | ||
| EDCRepresentationKey | I_EDCElectronicDocAcctgDoc | EDCRepresentationKey | ||
| EDCType | I_EDCElectronicDocAcctgDoc | EDCType | ||
| EDCRecordUUID | I_EDCElectronicDocAcctgDoc | EDCRecordUUID | ||
| EDCCommonKey | I_EDCElectronicDocAcctgDoc | EDCCommonKey |
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 R_ES_EDCSalesInvoiceSIITaxItem.
-- 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 R_ES_EDCSalesInvoiceSIITaxItem AS
SELECT
TaxItem.CompanyCode AS CompanyCode,
TaxItem.AccountingDocument AS AccountingDocument,
TaxItem.FiscalYear AS FiscalYear,
TaxItem.TaxCode AS TaxCode,
TaxItem.TransactionTypeDetermination AS TransactionTypeDetermination,
CompanyTaxCode.ES_EDocSIITaxClassification AS ES_EDocSIITaxClassification,
CompanyTaxCode.ES_EDocSIITaxRegime AS ES_EDocSIITaxRegime,
DocumentType.ES_SIIInvoiceTypeCode AS ES_SIIInvoiceTypeCode,
DocumentType.ES_SIITaxRegimeCode AS ES_SIITaxRegimeCode,
case when TaxRateDetail.ConditionCalculationTypeShort = 'W' then TaxItem.TaxRate * 100 else TaxItem.TaxRate / 10 end as TaxRate AS TaxRate10endasTaxRate,
case when JournalEntry.CompanyCodeCurrency = 'EUR' then JournalEntry.CompanyCodeCurrency else case when (TaxItem.TaxReturnCountry is not initial and TaxItem.TaxReturnCountry = 'ES') then TaxItem.CountryCurrency else JournalEntry.CompanyCodeCurrency end end as Currency AS CompanyCodeCurrencyendendasCurrency,
EqualizationTax.AccountKeyForGLAccount AS AccountKeyForGLAccount,
EDCeDocRelationACC.EDCRepresentationType AS EDCRepresentationType,
EDCeDocRelationACC.EDCRepresentationKey AS EDCRepresentationKey,
EDCeDocRelationACC.EDCType AS EDCType,
EDCeDocRelationACC.EDCRecordUUID AS EDCRecordUUID,
EDCeDocRelationACC.EDCCommonKey AS EDCCommonKey
FROM I_EDCElectronicDocAcctgDoc AS EDCeDocRelationACC
INNER JOIN I_JournalEntry AS JournalEntry ON /* join condition not captured in parsed metadata */
INNER JOIN I_TaxItem AS TaxItem ON /* join condition not captured in parsed metadata */
INNER JOIN R_ES_SIITaxCodeDetail AS CompanyTaxCode ON /* join condition not captured in parsed metadata */
INNER JOIN I_ES_SIIAccountingDocType AS DocumentType ON /* join condition not captured in parsed metadata */
INNER JOIN P_T007B_GLO AS AccountingKey ON /* join condition not captured in parsed metadata */
;
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