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: 

Issues with Currency(Price) Data types

Former Member
0 Kudos
734

Hi,

I am trying to copy the data from a field of data type CURR Length 11 Decimals 2 (For eg: 15.00) to another field of Data type CURR Length 28 and Decimals 6. At runtime when I am transferring the data to the target field, it's getting copied as (150000.00 for the Data 15.00 in source field). How to transfer the data correctly between these fields of different data types.

2 REPLIES 2

Former Member
0 Kudos
137

hi,

use char field as temp variable

/wg

Former Member
0 Kudos
137

Hi

There shuldnt be any problem while copying the fields in ur scenerio. As u said u r moving the fields from curr to curr.

so there shudnt be any issue.Here i am attaching one sample code for ur reference.

IN ABAP curr field is equivalent to P type so i use p type to explain ur case.

if u can execute this code and check that 15.00 value is moved to anther field as 15 , only blank spaces are there inf front of 15..

there would be anyother problem , please let me know in detail how and where u r using it, if this is used in module pool then there would be another reason,

data: p_tt(11) type p decimals 2 value '15.00',
     p_new(15) type p decimals 6.
     write: p_tt.
     uline.
     move p_tt to p_new .
     write : 'p_new',p_new

.

Reward points if it is helpful.