How-to · SAP CDS/OData for GST

Extracting GST tax lines from S/4HANA at scale — without losing the fields your reconciliation needs

The short answer

For line-level GST reconciliation, extract from I_OperationalAcctgDocTaxItem (BSET-based) for taxable value and the CGST/SGST/IGST split, joined to I_OperationalAcctgDocItem (BSEG-based) for the supplier, invoice number and posting date — not from ACDOCA-based views like I_JournalEntryItem, which carry the tax code but not the BSET tax base — the taxable value — per tax code, degrading a GSTR-2B match to totals that can't explain a gap.

Most S/4HANA teams building a GST purchase-register extract reach for the ACDOCA-based journal-entry views first — they're the familiar, general-ledger-shaped source everyone already queries for financial reporting. For a GSTR-2B match, that choice quietly drops the one field the match can't safely rebuild — the taxable value per tax code.

The extract that looks complete until you try to match it

A GSTR-2B match needs five things for every inward line: supplier GSTIN, invoice number, invoice date, taxable value, and the CGST/SGST/IGST (or cess) split — plus, if you hold more than one GSTIN, which of yours received it, since GSTR-2B is generated per registration (Rule 60(7), CGST Rules). Miss one and that line can no longer be matched cleanly at invoice level. That's the exact failure mode this article exists to prevent.

It happens because the fastest way to get a GST extract out of S/4HANA — querying an ACDOCA-based CDS view such as I_JournalEntryItem — is also the one built for a different job. ACDOCA (the Universal Journal) is S/4HANA's single source of truth for financial reporting: amounts, cost objects, ledgers. It carries a tax code on each line, but not the tax base per tax code — the taxable value — which lives in BSET, the tax-data table, alongside the entry-view document lines in BSEG. SAP exposes the two families separately: per KBA 2821106, BSEG (the "Entry View") is exposed as OperationalAcctgDocItem and ACDOCA (the "Ledger View") as JournalEntryItem.

The three views, and what each one is actually for

CDS viewUnderlying tableWhat it's for
I_OperationalAcctgDocTaxItemBSET (tax data)Line-level tax data — taxable base and the tax amounts per tax code. Per SAP KBA 3673075, I_STRPTAXITEM is not released for key-user or cloud development, and SAP suggests I_OperationalAcctgDocTaxItem as the workaround because it "includes most of the fields" I_STRPTAXITEM has.
I_OperationalAcctgDocItemBSEG (entry view)The accounting-document item context — vendor, document/invoice reference, posting date — for operational FI processes. SAP KBA 2821106 describes BSEG as the "Entry View" — relevant for operational processes such as clearing — and exposed as OperationalAcctgDocItem.
I_JournalEntryItem (and related ACDOCA-based views)ACDOCA (Universal Journal)Ledger-level journal-entry reporting — amounts and dimensions for financial and management reporting, not tax-code-level reconciliation.

Every SAP KBA cited here is written for S/4HANA Cloud Public Edition; on private cloud or on-premise, confirm the behaviour on your release.

The practical rule: if a field you need lives in BSET or BSEG, pull it from the CDS view built on that table, not from an ACDOCA-based view that happens to carry a similar-looking amount. The two sources are not guaranteed to agree — see the next section — and even where they do, the ACDOCA side is often missing the field entirely.

Worth checking before you build on this, not after: release state varies by release and by audience. SAP's own released-API list for ABAP Cloud (the Cloudification Repository, github.com/SAP/abap-atc-cr-cv-s4hc) shows I_JournalEntryItem, I_JournalEntry and I_OperationalAcctgDocItem released on every release we checked, but I_OperationalAcctgDocTaxItem only from S/4HANA Cloud Public Edition 2308 and from S/4HANA 2023 on private cloud and on-premise — it isn't on the 2022 lists. Neither I_STRPTAXITEM nor I_JournalEntryItemCube appears on any of them (as of November 2026). Release is also per audience: SAP's View Browser app shows a separate Key User Release State and Cloud Dev. Release State (KBA 3504675), so a view can be usable in ABAP Cloud development but not in the Custom CDS Views app. Check both columns in the View Browser app, or the object's API state in ADT, rather than assuming the names in this article — or in a post written against a different release — are usable on yours.

Where ACDOCA-only extraction breaks down

