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

difference b/w move and write.

Former Member
0 Likes
1,043

Hi,

Can anybody please explain ---

using move we can move content from one field to other,

similarly by using write also.

what is the Difference ?

regards,

phani.

1 ACCEPTED SOLUTION
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,017

Hi,

Though both are used to transfer contents of a variable, we should use 'write to' when we need the effect of outputting the variable to list output. (well thats what the documentation says).

You might wonder what the difference is.. suppose we use these methods on a field with conversion exit, it will be clear. Using 'write to', the value is converted using the conversion exit while it is not the case with move.

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

9 REPLIES 9
Read only

Former Member
0 Likes
1,017

Move moves the contents of one variable/constant to another.The statement assign the content of the operand source to the data object destination

Write is a statement that can be used to output the values on the screen as well. This statement writes the content of the data object dobj to the current page of the current list in the list buffer.

Read only

Former Member
0 Likes
1,017

>

> Hi,

>

> Can anybody please explain ---

>

> using move we can move content from one field to other,

>

similarly by using write also.

>

> what is the Difference ?

>

> regards,

> phani.

i dont think we can move content from one field to other by using write.

we can do by using

write to

Edited by: Sathish Reddy on Jan 7, 2009 2:35 PM

Read only

Former Member
0 Likes
1,017

Hi,

The statement WRITE TO has the same effect as the statement WRITE for lists. This statement formats the content of source or the source field specified in source_name as described in the field. It does not, however, store the result in an output area of a list in the list buffer, but instead stores it in a variable. The output length is determined by the length of the variable.

Best Regards,

Deepa Kulkarni

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,018

Hi,

Though both are used to transfer contents of a variable, we should use 'write to' when we need the effect of outputting the variable to list output. (well thats what the documentation says).

You might wonder what the difference is.. suppose we use these methods on a field with conversion exit, it will be clear. Using 'write to', the value is converted using the conversion exit while it is not the case with move.

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

Read only

Former Member
0 Likes
1,017

I think u are mentioning about write to:

Write to: This statement assigns the formatted content of the data object source, or the formatted content of the data object whose name is contained in source_name, to the data object destination.

Read only

Former Member
0 Likes
1,017

Hi,

MOVE is used for transfering data from DB table fields to itab fields

whereas WRITE is used for teansfering itab field values to output.

MOVE can also be used for transfering data to a perticular memory id

Regards,

Phani.

Edited by: Phani Krishna on Jan 7, 2009 2:36 PM

Read only

Former Member
0 Likes
1,017

did u search?

if yes u wud have got these results.

https://www.sdn.sap.com/irj/scn/advancedsearch?query=moveandwrite&cat=sdn_all

кu03B1ятu03B9к

Read only

Former Member
0 Likes
1,017

HI.

The MOVE to copy the contents of one variable to another variable.

but WRITE TO to assign values, the target field is always regarded as a character field, irrespective of its actual type. WRITE...TO behaves in the same way as when you write output to a list.

Regards.

Jay

Read only

Former Member
0 Likes
1,017

Hi,

Write and move statements are used for same purpose, but in write statement the target variable must be of character data type. Source data would be converted to character and placed to target variable.