> ## 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 Search Purchase Orders by Header Text

> Finds SAP purchase orders whose Header Text (`PurchaseOrderText`) equals a given value — used in some freight/broker flows as a B/L or load-ticket reference.

Finds SAP purchase orders whose Header Text (`PurchaseOrderText`) equals a given value — used in some freight/broker flows as a B/L or load-ticket reference. Display name **"SAP Search Purchase Orders by Header Text"**. Off by default.

Returns the same full PO detail as `read_sap_purchase_order` (line items, supplier, pricing, delivery, references). Multiple matches are sorted by PO number descending so the newest is first.

## Authentication and enablement

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

## Inputs

* `header_text` (required): exact Header Text value.
* `max_results` (optional): `0` uses the server default.

## Output

`{header_text, total_found, orders[], completed_at}`.

## Limits and side effects

* Read-only against SAP.
* Match is on Header Text, not PO number.

## Expected errors

* Missing SAP credentials.
* Empty `header_text`.
* SAP API error.
