Skip to Content
author's profile photo Former Member
Former Member

reg: 2 questions?

what is the difference between move to and write to ?

what is the purpose of chain statement ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 31, 2007 at 03:01 PM

    Hi Selva,

    Move to would move the contents of the source field directly into the target field, without any conversion routines.

    Write would convert the source into a format that is understandable by the user, based on his settings, into the list output or a target field.

    example:

    data: v_data(8),

    v_date2(10).

    move sy-datum to v_data.

    write:/ v_data.

    write sy-datum to v_date2.

    write:/ v_date2.

    REgards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2007 at 03:02 PM

    what is the difference between move to and write to ?

    move to--> will normally move the data to the target field

    write to--> this will format the data and move

    what is the purpose of chain statement ?

    this is used in module pool programming, when there is an error in a field all the fields will be greyed out on that screen, if we write those fields in CHAIN ENDCHAIN they will not be greayed out and will be available for input

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2007 at 03:04 PM

    Hi,

    What is the difference between move to and write to ?

    Basically both commands will do the same, however with "WRITE TO" conversion routines are used and it's possible to use edit masks:

    See the following example:

    REPORT ztest.

    data: test1(10) type c,

    test2(10) type c.

    START-OF-SELECTION.

    move sy-datum to test1.

    write sy-datum to test2.

    write :/ 'With MOVE :', test1.

    write :/ 'With WRITE:', test2.

    Output:

    With MOVE : 20050726

    With WRITE: 07/26/2005

    What is the purpose of chain statement ?

    To ensure that one or more PAI modules are only called when several screen fields meet a particular condition, you must combine the calls in the flow logic to form a processing chain. You define processing chains as follows:

    CHAIN.

    ...

    ENDCHAIN.

    All flow logic statements between CHAIN and ENDCHAIN belong to a processing chain.

    CHAIN.

    FIELD: <f1>, <f 2>,...

    MODULE <mod1> ON CHAIN-INPUT|CHAIN-REQUEST.

    FIELD: <g1>, <g 2>,...

    MODULE <mod2> ON CHAIN-INPUT|CHAIN-REQUEST.

    ...

    ENDCHAIN.

    The additions ON CHAIN-INPUT and ON CHAIN-REQUEST work like the additions ON INPUT and ON REQUEST that you use for individual fields. The exception is that the module is called whenever at least one of the fields listed in a preceding FIELD statement within the chain meets the condition. So <mod1> is called when one of the fields <fi> meets the condition. <mod2> is called when one of the fields <f i> or <g i> meets the condition.

    Hope this will help.

    Regards,

    Ferry Lianto

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.