Do you have any question about this error?
Message type: E = Error
Message class: AJ - Billing program
Message number: 021
Message text: Output operand of variant can only be updated once
The variant was set via the control so that only positive differences
are permitted. In this case, an update can be carried out in a
subsequent operand only.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Read about how you can avoid this case in the variant documentation.
Error message extract from SAP system. Copyright SAP SE.
AJ021
- Output operand of variant can only be updated once ?The SAP error message AJ021, which states "Output operand of variant can only be updated once," typically occurs in the context of using variants in SAP reports or programs. This error indicates that there is an attempt to update an output operand (a variable or field that is meant to hold the result of a calculation or operation) more than once within the same execution context, which is not allowed.
Cause:
- Multiple Updates: The most common cause of this error is that the output operand is being assigned a value multiple times in the same execution of the program or report.
- Incorrect Logic: There may be a logical error in the code where the output operand is inadvertently being updated in different branches of a conditional statement.
- Variant Configuration: If you are using a variant to run a report, the variant may be configured in such a way that it leads to multiple updates of the output operand.
Solution:
- Review Code Logic: Check the code where the output operand is being assigned. Ensure that it is only assigned a value once during the execution of the program. You may need to refactor the code to avoid multiple assignments.
- Conditional Statements: If the output operand is being updated within conditional statements (like IF...ELSE), ensure that only one branch can execute that updates the operand.
- Debugging: Use debugging tools in SAP to step through the code and identify where the output operand is being updated multiple times.
- Check Variants: If the error occurs when running a report with a variant, review the variant settings to ensure that they do not lead to multiple updates of the output operand.
Related Information:
By following these steps, you should be able to identify the root cause of the AJ021 error and implement a solution to resolve it.
Get instant SAP help. Start your 7-day free trial now.
AJ020
Division cannot be carried out; divisor is zero
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
AJ019
Invalid value in control; value: &1
What causes this issue? An invalid value was found for a control when a variant was being executed. This error only occurs if an inconsistency exists...
AJ022
Negative differences are not permitted
What causes this issue? The variant was set via the control so that a cancellation is to result in the case of a negative difference. This case has o...
AJ023
Error in IF-ELSE-ENDIF nesting: ELSE variant without previous IF
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.