AutoSys SAP Job Failure 'STATE FAILED Cmpc(1)' with sap_success_msg attribute
search cancel

AutoSys SAP Job Failure 'STATE FAILED Cmpc(1)' with sap_success_msg attribute

book

Article ID: 444921

calendar_today

Updated On:

Products

Workload Automation Agent Autosys Workload Automation

Issue/Introduction

An AutoSys SAP job fails with the status STATE FAILED Cmpc(1) even though the sap_success_msg attribute is configured in the JIL.

Example JIL configuration causing the issue:

jil
 
sap_success_msg: "STATE FAILED Cmpc(1)"sap_mon_child: Y

Environment

Workload Automation Agent for SAP

Cause

There are two primary causes for this behavior:

  1. Invalid sap_success_msg Value: The sap_success_msg attribute is designed to scan the SAP Job Log for a specific success string. In this case, the string "STATE FAILED Cmpc(1)" is an internal status message generated by the AutoSys System Agent, not by the SAP application. Therefore, the agent never finds a match within the SAP log to override the failure.
  2. Child Process Termination: When sap_mon_child: Y is set, the agent monitors child processes spawned by the main ABAP program. If any child process terminates abnormally, the overall job status is marked as FAILED even if the parent job completed successfully.

Resolution

To resolve this issue, apply one or more of the following recommendations based on your business requirements:

1. Correct the sap_success_msg Attribute

Ensure that the string specified in sap_success_msg exists within the SAP Job Log (viewable via transaction SM37).

  • Incorrect: sap_success_msg: "STATE FAILED Cmpc(1)"
  • Correct Example: sap_success_msg: "Processing completed successfully for all records" (Must match the actual SAP log text).

2. Disable Child Monitoring (Interim Workaround)

If the success of the parent job is the only metric required and child process terminations are expected or handled elsewhere, disable child monitoring in the JIL:

jil
 
sap_mon_child: N

Note: Consult with your SAP functional team before disabling this to ensure child process status is truly non-critical.

3. Investigate SAP Child Process Failures

If child monitoring is required, the SAP team must investigate why the child processes are terminating. Common issues include:

  • Incorrect selection criteria in the ABAP program.

4. Remove Optional Attribute

If no specific success string is required to determine the job outcome, remove the sap_success_msg attribute entirely to let the standard SAP job status determine the result.