Quantcast
Viewing all articles
Browse latest Browse all 10425

Re: Adding new record to ZTABLE from 2 ITAB

Hi Kishan,

 

The best is to combine both the tables into one common table and then insert the record into final Ztable.

 

SORT ITAB1 and ITAB2 by primary keys.

 

Loop at ITAB1 into WA1.

 

Read Table ITAB2 into WA2 with key WA1-fieldname (common in both the tables).

 

IF sy-subrc eq 0.

 

WA3-fieldnames = WA1/WA2- fieldnames.

Append WA3 to ITAB3.

 

endif.

Clear: WA1,WA2,WA3.

Endloop.

 

Regards,

Dinesh


Viewing all articles
Browse latest Browse all 10425

Trending Articles



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