2023 Feb 24 8:16 PM
Hi Experts, I have the following line in the Invoice program executed in VF03 in quality environment and production environment the line is stopped there in both environments so should be executed, I verify the values for each variable (kbetr, kwert and fkimg) and in quality the line is executed right and the variable komvd-kbetr is getting the expected value but in production the variable komvd-kbetr wasn't change after that math operation was executed it looks like the line wasn't executed even when the break-point stopped in this line so should be executed, in Production the variable komvd-kbetr still having the same value before the break-point pass trough this line.
I already verified:
* All the variables (kbetr, kwert and fkimg) have the same data type between Quality and production.
* Both code is active.
* Same user between Quality and Production has the same decimal notation (SU01).
Why I'm saying that the line is not executed even if the break-point stopped in this line in production? Because komvd-kbetr has the value 26.00 before the line is executed and after the line is executed should be 26,000.00 (I did it in a calculator with all the values like quality is showing too) but after the line is executed still having 26.00 so it looks that the line was not executed.
Do you know why this is happening?
2023 Feb 24 11:06 PM
Maybe a dynamic logpoint can help you analyse the code in the productive environment:
2023 Feb 25 9:33 AM
The SD module is known to have programs which use the old flag "fixed point arithmetic" in programs, when it's not selected, the decimal point of the variables is ignored:
Documentation:
If you create a program, the option "fixed point arithmetic" is selected by default.
The below program has "fixed point arithmetic" not selected, and does what you experience:
REPORT zdemo_no_fixed_pt_arith.
TABLES komvd.
TABLES vbdpr.
vbdpr-fkimg = '1.000'. " variable type has 3 decimals
komvd-kbetr = '26.00'. " variable type has 2 decimals
komvd-kbetr = ( 1000 * komvd-kbetr ) / vbdpr-fkimg.
ASSERT komvd-kbetr = '26.00'. " 1000 * 2600 / 1000 -> 2600
Note that vbdpr-fkimg = '1.000' and vbdpr-fkimg = '1000' are equivalent when the option "fixed point arithmetic" is not selected.