Connecting SAP

SAP needs no special integration — an outbound HTTP call from the payment run to the direct-create endpoint with an API key. Via Integration Suite with an iFlow, or from ABAP through an RFC destination, with the F110 field map and the date conversion.

Last updated: 2026-09-21

On this page

Principle

There is no SAP-specific code in the app: SAP (ECC · S/4HANA · Business One) sends an outbound HTTP call on payment confirmation to POST /api/cheque-logs — the alias of Create a cheque directly — with the X-API-KEY header. Every rule on that page applies: bank_name is required, the row is created confirmed, and duplicates are guarded by cheque number and external_id.

Path 1: SAP Integration Suite (CPI)

  1. An iFlow with an HTTPS Receiver Adapter to APP_URL/api/cheque-logs.
  2. The X-API-KEY header with a key from the API keys tab (a key for the SAP company code that pays).
  3. Content-Type: application/json and Accept: application/json.

Path 2: ABAP (RFC destination, type HTTP)

In SM59 a destination ZCHEQUES_API of type G to the installation URL, then:

abap
cl_http_client=>create_by_destination( EXPORTING destination = 'ZCHEQUES_API' IMPORTING client = lo_client ).
lo_client->request->set_method( 'POST' ).
lo_client->request->set_header_field( name = 'X-API-KEY'    value = lv_api_key ).
lo_client->request->set_header_field( name = 'Content-Type' value = 'application/json' ).
lo_client->request->set_cdata( lv_json ).
lo_client->send( ). lo_client->receive( ).

lv_json carries the fields below — including bank_name.

Field map (from payment program F110)

SAP Cheque Note
LIFNR / NAME1 recipient_name vendor name
WRBTR amount
WAERS currency currency code
BELNR cheque_number · reason document number
ZALDT cheque_date SAP dates YYYYMMDD must become YYYY-MM-DD before sending
house bank (HBKID → its name) bank_name required — exactly as /api/banks returns it
BELNR + BUKRS external_id optional idempotency key — makes resends safe
cheque_type always OUT for F110 payments

Body example

json
{ "bank_name": "بنك مصر", "cheque_type": "OUT", "recipient_name": "شركة النيل للتوريدات",
  "amount": 1250.50, "currency": "EGP", "cheque_date": "2026-10-15",
  "cheque_number": "100200", "reason": "1400001234", "external_source": "sap", "external_id": "1000-1400001234" }

Common problems

  • 422 “bank name required”bank_name missing or empty.
  • 422 “cheque number already used” — an F110 rerun; treat it as a prior success, or send external_id to get 200 reused.
  • 401 — the destination has no header, or the key expired.
اطلب نسختك التجريبية مجانًا