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

compare fields of two different itab

Hi,

How to compare fields of two different itab?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 08:45 AM

    hi,

    use this,

    loop at itab1.

    read table itab2 with key pernr = itab1-pernr.

    if sy-subrc eq '0'.

          • WRITE UR CODE

          endif.

          endloop.

          With Regds,

          S.Barani

          Message was edited by:

          S BHARANIDARAN

          Add a comment
          10|10000 characters needed characters exceeded

        • author's profile photo Former Member
          Former Member
          Posted on Sep 10, 2007 at 08:48 AM

          Hi,

          U can use read table inside one Loop at and compare.

          Regards,

          LIJO

          Add a comment
          10|10000 characters needed characters exceeded

        • author's profile photo Former Member
          Former Member
          Posted on Sep 10, 2007 at 08:48 AM

          Hi,

          You have to loop one internal table reading the other.

          To make things a little better, you have to sort the tables by their key fields and read using binary search.

          loop at itab1.

          read table itab2 with key field1 = itab1-field2.

          if sy-subrc = 0.

          if itab1-field... <> itab2-field...

          .........

          endif.

          endif.

          endloop.

          Regards,

          Satish

          Add a comment
          10|10000 characters needed characters exceeded

        • author's profile photo Former Member
          Former Member
          Posted on Sep 10, 2007 at 08:49 AM
          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.