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

Why do we have WRITE TO ??

Former Member
0 Likes
540

Move can do all the operations that WRITE TO can do .... then why do we have that option??

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
517

When using WRITE TO, it will apply the formatting that you see in a list display. For example, if you write a date using the WRITE TO, it will apply the user specific formatting.

20061224 -> 12/24/2006

Also if writing type P fields.

1234.00 -> 1,234.00

Regards,

Rich Heilman

4 REPLIES 4
Read only

abdul_hakim
Active Contributor
0 Likes
517

hi

WRITE TO will move the value of the source field to the target field which should be of type character..

but with MOVE TO the target field can be of any type..

Cheers,

Abdul Hakim

Mark all useful answers..

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
518

When using WRITE TO, it will apply the formatting that you see in a list display. For example, if you write a date using the WRITE TO, it will apply the user specific formatting.

20061224 -> 12/24/2006

Also if writing type P fields.

1234.00 -> 1,234.00

Regards,

Rich Heilman

Read only

0 Likes
517

thanks for that answer....

Read only

Former Member
0 Likes
517

read this i think this will help u

You can use either WRITE or MOVE.

Using WRITE the format of the target field will be the same as when you write to a list. That means that the settings in the user's master record for decimal point and date are taking into account.

If you use MOVE, the decimal point is always a periode.

Syntax:

move t1 + offset(length) to t2

write t1 + offset(length) to t2

Example:

data: t1(10) type c, t2(10) type c.

t1 = '0123456789'.

move t1+3(5) to t2.

t2 will contain 34567

Instead of move you could have used write. In this example the result would have been the same.