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: 

abc type p decimals 3 obsolete statement.. Why?

Former Member
0 Kudos

Hi frnds,

Can anybody tell me why this is obsolete (in EPC check)

abc type p decimals 3 .

and wht is the solution for this.

thanks and regards,

Ankit

1 ACCEPTED SOLUTION

Former Member
0 Kudos

which version ru using...

it can be used in any version... we are working on 4.7 & ECC and this doesnot show any error...

data : abc type p decimals 3.

if u have specified function-group GRAP in ur program, then it is obselete...u need to use function-group SFES.

4 REPLIES 4

Former Member
0 Kudos

which version ru using...

it can be used in any version... we are working on 4.7 & ECC and this doesnot show any error...

data : abc type p decimals 3.

if u have specified function-group GRAP in ur program, then it is obselete...u need to use function-group SFES.

Former Member
0 Kudos

Hi,

Check the following example:

DATA: PACK TYPE P DECIMALS 2.

PACK = '12345'.

WRITE PACK.

If the program attribute Fixed point arithmetic is not set, the output is as follows:

123.45

If the program attribute Fixed point arithmetic is set, the output is as follows:

12,345.00

If the Fixed point arithmetic attribute is set, the decimal places are also taken into account in

arithmetic operations. Calculations with packed numbers in ABAP use the same arithmetic as a

pocket calculator. Intermediate results are calculated using up to 31 digits (before and after the

decimal point). You should therefore always set the Fixed point arithmetic attribute when you use

type P fields

Regards,

Bhaskar

0 Kudos

And what happens when you're developping inside a routine wich is called by SAPMV45A, in wich the "Fixed Arithmetic Point" check is not set?

How do you work with decimal numbers in that case?

Multiplying the value of a number by 10, 100, 1000, depending on how many decimal places the number has?

Regards,

Andrés Sarcevic.

Former Member
0 Kudos

hi,

check like this.............

Data: abc(18) type p decimals 3 .

But if you give type as C it will read the data as it is ... so its better to declare the variable as type C.