Pull a purchase register from an ACDOCA-based view alone and you'll get an amount per line — but the thing a GSTR-2B match actually tests is whether that amount splits correctly into taxable value plus the right CGST/SGST/IGST, against the right supplier GSTIN and invoice number, for comparison against the GSTR-2B ITC. ACDOCA-based views are not built to carry that split at line level the way BSET is.

ACDOCA isn't blind to tax: SAP's own G/L Account Line Items – Read API, which SAP's KBA 2821106 describes as exposing a subset of ACDOCA's fields, carries TaxCode and Supplier on each line. What it doesn't carry is a tax base amount, your business place or the supplier's invoice reference — and the taxable value is the field a 2B match can least afford to reconstruct.

There's a second reason not to expect the two families to agree even on totals: they don't hold the same postings. Per KBA 2821106, General Ledger valuation and some other finance processes are recorded only in ACDOCA (the ledger view), never in BSEG — which is why SAP's entry-view Accounting Document – Read API doesn't return, for example, some asset postings. Fields don't line up either: an SAP Community answer notes the payment Reason Code is unavailable in I_JournalEntryItem and its sibling views because it "is not part of the underlying data base table ACDOCA". Don't assume field or population parity; check what a candidate view carries before relying on it for anything tax-code-level.

A documented gotcha even on the BSET/BSEG side: the two views can disagree

Don't assume that moving to I_OperationalAcctgDocTaxItem and I_OperationalAcctgDocItem makes the two views automatically reconcilable to each other, either. Per SAP KBA 3766358, the tax base amount in I_OperationalAcctgDocItem can differ from the tax base amount in I_OperationalAcctgDocTaxItem for Supplier Invoices, specifically in procurement scenarios involving goods-receipt/invoice-receipt (GR/IR) and the tax code carried on the purchase order. If your extract pipeline pulls the taxable value from the accounting-document-item view instead of the dedicated tax-item view, or mixes the two depending on which join was convenient, you can end up with a taxable value that doesn't match the tax amount calculated against it — a self-inconsistent line that will not reconcile against GSTR-2B no matter how the vendor's filing looks. SAP's own resolution is upstream: assign the tax code on the purchase order from the start, or post the invoice receipt with its tax code before the goods receipt.

The fix is a sourcing rule, not a reconciliation step: always take the taxable base and the tax-code-level CGST/SGST/IGST amounts from I_OperationalAcctgDocTaxItem, and use I_OperationalAcctgDocItem only for the document context (vendor, invoice reference, posting date) you join it to — never the other way round. For Supplier Invoices in a GR/IR procurement flow, confirm which figure your extract is actually using before trusting it at scale; KBA 3766358 is the documented case to check against.

Building the extract pipeline

A sound GST purchase-register extract from S/4HANA, built to feed a GSTR-2B-style match, looks like this:

  1. Pull tax-item detail from I_OperationalAcctgDocTaxItem — taxable base, tax code, and the CGST/SGST/IGST (and cess, where applicable) amounts — one row per tax line, distinguished by condition type or transaction key; confirm the field names on your release — keyed to the accounting document number, company code and fiscal year.
  2. Join to the document context without multiplying rows. Tax-item rows and entry-view item rows share the accounting-document key (company code, fiscal year, document number), but a document has many entry-view items, so joining on that key alone repeats every tax row once per item and inflates the totals. Take the supplier from the vendor line only (FinancialAccountType = 'K'), and take the supplier's invoice number (DocumentReferenceID — the Reference field on MIRO/FB60) and invoice date (DocumentDate) from the document header (I_JournalEntry) or that vendor line. Posting date is an SAP period attribute, not the invoice date GSTR-2B matches on.
  3. Resolve the supplier GSTIN from the supplier master. In SAP's India localisation it is held as Tax Number 3 on the vendor master, and SAP's standard approach for a supplier with several GSTINs is a separate vendor master per GSTIN (KBA 3671398) — so the GSTIN you match on depends on which vendor account the invoice was posted to. Separately, carry your own business place from the entry-view line: it identifies which of your GSTINs received the supply, and so which GSTIN's GSTR-2B the line belongs in.
  4. Expose the result via OData — deliberately. A released CDS view is not an OData service by itself. SAP publishes a few ready-made APIs: for the entry view, Accounting Document – Read (API_OPLACCTGDOCITEMCUBE_SRV), which per KBA 2821106 reads only entry-view (BSEG) documents; on the ACDOCA side, Journal Entry Item – Read, which SAP restricts to SAP Analytics Cloud integration. To expose your own joined tax-item extract, wrap it in a custom CDS view and publish it — through the Custom CDS Views app and a communication arrangement (KBA 2669062), or a service definition and binding in developer extensibility. Confirm names and fields in the SAP Business Accelerator Hub or your system's service catalog for your release.
  5. Key every line to supplier GSTIN + invoice number + invoice date + your own GSTIN (business place) before it reaches the matching step — not to the accounting document number alone, which is an SAP-internal key with no meaning to GSTN.

