AutoSys Integration with SAP and Oracle — Enterprise ERP Scheduling
- AutoSys integrates with SAP via the SAPXPBP (SAP External Background Processing) interface using job_type: s
- Oracle EBS integration uses job_type: o; Oracle Database integration typically uses CMD + sqlplus
- sqlplus exits 0 even on SQL errors — always check for ORA- patterns in your scripts and explicitly exit non-zero on error
AutoSys's value in enterprise environments comes largely from its ability to orchestrate processes across multiple disparate systems in a single coordinated workflow. SAP and Oracle ERP systems are the most common integration targets. AutoSys can trigger jobs inside SAP or Oracle, monitor their completion, and chain them with other batch processes.
This article covers the integration patterns and the specific mechanisms AutoSys uses to connect with each platform.
AutoSys and SAP — the SAPXPBP interface
AutoSys integrates with SAP R/3 and S/4HANA through the SAP XBP (External Background Processing) interface, also called SAPXPBP. This allows AutoSys to: - Submit SAP background jobs (ABAP programs, reports) - Monitor SAP job status and intercept completion events - Chain SAP jobs with non-SAP jobs in the same workflow
The SAP agent (a specialised AutoSys agent) handles the communication with the SAP application server.
/* SAP job type — triggers an ABAP program in SAP */ insert_job: PRD_SAP_FI_EOD_CLOSE job_type: s /* 's' = SAP job type */ sap_server_name: PRDSAP /* SAP system/instance name */ sap_report_name: RFBIBL00 /* ABAP report to run */ sap_report_variant: EOD_VARIANT /* variant (parameter set) */ sap_client: 100 /* SAP client number */ machine: sap-agent-server-01 /* machine with SAP agent installed */ owner: sapbatch date_conditions: 1 days_of_week: mon-fri start_times: "18:00" condition: success(PRD_TRADING_LOAD_DAILY) /* runs after trading load */ alarm_if_fail: 1 description: "SAP FI end-of-day period close"
AutoSys and Oracle — database job types
AutoSys can trigger Oracle stored procedures, SQL scripts, and Oracle E-Business Suite (EBS) concurrent programs. The approach depends on whether you're calling Oracle Database directly or Oracle ERP application layer.
/* Method 1: CMD job calling sqlplus (most common) */ insert_job: PRD_ORA_RECONCILE_DAILY job_type: CMD command: "/usr/bin/sqlplus -s batchuser/pass@ORCL @/scripts/oracle/reconcile.sql" machine: db-server-01 owner: orabatch condition: success(PRD_TRADING_LOAD_DAILY) alarm_if_fail: 1 std_err_file: /logs/autosys/PRD_ORA_RECONCILE_DAILY.err /* Method 2: Oracle E-Business Suite concurrent program */ insert_job: PRD_ORA_EBS_PAYROLL job_type: o /* 'o' = Oracle EBS job type */ oebs_server_name: PRDEBS oebs_responsibility: GL_SUPER_USER oebs_program_short_name: XLAFSNAPR oebs_argument1: 2026 oebs_argument2: 03 machine: oebs-agent-server owner: ebsbatch alarm_if_fail: 1
Practical integration patterns
The most common enterprise AutoSys flow that involves SAP and Oracle typically looks like this: 1. File Watcher detects upstream data file 2. CMD jobs load data into staging database 3. Oracle stored procedure processes data in the database 4. SAP job runs the period-close or posting ABAP report 5. CMD job generates confirmation report and emails finance team
All five steps are orchestrated by AutoSys with dependency conditions between each step — if any step fails, everything downstream stops and the team is alerted.
| Integration target | Job type code | What AutoSys can do | Prerequisite |
|---|---|---|---|
| SAP R/3 / S/4HANA | s (SAP) | Submit ABAP jobs, monitor completion | SAP agent + SAP XBP user setup |
| Oracle EBS | o (Oracle) | Submit concurrent programs, monitor | Oracle EBS agent installed |
| Oracle Database | CMD (sqlplus) | Run SQL scripts, call stored procs | sqlplus client on agent machine |
| Any database | CMD (CLI client) | Any SQL via command-line client | DB client on agent machine |
🎯 Key Takeaways
- AutoSys integrates with SAP via the SAPXPBP (SAP External Background Processing) interface using job_type: s
- Oracle EBS integration uses job_type: o; Oracle Database integration typically uses CMD + sqlplus
- sqlplus exits 0 even on SQL errors — always check for ORA- patterns in your scripts and explicitly exit non-zero on error
- Work with SAP Basis and Oracle DBA teams to set up the service accounts AutoSys uses for integration
⚠ Common Mistakes to Avoid
- ✕Using CMD + sqlplus without proper error handling — sqlplus exits 0 even on SQL errors unless you explicitly check for ORA- errors in the script
- ✕Not coordinating with SAP Basis team on the SAP XBP user account — it needs specific authorisations that Basis controls
- ✕Running Oracle stored procedures synchronously via sqlplus without a timeout — use term_run_time to handle hung DB sessions
- ✕Not capturing sqlplus output in std_out_file — Oracle errors in SQL output won't appear in std_err_file
Interview Questions on This Topic
- QHow does AutoSys integrate with SAP?
- QWhat is the SAP XBP interface?
- QWhat job type code is used for SAP jobs in JIL?
- QHow do you call an Oracle stored procedure from AutoSys?
- QWhat is the gotcha with sqlplus and exit codes in AutoSys?
Frequently Asked Questions
How does AutoSys integrate with SAP?
AutoSys integrates with SAP R/3 and S/4HANA through the SAP XBP (External Background Processing) interface. A specialised SAP agent on the AutoSys side communicates with SAP via RFC/BAPI calls to submit ABAP background jobs and monitor their completion.
What job type do you use for SAP jobs in AutoSys JIL?
Use job_type: s (lowercase 's') for SAP jobs. This job type requires the SAP agent to be installed on the specified machine and the SAP XBP interface to be configured in the SAP system.
How do you call an Oracle stored procedure from AutoSys?
The simplest method is a CMD job that invokes sqlplus from the command line: command: sqlplus user/pass@DB @/scripts/call_proc.sql. The SQL script calls the procedure and commits. Ensure the script checks for ORA- errors and exits non-zero on failure.
Why does sqlplus exit 0 even when SQL fails?
By default, sqlplus exits with code 0 regardless of SQL errors. AutoSys sees exit code 0 as SUCCESS. To get proper failure detection, add WHENEVER SQLERROR EXIT SQL.SQLCODE at the start of your SQL script, which causes sqlplus to exit with the Oracle error code when a SQL error occurs.
What permissions does the SAP user need for AutoSys integration?
The SAP user (often a technical basis user) needs XBP authorisations including S_XBP_ADM and S_BTCH_ADM. The exact profile setup should be coordinated with your SAP Basis team, who will follow SAP Note guidelines for external background processing users.
Developer and founder of TheCodeForge. I built this site because I was tired of tutorials that explain what to type without explaining why it works. Every article here is written to make concepts actually click.