RequestTailor Preview (22 November 2026): requests as files in Git, no account, offline – on the Mac, in the browser and in the pipeline. What’s inside → +43 664 1964199Contact →

OData and SAP

The OData plugin turns RequestTailor into a client that knows how SAP services behave: it reads $metadata, fetches CSRF tokens, keeps ETags, builds $batch requests and runs draft actions. Your requests stay plain files. The RequestTailor core contains no SAP knowledge; the plugin uses the same public plugin API as any other.

Edition
Free
Switch on
choose “SAP and OData” at first start or later in the plugin settings
Protocols
OData V2 and V4
Where
collection tabs OData and SAP systems; request tabs Query, Batch, Draft
Pipeline
rt send … --plugin odata.wasm

Switch the plugin on

The OData plugin ships with the app but is active only if you choose SAP and OData at first start – or switch it on later in the plugin settings. If you do not choose SAP, you see nothing of SAP: a disabled plugin has no tabs and no hooks.

Before installing, it shows its permissions, like every plugin (see Plugins):

  • network – only to the host of the request being sent;
  • storage – a store of its own for cached metadata, CSRF tokens and ETags;
  • variables – the non-secret variables, for sapClient and sapLanguage.
ServiceTypical rootProtocol
SAP Gateway services on S/4HANA/sap/opu/odata/sap/<SERVICE>/OData V2
RAP business services/sap/opu/odata4/sap/<service>/srvd_a2x/…/0001/OData V4, with draft
CAP services/odata/v4/<service>/, V2 adapter /odata/v2/<service>/OData V4 with draft, and V2

Connect your own system

  1. Create a collection or import the service’s $metadata – from the system or as an API specification from the SAP Business Accelerator Hub (EDMX, or OpenAPI with x-sap extensions). The importer creates requests per entity set and operation: list, read by key, create, update and delete as far as the entity set allows.
  2. In the collection tab SAP systems, create the DEV, QAS and PRD environments from a template: host, client, language and user. The password is created as a secret without a value.
  3. Enter the password once; it stays in the keychain, the environment file holds only its name.
  4. Pick an environment and send. The plugin adds sap-client and sap-language to the URL unless they are already there.
# environments/QAS.yml
name: QAS
variables:
  - name: baseUrl
    value: https://s4-qas.example.com
  - name: sapClient
    value: "200"
  - name: sapLanguage
    value: EN
  - name: user
    value: JDOE
  - secret: true
    name: password

The same requests run against all three systems this way; only host, client and user differ.

Entities from $metadata

The collection tab OData shows the service model: version, namespace, entity sets with keys, properties, types and labels, navigation and operations (actions and functions). The model is cached per service root.

Collection tab OData of the service ZRT_SALES_SRV, version V2: entity sets SalesOrderSet, SalesOrderItemSet and CustomerSet with keys, Edm types and labels, navigation ToItems and ToCustomer, two operations and the buttons Create requests, Forget metadata and Load $metadata
The model of an OData V2 service from the local test service, with fictitious data.
  1. Header: service URL, version, namespace, number of entity sets and operations.
  2. Per entity set its properties with key, Edm type and label; notes such as no delete when the service does not allow something.
  3. Create requests proposes requests for the service; you confirm what is created. New requests stay unsaved until you save.
  4. Load $metadata loads the model from the Service root URL, Forget metadata drops the cache.

Build queries

In the request tab Query, the query builder offers $filter, $expand, $select, $orderby, $top, $skip and $count (V4) or $inlinecount (V2) from the model and writes them into the request URL. The URL stays the truth; you can change it by hand at any time.

Query tab of the request Read sales order with items: service root, entity set SalesOrderSet, OData version V2 from $metadata, a table of filterable properties with type and example filter, below it the response 200 OK with the order including ToCustomer
The query builder shows the filterable properties with an example per type; the response below contains the customer and item data loaded by $expand.

Writing: CSRF tokens and ETags

