How to check two internal table fields

Hi all,
I need to check two internal table fields are equal or not means which statement i can use.
Not internal table ,table contents i need to check i.e
it1-pernr = it2-pernr.
like this
if i put loop it'll check one table field for one loop.
if i put two loop means some fields reflecting 2 in it1 then it'll pring 4 times like that.i want to print whatever in internal table only .
pernr(0001) two times there in it1 means
it1-pernr = it2-pernr then
it's printing
0001
0001
0001
0001
like this but actually in it1 only two records.
Anybody know solution.tell me.
Thanks
Regards,
Nandha

Hi,
code for your view
data : begin of it1 occurs 0,
       z_pernr like pa9012-pernr,
       z_fac_c like pa9012-zz_fac_c,
       end of it1.
data : it2 like Zsc1 occurs 0 with header line,
It1 data
pernr   FAC C
0001   5555
0001   5555
0002   4444
0003   3333
0006   8888
It2 data
pernr   FAC C
0001   5555
0001   5555
0005   6666
0003   3333
output(My code)
loop at it2 .
loop at it1 where pernr = it2-pernr.
  write:/01 it1-1pernr,
        10 it1-z_fac_c.
endloop.
endloop.
out put i need.
0001   5555
0001   5555
0002   4444
0003   3333
Thanks,
Nandha

