An owner or admin on the Business plan connects your SAP S/4HANA system in Settings, under Integrations, with its API host and a communication user you create for SignWren. After that, a supplier contract template can be filled from a purchase order, and when everyone has signed, the signed PDF is attached to that purchase order.
SignWren connects to your own S/4HANA system through SAP’s published OData APIs. It isn’t an SAP product, and SAP doesn’t review or endorse it.
What do we set up in S/4HANA first?
Someone who administers communication management in S/4HANA does these steps (the app names are those of S/4HANA Cloud):
- A communication user. In the Communication Users app, create a user for SignWren with a password. SAP’s rules: at least 20 characters with at least one special character. SAP recommends certificates for communication users, but SignWren signs in with the password over HTTPS.
- A communication system. In Communication Systems, create one for SignWren and add the user from step 1 under Users for Inbound Communication.
- A communication arrangement. In Communication Arrangements, create one for scenario SAP_COM_0053 (purchase order integration) with that system and user. SAP’s page for this scenario lists both services SignWren uses: Purchase Order (API_PURCHASEORDER_PROCESS_SRV) and Attachment (API_CV_ATTACHMENT_SRV).
The user locks after three wrong passwords, so SignWren never retries a refused sign-in on its own. It marks the connection “Needs reconnect” instead.
How do we connect it in SignWren?
- Go to Settings, then Integrations, and choose Connect next to SAP S/4HANA.
- Enter the API host address. In S/4HANA Cloud, it is the host name shown under Own SAP Cloud System in the Communication Systems app; SAP says to use the host name with “-api”, not the one you sign in at. Pasting a service URL from the arrangement is fine: SignWren keeps only the host. On-premise systems use your own host name and HTTPS port.
- Enter the communication user’s name and password. SignWren checks them by reading one purchase order and opening the attachment service, then stores the password encrypted.
The connection setting Business object type says what the PDF is attached to. Leave it empty for BUS2012, the purchase order header, which is what SAP’s page for SAP_COM_0053 uses.
Which merge fields can a template use?
Link the envelope to a purchase order by its number. These names fill from it:
purchase_order.number,purchase_order.date,purchase_order.type,purchase_order.company_code,purchase_order.purchasing_organization,purchase_order.purchasing_group,purchase_order.currency,purchase_order.payment_terms,purchase_order.incoterms,purchase_order.validity_start,purchase_order.validity_endpurchase_order.item_countandpurchase_order.items_summary, one line per item such as “10: Laptop stand, 5 EA at 120.00 USD”, up to 500 characterssupplier.id,supplier.name,supplier.street,supplier.city,supplier.postal_code,supplier.region,supplier.country,supplier.phone,supplier.sales_person
The supplier’s name and address come from the purchase order’s supplier address. SignWren doesn’t add up totals, so put amounts in the contract from your own figures. Check the draft before sending.
What lands in S/4HANA when a contract is signed?
The signed PDF, with its certificate of completion, is attached to the purchase order. Its file name is the envelope’s title in plain letters followed by “signed” and a short reference, because SAP stores letters outside plain ASCII in file names as “#”. Before uploading, SignWren lists the purchase order’s attachments and skips the upload if its copy is already there, so one envelope never adds two. SAP’s limit is 100 MB per file.
Anything else we should know?
SAP has marked the OData V2 purchase order API that SignWren reads as deprecated in S/4HANA Cloud since release 2308, with an OData V4 successor, and keeps deprecated APIs available for at least 12 months. If your system no longer offers the V2 service, reading purchase orders won’t work until SignWren adds the V4 one; attaching PDFs uses a different service and isn’t affected.
What if attaching fails?
SignWren retries for up to three days. If S/4HANA refuses the request, for example because the communication arrangement doesn’t include the attachment service, the envelope page shows “Couldn’t save to SAP S/4HANA” with SAP’s reason, and the sender gets one email. The signed PDF stays in SignWren either way.