Analytics Catalog/Oracle Fusion ERP/General Ledger/Spain SII Report
Explore the catalogReportsModulesEnterprise modelOTBI subject areasBICC PVOs
Oracle Fusion · General Ledger

Spain SII Report

General Ledger

The Spain SII (Suministro Inmediato de Información) submission — issued and received invoice detail with VAT breakdown, formatted for near-real-time electronic filing to the Spanish tax authority within the legal four-day window.

Run note · Data latency  Several tax reports read the Tax Reporting Ledger extract rather than live transaction tables — run the extract first or the report returns stale or empty results.

Sample build of the Spain SII Report — reconciled, and rendered tool-neutral so it runs in Power BI, ThoughtSpot, or Tableau.

Spain SII Report
Sample build · illustrative
Filters
Gl Date From
2026-02-28
Gl Date To
2026-02-28
Ledger
US Primary
Register Type
Standard
Tax Reg Num
1003
4,800
Invoices
99.2%
Submitted
38
Rejected
InvoiceTypeCounterpartyTax IdTaxable BaseVatSubmission Status
SampleStandardAcme Industrial1001SampleSampleOpen
CorporateNorthwind Trading1002Posted
SampleStandardGlobex Holdings1003SampleSampleValidated
DefaultInitech LLC1004Open
SampleStandardUmbrella Corp1005SampleSamplePaid
SampleStandardAcme Industrial1001SampleSampleOpen
AI Analyst · active
reading

The report assembles issued and received invoices with their ZX_LINES VAT detail in the SII submission format.

flag

38 invoices were rejected by the tax authority, most for a counterparty tax-ID format error that SII validates strictly.

root cause & next step

Correct the tax IDs and resubmit within the four-day window; tax-ID format is the most common SII rejection.

Illustrative data. The live interactive version — drill-through, filters, export, and the AI Analyst — runs on your warehouse. See it live →

This is the report's BI Publisher data model — the SQL data set BI Publisher runs against Oracle tables to produce the output. The same SQL becomes a dbt model in your warehouse, so one definition drives both the formatted report and the analytics layer.

Data sources

How it interconnects: this data set reads the physical tables above. Those same tables surface in OTBI as subject areas and in BICC as PVOs — three lenses on one source. Open any table to trace its subject areas and View Objects.
SQL data set · genericized · parameterized · no hardcoded segments
Show / hide SQL
----Received Invoices PAYABLES
SELECT
	PK PK_G4,
	CONPAR1||'|'||CONPAR2||'|'||CONPAR3||'|'||CONPAR4||'|'||CONPAR5||'|'||CONPAR6 CONPAR_STR
