Diff between AT new and on change of

hi,
can any one tell me what is the exact difference between <b>AT new</b> and <b>on change of</b>
thanks
pavan

hi
good
In a LOOP which processes a dataset created with EXTRACT, you can use special control structures for control break processing. All these structures begin with AT and end with ENDAT. The sequence of statements which lies between is executed whenever a control break occurs.
You can use these key words for control break processing with extract datasets only if the active LOOP statement is processing an extract dataset.
The control level structure with extract datasets is dynamic. It corresponds exactly to the sort key of the extract dataset, i.e. to the order of fields in the field group HEADER by which the extract dataset was sorted.
At the end of a control group ( AT END OF, AT LAST), there are two types of control level information between AT and ENDAT:
If the sort key of the extract dataset contains a non-numeric field h (particularly in the field group HEADER), the field CNT(h) contains the number of control breaks in the (subordinate) control level h.
For extracted number fields g (see also ABAP Number Types), the fields SUM(g) contain the relevant control totals.
Notes
The fields CNT(h) and SUM(g) can only be addressed after they have been sorted. Otherwise, a runtime error may occur.
The fields CNT(h) and SUM(g) are filled with the relevant values for a control level at the end of each control group ( AT END OF, AT LAST), not at the beginning (AT FIRST, AT NEW).
When calculating totals with SUM(g), the system automatically chooses the maximum field sizes so that an overflow occurs only if the absolute value area limits are exceeded.
You can also use special control break control structures with LOOPs on internal tables.
Variant 1
AT NEW f.
Variant 2
AT END OF f.
Effect
f is a field from the field group HEADER. The enclosed sequence of statements is executed if
the field f occurs in the sort key of the extract dataset (and thus also in the field group HEADER) and
the field f or a superior sort criterion has a different value in the current LOOP line than in the preceding (AT NEW) or subsequent (AT END OF) record of the extract dataset.
If f is not an assigned field symbol, the control break criterion is ignored, and the subsequent sequence of statements is not executed. If a field symbol is assigned, but does not point to the HEADER field group, the system triggers a runtime error.
Example
DATA: NAME(30),
      SALES TYPE I.
FIELD-GROUPS: HEADER, INFOS.
INSERT: NAME  INTO HEADER,
        SALES INTO INFOS.
LOOP.
  AT NEW NAME.
    NEW-PAGE.
  ENDAT.
  AT END OF NAME.
    WRITE: / NAME, SUM(SALES).
  ENDAT.
ENDLOOP.
Notes
If the extract dataset is not sorted before processing with LOOP, no control level structure is defined and the statements following AT NEW or AT END OF are not executed.
Fields which stand at hex zero are ignored by the control break check with AT NEW or AT END OF. This corresponds to the behavior of the SORT statement, which always places unoccupied fields (i.e. fields which stand at hex zero) before all occupied fields when sorting extract datasets, regardless of whether the sort sequence is in ascending or descending order.
Variant 3
AT FIRST.
Variant 4
AT LAST.
Effect
Executes the relevant series of statements just once - either on the first loop pass (with AT FIRST) or on the last loop pass (with AT LAST).
Variant 5
AT fg.
Addition:
... WITH fg1
Effect
This statement makes single record processing dependent on the type of extracted record.
The sequence of statements following AT fg are executed whenever the current LOOP record is created with EXTRACT fg (in other words: when the current record is a fg record).
Addition
... WITH fg1
Effect
Executes the sequence of statements belonging to AT fg WITH fg1 only if the record of the field group fg in the dataset is immediately followed by a record of the field group fg1.
thanks
mrutyun^

