Skip to content

SAP API

Platform Users — Engineers & Low-code Ops Users (ORA / Panel Builder) OR Platform ORA — AI Planning Interface Agent Workflows Plan Visualisation ADK Integration SDK UI — Frontend Shell FDK Architecture Low code Config-driven DDK Schema Definition Code Generator Generated Server MDK WEM DAL Experiment Manager Nexus Deployment Control Live Monitoring Registry Browser SCDK Source Control Pipeline Mgmt Azure DevOps deploys ↓ SDK API — GraphQL Federation Gateway Federation Gateway Component Resolvers Auth & Licensing Plugins: gql-autogeneration Migrator Helm KinD Boilerplate GenAI ··· Microservices — Domain IP Services Data Pipeline Core Platform Metrics & Analytics Spatial & Geo Simulation Event Detection Camera & Device Fire & Resource Opt. Satellite Modelling ↓ Nexus deploys Deployed OR Applications Rail Ops Dashboard Mine Mgmt Dashboard Port Ops Dashboard ··· FDK-built · DDK-backed · MDK-powered · deployed via Nexus ↑ Application Users — Operations Teams (shift managers, analysts, planners)

Overview

The SAP API service provides integration with SAP S/4HANA enterprise resource planning (ERP) systems. It enables workflows to read operational data, create business objects, and execute actions in SAP — connecting OR workflows with enterprise business processes and data.

This service is designed for operations teams, supply chain managers, and business analysts who need to integrate OR workflows with SAP-managed business data and processes.

Key Capabilities

Data Access

  • Read Business Objects — Retrieve data from SAP (orders, materials, customers, etc.)
  • Query Filtering — Filter and sort SAP data with OData queries
  • Structured Retrieval — Get typed, structured data from SAP tables
  • Batch Operations — Retrieve multiple objects efficiently

Data Modification

  • Create Objects — Insert new business objects (orders, invoices, etc.)
  • Update Objects — Modify existing SAP records
  • Delete Objects — Remove records from SAP
  • Bulk Operations — Create or update multiple records in one operation

Business Actions

  • Execute SAP Actions — Trigger SAP business logic (approve, release, post)
  • Workflow Integration — Incorporate SAP processes into OR workflows
  • Transaction Management — Ensure data consistency across operations

Data Transformation

  • SAP to Standard Format — Convert complex SAP responses to simple structures
  • Type Mapping — Transform SAP types to OR data types
  • Field Selection — Extract only needed fields from complex objects
  • Business Object Models — Work with specific SAP object types (orders, materials, maintenance)

Use Cases

Procurement Automation

Scenario: Automatically create purchase orders in SAP based on inventory forecasts and optimization models.

Workflow:

  1. Demand forecasting model predicts needs
  2. Inventory optimization determines order quantities
  3. SAP API creates purchase orders
  4. Workflow monitors order status in SAP
  5. Alerts on exceptions or delays

Value: Automate procurement based on data-driven forecasts, reducing stockouts and manual effort.

Maintenance Planning Integration

Scenario: Schedule equipment maintenance in SAP based on predictive maintenance models.

Workflow:

  1. Sensor data analyzed for equipment health
  2. Predictive model forecasts maintenance needs
  3. Schedule optimization finds optimal timing
  4. SAP API creates maintenance orders
  5. Workflow tracks completion in SAP

Value: Optimize maintenance timing while keeping SAP as the system of record.

Order Fulfillment Optimization

Scenario: Optimize production and logistics schedules using SAP order data.

Workflow:

  1. SAP API retrieves current order backlog
  2. Schedule generation optimizes production sequence
  3. Traffic model plans delivery routes
  4. Results exported back to SAP for execution
  5. Status updates written to SAP

Value: Leverage SAP data for optimization while maintaining SAP as operational system.

Supply Chain Visibility

Scenario: Create dashboards and reports combining SAP data with operational models.

Workflow:

  1. SAP API pulls inventory, orders, and shipment data
  2. Data loaded into analytics database
  3. Combined with forecasts and simulations
  4. Dashboards show current state vs predictions
  5. Alerts on deviations from plan

Value: Enhanced visibility by combining transactional SAP data with predictive models.

Model Inputs

The SAP API service accepts:

  • SAP Connection Details — System URL and credentials
  • Business Object Type — What to access (sales order, material, customer, etc.)
  • Operation — Read, create, update, delete, or execute action
  • Query Filters — Conditions for data selection
  • Object Data — For create/update operations, the object fields and values