Similar Messages

  • How to join two internal table rows in alternative manner into one internal table?

    How to join two internal table rows in alternative manner into one internal table?
    two internal tables are suppose itab1 &  itab2 & its data
    Header 1
    Header 2
    Header 3
    a
    b
    c
    d
    e
    f
    g
    h
    i
    Header 1
    Header 2
    Header 3
    1
    2
    3
    4
    5
    6
    7
    8
    9
    INTO itab3 data
    Header 1
    Header 2
    Header 3
    a
    b
    c
    1
    2
    3
    d
    e
    f
    4
    5
    6
    g
    h
    i
    7
    8
    9

    Hi Soubhik,
    I have added two additional columns for each internal table.
    Table_Count - It represents the Internal Table Number(ITAB1 -> 1, ITAB2 -> 2)
    Row_Count  - It represents the Row Count Number, increase the row count value 1 by one..
    ITAB1:
    Header 1
    Header 2
    Header 3
    Table_Count
    Row_Count
    a
    b
    c
    1
    1
    d
    e
    f
    1
    2
    g
    h
    i
    1
    3
    ITAB2:
    Header 1
    Header 2
    Header 3
    Table_Count
    Row_Count
    1
    2
    3
    2
    1
    4
    5
    6
    2
    2
    7
    8
    9
    2
    3
    Create the Final Internal table as same as the ITAB1/ITAB2 structure.
    "Data Declarations
    DATA: IT_FINAL LIKE TABLE OF ITAB1.          "Final Internal Table
    FIELD-SYMBOLS: <FS_TAB1> TYPE TY_TAB1,     "TAB1
                                   <FS_TAB2> TYPE TY_TAB2.     "TAB2
    "Assign the values for the additional two column for ITAB1
    LOOP AT ITAB1 ASSIGNING <FS_TAB1>.
         <FS_TAB1>-TABLE_COUNT = 1.             "Table value same for all row
         <FS_TAB1>-ROW_COUNT = SY-TABIX. "Index value
    ENDLOOP.
    "Assign the values for the additional two column for ITAB2
    LOOP AT ITAB2 ASSIGNING <FS_TAB2>.    
         <FS_TAB2>-TABLE_COUNT = 2.                  "Table value same for all row
         <FS_TAB2>-ROW_COUNT = SY-TABIX.      "Index value
    ENDLOOP.
    "Copy the First Internal Table 'ITAB1' to Final Table
    IT_FINAL[] = ITAB1[].
    "Copy the Second Internal Table 'ITAB2' to Final Table
    APPEND IT
    LOOP AT ITAB2 INTO WA_TAB2.
    APPEND WA_TAB2 TO IT_FINAL.
    ENDLOOP.
    "Sort the Internal Table based on TABLE_COUNT & ROW_COUNT
    SORT IT_FINAL BY  ROW_COUNT TABLE_COUNT.
    After sorting, check the output for IT_FINAL Table, you can find the required output as shown above.
    Regards
    Rajkumar Narasimman

  • How to populate dynamic internal table fields with data??

    Hi Folks,
    How to assign a particular internal table field to a dynamically assigned internal table?
    I have an excel sheet, and i upload the excel sheet data into an internal IT_EXLOAD table using FM ALSM_EXCEL_TO_INTERNAL_TABLE
    Now i created a dynamic internal table which has the same column as in my DB table.
    I have to fill the dynamically created Internal table with the IT_EXLOAD data dynamically.
    Suppose in future if i add some field in DB table and for that field if i add some column in excel sheet there is no need to change in the program.
    Looking for reply...
    Best Regards,
    Sayak

    hi,
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_path
                i_begin_col             = '1'
                i_begin_row             = '2'
                i_end_col               = '2'
                i_end_row               = '1000'
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
    *declare intern_tmp as internal table tb_data in wich you want the data
    *and declare a field symbol <fs_123>
    LOOP AT intern.
        ASSIGN COMPONENT intern-col OF STRUCTURE
        intern_tmp TO <fs_123>.
        IF NOT <fs_123> IS ASSIGNED.
          CLEAR intern.
          CLEAR intern_tmp.
          CONTINUE.
        ENDIF.
        <fs_123> = intern-value.
        AT END OF row.
          CLEAR tb_data.
          MOVE-CORRESPONDING: intern_tmp TO tb_data.
          APPEND tb_data.
          CLEAR intern_tmp.
        ENDAT.
        CLEAR intern.
      ENDLOOP.
    **paste this code and you can see the data in ur tables dynamically.
    Thanks
    Nitin Sachdeva

  • How to check if internal table exists in dynamical called subroutine ?

    Hi,
    in a dynamically called subroutine i'm using a internal table, but in some calls this table is not exist.
    How can i check in the code whether the internal table exist or not ?
    regards,
    Hans

    In Horst Keller's blog /people/horst.keller/blog/2005/05/27/abap-geek-10--everything-functions-150-but-how my issue is talked about :
    All other parameters are handled in a way as they were declared as global data objects in the top include of the function group, that can be used only during the execution of the function module: They are visible throughout the function group but you can access them only while the function module is active. If you access such a parameter and the respective function module is not executed, you get the runtime error GETWA_NOT_ASSIGNED (Why? Well, technically thos guys are represented via field symbols which are valid only during the runtime of the function module).
    The code is in SD pricing. Sometimes the code is called from function module PRICING_BUILD_XKOMV or PRICING_SUBSCREEN_PBO where TKOMV is defined as globalized parameter.
    And sometimes it is called from function module PRCING_CHECK where TKOMV is NOT defined as parameter.
    In the call of last function the dump occures on the ASSIGN statement :
         data: ls_tkomv like line of tkomv,
                  lv_tablename(30) type c value 'TKOMV[]'.
        field-symbols: <lfs> type any table.
         assign (lv_tablename) to <lfs>.
         if <lfs> is assigned.
    Any suggestions to solve the issue ?
    regards,
    Hans

  • How to compare two internal table and store value in third table

    Dear All,
                  There is two tabel say I_T1 & T2, in I_T1 there are 4 rows , in T2 there are multiple rows against the same field. Say there is a filed X common in both table .
    Value of I_T1-X are
    10
    20
    50
    90
    and value ot T2-X are
    10
    15
    20
    30
    40
    50
    .100
    Now i want to fetch data form T2 against the common field of I_T1-X and store into other internal table.
    Plz suggest me the proper way of doing this.
    Rewards points assured for proper answer.
    Regards,
    Gulrez Alam

    hi this is like your requirement.
    in this i am storing the values into the final table
    REPORT  ZZZZ000000.
    tables:mara,marc,mard,makt.
    data:begin of it_mara occurs 0,
         matnr like mara-matnr,
         mtart like mara-mtart,
         meins like mara-meins,
         end of it_mara.
    data:begin of it_marc occurs 0,
         matnr like marc-matnr,
         pstat like marc-pstat,
         werks like marc-werks,
         end of it_marc.
    data:begin of it_mard occurs 0,
         werks like mard-werks,
         lgort like mard-lgort,
         labst like mard-labst,
         end of it_mard.
    data:begin of it_final occurs 0,
         matnr like mara-matnr,
         mtart like mara-mtart,
         meins like mara-meins,
         pstat like marc-pstat,
         werks like marc-werks,
         lgort like mard-lgort,
         labst like mard-labst,
         maktx like makt-maktx,
         end of it_final.
    select-options:s_matnr for mara-matnr.
    select  matnr
            mtart
            meins
            from mara
            into table it_mara
            where matnr in s_matnr.
            if not it_mara[] is initial.
            select matnr
                   pstat
                   werks
                   from marc
                   into table it_marc
                   for all entries in it_mara
                   where matnr = it_mara-matnr.
                   if not it_marc[] is initial.
                   select werks
                          lgort
                          labst
                          from mard
                          into table it_mard
                          for all entries in it_marc
                          where werks = it_marc-werks.
                   endif.
          endif.
    loop at it_mara.
    it_final-matnr = it_mara-matnr.
    it_final-mtart = it_mara-mtart.
    it_final-meins = it_mara-meins.
    read table it_marc with key matnr = it_mara-matnr.
    it_final-werks = it_marc-werks.
    it_final-pstat = it_marc-pstat.
    read table it_mard with key werks = it_marc-werks.
    it_final-lgort = it_mard-lgort.
    it_final-labst = it_mard-labst.
    if sy-subrc = 0.
    select maktx from makt into it_final-maktx where matnr = it_final-matnr.
    endselect.
    endif.
    append it_final.
    endloop.
    loop at it_final.
    write:/ it_final-matnr under 'material',
            it_final-mtart under 'material type',
            it_final-meins under 'unit of measure',
            it_final-werks under 'plant' ,
            it_final-pstat under 'status',
            it_final-lgort under 'storage loc',
            it_final-labst under 'stock',
            it_final-maktx.
    endloop.
    reward points if useful,
    venkat.

  • Combining two internal table

    Hi,
    Can any one tell how to combine two internal tables??

    hi,
    data it_tab  like table of wa_struct.
    data it_tab2 like table of wa_struct.
    it_tab-field1 = "a".
    append it_tab.
    it_tab2-field2 = "b".
    append it_tab2.
    move-correponding   it_tab to it_tab2.
    or
    data it_tab3 like table of wa_struct.
    loop at it_tab.
    it_tab3-field = it_tab -field.
    append it_tab3.
    endloop.
    loop at it_tab2.
    it_tab3-field = it_tab2-field.
    append it_tab3.
    endloop.
    regards,
    Siva
    REGARDS,
    Siva.

  • Uploading two internal tables

    how to upload two internal tables at a time using standard class methods in to
      internal tables. help required

    Are three tables are of same type ?

  • How to read an internal table with more than  one (2 or 3) key field(s).

    how to read an internal table with more than  one (2 or 3) key field(s). in ecc 6.0 version

    hi ,
    check this..
    report.
    tables: marc,mard.
    data: begin of itab occurs 0,
          matnr like marc-matnr,
          werks like marc-werks,
          pstat like marc-pstat,
          end of itab.
    data: begin of itab1 occurs 0,
          matnr like mard-matnr,
          werks like mard-werks,
          lgort like mard-lgort,
          end of itab1.
    parameters:p_matnr like marc-matnr.
    select matnr
           werks
           pstat
           from marc
           into table itab
           where matnr = p_matnr.
    sort itab by matnr werks.
    select matnr
           werks
           lgort
           from mard
           into table itab1
           for all entries in itab
           where matnr = itab-matnr
           and werks = itab-werks.
    sort itab1 by matnr werks.
    loop at itab.
    read table itab1 with key matnr = itab-matnr
                              werks = itab-werks.
    endloop.
    regards,
    venkat.

  • How to delete the matching records from two internal tables

    Hi ,
    I have two internal tables say A and B of the same type. If A has 10 records and B has 4 records , I want to delete the 4 records in B from A .
    loop at B into wa .
    delete A where key = wa - key .
    endloop.
    takes a long time if the table B is huge. how can I improve the performance.
    Thanks.
    Gayathri

    Hi Gayathri,
    You could try field-symbols. It reduces the data transfer from the internal table B to the work area.
    field-symbols <fs_itab_b> like line of B.
    loop at B assigning <fs_itab_b>.
      delete A where key = <fs_itab_b>?-key.
    endloop.
    Regards,
    <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=zwcc%2fwm4ups%3d">anand Mandalika</a>.

  • How to get records into two internal tables from 1 internal table?

    VERME                                                                     LGPLA
    252.000  EA  300     0149A                                  410     0149
    276.000  EA  300     0149A                                  410     0107
    516.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    I have above records in my one internal table ITAB.
    I want to divide these records in to two internal tables ITAB1 and ITAB2. and this is based on LGPLA and VERME.
    If there is same LGPLA (last column) and different VERME (1st column) available, then it should append ITAB1
    Otherwise it should append ITAB2.
    ITAB1 should contain ,
    516.000  EA  300     0149A                                  400     3013
    ITAB2 should contain ,
    252.000  EA  300     0149A                                  410     0149
    276.000  EA  300     0149A                                  410     0107
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    528.000  EA  300     0149A                                  400     3013
    I have tried with this code
    Loop at itab….
    IF lv_prev_lgpla = wa-lgpla and lv_prev_verme <> wa-verme.
          APPEND wa TO itab1.
    else.
          APPEND wa TO itab2.
    endif.
    lv_prev_lgpla = wa-vlpla.
    lv_prev_verme = wa-anfme.
    Endloop.
    But it contains,
    516.000  EA  300     0149A                                  400     3013
    in table ITAB2 which I don’t want.
    Points rewarded soon.
    Regards,
    Ronn

    Dear Ronny,
    i am gining the solution below.But would request you to change your ITAB STRUCTURE LIKE THIS BEFORE USING THE CODE
    VERME LGPLA
    252.000 EA 300 0149A  0149 410
    276.000 EA 300 0149A  0107 410
    516.000 EA 300 0149A  3013 400
    528.000 EA 300 0149A  3013 400
    528.000 EA 300 0149A  3013 400
    528.000 EA 300 0149A  3013 400
    528.000 EA 300 0149A  3013 400
    528.000 EA 300 0149A  3013 400
    528.000 EA 300 0149A  3013 400
    then do as follows.
    SORT ITAB BY LGPLA VERME.
    LOOP AT ITAB INTO WITAB.
    W_INDEX = SY-TABIX.
    here take all the abOve fields in temp fieds.
    LW_VERME = WITAB-VERME..AND SO ON.
      AT END OF LGPLA.
       MOVE: all LW fields to work area of ITAB1
       APPEND work area of ITAB1 TO ITAB1.
       DELETE ITAB INDEX W_INDEX
      ENDAT.
    ENDLOOP.
    Basically what u r doing here is thet u r using processing event.
    So whenerv VERME changes this event will be triggered.
    Just try this out...something like this only will be he logic.
    Please let me know further

  • How to specify for a internal table field so that number of digits = 9

    In if condition how can i specify that
    if country = 'US'
    then the account number should be equal to 9 digits only.
    <removed_by_moderator>
    Edited by: Julius Bussche on Aug 6, 2008 1:41 PM

    You can set the internal table field to the biggest length possible, according to your requirements, and then work on something like the following. If the condition is met and you have to shorten the account number... try something similar to this:
    DATA e TYPE string VALUE 'Test string'.
    * I'm using 2 as an example here.
    SHIFT e BY 2 PLACES RIGHT CIRCULAR.
    SHIFT e BY 2 PLACES LEFT.
    WRITE :/, e.
    Avraham

  • Joining of two internal tables...... urgent.

    Dear all experts,
    I am going to join two internal tables, one table contains some fields from mara
    and another table contains some fields from makt.
    i have to join these tables without using for all entries.
    below is program mentioned... I am not getting exactly how to put the logic, to get fields into table itab_3.
    <b>*------- defining internal tables.</b>
    DATA: BEGIN OF <b>itab_1</b> OCCURS 0,
            matnr  TYPE mara-matnr,
          END OF itab_1.
    DATA: BEGIN OF <b>itab_2</b> OCCURS 0,
            matnr  TYPE makt-matnr,
            maktx  TYPE makt-maktx,
            spras  TYPE makt-spras,
          END OF itab_2.
    DATA: BEGIN OF <b>itab_3</b> OCCURS 0,
            matnr TYPE mara-matnr,
            spras TYPE makt-spras,
          END OF itab_3.
    <b>*---taking data to first internal table.-</b>
    SELECT matnr
                 FROM mara
                 INTO TABLE itab_1
                 WHERE ernam = 'RUDISILL'.
    <b>*--taking data to second internal table.--</b>
    SELECT matnr maktx spras
           FROM makt
           INTO TABLE itab_2.
    sort itab_1 by matnr.
    sort itab_2 by matnr.
    can anybody please tell, how to take fields of itab_2 to itab_3, where all matnr in itab_2  should be equal to all matnr in itab_1.
    points will be surely assigned to your help.
    waiting
    Warm regards
    Vinay.

    hi,
    kindly chk this sample.
    check this.
    data : begin of itab1 occurs 0. "itab with work area.
    key_field1 like ztable1-key_field1,
    field1 like ztable1-field1,
    field2 like ztable1-field2,
    endof itab1.
    data : begin of itab2 occurs 0. "itab with work area.
    key_field2 like ztable2-key_field2,
    field3 like ztable2-field3,
    field4 like ztable2-field4,
    endof itab2.
    data : begin of itab_final occurs 0.
    key_field1 like ztable1-key_field1,
    field1 like ztable1-field1,
    field2 like ztable1-field2,
    field3 like ztable2-field3,
    field4 like ztable2-field4,
    endof itab_final.
    put the date final(merged) internal table
    1. loop at itab1.
    read table itab2 with key keyfield2 = itab1-keyfield1.
    if sy-surc = 0.
    itab_final-key_field1 = itab1-keyfield1
    itab_final-field1 = itab1-field1.
    itab_final-field2 = itab1-keyfield2.
    itab_final-field3 = itab2-field2.
    itab_final-field4 = itab2-keyfield2.
    append itab_final.
    clear itab_final.
    endif.
    endloop.
    or
    LOOP AT ITAB1.
    MOVE-CORRESPONDING TO ITAB1 to ITAB_FINAL.
    READ TABLE ITAB2 WITH KEY FILED1 = ITAB1-FIELD1.
    if sy-subrc = 0.
    MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
    endif,
    READ TABLE ITAB3 WITH KEY FILED1 = ITAB1-FIELD1.
    if sy-subrc = 0.
    MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
    endif,
    append itab_final.
    clear itab_final.
    endloop
    Regards,
    Anversha

  • Compare multiple variable selections between two internal tables

    I am trying to work out the syntax for the following, however i am stumped on the 2nd part of the requirement....
    I have two internal tables.  and i need to compare the records.
    1st, line by line, which i can do, however the 2nd requirement, i need to check a range of data against the same table...
    here is an example of the tables:
    Internal Table1 has the following records.
    TL1
    TL2
    TL3
    TL4
    TL5
    TL6
    Internal table 2 has the following records...
    LDOC1     TL1
    LDOC1     TL2
    LDOC1     TL3
    LDOC1     TL7
    LDOC2     TL1
    LDOC2     TL5
    LDOC3     TL6
    LDOC3     TL7
    but for the 2nd requirement, i have to group the LDOC1 (2, 3)  and search for all TL* and report if they all exist, some exist or none exist within the 1st internal table.
    so for requirement 1, the answer would be yes (as i can do a read table using the TL*), however i am not sure how i can check "for all entries" for TL1, Tl2, TL3, TL7 and return that only some entries exist....  LDOC1 should return "some", LDOC2 should return "all" and LDOC3 should return "none".
    Hopefully that makes sense???
    Can someone give me a keyword to investigate as i am not sure the At new would work....  Unless i do an at new and then loop and maybe add the record to a "range" to then compare and log the result as it runs through each result...
    so if Itab1 = itab2 then variable = yes. else None.
    if variable = yes, and itab1 = itab2 then variable = yes.
    if variable = yes and itab1 <> itab2 then variable = some.
    would that work??  i am worried about performance too as there could be 1000's of records....
    and can i have an "at end" so at end, if variable = yes, then variable = all?
    i have written all the rest of the report to get all the data into these tables...  i am just a little baffled as to how i can validate and compare the multiple selection....  :o(

    Hi,
    It is really confusing :-).. But i have tried to figure out.. may be this could be useful for you.
    Internal Table1 has the following records.
    TL1
    TL2
    TL3
    TL4
    TL5
    Internal table 2 has the following records...
    LDOC1 TL1
    LDOC1 TL2
    LDOC1 TL3
    LDOC1 TL7
    LDOC2 TL1
    LDOC2 TL5
    LDOC3 TL6
    LDOC3 TL7
    itab3[] = itab2[]
    sort itab3 by field1.
    delete adjacent duplicates from itab3 comparing field1.
    itab3
    LDCO1 
    LDCO2
    LDCO3
    loop at itab3.
    clear: lv_flag, index, ind.
    loop at itab2 where field1 = itab3-field1.
    index = index + 1.
    read table itab1 with key field1 = itab2-field2.
    if sy-subrc NE 0.
    lv_flag = 'X'.
    ind = ind + 1.
    endif.
    endloop.
    if lv_flag = 'X'.
    if ind = index.
      lv_val = 'NONE'.
    elseif ind NE index.
      lv_val = 'SOME'.
    endif.
    else.
      lv_val = 'ALL'.
    endif.
    "here you can modify itab3 with lv_val in one field, so that you can figure out which is SOME, NONE, ALL
    endloop.
    Regards,
    senthil

  • Internal table fields

    Hi,
    I have two internal tables.itab1 and itab2.
    The sturcture of both the tables are as:
    begin of itab1
    kunnr
    name1
    end of itab1.
    begin of itab2
    ort01
    name1
    land1
    end of itab2.
    now, i have data in both the tables using select statement.
    Requiement is like this :
    i want to check if value of field name1 is availabe in itab1. if itab1-name1 is not having any values then i want to update this field of itab1 with name1 of tale itab2.
    i.e. in place of blank values of field itab1-name1 , i want to replcae this null value with values from itab2-name1.
    Any help will be appricitated.
    Thanks

    Hi,
    U can try the following code.
    loop at itab1 into wa1.
    if wa1-name1 eq space.
    read table itab2 into wa2 with key ort01 = kunnr.
    wa1-name1 = wa2-name1.
    modify table itab1 from wa1 transporting name1.
    endif.
    clear: wa1,wa2.
    endloop.
    reward points if helpful.
    regards,
    Ravi G

  • Compare two internal tables

    hi everybody
    i have two internal tables  ITAB1 AND ITAB2
    I WANT TO COMPARE THE CONTENTS OF THESE INTERNAL TABLES HOW TO DO THIS
    REGARDS
    HRIDHANJILI

    Hello Hridhayanjili
    The most detailed comparison is to use the same logic as change documents are prepared. Assuming both of your itabs are of structure struc_a. Then define the following type:
    TYPES: BEGIN OF ty_s_itab_di. 
    INCLUDE TYPE struc_a.
    TYPES: CHIND  TYPE bu_chind.
    TYPES: END OF ty_s_itab_di.
    TYPES: ty_t_itab_di  TYPE STANDARD TABLE OF ty_s_itab_di
                         WITH DEFAULT KEY.
    DATA: 
      gt_itab_old  TYPE ty_t_itab_di, 
      gt_itab_new  TYPE ty_t_itab_di.
    Fill itabs gt_Itab_old with the corresponding data of itab1 and gt_itab_new with the corresponding data of itab2.
    Very important: sort you itabs either by all key fields or by all fields.
    Call function CHANGEDOCUMENT_PREPARE_TABLES with the following parameters
    - CHECK_INDICATOR = ' '
    - TABLE_NEW = gt_Itab_new
    - TABLE_OLD = gt_itab_old
    The function module will remove identical lines from both itabs. New entries in gt_itab_New will have CHIND = 'I' and deleted entries in gt_itab_old will have CHIND = 'D'.
    Read the documentation of the function module and play around with it. You will see that this a quite easy yet powerful approach for comparing itabs.
    Regards
    Uwe

