What is the difference between MOVE var1 TO var2 and var2 = var1? Help!

Hi Experts,
    What is the difference between MOVE var1 TO var2 and var2 = var1?
Thanks
Gopal

Gopal,
  pls. look into it.Good explanation on you requirement.
To assign the value of a data object <f1> to a variable <f2>, use the following statement:
MOVE <f1> TO <f2>.
or the equivalent statement
<f2> = <f1>.
The contents of <f1> remain unchanged. <f1> does not have to be a variable - it can also be a literal, a text symbol, or a constant. You must always specify decimal points with a period (.), regardless of the user’s personal settings.
Multiple value assignments in the form
<f4> = <f3> = <f2> = <f1>.
are also possible. ABAP processes them from right to left as follows:
MOVE <f1> TO <f2>.
MOVE <f2> TO <f3>.
MOVE <f3> TO <f4>.
In the MOVE statement (or when you assign one value to another with the equal sign), it is not possible to specify the field names dynamically as the contents of other fields. If you need to do this, you must use field symbols .
There are three possible outcomes of assigning <f1> to <f2>:
The data objects <f1> and <f2> are fully compatible, that is, their data types, field length, and number of decimal places are identical. The contents of source field <f1> are transferred byte by byte into the target field <f2> without any further manipulation. The MOVE statement is most efficient when this is the case.
The data objects <f1> and <f2> are incompatible. This is the case, for example, if the two fields have the same type, but different lengths. The contents of the source field <f1> are converted so that they are compatible with the data type of <f2>, and are then transferred. This procedure only works if a conversion rule exists between the data types of <f1> and <f2>. Type conversions make the MOVE statement less efficient. How much less efficient depends on the individual conversion.
The data objects <f1> and <f2> are incompatible, and no conversion is possible. The assignment is not possible. If this can be recognized statically, a syntax error occurs. If it is not recognized before the program is run, a runtime error occurs.
The source and target fields can be of different data types. In contrast to other programming languages, where the assignment between different data types is often restricted to a small number of possible combinations, ABAP provides a wide range of automatic type conversions.
For example, the contents of a source field with an elementary data type can be assigned to a target field with any other data type. The single exception to this rule is that it is not possible to assign values between type D fields and type T fields. ABAP even supports assignments between a structure and an elementary field, or between two structures.
DATA: T(10) TYPE C,
      NUMBER TYPE P DECIMALS 2,
      COUNT  TYPE I.
T = 1111.
MOVE '5.75' TO NUMBER.
COUNT = NUMBER.
Following these assignments, the fields T, NUMBER, and COUNT have the values ‘1111      ’, 5.75, and 6 respectively. When you assign the number literal 1111 to T, it is converted into a character field with length 10. When you assign NUMBER to COUNT, the decimal number is rounded to an integer (as long as the program attribute Fixed pt. arithmetic has been set).
Pls. reward if useful

