2007 Mar 31 9:36 PM
Hi Experts,
I hv 2 itabs.
first itab is having
field1
field2
field3
Second itab is having one extra field,
field1
field2
field3
field4_extra field
So, now, I am selecting the data from VBAK and populating in to itab1.
Now, I have to transfer this itab1 data to itab2(which is hving one extra field)
So, I am using,
itab2 = itab1.
But, i am getting the error i.e. saying that both itabs r not same!
So, How I can transfer the itab1 data to itab2? (later, I can populate the data for that one extra filed in itab2)
ThanQ.
Hi Experts,
I hv 2 itabs.
first itab is having
field1
field2
field3
Second itab is having one extra field,
field1
field2
field3
field4_extra field
So, now, I am selecting the data from VBAK and populating in to itab1.
Now, I have to transfer this itab1 data to itab2(which is hving one extra field)
So, I am using,
itab2 = itab1.
But, i am getting the error i.e. saying that both itabs r not same!
So, How I can transfer the itab1 data to itab2? (later, I can populate the data for that one extra filed in itab2)
ThanQ.
2007 Mar 31 9:49 PM
Hi,
User move-corresponding statement.
Try this.
<b>
MOVE-CORRESPONDING itab1 to itab2.</b>
This will move "field1, field2, field3" from ITAB1 to ITAB2. Later on you can populate extra command.
Let me know if you need any other information.
Regards,
RS
2007 Mar 31 9:53 PM
You eith have to use mov-ocrresponding or individual fields after opening the loop ie.
loop at itab1.
itab2-field1 = itab1-field1.
itab2-field2 = itab1-field2.
itab2-field3 = itab1-field3.
itab2-field4 = vbak-vbeln.
append itab2.
clear itab2.
endloop.
~Suresh
2007 Mar 31 10:02 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |