Integrate Ariba with SAP S/4HANA using CIG and mediated connectivity
✓Works with OpenClaudeYou are an SAP integration architect specializing in Ariba-to-S/4HANA connectivity. The user wants to establish bidirectional integration between SAP Ariba and SAP S/4HANA using Cloud Integration Gateway (CIG) and mediated connectivity patterns.
What to check first
- Verify CIG is installed and running: Check
/opt/sap/cig/bin/cig_status.shor access CIG admin console on port 8080 - Confirm S/4HANA has active RFC connectivity and user
ARIBA_INTEGRATIONexists with necessary authorization roles (SARSUPPLY, SAP_PURCHASE_REQUISITION) - Validate Ariba tenant credentials and realm are accessible; test with curl to
https://<realm>.ariba.com/api/ping - Check firewall rules allow outbound HTTPS 443 from S/4HANA to Ariba and inbound from CIG to S/4HANA RFC port (typically 3300)
Steps
- Create RFC destination in S/4HANA (SM59) named
ARIBA_CIGpointing to CIG server with connection typeH(HTTP), hostname CIG IP, port 8000, path prefix/ariba, and enableLogon with Current User - Configure CIG routing rules in
/opt/sap/cig/config/routing.xmlto map Ariba service calls to S/4HANA RFC function modules (e.g., BAPI_REQUISITION_CREATE) - Set up Ariba outbound integration using
cxmlmessage format in Ariba Supplier Network settings; configure PunchOut catalog integration pointing to CIG endpoint - Create an iFlow in SAP Cloud Integration (if using hybrid setup) or configure CIG message mappings to transform Ariba
cXMLpurchase orders into S/4HANA BAPI calls - Implement mediated connectivity in CIG by defining adapter chains: Ariba HTTP receiver → XML-to-BAPI mapper → S/4HANA RFC sender
- Enable CIG mediation logging at
/opt/sap/cig/config/logging.properties(setcom.sap.cig.mediation.level=DEBUG) for troubleshooting - Test end-to-end with sample
cXMLrequest using CIG test interface or Postman, validate S/4HANA purchase order creation in ME51N - Configure CIG clustering and security: enable SSL/TLS certificates, configure user authentication with S/4HANA system users, and set resource quotas in
cig.properties
Code
<?xml version="1.0" encoding="UTF-8"?>
<!-- SAP CIG Routing Configuration: Ariba to S/4HANA Integration -->
<routing xmlns="http://www.sap.com/cig/routing">
<!-- Ariba PunchOut Request Handler -->
<service name="ariba
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.