Application Development and Automation 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: 
Read only

How to set Fixed Point Arithmetic attribute of program RM07MLBD(Tcode MB5B)

jagesh_lakdawala
Active Participant
0 Likes
1,485

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
995

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.

3 REPLIES 3
Read only

Former Member
0 Likes
996

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.

Read only

0 Likes
995

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.

Read only

0 Likes
995

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