Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3257

Comparing Two Internal Tables with the Same Key

$
0
0

Hello Experts,

 

 

I have a problem with Internals tables with the same key. And i have to make out the difference using fields.

 

For Ex:

 

     LOOP AT LT1 INTO LS1.

 

          READ TABLE LT2INTO LS2WITH KEY KEY = LS2-KEY.

 

         IF sy-subrc EQ 0.


                *comments

 

          ENDIF.


     ENDLOOP.

 

Now the real Problem is both table having the same key each and every time, but the fields will be containing different values.

I have to take out the difference from two table and store it into other table.

 

Ex:

 

 

First table LT1:      Key   Field1   Field2    Field3

                              A       1          2           3

 

First table LT2:      Key   Field1a   Field2a    Field3a

                              A       1            4               1

 

First table LT3:      Key   Field1   Field1a   Field2    Field2a   Field3     Field3a

                              A                                2            4            3            1

 

I have to take out the difference from LT1 and LT2 and store it in LT3.

 

Require Guidance!!!!!


Viewing all articles
Browse latest Browse all 3257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>