2012 Sep 18 3:51 AM
Hello gurus
I am new to abap development.
I am using two internal tables i.e ITAB1 & ITAB2 in ECC 6.0
ITAB1 has got 6 fields.
ITAB2 also has got 6 fields out of which 2 fields are common to both ITAB1 and ITAB2.
The common fields have got same data types.
I want to know how to copy data from ITAB1 to ITAB2 based on the above scenario.
regards
krishna
Moderator Message: Please read F1 help, search for the available information, do some research your self.
Message was edited by: Kesavadas Thekkillath
Hello gurus
I am new to abap development.
I am using two internal tables i.e ITAB1 & ITAB2 in ECC 6.0
ITAB1 has got 6 fields.
ITAB2 also has got 6 fields out of which 2 fields are common to both ITAB1 and ITAB2.
The common fields have got same data types.
I want to know how to copy data from ITAB1 to ITAB2 based on the above scenario.
regards
krishna
Moderator Message: Please read F1 help, search for the available information, do some research your self.
Message was edited by: Kesavadas Thekkillath
2012 Sep 18 5:05 AM
Hi,
Here is what you can do,
Loop at itab2.
Read table itab1 with the common fields from itab2.
Now based on the data in read statement, modify itab2 with required fields.
Hope this helps. Thank you.
Regards,
Kartik
2012 Sep 18 5:14 AM
Hello Krishna,
As Kartik suggested u can loop ITAB2 and assigning fields in to Field Symbol can update ITAB1.
I think its pretty easy if dig on more SCN.
Still sending u for just to kick start -----
1. FILL BOTH INTERNAL TABLE.
2. DECLARE FIELD-SYMBOL.
<CODE>
LOOP AT IT_TAB2 ASSIGNING <LS_TAB2>.
READ TABLE IT_TAB1 INDES SY-TABIX.
<LT_TAB2>-COMMON_FIELD(s) = IT_TAB1-COMMON_FIELD(S).
.....
......
ENDLOOP.
</CODE>
Thanks and Regards,
Ravindra Sonar.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |