Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Line code not executed even if I verified with break-point that the line should be executed.

former_member653972
Discoverer
0 Kudos

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?

2 REPLIES 2

touzik_itc
Active Participant
0 Kudos

Maybe a dynamic logpoint can help you analyse the code in the productive environment:

https://blogs.sap.com/2020/04/21/adt-abap-debugger-what-to-do-if-your-program-does-not-stop-at-break...

Sandra_Rossi
Active Contributor
0 Kudos

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 mark this checkbox, all calculations in the program will use fixed point arithmetic.
  • If you do not, packed numbers (ABAP/4 type P, Dictionary types CURR, DEC or QUAN) will be treated as integers when they are used in assignments, comparisons, and calculations, irrespective of the number of decimal places defined. Intermediate results in arithmetic calculations will also be rounded to the next whole number. The number of decimal places defined is only taken into account when you output the answer using the WRITE statement.

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.