2014 Mar 31 10:22 PM
Hi,
We have developed a custom variant which does some calculations and returns outputs.
To fill values to the output operands, we are using the macro ' mac_output_ioper '.
But the macro adds the previously calculated values to the current values before returning the output. This is resulting in incorrect values.
i.e. If the previous value calculated for the operand ZOP1 is 10 and the current value is 5, we are getting an output of 15 instead of 5.
Can someone let us know what is going wrong here.
Also, we do not have any variant control which regulates whether the values are overwritten or added.
Regards,
Joshua.
2014 Apr 02 3:43 AM
Hi Joshua,
Can you provide more details as in which Variant you are trying to modify?
Cheers
2014 Apr 02 3:43 AM
Hi Joshua,
Can you provide more details as in which Variant you are trying to modify?
Cheers
2014 Apr 02 9:39 AM
Hi Sudeep,
We have developed a custom variant.
There are no inputs to the variants, but it calculates and returns four factors.
The values in these four factors get accumulated.
I tried using
mac_init_output '02' x_op-o1
mac_init_output '02' x_op-o2
mac_init_output '02' x_op-o3
mac_init_output '02' x_op-o4
The above logic did not work as expected.
Between the two calls to the variants, the operands are being used for calculations.
But the above logic clears the operand values and the calculations become incorrect.
Regards,
Joshua.
2014 Apr 02 11:05 PM
Hi Joshua,
When you create a custom Variant, generally its a copy of standard variants over which you make modifications.
If you are creating from scratch then add variant control in Tcode EA99.
Choose the variant control in the rate step "Values Overwritten during Update".
Use Macro ' mac_output_ioper ' OR mac_facts_write(if you are writing in the installation facts and choose update type as '4' for the output operand).
Let me know if it is helpful.
Cheers,
Sudeep
2014 Apr 03 9:15 AM