merging of 4 internal table to 1 internal table
Dear friends,,
can you help me to understand...how i fetch the data from 4 different internal tables to 1 internal table based on one single criterial if *** = m then fetch the data from 4 internal table to one internal table here the partner is the only field which is common in 4 internnal table...shall i use read table...
regards,
naim
Tags:
Former Member replied
Naim,
LOOP AT ITAB1.
MOVE-CORRESPONDING FIELDS OF ITAB1 TO FINAL_TAB.
READ TABLE ITAB2 WITH KEY XXX = XXX.
MOVE-CORRESPONDING FIELDS OF ITAB2 TO FINAL_TAB.
READ TABLE ITAB3 WITH KEY XXX = XXX.
MOVE-CORRESPONDING FIELDS OF ITAB3 TO FINAL_TAB.
READ TABLE ITAB4 WITH KEY XXX = XXX.
MOVE-CORRESPONDING FIELDS OF ITAB4 TO FINAL_TAB.
APPEND FINAL_TAB.
ENDLOOP.
Now, your FINAL_TAB will have the data of four fields. You should declare FINAL_TAB with all the fields from 4 tables that you want.
Regards,
Ravi
Note - Please mark the helpful answers