--, INVOICE_NUM
--, CONPAR2
--, CONPAR4
FROM
(
SELECT DISTINCT 
	AIA.INVOICE_ID PK,
	'CONPAR' CONPAR1,
	HZP.PARTY_NAME CONPAR2,
	NULL CONPAR3,
 	(CASE WHEN zptp.COUNTRY_CODE = 'ES' THEN REGEXP_REPLACE(REP_REGISTRATION_NUMBER, '^ES','')
      WHEN  zptp.COUNTRY_CODE = 'US' THEN 'US'||PSP.INCOME_TAX_ID
      ELSE (CASE WHEN SUBSTR(UPPER(ZPTP.REP_REGISTRATION_NUMBER), 1, 2) = UPPER( zptp.COUNTRY_CODE) THEN ZPTP.REP_REGISTRATION_NUMBER
                 ELSE  zptp.COUNTRY_CODE || ZPTP.REP_REGISTRATION_NUMBER
           END)  
    END)  CONPAR4, 

	 (CASE WHEN zptp.COUNTRY_CODE <> 'ES' THEN zptp.COUNTRY_CODE ELSE NULL END) CONPAR5, 

    	
	 (CASE WHEN zptp.COUNTRY_CODE IN (
	'AT','BE','BG','CY','DK','FI','FR','GR','HU','IE','IT','LU','MT','NL','PL','PT','DE','RO','SE'
	,'LV','EE','LT','CZ','SK','SI','HR') THEN '02' 
	WHEN zptp.COUNTRY_CODE = 'ES' THEN NULL
	ELSE '06'
	END) CONPAR6 
	
	
	
FROM
	AP_INVOICES_ALL AIA,
	AP_INVOICE_LINES_ALL AILA,
	POZ_SUPPLIERS PS, 
	POZ_SUPPLIERS_PII PSP,
	HZ_PARTIES HZP,
	ZX_LINES ZL,
	GL_PERIODS GP,
	GL_LEDGERS GL,
	ZX_RATES_VL ZRV,
	ZX_PARTY_TAX_PROFILE ZPTP

	
WHERE
	1=1
	AND AIA.INVOICE_ID = AILA.INVOICE_ID
	AND AIA.VENDOR_ID = PS.VENDOR_ID
	AND PS.VENDOR_ID = PSP.VENDOR_ID(+)
	AND PS.PARTY_ID = HZP.PARTY_ID(+)
	AND AIA.INVOICE_ID = ZL.TRX_ID
	AND AILA.PERIOD_NAME = GP.PERIOD_NAME
	AND AIA.SET_OF_BOOKS_ID = GL.LEDGER_ID
	AND GL.PERIOD_SET_NAME = GP.PERIOD_SET_NAME
	AND AILA.TAX_RATE_ID = ZRV.TAX_RATE_ID(+)
	AND AILA.TAX_RATE_CODE = ZRV.TAX_RATE_CODE(+)
	AND AIA.APPROVAL_STATUS = 'APPROVED'
	--AND HZP.IDEN_ADDR_PARTY_SITE_ID = ZPTP.PARTY_ID(+)
	AND aia.party_site_id = zptp.party_id (+)
	AND AP_INVOICES_PKG.GET_POSTING_STATUS(AIA.INVOICE_ID) = 'Y'
		AND 'Received Invoices Register' = :P_REGISTER_TYPE
	AND GL.NAME IN ('PL SPAIN EUR GAAP','SL SPAIN EUR LOCAL')
	AND (GL.name                    	IN (:P_LEDGER)
	OR  'All'                       	IN (:P_LEDGER||'All'))
	AND ZL.TAX_REGISTRATION_NUMBER = (case when ZL.TAX_REGISTRATION_NUMBER like 'ES%'
	THEN 
	'ES'||:P_TAX_REG_NUM
	ELSE 
	:P_TAX_REG_NUM END)
	AND AIA.GL_DATE BETWEEN :P_GL_DATE_FROM AND :P_GL_DATE_TO
	
UNION
--Issued Invoices - RECEIVABLES
SELECT
	RCTA.CUSTOMER_TRX_ID PK,
	'CONPAR' CONPAR1,
	HP.PARTY_NAME CONPAR2,
	NULL CONPAR3,
/* (CASE WHEN HP.COUNTRY = 'ES' THEN REGEXP_REPLACE(ZPTP.REP_REGISTRATION_NUMBER, '^ES','')
      ELSE (CASE WHEN SUBSTR(UPPER(ZPTP.REP_REGISTRATION_NUMBER), 1, 2) = UPPER(HP.COUNTRY) THEN ZPTP.REP_REGISTRATION_NUMBER
                 ELSE HP.COUNTRY || ZPTP.REP_REGISTRATION_NUMBER
           END)  
    END)	 CONPAR4, */

--**tax Registration num from cust Sites**--
(CASE WHEN HP.COUNTRY = 'ES' THEN REGEXP_REPLACE(nvl(zr1.registration_number, ZPTP.REP_REGISTRATION_NUMBER), '^ES','')
      ELSE (CASE WHEN SUBSTR(UPPER(nvl(zr1.registration_number, ZPTP.REP_REGISTRATION_NUMBER)), 1, 2) = UPPER(HP.COUNTRY) THEN nvl(zr1.registration_number, ZPTP.REP_REGISTRATION_NUMBER)
                 ELSE HP.COUNTRY || nvl(zr1.registration_number, ZPTP.REP_REGISTRATION_NUMBER)
           END)  
    END)	 CONPAR4,
--**end**--

	(CASE WHEN HP.COUNTRY <> 'ES' THEN
	HP.COUNTRY ELSE NULL END) CONPAR5,
	(CASE WHEN ZRV.TAX_RATE_NAME IN ('ESARGOODSEU', 'ESARSERVEU') THEN '02'
      WHEN ZRV.TAX_RATE_NAME IN ('ESARGOODSNEU', 'ESARSERVNEU') THEN '04'
      WHEN ZRV.TAX_RATE_NAME IN ('ESAR05.2GOODSRDE', 'ESAR21.0GOODS','ESSPNLZ', 'ESEMTCNOVAT', 'ESARNOVAT' ) THEN ''
      WHEN RCTA.DEFAULT_TAXATION_COUNTRY IN ('AT','BE','BG','CY','DK','FI','FR','GR','HU','IE','IT','LU','MT','NL','PL','PT','DE','RO','SE','LV','EE','LT','CZ','SK','SI','HR') THEN '02'
      WHEN RCTA.DEFAULT_TAXATION_COUNTRY = 'ES' THEN NULL
      ELSE '04'
     END) CONPAR6

FROM
	RA_CUSTOMER_TRX_ALL RCTA,
	RA_CUSTOMER_TRX_LINES_ALL RCTLA,
	ZX_RATES_VL ZRV,
	ZX_LINES ZL,
	HZ_PARTIES HP,
	GL_LEDGERS GL,
	ZX_PARTY_TAX_PROFILE ZPTP,
	HZ_CUST_ACCOUNTS HCA
--** added to get cust site Tax Reg num**--
, hz_cust_acct_sites_all hcas
, hz_party_sites hps 
, zx_party_tax_profile ztp
, zx_registrations zr1
--**end**--
--**added**--
, zx_registrations zr 
, zx_party_tax_profile zptp1
--**end**--
	
WHERE
	1=1
	AND RCTA.CUSTOMER_TRX_ID = RCTLA.CUSTOMER_TRX_ID
	AND RCTLA.TAX_LINE_ID = ZL.TAX_LINE_ID
	AND ZL.TAX_RATE_ID = ZRV.TAX_RATE_ID
	AND GL.LEDGER_ID = RCTA.SET_OF_BOOKS_ID
	AND RCTA.BILL_TO_CUSTOMER_ID = HCA.CUST_ACCOUNT_ID
	AND HCA.PARTY_ID = HP.PARTY_ID
	AND Hp.IDEN_ADDR_PARTY_SITE_ID = ZPTP.PARTY_ID(+)
	--** To get Tax Registration column (CONPAR 4) from Cust Sites **--	
	AND hca.cust_account_id = hcas.cust_account_id
	AND hcas.party_site_id = hps.party_site_id
	AND hp.party_id = ztp.party_id(+)
	AND ztp.party_tax_profile_id = zr1.party_tax_profile_id(+)
	AND RCTA.COMPLETE_FLAG = 'Y'  -- to get accounted and validated AR invoices
	--**end**--
	
	--**ADDED**--
	AND ZR.PARTY_TAX_PROFILE_ID = zptp1.party_tax_profile_id
    AND zptp1.party_tax_profile_id = ZL.HQ_ESTB_PARTY_TAX_PROF_ID
	--**end**--
	
	AND 'Issued Invoices Register' = :P_REGISTER_TYPE
	AND GL.NAME IN ('PL SPAIN EUR GAAP','SL SPAIN EUR LOCAL')
	AND (GL.name                    	IN (:P_LEDGER)
	OR  'All'                       	IN (:P_LEDGER||'All'))
	AND NVL(ZL.TAX_REGISTRATION_NUMBER,zr.registration_number) = (case when ZL.TAX_REGISTRATION_NUMBER like 'ES%'
	THEN 
	'ES'||:P_TAX_REG_NUM
	ELSE 
	:P_TAX_REG_NUM END)
	AND RCTA.TRX_DATE BETWEEN :P_GL_DATE_FROM AND :P_GL_DATE_TO
)
ORDER BY PK
:P_GL_DATE_FROM :P_GL_DATE_TO :P_LEDGER :P_REGISTER_TYPE :P_TAX_REG_NUM

