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

Move assignment

Former Member
0 Likes
809

Hi,

For expaining the scenario i am copying below the custom code , but the problem is happening in a standard code

REPORT yztest.

DATA: source(10) TYPE p DECIMALS 4 VALUE 100,

destin(256) TYPE c.

MOVE source TO destin .

WRITE / destin.

The output of this code is coming as blank when its suppose to display '100.0000' , not sure whats happening. Surprisingly if i change the length of destin to 10 from 256 its displaying correct value. data: destin(10) TYPE c.

Did anyone come accross such a scenario before? The problem is its a standard code and i can only change the datatype of source through config but not the destin and also source will contain numebrs with decimals

Many Thanks,

Kasi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
747

Hi,

Instead of MOVE use WRITE statement.....

REPORT yztest.
DATA: source(10) TYPE p DECIMALS 4 VALUE 100,
destin(256) TYPE c.

*MOVE source TO destin .      
WRITE source TO destin LEFT-JUSTIFIED.
WRITE / destin.

Regards,

Shankar.

6 REPLIES 6
Read only

Former Member
0 Likes
748

Hi,

Instead of MOVE use WRITE statement.....

REPORT yztest.
DATA: source(10) TYPE p DECIMALS 4 VALUE 100,
destin(256) TYPE c.

*MOVE source TO destin .      
WRITE source TO destin LEFT-JUSTIFIED.
WRITE / destin.

Regards,

Shankar.

Read only

0 Likes
747
DATA: source(10) TYPE p DECIMALS 4 VALUE 100,
destin(256) TYPE c.

*MOVE source TO destin .
destin+0(10) = source.
WRITE / destin.
Read only

0 Likes
747

Thanks for your replies guys, but i dont have the option to modify the code becuase this logic is done in standard. I can only decide the data type of source field through config

Thanks,

Kasi

Read only

0 Likes
747

define the source field as string. or some char type field (any left justified data element)

Edited by: Soumyaprakash Mishra on Oct 1, 2009 8:00 PM

Read only

Former Member
0 Likes
747

Thanks

Read only

Clemenss
Active Contributor
0 Likes
747

Hi Kasi,

although alread closed:

Don't worry, source has been moved to destin. If you use a WRITE TO, then it will put it as a numeric value by default right-justified into the output field, so you can see it if you look at destin+240.

Your example is just no use.

Regards,

Clemens