Overloaded Functions : FRAC(), FLOOR(), CEIL() strange behavior...
These ABAP commands have a different behavior in a report or in a user-exit.
For instance :
DATA: v_frac LIKE vbep-bmeng,
v_floor LIKE vbep-bmeng,
or (same results)
DATA: v_frac type p decimals 3,
v_floor type p decimals 3.
The code in my report ( ztest ) is :
vbep-bmeng = 1333 / 1000.
v_frac = FRAC( vbep-bmeng ).
v_floor = FLOOR( vbep-bmeng ).
I see, in debug mode:
v_frag set to 0.333 -> works fine
v_floor set to 1.000 -> works fine
Now in my User-exit (include MV45AFZZ), I put exactly the same code.
I see, in debug mode,
v_frag set to 0.000 -> ????
v_floor set to 1.333 -> ???
I don't understand why the results are different ?
In the Exit, the types P or Quant seem to be considered as Integer...
any idea ?
( R/3 ECC5, ABAP 6.40)