Get these five fields onto every line — supplier GSTIN, invoice number, invoice date, taxable value, and the tax split — and the match against GSTR-2B works the way it's supposed to: a mismatch points at a specific invoice, not a quarter's worth of unexplained total.

Checklist: validate the extract before you trust it at scale

Before wiring this extract into a monthly reconciliation run, confirm each of the following on your own system — release differences and configuration choices mean none of these are safe to assume from a blog post, including this one:

  • The view names actually exist on your release. Confirm I_OperationalAcctgDocTaxItem, I_OperationalAcctgDocItem and whichever ACDOCA-based view you're comparing against are all present, via the View Browser app (both release-state columns) or ADT — not by assuming the names in any one document carry across releases.
  • Taxable base is sourced from the tax-item view, not the document-item view. Given the documented KBA 3766358 discrepancy for Supplier Invoices in GR/IR scenarios, trace a sample of invoices through both views and confirm the taxable base you're using for the 2B match is the one from I_OperationalAcctgDocTaxItem.
  • The tax code actually maps to a CGST/SGST/IGST rate you can split correctly. A tax code can carry zero-rated, exempt or RCM lines that need different treatment in a purchase register than a standard taxable line — don't assume every row with a tax amount field populated is a standard local-supply ITC line.
  • Imports and ISD credit are keyed differently in GSTR-2B. IGST on goods imported from overseas reaches GSTR-2B from ICEGATE against the bill of entry — port code, BoE number and date — with no supplier GSTIN; goods from an SEZ unit or developer carry the SEZ supplier's GSTIN alongside the BoE; ISD credit comes from the distributor's GSTR-6 under the ISD's GSTIN, not the original vendor's (Rule 60(7), CGST Rules; GSTN's GSTR-2B FAQ). Key those lines to the bill of entry or the ISD document, not a vendor-master GSTIN — and never let a blank GSTIN silently drop a line from the match.
  • The OData service actually exposes the fields you joined, not just the ones in the CDS view's default projection. A released CDS view can still ship an OData service that only exposes a subset of fields by default — check the service metadata (the `$metadata` document) against your extract's field list before assuming parity.

None of this is exotic SAP work. It's the kind of verification that's fast to do once, on a handful of sample invoices, and expensive to skip — because the failure mode isn't an error message, it's a purchase register that looks complete and quietly isn't.

Why this is the step teams end up doing by hand

None of the individual joins above are hard. What's hard is that most teams discover the ACDOCA-only gap only after they've already built a dashboard on top of it and started seeing ITC totals that don't tie to GSTR-2B — at which point the fix isn't a schema change, it's going invoice by invoice through a quarter of purchase data to work out which lines the extract silently flattened. That reconstruction — matching supplier GSTIN and invoice number by hand against the 2B statement because the SAP-side extract never carried them — is exactly the kind of work that's painful to do manually once the vendor count and invoice volume are real.

Recoup doesn't replace your SAP extract — it reconciles the invoice-level purchase register (supplier GSTIN, invoice number, taxable value, tax split) once it reaches your books of record against GSTR-2B continuously, and names the specific vendor behind any gap before the return is due. Getting the S/4HANA extraction right, as above, is what makes that purchase register trustworthy in the first place — a totals-only feed can't be matched line by line no matter what sits downstream of it.

Don't rebuild line-level matching by hand every quarter

Recoup reconciles your purchase register against GSTR-2B at the invoice level and names the exact vendor behind every gap — once your extract carries the fields the match needs.

Book a demo →

Related guides