Similar Messages

  • Diff between at-new and on-change of in loop events

    diff between <b>at-new</b> and <b>on-change of</b> in loop events

    Hello,
    <b>ON CHANGE OF f.
    Normally, you use the statement to manipulate database fields during GET events or SELECT/ENDSELECT processing.
    AT NEW
    There are special control structures for processing control breaks in LOOP s on internal tables or extract datasets (AT).</b>
    ON CHANGE OF f.
    Executes the processing block enclosed by the "ON CHANGE OF f" and "ENDON" statements whenever the contents of the field f change (control break processing).
    Normally, you use the statement to manipulate database fields during GET events or SELECT/ENDSELECT processing.
    ON CHANGE OF is unsuitable for recognizing control levels in loops of this type because it always creates a global auxiliary field which is used to check for changes. This global auxiliary field is only changed in the relevant ON CHANGE OF statement. It is not reset when the processing enters loops or subroutines, so unwanted effects can occur if the loop or subroutine is executed again. Also, since it is set to its initial value when created (like any other field), any ON CHANGE OF processing will be executed after the first test, unless the contents of the field concerned happen to be identical to the initial value.
    Example
    TABLES T100.
    SELECT * FROM T100 WHERE SPRSL = SY-LANGU AND
                             MSGNR < '010'
                       ORDER BY PRIMARY KEY.
      ON CHANGE OF T100-ARBGB.
        ULINE.
        WRITE: / '**', T100-ARBGB, '**'.
      ENDON.
      WRITE: / T100-MSGNR, T100-TEXT.
    ENDSELECT.
    Displays all messages with their numbers in the logon language, provided the number is less than '010'.
    Each time the message class changes, it is output.
    AT NEW f.
    f is a field from the field group HEADER. The enclosed sequence of statements is executed if the field f occurs in the sort key of the extract dataset (and thus also in the field group HEADER) and the field f or a superior sort criterion has a different value in the current LOOP line than in the preceding (AT NEW) or subsequent (AT END OF) record of the extract dataset.
    If f is not an assigned field symbol, the control break criterion is ignored, and the subsequent sequence of statements is not executed. If a field symbol is assigned, but does not point to the HEADER field group, the system triggers a runtime error.
    Example
    DATA: NAME(30),
          SALES TYPE I.
    FIELD-GROUPS: HEADER, INFOS.
    INSERT: NAME  INTO HEADER,
            SALES INTO INFOS.
    LOOP.
      AT NEW NAME.
        NEW-PAGE.
      ENDAT.
      AT END OF NAME.
        WRITE: / NAME, SUM(SALES).
      ENDAT.
    ENDLOOP.
    Notes
    If the extract dataset is not sorted before processing with LOOP, no control level structure is defined and the statements following AT NEW or AT END OF are not executed.
    Reward if helpful,
    Regards,
    LIJO

  • Difference between At-new and on change of

    Hi,
    Can anyone send me the exact difference between At-new and On change of
    Thank You
    Santosh

    Hi anjali,
    I just entered your subject "difference between At-new and on change of" as search terms in the SEARCH FORUM input field.
    Please check the results and come back after.
    Difference between At new and On change of?
    Posted on: 28.09.2006 19:01, by user: subhash soni -- Relevance: 100% -- Show all results within this thread
    Hi What is the difference between At new and On change of? Thank You
    difference between At-new and on change of
    Posted on: 09.03.2007 20:16, by user: anjali nalluri -- Relevance: 89% -- Show all results within this thread
    Hi, Can anyone send me the exact difference between At-new and On change of Thank You Santosh
    Diff between AT new and on change of
    Posted on: 30.11.2006 16:06, by user: Pavan Ravikanti -- Relevance: 53% -- Show all results within this thread
    hi, can any one tell me what is the exact difference between <b>AT new</b> and <b>on change of</b> thanks pavan ...
    Diff. between At New and On Change Of
    Posted on: 05.10.2005 08:58, by user: surya mamtha -- Relevance: 48% -- Show all results within this thread
    Hi, Could anybody exlain the difference between At New event and On Change Of event in detail? And how can we avoid the inner loops ...
    Major Diff. Between On change of and At New
    Posted on: 24.05.2006 12:48, by user: IFF -- Relevance: 46% -- Show all results within this thread
    Hi Experts, Could you please let me know that what is the major difference between the control break statements On change of and At new. Which one is best to used ...
    diff between at new and on change of
    Posted on: 08.03.2007 16:27, by user: saroja ponnam -- Relevance: 44% -- Show all results within this thread
    Hi all, what is the main diff between at new and on change of statements. Regards Saroja.
    Differnce between AT NEW AND ON CHANGE OF
    Posted on: 06.05.2006 10:55, by user: Raja Sekhar T -- Relevance: 44% -- Show all results within this thread
    Hi, Differnce between AT NEW AND ON CHANGE OF Iam waiting foryour reply Thanks & Regards Raja Sekhar.T ...
    Regards,
    Clemens

  • What is the exact diff between  At New  and On Chnage

    hello all
    what is the exact diff between  At New  and On Chnage in control breaks statements. and when  shall we go for At new & when shall we go for On change on events.
    Plz tell with with some code.

    Hi ,
    Using at new
    Each time the value of c changes, the lines of code between at new and endat are executed. This block is also executed during the first loop pass or if any fields to the left of c change. Between at and endat, the numeric fields to the right of c are set to zero. The non-numeric fields are filled with asterisks (*). If there are multiple occurrences of at new, they are all executed. at end of behaves in a similar fashion.
    Using the on change of Statement
    Another statement you can use to perform control break processing is on change of. It behaves in a manner similar to at new.
    The following points apply:
    u2022     If the value of any of the variables (v1, v2, and so on) changes from one test to the next, the statements following on change of are executed.
    u2022     If no change is detected and else is specified, the statements following else are executed.
    on change of differs from at new in the following respects:
    u2022     It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    u2022     A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    u2022     When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    u2022     When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    u2022     You can use else between on change of and endon.
    u2022     You can use it with loop at it where . . ..
    u2022     You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    u2022     Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    Regards,
    KV

  • Diff bt  AT NEW  and ON CHANGE OF

    can any one explain me diff bt  AT NEW  and ON CHANGE OF
    Thanks and regards,
    venki..

    Hi
    Both will do the same function
    ON CHANGE OF is not used much now-a-days.
    see the sample for At new
    All this AT NEW, AT FIRST, AT END OF and AT LAST are called control break statements of Internal tables and are used to calculate the TOTALS based on sertain key fields in that internal table
    FIrst to use these statements the ITAB has to be sorted by the key fields on whcih you need the SUM of the fields.
    Some time you will get * when mopving data from this int table to other table using these commands
    so you have to use
    READ TABLE ITAB INDEX SY-TABIX in AT..ENDAT..if you are using other fields between them
    DATA: sflight_tab TYPE SORTED TABLE OF sflight
                      WITH UNIQUE KEY carrid connid fldate,
          sflight_wa  LIKE LINE OF sflight_tab.
    SELECT *
           FROM sflight
           INTO TABLE sflight_tab.
    LOOP AT sflight_tab INTO sflight_wa.
      AT NEW connid.
        WRITE: / sflight_wa-carrid,
                 sflight_wa-connid.
        ULINE.
      ENDAT.
      WRITE: / sflight_wa-fldate,
               sflight_wa-seatsocc.
      AT END OF connid.
        SUM.
        ULINE.
        WRITE: / 'Sum',
                  sflight_wa-seatsocc UNDER sflight_wa-seatsocc.
        SKIP.
      ENDAT.
      AT END OF carrid.
        SUM.
        ULINE.
        WRITE: / 'Carrier Sum',
                  sflight_wa-seatsocc UNDER sflight_wa-seatsocc.
        NEW-PAGE.
      ENDAT.
      AT LAST.
        SUM.
        WRITE: / 'Overall Sum',
                  sflight_wa-seatsocc UNDER sflight_wa-seatsocc.
      ENDAT.
    ENDLOOP.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • What is the perfect defference between AT NEW and ON CHANGE...

    What is the perfect defference between AT NEW and ON CHANGE...?

    hi vijay,
    if u use 'at-new' statement , basically it dont pick first record of the itab where as 'on chage of' can pick from first record.
    all these control brake statements can work with header line except 'on change of' event.
    regards..
    seshu.
    Jogdand M B  
    Hi,
    At New.
    Effect
    Beginning or end of a group of lines with the same content in the component comp1 comp2 ... and in the components to the left of comp1 comp2 .... The components comp1 comp2 ... can be specified, as described in the section Specification of Components, with the limitation that access to object attributes is not possible here.
    Example:
    LOOP AT itab result ...
        [AT NEW comp1.
         ENDAT.
    endloop.
    On Change of:
    Effect:
    The statements ON CHANGE OF and ENDON, which are forbidden in classes, define a control structure that can contain a statement block statement_block. After ON CHANGE OF, any number of data objects dobj1, dobj2... of any data type can be added..
    Example:
    In a SELECT loop, a statement block should only be executed if the content of the column CARRID has changed.
    DATA spfli_wa TYPE spfli.
    SELECT *
           FROM spfli
           INTO spfli_wa
           ORDER BY carrid.
      ON CHANGE OF spfli_wa-carrid.
      ENDON.
    ENDSELECT.

  • Difference between At new and on change statement?

    What is the difference between at new and on change statement? Please explain with an example.

    hi
    on change of differs from at new in the following respects:
    It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    You can use else between on change of and endon.
    You can use it with loop at it where . . ..
    You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    REGARDS
    PRASANTH

  • Differnce between AT NEW AND ON CHANGE OF

    Hi,
    Differnce between AT NEW AND ON CHANGE OF
    Iam waiting foryour reply
    Thanks & Regards
    Raja Sekhar.T

    Hai Raja
    check the following Documents
    1. AT NEW f.
    2. AT END OF f.
    3. AT FIRST.
    4. AT LAST.
    5. AT fg.
    Effect
    In a LOOP which processes a dataset created with EXTRACT , you can use special control structures for control break processing. All these structures begin with AT and end with ENDAT . The sequence of statements which lies between them is then executed if a control break occurs.
    You can use these key words for control break processing with extract datasets only if the active LOOP statement is proceesing an extract dataset.
    The control level structure with extract datasets is dynamic. It corresponds exactly to the sort key of the extract dataset, i.e. to the order of fields in the field group HEADER by which the extract dataset was sorted .
    At the end of a control group ( AT END OF , AT LAST ), there are two types of control level information between AT and ENDAT :
    If the sort key of the extract dataset contains a non-numeric field h (particularly in the field group HEADER ), the field CNT(h) contains the number of control breaks in the (subordinate) control level h .
    For extracted number fields g (see also ABAP/4 number types ), the fields SUM(g) contain the relevant control totals.
    Notes
    The fields CNT(h) and SUM(g) can only be addressed after they have been sorted. Otherwise, a runtime error may occur.
    The fields CNT(h) and SUM(g) are filled with the relevant values for a control level at the end of each control group ( AT END OF , AT LAST ), not at the beginning ( AT FIRST , AT NEW ).
    When calculating totals with SUM(g) , the system automatically chooses the maximum field sizes so that an overflow occurs only if the absolute value area limits are exceeded.
    You can also use special control break control structures with LOOP s on internal tables.
    Variant 1
    AT NEW f.
    Variant 2
    AT END OF f.
    Effect
    f is a field from the field group HEADER . The enclosed sequence of statements is executed if
    the field f occurs in the sort key of the extract dataset (and thus also in the field group HEADER ) and
    the field f or a superior sort criterion has a different value in the current LOOP line than in the prceding ( AT NEW ) or subsequent ( AT END OF ) record of the extract dataset.
    Example
    DATA: NAME(30),
          SALES TYPE I.
    FIELD-GROUPS: HEADER, INFOS.
    INSERT: NAME  INTO HEADER,
            SALES INTO INFOS.
    LOOP.
      AT NEW NAME.
        NEW-PAGE.
      ENDAT.
      AT END OF NAME.
        WRITE: / NAME, SUM(SALES).
      ENDAT.
    ENDLOOP.
    Notes
    If the extract dataset is not sorted before processing with LOOP , no control level structure is defined and the statements following AT NEW or AT END OF are not executed.
    Fields which stand at hex zero are ignored by the control break check with AT NEW or AT END OF . This corresponds to the behavior of the SORT statement, which always places unoccupied fields (i.e. fields which stand at hex zero) before all occupied fields when sorting extract datasets, regardless of whether the sort sequence is in ascending or descending order.
    Variant 3
    AT FIRST.
    Variant 4
    AT LAST.
    Effect
    Executes the relevant series of statements just once - either on the first loop pass (with AT FIRST ) or on the last loop pass (with AT LAST ).
    Variant 5
    AT fg.
    Addition
    ... WITH fg1
    Effect
    This statement makes single record processing dependent on the type of extracted record.
    The sequence of statements following AT fg are executed whenever the current LOOP record is created with EXTRACT fg (in other words: when the current record is a fg record).
    Addition
    ... WITH fg1
    Effect
    Executes the sequence of statements belonging to AT fg WITH fg1 only if the record of the field group fg in the dataset is immediately followed by a record of the field group fg1 .
    Basic form
    ON CHANGE OF f.
    Addition
    ... OR f1
    Effect
    Executes the processing block enclosed by the " ON CHANGE OF f " and " ENDON " statements whenever the contents of the field f change (control break processing).
    Normally, you use the statement to manipulate database fields during GET events or SELECT / ENDSELECT processing.
    Note
    There are special control structures for processing control breaks in LOOP s on internal tables or extract datasets AT ).
    ON CHANGE OF is unsuitable for recognizing control levels in loops of this type because it always creates a global auxiliary field which is used to check for changes. This global auxiliary field can only be changed in the relevant ON CHANGE OF statement. It is not reset when the processing goes into loops or subroutines, so unwanted effects can occur if the loop or subroutine is executed again. Also, since it is set to its initial value when created (like any other field), any ON CHANGE OF processing will be executed after the first test, unless the contents of the field concerned happen to be identical to the initial value.
    Example
    TABLES T100.
    SELECT * FROM T100 WHERE SPRSL = SY-LANGU AND
                             MSGNR < '010'
                       ORDER BY PRIMARY KEY.
      ON CHANGE OF T100-ARBGB.
        ULINE.
        WRITE: / '**', T100-ARBGB, '**'.
      ENDON.
      WRITE: / T100-MSGNR, T100-TEXT.
    ENDSELECT.
    Displays all messages with their numbers in the logon language, provided the number is less than '010'.
    Each time the message class changes, it is output.
    Addition
    ... OR f1
    Effect
    Also executes the code whenever the contents of the field f1 changes.
    You can use this addition several times.
    Example
    Logical database F1S
    TABLES: SPFLI, SFLIGHT, SBOOK.
    GET SBOOK.
      ON CHANGE OF SPFLI-CARRID   OR
                   SPFLI-CONNID   OR
                   SFLIGHT-FLDATE.
        ULINE.
        WRITE: /5 SPFLI-CARRID, SPFLI-CONNID,
                5 SFLIGHT-FLDATE, SPFLI-FLTIME,
                5 SFLIGHT-SEATSMAX, SFLIGHT-SEATSOCC.
      ENDON.
      WRITE: / SBOOK-CUSTOMID.
    The code between ON CHANGE OF and ENDON is executed only if at least one of the fields SPFLI-CARRID , SPFLI-CONNID or SFLIGHT-FLDATE has changed, i.e. there is a different flight connection (which also has bookings).
    Notes
    Thanks & regards
    Sreenivasulu P

  • Difference  between AT NEW and ON CHANGE

    difference  between AT NEW and ON CHANGE

    HI,
    at new is controlbreak statment and on change of is not and we can use onchange of  out side the loop
    and on at nnwe the left side feild change  the event
    trigers and the values become 0 and *
    -->1.It can be used in any loop construct, not just loop at.
    For example, it can be used within select and endselect, do
    and enddo, or while and endwhile, as well as inside get events.
    2. A single on change of can be triggered by a change within
    one or more fields named after of and separated by or. These
    fields can be elementary fields or field strings. If you are
    within a loop, these fields do not have to belong to the loop.
    3.When used within a loop, a change in a field to the left
    of the control level does not trigger a control break.
    4.When used within a loop, fields to the right still contain
    their original values; they are not changed to contain zeros
    or asterisks.
    5.You can use else between on change of and endon.
    6.You can use it with loop at it where . . ..
    7. You can use sum with on change of. It sums all numeric
    fields except the one(s) named after of.
    8.Any values changed within on change of remain changed
    after endon. The contents of the header line are not
    restored as they are for at and endat
    regards,
    vineela.

  • Difference btwn at new and on change of

    Hi all,
    can i know the difference between 'at new' and 'on change of'.

    Hi,
    at new - > means inside the loop, the new value.
    eg :
    1
    1
    2
    3
    4
    5
    5
    loop at itab
    at new matnr
    write matnr.
    end at.
    end loop.
    1
    2
    3
    4
    5
    On change of -> chnage of particular value inside the loop.
    The Major Difference is :
    a) When AT NEW occurs,
    the alpha-numeric fields have ******* in their value,
    b) where as in case of ON CHANGE,
    the alpha-numeric fields have their corresponding value,
    of that particular record,
    where the Event gets fired.
    Other differences are :
    ON CHANGE OF can be used any where in the program..
    on change of differs from at new in the following respects:
    1.It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    2.A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    3.When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    4.When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    5.You can use else between on change of and endon.
    6.You can use it with loop at it where . . ..
    7.You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    8.Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    while
    AT NEW can be used only within a loop of an INTERNAL TABLE..
    5. Sample program to get the taste of it
    (just copy paste)
    6.
    REPORT ABC.
    DATA : BEGIN OF ITAB OCCURS 0,
    bukrs like t001-bukrs,
    f1(10) type c,
    end of itab.
    itab-bukrs = '1000'.
    itab-f1 = '1111111'.
    append itab.
    itab-bukrs = '1100'.
    itab-f1 = '3333333'.
    append itab.
    itab-bukrs = '1200'.
    itab-f1 = '555555'.
    append itab.
    AT NEW
    loop at itab.
    at new bukrs.
    write :/ itab-bukrs , itab-f1.
    endat.
    endloop.
    AT ONCHANGE
    loop at itab.
    ON CHANGE OF ITAB-BUKRS.
    write :/ itab-bukrs , itab-f1.
    ENDON.
    Regards,
    Ferry Lianto

  • At new and on change of

    Hi Friends,
    can any one explain ,
    1) what is main difference between at new and on change of
    control break statements...
    2) in which situation we are supposed use on change of control beark.
    cheers,

    Vijay ,
    Control Break Event AT- NEW :
    Event AT-NEW will be triggered whenever the control level changes or any field prior to the control level changes.
    For Example:
    DATA : BEGIN OF IT_TAB OCCURS 0,
    A(5),
    B(5),
    C(5),
    END OF ITAB.
    Insert some Values to the internal table.
    SORT   IT_TAB.
    LOOP AT   IT_TAB,
    AT NEW A.
    <Only when value of A Changes.>
    ENDAT
    AT NEW B.
    <When Combined vales of A & B Changes i.e either A or B Or both>.
    ENDAT.
    1) Sorting of the INTERNAL TABLE is necessary.
    2) You cannot use multiple fields in AT-NEW statement.
    3) Between AT-NEW and ENDAT the content of work area will not contain any value
    4) If you change the value of a work area within AT-NEW and ENDAT your changes will be lost after the ENDAT statement.
    5) When AT NEW occurs, the alpha-numeric fields have ******* in their value
    6) Can be used in ABAP objects
    ON-CHANGE-OF :
    On Change of will be triggered whenever the control level changes.
    It won't be triggered when the field prior to the control level change.
    For Example:
    DATA : BEGIN OF IT_TAB OCCURS 0,
    A(5),
    B(5),
    C(5),
    END OF ITAB.
    Insert some Values to the Internal table.
    LOOP AT  IT_TAB,
    On CHANGE OF B.
    < Every time a value of B changes >
    ENDON.
    ENDLOOP.
    1)     Sorting of the INTERNAL TABLE is NOT necessary.
    2)     Mutilpe Fields are used in ON-CHANGE-OF
    3)     It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    4)      In ON CHANGE,the alpha-numeric fields have their corresponding value, of that particular record, where the Event gets fired.
    5)     When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    6)     You can use else between on change of and endon.
    7)     You can use it with loop at it where . . ..
    8)      cannot be used in ABAP objects
    Regards,
    Shiv.G.Sethu

  • In Reports what  is the difference between the AT NEW and ON CHANGE Event

    Hi,
            Could you tell the differences of AT NEW and ON CHANGE events in Repors

    Hi raghava,
    The Major Difference is :
    a) When AT NEW occurs,
    the alpha-numeric fields have ******* in their value,
    b) where as in case of ON CHANGE,
    the alpha-numeric fields have their corresponding value,
    of that particular record,
    where the Event gets fired.
    Other differences are :
    ON CHANGE OF can be used any where in the program..
    on change of differs from at new in the following respects:
    1.It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
    2.A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
    3.When used within a loop, a change in a field to the left of the control level does not trigger a control break.
    4.When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
    5.You can use else between on change of and endon.
    6.You can use it with loop at it where . . ..
    7.You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
    8.Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
    while
    AT NEW can be used only within a loop of an INTERNAL TABLE..
    5. Sample program to get the taste of it
    (just copy paste)
    6.
    REPORT ABC.
    DATA : BEGIN OF ITAB OCCURS 0,
    bukrs like t001-bukrs,
    f1(10) type c,
    end of itab.
    itab-bukrs = '1000'.
    itab-f1 = '1111111'.
    append itab.
    itab-bukrs = '1100'.
    itab-f1 = '3333333'.
    append itab.
    itab-bukrs = '1200'.
    itab-f1 = '555555'.
    append itab.
    AT NEW
    loop at itab.
    at new bukrs.
    write :/ itab-bukrs , itab-f1.
    endat.
    endloop.
    AT ONCHANGE
    loop at itab.
    ON CHANGE OF ITAB-BUKRS.
    write :/ itab-bukrs , itab-f1.
    ENDON.
    endloop.

  • Diff between ECC5.0 and ECC6.0

    Hi,
    This is Ramakrishna,can any one give proper explanation diff between ECC5.0 and ECC6.0
    Regards
    Ramakrishna

    Hi,
    Refer following link;
    [SAP ERP Solution Browser|http://solutionbrowser.erp.sap.fmpmedia.com/]
    Following are the basic differences as far as MM Module is concerned;
    Pickup list - Batch where-used list display in transaction MB56
    u2022 Until release 4.7, the top-down and bottom-up analyses in the function pickup list for batch where-used list (transaction MB5C) were displayed only in the form of simple output lists. As of release 6.00 of SAP ERP Central Component, the function pickup list for batch where-used list branches to the batch where-used list itself (transaction MB56).
    u2022 In addition, user can define how the data in the batch where-used list is displayed, in the initial screen.
    u2022 User can use all the settings available in the batch where-used list. For example, he can expand transfer posting or display vendor batch. However, it is not possible to limit the selection to valid plants in the initial screen of the pickup list.
    Usability enhancements for transaction MIGO for the posting of goods movements
    u2022 For goods movements that refer to purchase orders as reference documents (for example, goods receipt, goods issue, subsequent adjustment), user can specify the ordering plant as an additional selection criterion directly next to the purchase order number and the item number.
    u2022 There is a new default value: "copy account assignment fields." When entering other goods receipts, user can copy existing account assignment data from the previous item to use as the default values for a new item. To do this, user has to set the copy account assignment fields indicator in the default values.
    u2022 User changes the default values in the menu path "Settings -> Default Values."
    u2022 Goods movement is monitored with reference to a material document. When you enter the following goods movements, it is possible to specify a material document, such as the following, as the reference document:
    - Goods receipt
    - Goods issue
    - Transfer posting
    - Remove from storage
    u2022 Note that these material documents must be documents that have arisen from a goods movement without reference ("Others") and that are not reversal documents.
    New report : display list of invoice documents (MIR5)
    u2022 Logistics invoice verification offers a new report display list of invoice documents (RMMR1MDI), w hich user can use to display such a list (Transaction is MIR5).
    u2022 As an addition to the existing program invoice overview (transaction code MIR6), user have extended selection criteria and display options. For example, on the initial screen user can make selections by one-time customers, invoice gross amount, and entry date.
    u2022 User can also show an expert mode, which enables him to select at plant level by FI document, GL A/c posting, and Material Posting.
    u2022 In the output list, the report shows both posted and held invoices.
    u2022 It does not show invoices without a corresponding FI document; such as invoices planned for verification in the background or which the software has already verified as containing errors.
    Requirement prioritizations in materials management
    u2022 With Requirement Prioritization functionality user can assign requirement urgency at item level in purchasing and reservation documents.
    u2022 The software determines the relevant requirement priority (overall priority) of a material requisition from the combination of requirement urgency group and organizational priority.
    Mass maintenance of outline agreements
    The following two transactions available:
    u2022 Mass maintenance for contracts: transaction code MEMASSCONTRACT
    u2022 Mass maintenance for scheduling agreements: transaction code MEMASSSA
    Commitment plan for purchase contracts
    u2022 With the function of the commitment plan for purchase contracts, it is possible to pre plan value consumption for a purchase contract.
    u2022 To this end, a commitment plan is generated for each document item of the relevant contract.
    u2022 This commitment plan itself can have any number of items.
    u2022 User can define a value and a validity date for each commitment plan item.
    u2022 This enables user to pre plan different values for different periods of time.
    u2022 The software generates an earmarked fund document for a defined commitment plan item.
    u2022 This earmarked funds document can in turn contain several different items with different account assignments.
    u2022 The software adopts these account assignments from the item account assignments of the commitment plan.
    u2022 If a purchase requisition or purchase order references this contract, the earmarked funds document is copied into the purchase order, and the account assignment is adopted from that document.
    u2022 Account assignment to a different account assignment object is then no longer allowed.
    Availability check in "Enjoy purchase order and requisition"
    u2022 Display and checking of availability are invokable separately in the "Enjoy purchase order and requisition" function, in line with the software behavior on the sales side.
    u2022 User invoke the display and checking of availability in the "Enjoy purchase order" function (transaction code ME21N) and the "Enjoy purchase requisition" function (transaction code ME51N) as follows:
    - To display the availability overview, choose the menu path "Environment -> Availability." - To check availability, choose the "Check Availability" icon.
    - Until this release, if user carried out the availability check for an item of a stock transport order, the software adopted confirmations as per the desired date/time only.
    u2022 Two settings are possible with availability check:
    - Confirmation as per desired date/time (this is the standard setting and corresponds to previous software behavior)
    - Delivery proposal - Full confirmation
    External services: putting service items in the purchase order on hold (changed)
    User can put purchase orders with service items on hold if these items do not contain any errors. Purchase orders with service items can also be put on hold if errors occur only at header level or as a result of the availability check.
    Customizing transactions OX18 replaced by view
    The assigned customizing transactions have been replaced by the following view in the following implementation guide activity in customizing for the enterprise structure: Assign plant to company code: transaction OX18 replaced by view V_T001K_Assign. One will find this activity in the implementation guide under the menu path "Enterprise Structure -> Assignment -> Logistics General -> Assign Plant to Company Code."
    Goods receipt: new movement types in inventory management
    The following new movement types are available in inventory management:
    - 107: Goods receipt to valuated goods receipt blocked stock
    - 109: Goods receipt from valuated goods receipt blocked stock
    Prepayment of invoices
    This functionality is characterized as follows:
    u2022 User can trigger prepayment of vendor invoices in logistics invoice verification.
    u2022 User use the prepayment function for vendors with whom organisation has a good, long-standing relationship.
    u2022 The function enables payment soon after issue of the invoice and full exploitation of the date of required payment and existing cash discounts, by posting the vendor liabilities, taxes, and cash discounts in financial accounting in advance.
    u2022 The software executes the payment of the invoice regardless of the relevant goods receipt and the outcome of the invoice verification check.
    u2022 Most logistics invoice verification standard functions are not affected by the prepayment function.
    u2022 When the software posts invoices, it continues to execute the standard checks.
    u2022 If the software has already posted the prepayment document, user can make only restricted changes to the header fields of the invoice.
    u2022 To ensure adequate and orderly financial accounting postings, a prepayment clearing account has been added to SAP ERP Central Component.
    u2022 Upon prepayment, the software debits this account and then settles the account again after executing the check.
    Purchasing accounting information to the former SAP Business Information Warehouse
    u2022 With the transfer of the purchasing account information to the former SAP Business Information Warehouse component (whose functionality is now part of SAP Net Weaver), it is now possible to maintain Info Cubes, reports, and queries that can determine how and where the costs from purchasing documents have been assigned and controlled.
    u2022 As part of the software, a new data source (2LIS_02_ACC) has been created and the purchasing extraction process extended to cover the account information for purchasing orders, schedule agreements, and contracts.
    Automatic settlement of planned delivery costs with evaluated receipt settlement (MRDC)
    u2022 A new report (RMMR1MDC), available within the logistics invoice verification, can be used to automatically settle planned delivery costs.
    u2022 To invoke the report, from the SAP easy access screen, choose the menu path "Logistics -> Materials Management -> Logistics Invoice Verification -> Automatic Settlement -> Automatic Delivery Cost Settlement" (transaction code MRDC).
    u2022 Functionality for report RMMR1MRS is enhanced.
    u2022 User can use the report RMMR1MRS, "Evaluated receipt settlement with logistics invoice verification (LIV)" (transaction code MRRL), to settle planned delivery costs in addition to goods and service items within logistics invoice verification.
    u2022 To do so, set the relevant indicator on the initial screen of the report.
    Parking service items
    It is now possible to put service orders without errors or with commitment errors on hold.
    Report MB5B : Stock on Posting Date
    u2022 This Report is available with u201CNon-Hierarchyu201D display option which provides details of Opening, Receipt, Issue and Closing balances of Stock with quantity and value both for a given period.
    u2022 This functionality is not available in Release 4.7.
    Stock Transfer Between Storage Locations
    u2022 Function of stock transport orders between storage locations is available from ECC 6.0 onwards.
    u2022 As a result of which user can input issuing storage location with supplying plant.
    u2022 Facility of using different delivery types for different issuing storage locations is available.
    u2022 Shipping Point data can also be determined based on the issuing storage location

  • Diff between Solaris 8 and Solaris 9

    Hello Experts,
    Do we have a document which talks about the diff between Solaris 8 and Solaris 9
    I need to know what are the new featured in Solaris 9 and etc....
    Thanks in Advance.
    Sunil.

    Sadly, the difference between the early releases of Solaris 9 and the late releases of Solaris 8 isn't that big, since Sun backported a lot of the cool features in Solaris 9 to Solaris 8..
    Hence; the answer to your question depends on which Solaris 8 and which Solaris 9 releases you are talking about.
    However, a complete list of changes incoperated in the different Solaris 9 releases can be found here:
    http://docs.sun.com/app/docs/doc/817-5770/6ml72d6k9?a=view
    I guess there are similar lists for Solaris 10, which is even cooler than 8/9.
    Enjoy!
    //Magnus

  • Diff between interactive report and interactive alv

    Diff between interactive report and interactive alv? Suppose I have been given certain program then how I will diffrentiate that this prog should be done in interactive alv or interactive report.

    hi
    both are used for same purpose
    interactive report means an output list which displays basic details & allow user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session.
    I suggest to use ALV.by using ALV we can display in Grid as well as list format.
    Output format will be good . Sorting,Filtering facilities are provided by itself.We can have column headings also.
    if helpful reward points

Maybe you are looking for

  • HTTP Header in Client Application

    Hi All, I have developed a small web app (client), running under tomcat. I have configured access manager with ldap repository. my client webapp has been configured with tomcat policy agent to communicate with Access manager. This client app will be

  • Flash player upgrade screws up BBC Video?

    This morning I've lost the ability to play video material from the BBC site, such as the Forecast Vid on http://news.bbc.co.uk/weather/ Repeats etc on BBC iplayer play ok. This is only on one desktop in the house. Another desktop works as normal. I d

  • I am unable to access any of my ebooks in adobe after I had help this morning

    I am unable to access any of my ebooks in adobe after I had help this morning

  • Rendering imported images in Final Cut so they look nice

    I recently edited a video requiring still image animation, something Final Cut is notoriously poor at. After much experimenting, I got good results that I want to share. Hope it will help someone else. I have also posted this info, with pictures, her

  • Artists tab empty, but all music appears in Songs tab

    I'm using iTunes Match on my iPhone 5. All 13000+ songs appear in the Songs tab, and songs appear in my Playlists, but the Artists tab shows "No Music" and all of my Genres show "No Music," too. Any fix for this?