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:
Workload Automation Agent for SAP
There are two primary causes for this behavior:
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.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.To resolve this issue, apply one or more of the following recommendations based on your business requirements:
Ensure that the string specified in sap_success_msg exists within the SAP Job Log (viewable via transaction SM37).
sap_success_msg: "STATE FAILED Cmpc(1)"sap_success_msg: "Processing completed successfully for all records" (Must match the actual SAP log text).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:
Note: Consult with your SAP functional team before disabling this to ensure child process status is truly non-critical.
If child monitoring is required, the SAP team must investigate why the child processes are terminating. Common issues include:
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.