SAP Gateway and many CAP deployments protect writing requests with a CSRF token bound to the session cookie. Before a POST, PUT, PATCH, MERGE or DELETE without X-CSRF-Token, the plugin fetches one with X-CSRF-Token: Fetch – in the same session as the request – and sets it. When the server answers 403 with X-CSRF-Token: Required, the next send fetches a new one.

For optimistic locking, read the entity first. The plugin remembers its ETag (the ETag header, @odata.etag or __metadata.etag) and sets If-Match on the next update or delete of that entity, unless you set the header yourself. In OData V2 the update method is usually MERGE (newer Gateway releases accept PATCH too); in V4 it is PATCH.

$batch

The Batch tab composes a $batch request from read parts and changesets (groups of writes that apply all or nothing) – as multipart for V2 and V4 or as JSON for V4 – and shows the response part by part with its status. A batch is an ordinary request file; you can also write the body by hand.

Drafts in RAP and CAP

Draft-enabled entities have two instances per key: the active one (IsActiveEntity=true) and the draft (IsActiveEntity=false). The Draft tab walks through the lifecycle:

StepRAPCAP
Draft of an active instancebound action Editbound action draftEdit
Change the draftPATCH on the draftPATCH on the draft
ValidatePreparedraftPrepare
SaveActivatedraftActivate
Throw awayDiscardDELETE on the draft

Try it locally and in the pipeline

The core repository contains a synthetic OData test service and three example collections – without real SAP data:

cargo run -p rt-odata-testserver   # http://127.0.0.1:47830
  • examples/s4hana-sales – OData V2 in SAP Gateway style: sales orders, $expand, MERGE, a function import, $batch with a changeset;
  • examples/cap-bookshop – a CAP bookshop as OData V4 with drafts and through the V2 adapter;
  • examples/rap-salesorder – a RAP business object with the whole draft lifecycle.

Choose the Local environment; for the S/4 examples, enter the test password RT_PASS as the value of the secret password. The plugin runs in rt send too, with the same CSRF and ETag handling:

rt send sales/read-sales-order.yml --env QAS --var password="$QAS_PASSWORD" --plugin odata.wasm --pretty

SAP, SAP S/4HANA and SAP Gateway are trademarks or registered trademarks of SAP SE in Germany and other countries. RequestTailor is not a product of SAP SE and is neither offered nor endorsed by it.

See also

Sources on this page

The superscript numbers in the text point here. Tap one to see the source right where it is used; all sources of this website are listed on one page.

  1. 1

    OData plugin for S/4HANA, CAP and RAP ↑Product · RequestTailor core repository, plugins/odata, website/sap, website/docs/odata · checked on 2026-11-22

  2. 2

    Plugins only as WebAssembly, with permissions ↑Product · RequestTailor core repository, crates/rt-plugin/API.md, plugins/README.md · checked on 2026-11-22

Frequently asked

Short answers.

Is RequestTailor an SAP product?
No. RequestTailor is an API client by CloudDNA GmbH. The core contains no SAP knowledge; OData and SAP live in the OData plugin on the public plugin API, which you choose at first start.
Do I need an SAP system to try the plugin?
No. The core repository contains the synthetic test service rt-odata-testserver and three example collections for S/4HANA, CAP and RAP with fictitious data.
Where is my SAP password kept?
In your operating system’s keychain, in the web app encrypted in the browser. The environment file in the repository holds only the variable’s name, never the value.
Is there support for BTP destinations and service keys?
Not yet. Comfort for SAP BTP is planned for Pro and in the works. Until then you enter the host and credentials as an environment, for example with OAuth 2.0 client credentials.

Your question isn’t here? Talk to me: +43 664 1964199 office@clouddna.at Get in touch

Contact

Requests in the repo instead of an account? Talk to us.

Free is free and stays free. For an early copy, for Enterprise, for the OData plugin on your SAP system or for a wish for Pro and Team: write to me. I reply within one working day, personally.

Martin KochManaging Director, CloudDNAI read every request myself and reply personally.