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

data type p

Former Member
0 Likes
1,207

hi all,

i have defined a field as data type betrg which is P, but in some cases i m having arithemetic overflow error.

"An overflow has been determined in the current arithmetical operation

containing operands of type P. Possible causes include:

1. The results field of type P is to small and the result does not fit

into it.

places.

2. The result or partial result has more than 31 decimal places."

Can someone please suggest a field that can hold higher values then betrg??

thanks,

HM

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
667

try defining the field like this.



data: lv_field(8) TYPE p decimals 3.

Regards,

Rich Heilman

5 REPLIES 5
Read only

Former Member
0 Likes
667

What is the statement causing the dump?

Rob

Read only

Former Member
0 Likes
667

Try to do it in a smalle variable on decimal places,

ie:

var type p decimals 7---> do not like this

var type p decimals 4 --> correct

Bye

Gabriel

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
668

try defining the field like this.



data: lv_field(8) TYPE p decimals 3.

Regards,

Rich Heilman

Read only

0 Likes
667

Can i define it as var(20) type p decimals 2??

does it mean it can accomodate 20 places before decimal??

thanks,

HM

Edited by: Hitesh Mehta on Jan 22, 2008 10:59 AM

Read only

0 Likes
667

YES. Like:

12345678901234567890.12