MojarMojar
Connectors

SAP / ERP

Query stock, materials, production orders, and create maintenance notifications in SAP via OData.

The SAP / ERP connector lets your agent retrieve live data from SAP — stock availability, material master records, production orders — and create maintenance notifications, all through SAP's OData REST gateway.

What you can do

ActionWhat it does
QueryRuns a generic OData query against any SAP entity set and returns the results.
Stock availabilityReads stock quantities for a material number, optionally filtered by plant.
Material infoFetches material master data (description, type, base unit, weight) for a material number.
Production orderRetrieves planned and confirmed quantities, dates, and status for a production order number.
Create maintenance notificationCreates a PM notification (type M1) for a piece of equipment.
Custom RFCCalls a custom OData function module by name with input parameters.

All text fields support {{variable}} template syntax for dynamic queries.

Before you start

You need:

  • Access to an SAP system with the OData Gateway enabled (transaction /IWFND/MAINT_SERVICE).
  • The SAP Gateway URL — typically https://your-sap-host/sap/opu/odata/sap/.
  • A technical user account with authorization for the OData services you want to call.
  • The Client Number (a 3-digit identifier like 100, 800) for your SAP environment.

Ask your SAP Basis administrator to create a dedicated service account (e.g. MOJAR_INTEGRATION) with minimum required authorizations. Do not use your personal SAP login.

Common SAP OData services used by this connector:

  • API_MATERIAL_STOCK_SRV — stock availability
  • API_PRODUCT_SRV — material master
  • API_PRODUCTION_ORDER_2_SRV — production orders
  • API_MAINTNOTIFICATION — maintenance notifications

All services are listed on the SAP API Business Hub.

Connect SAP

Open your agent in Mojar and go to Integrations in the sidebar.
Find SAP / ERP in the list of available providers and click Connect.

Fill in the credential form:

FieldValue
SAP Gateway URLBase URL of your OData gateway, e.g. https://sap-gateway.example.com/sap/opu/odata/sap/
Client Number3-digit client number, e.g. 100
UsernameSAP technical user login
PasswordSAP technical user password
System ID (optional)SAP system identifier, e.g. PRD for production
Click Save.

SAP connector credential form showing the SAP Gateway URL, Client Number, Username, and Password fields

Use it in a workflow

Open the workflow editor and add a new node where you want the SAP action.
Select SAP / ERP as the connector.
Choose an Action from the dropdown.

Fill in the fields for the chosen action:

Stock availability

  • Material Number — SAP material number, e.g. 100001
  • Plant (optional) — filter to a specific plant code, e.g. 1000

Material info

  • Material Number — SAP material number

Production order

  • Order Number — SAP manufacturing order number

Create maintenance notification

  • Description — text description of the issue
  • Equipment (optional) — equipment technical object number
  • Priority — SAP priority code (14, where 1 = very high)

Query (generic OData)

  • Entity Set — OData entity set name, e.g. A_MatlStkInAcctMod
  • Filter (optional) — OData $filter expression, e.g. Material eq '100001'
  • Select (optional) — comma-separated field names
  • Top (optional) — maximum number of results to return

Custom RFC

  • Function Name — OData service or function module name
  • Input Parameters — JSON object of input parameters
Connect the node output to the next workflow step. Results are returned as a results array for queries, or a structured object for single-record lookups.

Write operations (Create maintenance notification, Custom RFC) require a valid CSRF token. The connector fetches this automatically before sending the request — no extra configuration is needed.

On this page