R_ES_EDCSalesInvoiceSIITaxItem

DDL: R_ES_EDCSALESINVOICESIITAXITEM Type: view_entity COMPOSITE

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)

SourceAliasJoin 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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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 */
;