‎2008 Dec 09 4:47 AM
I have used the Implicit Enhancement option for Enhancing the MB5B Tcode.
Enhancement coding is written inside the Enhancement Implimentation(Z Series)
In that coding , I am assigning Floating point value to the Decimal data object as shown below.
data: G_Pack(7) type P decimals 3.
G_Pack = W_AUSP-ATFLV.
At runtime value of W_AUSP-ATFLV is '8.3929999999999999E-01'.
After this assignment G_Pack is '0.001' instead of '0.839'.
The reason for this I found out is that in the Program(MB5B) attribute 'Fixed Point artihmetic' attribute is not set.
so how should I set this attribute for standard program RM07MLBD ?? or
Is there any way for setting this attribute through coding???.
Thanks & Regards
Jagesh Lakdawala
‎2008 Dec 09 2:08 PM
You could use the function module:
MURC_ROUND_FLOAT_TO_PACKED
to change the floating point number to a packed number.
I'm new to enhancement framework, but I didn't see an option to change the implementation to floating point.
‎2008 Dec 09 2:08 PM
You could use the function module:
MURC_ROUND_FLOAT_TO_PACKED
to change the floating point number to a packed number.
I'm new to enhancement framework, but I didn't see an option to change the implementation to floating point.
‎2011 Feb 24 10:12 AM
Hey michelle,
Well i am having the same issue in an implicit enhancement.
Tcode : VA22 - Quotation.
I have used the Standard data element : LPREIS type P decimals 2 and getting extra 2 zero's after doing a product of 2 variables.
x type P decimals 2.
y type P decimals 2.
x = 1.00
y = 3.00
Now z = x * y
I get z = 300.00
I also figured out it is the Fixed point arithmetic problem. Verified the standard program SAPLKKDI and the fixed point arithmetic is not set.
Can someone tell me how to solve this FIXED POINT ARITHMETIC problem in the standard program ?
Is there any function module to change the attribute of the standard program.?
Thanks in advance.
‎2011 Mar 25 4:19 PM
Hi Ashok,
One way is you can create a routine in a zreport say "add_val" and turn on fixed point arithmetic option in the attributes of the report. Perform your manipulations in the routine and call this routine in your enhancement by passing the parameters.
ZREPORT.
FORM add_val USING value1 value2 CHANGING result.
result = value1 * value2.
ENDFORM.
In your Enhancement:
PERFORM add_val(zreport) USING x y CHANGING z.
Thiswill solve your problem.
Best Regards,
Sharmila