Maybe you are looking for

  • IPhone 5c keeps turning on passcode lock without doing anything!  We don't want to have to plug it on and wipe it again (all since iOS 7.1 update)

    Basically my sister updated her iPhone 5c to iOS 7.1, before this she has a passcode on it, She then took the passcode off, after the 7.1 update. Yesterday it randomly put a passcode back on so she tried the ones she had used before and the usual 1,2

  • Maintenance order for Refurbishment

    Dear Experts, I have created a maintenance order for the equipment E12000003 with order type PM01 and using the control key PM03.Material 12000003 representing the equipment E12000003 issued against the PM order . Purchase requisition is created at t

  • CAPTURE OF  EXCISE LINE ITEMS

    Hi We have a scenario in which excise has not been calculated in certain Sales order at each line itemlevel. There are many such sales orders.Is there any way in which we can get the details of all such sales order? One way whic i understand is to lo

  • Stock transfer between storage locations

    Hello All, We have a scenario wherin ONE PLANT has MULTIPLE SLOC's across INDIA. Now we need to transfer some manufactured machines to these various storage locations which are actually stockyards. How do we go executing this?? I know about the STO b

  • N95 8GB Newbie question re Text Messaging

    Hello Folks, I live in the USA an have AT&T as a provider. I am just learning my around the N95 8GB. When I try to send a text message I get a screen with two window. One is label "Text message Center" and the other has "message center number" in it.