> ## 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 Get Attachment

> Downloads the files attached to a SAP business object, with their metadata.

Fetches the attachments on one object from `API_CV_ATTACHMENT_SRV`. Display name **"SAP Get Attachment"**. Off by default.

## Authentication and enablement

Requires a workspace SAP integration. `base_url` and `authorization` are injected. Enable the tool and bind the integration.

## Inputs

Name the object, not the files — the same pair `sap_list_attachments` takes:

| Field | Required | Notes |
| - | - | - |
| `business_object_type` | yes | e.g. `BUS2081` for a supplier invoice, `BKPF` for an accounting document. |
| `object_key` | yes | `LinkedSAPObjectKey`, built from fixed-width parts with no separator. |
| `file_names` | — | Fetch only the attachments with these names. |
| `document_numbers` | — | Fetch only these attachments, by `DocumentInfoRecordDocNumber`. |

Naming neither filter fetches every file on the object. The two filters are a union, not an intersection — each names files outright.

File names are not unique in SAP: two files on one invoice can both be `invoice-attachment.pdf`, and a `file_names` entry matching several fetches all of them. Use `document_numbers` to ask for one exact file; `sap_list_attachments` reports that number, and the task card shows it.

The tool reads the attachment list itself and takes each file's document keys from it. Those keys are not inputs: an agent cannot compose them, so passing them back in only invited a transcription slip — and a wrong key is answered with an empty list, not an error.

## Outputs

`{tool_name, business_object_type, object_key, attachments[], total, completed_at}`, where each attachment carries `{file_name, mime_type, size_bytes, created_by, created_at, document_info_record_doc_number}`. The author and date come from the attachment list; SAP does not report them on the content read.

**The file content is not in the tool result.** It is attached to the task feed under `attachment_contents`, declared `feed_only`, so the task card can render it while every model-facing projection drops it. An encoded PDF is several thousand tokens that carry no information a model can use, and the result already states every fact about the file.

In the task feed, clicking a file name opens it in the preview pane.

## Limits and errors

* One call downloads at most 10 MB across all files. The content is carried in the stored step and encodes a third larger again. A file that would cross the limit is skipped, named in the result, and marked in the card — never dropped silently.
* SAP does not implement reading an attachment entity without its content — a plain read answers `501`. The list call is what supplies metadata without bytes.
* An object key SAP does not recognise returns an empty list, exactly as an object with no attachments does. The tool fails with a message naming the key rather than reporting zero files, because the two cases are indistinguishable in the response and "no attachments" is the dangerous reading.
* A file SAP refuses is reported per file with its error; the rest of the call still succeeds.


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