The data-warehouse model — one fact surrounded by conformed dimensions (what you slice by) and measures (what you aggregate), expressed as dbt so it migrates with you. Grain: one row per source transaction.

AP_INVOICE_LINES_ALLdimensionRA_CUSTOMER_TRX_ALLdimensionZX_LINESdimensionPOZ_SUPPLIERSdimensionAP_INVOICES_ALLfact · one row per source transactionAmount
●— fact → dimension join
ElementTypeDefinition
AP_INVOICE_LINES_ALLdimensiondimension
RA_CUSTOMER_TRX_ALLdimensiondimension
ZX_LINESdimensiondimension
POZ_SUPPLIERSdimensiondimension
Amountmeasuremeasure
Runs on your cloud warehouse — Snowflake, BigQuery, Redshift, or Synapse on AWS, Google Cloud, Azure, or any provider. Reconciled to the source control total — 0% variance by design. You own the code, the model, and the data.
How the data gets here: a BICC bulk extract of the source tables above, on the same pattern for every report. See the extraction pattern & data flow →
See the complete model
How this report's fact and dimensions fit the full picture, via conformed keys.
General Ledger data model →Enterprise model →

Every source object behind this report. Each linked table has its own page with full column descriptions, drawn from the Oracle BICC lineage and articulated for practitioners.

TableReporting columnsSubject areas
AP_INVOICES_ALL6315
AP_INVOICE_LINES_ALL5819
RA_CUSTOMER_TRX_ALL5816
ZX_LINESSetup / configuration table — joined for reference, not exposed for analytics
POZ_SUPPLIERS14575
HZ_PARTIES81144
Reporting columns = fields the report selects that are exposed as analytics attributes; subject areas = the OTBI subject areas the table appears in. Setup and configuration tables (master data, ledger and book setup, lookups) are referenced by the report's joins but aren't exposed as analytics columns or subject areas — that's expected, not a gap.