Similar Messages

  • What is the difference between MOVE and WRITE TO ststement?

    Hi
    What is the difference between MOVE and WRITE TO ststement?
    When do we use both of them?
    Thank You

    Hi,
    <b>MOVE</b>
    Syntax
    MOVE source {TO|?TO} destination.
    destination {=|?=} source.
    Effect
    Both these statements assign the content of the operand source to the data object destination. The variants with the language element TO or the assignment operator = are valid for all assignments between operands that are not reference variables, and for assignments between reference variables for which the static type of source is more specific than or the same as the static type of destination(narrowing cast).
    Variants with the language element ?TO or the assignment operator ?= (casting operator ) must be used if the source and destination are reference variables and the static type of source is more general than the static type of destination (widening cast). For assignments between operands that are not reference variables, use of the question mark ? is not permitted.
    The data object destination can be any data object that can be listed at a write position, and the data object source can be a data object, a predefined function or a functional method (as of release 6.10). The data type of the data object destination must either be compatible with the data type of source, or it must be possible to convert the content of source into the data type of destination according to one of the conversion rules.
    Notes
    If source and/or destination are field symbols, then, as in all ABAP commands, the system works with the content of the data objects to which the field symbols point. The actual pointer content of a field symbol can only be changed using the statement ASSIGN or the addition ASSIGNING when processing internal tables (value semantics). If source and destination are reference variables, the reference contained in source is assigned to destination (reference semantics).
    Strings and internal tables are addressed internally using references. When assignments are made between strings and between internal tables (as of release 6.10), only the reference is transferred, for performance reasons. After the assignment, the actual string or the actual table body of the source as well as the target object are addressed (sharing). When the object is accessed to change it, the sharing is canceled and a copy of the content is made. The sharing is displayed in the memory consumption display of the ABAP debugger and in the Memory Inspector tool (as of release 6.20).
    Obsolete Form: MOVE PERCENTAGE
    Exceptions
    Catchable Exceptions
    CX_SY_CONVERSION_NO_NUMBER
    Cause: Operand cannot be interpreted as number
    Runtime Error: CONVT_NO_NUMBER (catchable)
    CX_SY_CONVERSION_OVERFLOW
    Cause: Overflow with arithmetic operation (type P, with specified length)
    Runtime Error: BCD_FIELD_OVERFLOW (catchable)
    Cause: Operand too large or (intermediate) result too large
    Runtime Error: CONVT_OVERFLOW (catchable)
    CX_SY_MOVE_CAST_ERROR
    Cause: Source or target variable are not reference variables
    Runtime Error: MOVE_CAST_REF_ONLY
    Non-Catchable Exceptions
    Cause: Source field (type P) does not contain correct BCD format.
    Runtime Error: BCD_BADDATA
    Cause: Assignment for deep structures not permitted if these overlap.
    Runtime Error: MOVE_COMPLEX_OVERLAP
    Cause: Type conflict with the assignment between object references.
    Runtime Error: MOVE_INTERFACE_NOT_SUPPORTED,
    Runtime Error: MOVE_IREF_NOT_CONVERTIBLE,
    Runtime Error: MOVE_IREF_TO_OREF,
    Runtime Error: MOVE_OREF_NOT_CONVERTIBLE
    Cause: Type conflict with the assignment between data references.
    Runtime Error: MOVE_DREF_NOT_COMPATIBLE
    Cause: Assignment between the types involved not supported.
    Runtime Error: MOVE_NOT_SUPPORTED
    Cause: Constants and literals must not be overwritten.
    Runtime Error: MOVE_TO_LIT_NOTALLOWED
    Cause: onstants and literals must not be overwritten.
    Runtime Error: MOVE_TO_LIT_NOTALLOWED_NODATA
    Cause: During a loop in an internal table, an attempt was made to overwrite a reference variable that is linked with the internal table by REFERENCE INTO.
    Runtime Error: MOVE_TO_LOOP_REF
    <b>Write</b>
    Syntax Diagram
    WRITE - TO
    Syntax
    WRITE {source|(source_name)} TO destination
                                 [int_format_options].
    Effect:
    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. The data objects source_name and destination must be character type and flat. source_name can contain the name of the data object to be assigned in upper or lower case. If the data object specified in source_name does not exist, the assignment is not executed, and sy-subrc is set to 4.
    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.
    The same additions int_format_options can be specified for formatting the content as in the statement WRITE for lists, except for NO-GAP and UNDER.
    System fields
    sy-subrc Meaning
    0 The data object specified in source_name was found and the assignment was executed.
    4 The data object specified in source_name was not found and the assignment was not executed.
    For the static specification of source, sy-subrc is not set.
    Note:
    If destination is specified as an untyped field symbol or an untyped formal parameter, and is not flat and character-type when the statement is executed, this leads to an untreatable exception in a Unicode program. In non-Unicode programs, this only leads to an exception for deep types. Flat types are handled as character-type data types.
    Example:
    After the assignment, the variables date_short and date_long receive the current date in the order specified in the user master record. The variable date_long also contains the defined separators, as the output length is sufficiently long. The content of the variable date_mask is formatted according to the formatting addition DD/MM/YY.
    DATA: date_short(8) TYPE c,
          date_long(10) TYPE c,
          date_mask(8)  TYPE c.
    WRITE sy-datum TO: date_short,
                       date_long,
                       date_mask DD/MM/YY.
    Exceptions
    Non-Catchable Exceptions
    Cause: Negative length specified for offset/length
    Runtime Error: WRITE_TO_LENGTH_NEGATIVE
    Cause: Negative offset specified in offset/length
    Runtime Error: WRITE_TO_OFFSET_NEGATIVE
    Cause: Offset specified in offset/length specification is longer than the field length.
    Runtime Error: WRITE_TO_OFFSET_TOOLARGE
    Thanks
    sunil

  • What is the difference between SAP NW PI7.1 and PI7.1 EHP1

    We have a customer using SAP PI7.1 EHP1. The application to be deployed
    isdeveloped on SAP Netweaver PI 7.1 SP06.
    We need to know if application developed and transported from PI7.1 is
    compatible with EHP1?
    Below are the Components used by the application .
    1) SSL communication using SOAP adapter
    2) Java mapping , Graphical mapping , XSLT mapping
    3) Customised EJB modules
    4) Adapter framework
    5) ALE layer for IDoc communication from ERP to PI
    6) RFC lookups to PI system and ERP system.
    Questions
    1)Will PI EHP1 be able to communicate with PI7.1 using SOAP adapter ?
    2) What is the difference between SAP NW PI7.1 and PI7.1 EHP1 ?
    Regards,
    Sneha

    Hi,
    EHP Pi7.1 new
    IPv6 Support in SAP Systems (new)
    Async/Sync and Sync/Async Bridge in the JMS Adapter (New)
    High Availability (New)   Locate the document in its SAP Library structure
    Use
    A new concept is available for setting up a high availability environment for SAP NetWeaver Process Integration (PI). To do this, you need SAP Web Dispatcher for load balancing, and you must reconfigure your HTTP, RFC, and RMI connections so that they can be used for load balancing. You must also make various configuration steps in other components of your PI environment.
    [Level 4: Document: XML to Text Conversion Module (New)] XML to Text Conversion Module (New)
    Message Packaging (New)
    Monitoring Milestones (New)   Locate the document in its SAP Library structure
    Use
    You can use the new scenario variant Monitoring Milestones of the Business Process Management scenario to define a monitoring process that can monitor events from different applications. A monitoring process can subscribe to events from SAP or non-SAP systems.
    check  given Link
    http://help.sap.com/saphelp_nwpi711/helpdata/en/61/8c3842bb58f83ae10000000a1550b0/frameset.htm
    Regards,
    Amit

  • What is the difference between component(Y, Pb, Pr) and component(R,G,B)?

    [I previously posted this question in another thread as hadn't realised how to post new question]
    Q. What is the difference between component (Y, Pb, Pr) and component (R,G,B) ?
    I’d previously thought I was reasonably savvy on all things HD, but when I turned my thoughts to looking into getting a mac mini to run part of my home cinema I realise I have some confusions around the above.
    Here’s what I think I know:-
    The mac mini has a DVI output of the type which can output both digital and analogue, and so via physical adapters it could be used to connect to displays that take HDMI or VGA style RGB leads.
    I know on the market I can get a DVI to Component cable lead which would therefore lead me to assume it could drive my HD plasma with component input (Y,Pb,Pr), as I currently drive the HD TV via component cable with a SKY HD box (720p and 1080i), an xbox 360 (720p) and a progressive scan DVD player (480p), all through a Denon AV-amp.
    The problem is, I’ve heard somewhere that the DVI to component is R,G,B only and that it is not Y, Pb, Pr which is making me wonder it a) this will work and b) if I really understand component video afterall.
    I notice the Apple TV outputs Y,Pb,Pr but colours them red, green and blue, so am even more confused….
    Hopefully someone can help educate me on this !

    Thanks for this.
    My Plasma is a Panasonic 42" Viera March 2005 model. No HDMI, No VGA.
    It can process signals up to 720p and 1080i via the component (an interestingly it makes a huge difference over SD even though the native panel is 480..!?!)
    Am I right in thinking that the iPod component cable will also be R,G,B and therefor might be a suitable trial? Ie. if the TV accepts the input from the iPod then it should work for the mini?
    Only other thing of note is I'm doing all this via my Denon 1707 AV amp which does have the facility of upscaling, but I imagine it needs to stick to one format?
    Thanks.

  • What is the difference between Safari 5.1.7 and 5.1.10? I can not log on to my website, so that their customer service has said that they are using Safari 5.1.7, and I use 5.1.10 (which I have installed on my computer, Mac)

    what is the difference between Safari 5.1.7 and 5.1.10?
    I can not log on to my website, so that their customer service has said that they are using Safari 5.1.7, and I use 5.1.10 (which I have installed on my computer, Mac)

    Might be the security fixes >  Safari 5.1.10 for Snow Leopard

  • What is the difference between j2sdk1.4.1_03/jre and j2re1.4.1_03?

    Hi,all!
    What is the difference between j2sdk1.4.1_03/jre and j2re1.4.1_03?
    Why there have two JRE? Which one we should use?

    JRE - Java Runtime Enviroment, what you stick on the end-user computers - http://www.java.com
    SDK - Software Development Kit (aka JDK - Java Developer Kit) - http://java.sun.com

  • What is the difference between 11.1.0.1 And  11.1.0.1.1

    What is the difference between 11.1.0.1 And 11.1.0.1.1

    11.1.0.1 is the base version of Oracle installed on the system.
    11.1.0.1.1 is the version of PSU (patch set update) applied to the base release version.
    Take a look at this http://docs.oracle.com/cd/B28359_01/server.111/b28310/dba004.htm

  • What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    MD199 is as shown below. The other number is not an Apple model number.
    OVERVIEW
    Introduced     March 2012 (A1427) March 2013 (A1469)
    Discontinued     --
    Model Identifier     AppleTV3,1 (A1427) or AppleTV3,2 (A1469)
    Model Number     A1427 or A1469
    EMC     2528
    Order Number     MD199LL/A

  • What is the difference  between apple care protection plan and apple care

    What is the difference between apple care protection plan and apple care +

    apple care protection plan
    That is the extended warranty (total of 3 years including the standard warranty for the first year) for any Mac computer.
    apple care +
    That is the extended warranty (total of 2 years including the standard warranty for the first year) for any iDevice (iPad, iPhone, etc).
    For either, the standard warranty is usually referred to as hardware warranty (not Applecare); see an example for the warranty for an iMac:
    http://www.apple.com/legal/warranty/products/embedded-mac-warranty-us.html
    whereas the extended Applecare is referred to as that:
    http://www.apple.com/legal/sales-support/

  • What's the difference between tax account in FTXP and OB40

    Hi all,
    There are two tax accounts link to same tax code in FTXP for different company codes, but in OB40 I only can assign one account to tax code. What's the difference between tax account in FTXP and OB40?
    Thanks in advance.
    babyyw
    Edited by: babyyw on May 5, 2010 8:21 AM

    Hi,
    FTXP no need to create a request and it is easy but in OB40 system will ask you create request. and another thing is in FTXP it is at country level but in OB40 it is at chart of accounts level.

  • What are the differences between Turn in Final Timesheet and the other option: Send Progress for Selected Tasks?

    Hello,
    The resource filled his/her timesheet in PWA. 
    Now : 
    What are the differences between Turn in Final Timesheet
    and the other option: Send Progress for Selected Tasks?
    Thanks

    You are partially correct and partially wrong.
    Turn
    in Final Timesheet sends
    the timesheet to the Timesheet Manager for Approval
    but task update always goes to Status manger of the task. Taks manager you can see in MPP(insert status manager field then check)
    Yes
    after approval progress will be available in MPP as well as in Projectweb app as % complete . 
    Send
    Progress for Selected Tasks 
    Send progress of selected task to status manager after approval update will be available in both MPP and Projectweb
    app as % complete.
    In Send
    Progress for Selected Tasks Timesheet
    Manager doesn't receive anything in his Approval center
    because all the update directly go to Status manager Approval center.
    Here you have to understand
    that there are two role Timesheet Manager(for timesheet approval) and Status manager(for task
    actual approval) 
    kirtesh

  • What's the difference between e.g. dialog listbox and regular listbox?

    What's the difference between e.g. dialog listbox and regular listbox?

    Dialog controls use platform specific drawing functions and cannnot be customized (change the color, etc). They often assume specific system colors.
    For example, place a dialog list box and a regular list box on your front panel. Now go to your Display control panel in windows and change the color scheme in the appearance tab. You will see that the dialog list box will change the color according to the selected scheme while the regular list box remains the same.
    Now use your labview color tool and try to change the color of each. You will be able to change the color of the regular list box, but not of the dialog list box.
    Functionally they are the same, the differences are cosmetic.
    LabVIEW Champion . Do more with less code and in less time .

  • What's the difference between Flash Builder 4.5 and Flash Builder 4.7?

    Hi everybody!
    Could you help me?
    this is my question:
    What's the difference between Flash Builder 4.5 and Flash Builder 4.7?
    I'm going to develope a new app using Flash Builder 4.5 but the new version is available... What could I wait about it?

    The only listed change is the addition of support for the new Nike + iPod system (more information about the Nike products can be found here).

  • What is the difference between sales order with picking and without picking

    hi friends,
    i would like to know what is the difference between sales order with picking and without picking.
    thanks
    skrishnan

    Hello,
    Picking refers to preparing the right quantity and quality of goods for shipping on schedule as required by the customer.
    Once picking is configured, SAP Sd automatically generates picking lists and picking labels which can be tagged to the relevant goods. SAP can be configured to ensure that picked quantity is confirmed before goods are issued. This can be done using transaction code VSTK. In T-code VSTK, picking confirmations can be set, which ensure that goods picked for delivery are in accordance with picking slips.
    Picking thus helps in monitoring each item using the picking status. Picking is normally done in SAP SD by a shipping clerk.
    Prase

  • What is the difference between "viewable/ printable payment history" and my "payments received history"? Shouldn't my "payments received" (money verizon got from me) be my "payment history"be my

    What is the difference between "viewable/ printable payment history" and my "payments received history"? Shouldn't my "payments received" (money verizon got from me) be my "payment history"?

    I have not directly myself. One of the reps put me on hold while they said they spoke to finical services. He said they would not turn off my phone while he (the rep) looked into the problem. He couldn't give me a phone # to call him back the next day and told me he would call me instead on my home land line phone #. But what I got the next day was a text message that started with" DO NOT RESPOND" to this text message and it said that I was past due on my account, and that it was due immediately. signed out again with only his first name and no phone # again. Thing is he promised he could help in my first conversation with him, where I had started with "can I speak with a supervisor as I did not want to have to repeat the whole spiel again as he was going to be my third time". He said he was authorized to take care of all & any problems and I did not need a supervisor. I took him at his word and said OK. Turns out like I said earlier…I wasted 2 hours on the phone. Can't find him as I don't know what call center and no last name. I should have gotten that up info front. Hindsight is 20/20.