Model Outputs

The service produces:

  • Retrieved Data — Business objects from SAP in structured format
  • Operation Status — Success/failure for create, update, delete operations
  • Transformed Objects — SAP data converted to simplified, typed structures
  • Error Messages — Detailed diagnostics for failed operations

Supported SAP Objects

The service can work with various SAP business objects:

Material Management

  • Materials and material masters
  • Inventory levels and movements
  • Purchase orders and requisitions
  • Goods receipts and issues

Sales & Distribution

  • Sales orders and quotations
  • Deliveries and shipments
  • Customer masters
  • Pricing and billing

Maintenance

  • Maintenance orders
  • Work orders and notifications
  • Equipment and functional locations
  • Maintenance schedules

Finance

  • Cost centers
  • GL accounts and postings
  • Internal orders
  • Budget data

Note: Specific objects depend on your SAP configuration and permissions.

Operations

Read Operations

Single Object Retrieval

  • Get one business object by ID
  • Retrieve all fields or select specific ones

Query/Filter

  • Search for objects matching criteria
  • Sort and paginate results
  • Aggregate and group data

Write Operations

Create

  • Insert new business objects
  • Validate required fields
  • Return created object IDs

Update

  • Modify existing objects
  • Partial updates (change only specific fields)
  • Optimistic locking to prevent conflicts

Delete

  • Remove objects from SAP
  • Check dependencies before deletion

Action Execution

Trigger SAP Functions

  • Execute SAP business logic
  • Pass parameters to functions
  • Capture return values

Integration with Other Models

The SAP API service works well with:

  • Schedule Generation — Use SAP order data for scheduling optimization
  • Tiny Time Mixers — Forecast demand based on SAP historical sales
  • Data Loader — Load SAP data into analytics databases
  • AI Agent Python — Agents can query and update SAP automatically

Configuration Options

Key parameters you can configure:

  • SAP System URL — Connection endpoint for your SAP instance
  • Authentication — Credentials for SAP access
  • Business Object — Which SAP entity to interact with
  • OData Query — Filters, sorting, field selection
  • Batch Size — For bulk operations, how many per request
  • Timeout — Maximum wait time for SAP responses

Best Practices

Data Access

  1. Filter Aggressively — Only retrieve data you need
  2. Select Fields — Don't fetch all columns if you only need a few
  3. Use Batch Reads — More efficient than many single-object reads
  4. Cache When Possible — Master data (materials, customers) changes rarely

Data Modification

  1. Validate First — Check data quality before creating/updating
  2. Handle Errors Gracefully — SAP will reject invalid data, have fallback logic
  3. Use Transactions — Group related changes for consistency
  4. Audit Changes — Log what was changed and why

Performance

  1. Limit Query Scope — Use date ranges and other filters
  2. Avoid Peak Times — Schedule heavy queries during off-hours
  3. Parallel Queries — Independent reads can run concurrently
  4. Monitor SAP Load — Don't overwhelm the SAP system

Security

  1. Least Privilege — Use SAP accounts with minimal required permissions
  2. Secure Credentials — Never hardcode SAP passwords
  3. Audit Access — Track who accessed what SAP data
  4. Comply with Policies — Follow organizational SAP governance rules

Data Governance

When integrating with SAP:

  • SAP is Source of Truth — Don't create conflicting records elsewhere
  • Change Management — Coordinate SAP modifications with business processes
  • Data Ownership — Respect SAP data ownership and approval workflows
  • Compliance — Follow regulatory requirements for ERP data

Troubleshooting

Authentication Failures

  • Verify credentials are correct and current
  • Check if SAP account is locked or expired
  • Ensure account has required authorizations
  • Review SAP security logs for details

Query Returns No Results

  • Check filter syntax (OData format)
  • Verify object types and field names
  • Ensure you have read permissions for those objects
  • Test query directly in SAP to isolate issue

Create/Update Fails

  • Validate all required fields are provided
  • Check field value formats (dates, numbers)
  • Verify you have create/update permissions
  • Review SAP error message for specific validation failure

Slow Performance

  • Reduce query scope with filters
  • Select only necessary fields
  • Avoid running during SAP batch job times
  • Check SAP system performance overall

Next Steps

User documentation for Optimal Reality