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

Doubt on Currency Data Type

Former Member
0 Likes
4,104

Hi,

Have a basic question. When we have a field with type currency defined as length 13 and decimal places 2 and output length 16, what does this mean?

Does it mean that there are 13 places to the left of the decimal, 2 places after the decimal and 1 place for the decimal so making a total of 16 places as output length?

Thanks in advance.

Mick

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,671

it contains only 11 places before decimals ...

below program gives a dump with

'Overflow when converting from "1234567890123.11"'

data : v_curr type PAD_AMT7S. "( Curr 13 , 2)

v_curr = '1234567890123.11'.

while it runs perfectly when we give

v_curr = '12345678901.11'. " ( 11 + 2 )

it contains only 11 places before decimals ...

below program gives a dump with

'Overflow when converting from "1234567890123.11"'

data : v_curr type PAD_AMT7S. "( Curr 13 , 2)

v_curr = '1234567890123.11'.

while it runs perfectly when we give

v_curr = '12345678901.11'. " ( 11 + 2 )

6 REPLIES 6
Read only

Former Member
0 Likes
1,671

it means 11 places to the left of decimal , decimal places 2 .. and three

places for comma or '.'(separator .. depends on the settings)

Read only

Former Member
0 Likes
1,671

Your are apsolutely correct.

Venkat.

Read only

0 Likes
1,671

Hi Venkata,

I am a little confused. Who is correct me or Srinivas.

Thanks,

Mick

Read only

Former Member
0 Likes
1,671

hi mick srinivas is correct , and you also saying the right thing

...because the data type takes 13 decimals take.. and the decimals take 2 and the separator will be like '.'

or you can check the fields in standard table..

ex: 123456789123._12_

13 2

regards,

venkat

Read only

Former Member
0 Likes
1,672

it contains only 11 places before decimals ...

below program gives a dump with

'Overflow when converting from "1234567890123.11"'

data : v_curr type PAD_AMT7S. "( Curr 13 , 2)

v_curr = '1234567890123.11'.

while it runs perfectly when we give

v_curr = '12345678901.11'. " ( 11 + 2 )

Read only

0 Likes
1,671

Thanks Srinivas. Points awarded.