SAP Agent throws error when trying to delete variant (R3_DELETE_VARIANT)
search cancel

SAP Agent throws error when trying to delete variant (R3_DELETE_VARIANT)


Article ID: 88328


Updated On:


CA Automic Workload Automation - Automation Engine


When trying to delete a R3 Variant out from the SAP System the following error message appears within the job report and within the SAP agent:
U02004081 Error in function 'BAPI_XBP_VARIANT_DELETE': 'Error: function RS_VARIANT_DELETE Returncode 9', Type: 'E', ID:'XM', Number: '243'
Error: Function RS_VARIANT_DELETE Returncode 9
U02004015 The variant '[VARIANTNAME]' of report '[REPORTNAME]' could not be deleted ('Error: function RS_VARIANT_DELETE Returncode 9').


Release: AOATAM99000-9.0-Automic-One Automation Tools-Application Manager


There are two possible scenarios known which cause the issue.
  1. XBP Interface 3.0 is not used. R3_COPY_VARIANT and R3_DELETE_VARIANT do have XBP 3.0 as a prerequisite. First, check the XBP Interface version used, and possibly set it to 3.0
  2. The variant is locked to be deleted and/or edited at the SAP level. If the first issue is either not relevant, or does not solve the issue, check the variant at the SAP level to see if the variant is locked, or restricted in general or for the user which is executing the job.
In case both steps above does not solve the issue, open a case with Automic Support and provide the following data:
  • Job report of the execution
  • SAP Agent Logfile during the time the error occurred (provide the original log file from the \temp directory of the agent, not the report from the system overview)
  • An XML export of the SAP job.