Maybe you are looking for

  • I can't link my homesharing to my apple tv. i'm on windows 7. is that the problem?

    Can anyone help. I bought apple tv yesterday, but everytime I enter my apple id on the screen of apple TV it says not recognised. it is working on all other devices, including 'homeshare' on itunes. Is there something in windows 7 is the problem?

  • How to make a block appear / disappear at runtime ?

    Hello, I'd like to make a whole block appear and disappear at runtime. The block has no "visible" property, nor has the frame surrounding it on the canvas. Of course I can set this property for each item in the block, but I would like to find somethi

  • Cant find imovie, iphoto and the rest of ilife app

    Hello! A few days ago I got my macbook pro (late 2011). I delivered it to the service and when i got it back I cant find imovie, iphoto, garage band that I had before i delivered it to the service. What has happend and how do I get these programs bac

  • How to install Apache Web Server with PHP on Sun Solaris Sparc machine

    Hi, We are trying to install the Apache Web Server and the PHP package on a Sun Solaris Sparc machine running on SunOS 5.8. We are having compilation problems with the source code of both these packages. Does anybody know if there are ready solaris p

  • Alert in integration process

    Hi, is it possible to use alert-monitoring in the integration process? Does anybody know if there exist a blog of this theme? Thanks. Regards. Stefan