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

Enabling / Disabling Fixed Point Arithmetic

Former Member
0 Likes
1,330

Hi Guys/Dolls

I've made a copy of a standard SAP program that <b>doesn't</b> use fixed point arithmetic i.e. from the menu option of the program <b>Goto-->Attribute</b> the fixed point arithmetic is not checked.

Anyway I've inserted some code that needs to have fixed point arithmetic checked temporarily (on the fly) and after my piece of code has executed I need to disable the fixed point arithmetic checkbox again on the fly.

Any ideas how I can do this?

Many thanks in advance.

Raj

1 REPLY 1
Read only

Former Member
0 Likes
937

Refer this example:

... FIXED-POINT ARITHMETIC fp

Effect

The indicator controlling the fixed point arithmetic is set to the value of the field fp. The values 'X' (fixed point arithmetic; ABAP_ON) and ' ' (no fixed point arithmetic; ABAP_OFF) are allowed.

Example

TYPE-POOLS ABAP. 
TYPES: line(72) TYPE C. 
DATA: itab TYPE STANDARD TABLE OF line. 
APPEND 'report test.' TO itab. 
APPEND 'DATA: p(5) TYPE P DECIMALS 2 VALUE 10.' TO itab. 
APPEND 'WRITE p.' TO itab. 
INSERT REPORT 'test_report' FROM itab FIXED-POINT ARITHMETIC ABAP_OFF.

Regards,

Ravi