> ## Documentation Index
> Fetch the complete documentation index at: https://agents.nanonets.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SAP Read Accounting Document Items

> Reads posted FI accounting-document line items by document key or by filter (company code, reference, G/L, cost/profit centre, posting date).

Reads posted FI line items from `API_OPLACCTGDOCITEMCUBE_SRV` (`A_OperationalAcctgDocItemCube`). Display name **"SAP Read Accounting Document Items"**. Off by default.

## Authentication and enablement

Requires a workspace SAP integration. Connection fields are injected. Enable the tool and bind the integration.

## Modes

* **By document key** — `company_code` + `fiscal_year` + `accounting_document` reads one posted document.
* **By filter** — `company_code` plus at least one narrowing filter (`document_reference_id`, `gl_account`, `fiscal_year`, posting date range, `cost_center`, or `profit_center` — any of them, matching the input schema). A `document_reference_id` filter is matched at SAP's stored 16-character (XBLNR) width; it can be used for a pre-post duplicate check (a non-empty result means the reference is already used), but the tool is a generic reader and does not render that as a verdict. Keep in mind a read is only as complete as what it returns — it is capped at `max_results`, cannot see documents the connection's user is not authorised to read, and a reversed document still counts as the reference having been used.

## Inputs

`company_code` (required) and **at least one narrowing filter** so the read is always bounded: any of `accounting_document`, `document_reference_id`, `fiscal_year`, `gl_account`, `cost_center`, `profit_center`, or a posting date range (`posting_date_from` / `posting_date_to`). `accounting_document` requires `fiscal_year`. `max_results` (default 100, capped at 100) rounds out the inputs; a capped read adds a truncation note.

## Output

`structuredContent` carries `item_count`, `document_count`, `truncated`, `document_reference_id` (the filter value, when one was given), and `data` (the full response). `IsError` is set on any failure. The result can be stored as a task variable (`store_result_as_variable`, on by default) for use as `${VAR_N}`.

## Validation Status

Provisional — verified live against s4h-2022 (2026-10-13). Not yet validated against a customer production connection.

## Errors

Missing integration, missing `company_code`, no narrowing filter, or an SAP error return `IsError: true` with the SAP message.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.