2009 May 30 10:58 PM
Hi
I have one internal table structure which has few fileds and one include structure i have values in that internal table but i need to copy only those include stucture internal table values to other same include strucutre internal table how to do that plz help me out.
DATA: BEGIN OF t_ros,
stat LIKE zpmes002-zzstatus,
usr02 LIKE afvu-usr02,
usr10 LIKE afvu-usr10,
usr11 LIKE afvu-usr11,
labor(13),
changes.
INCLUDE STRUCTURE afvc.
DATA: END OF t_ros.
DATA: i_sub_afvc LIKE t_ros OCCURS 0.
DATA: i_del_afvc TYPE TABLE OF afvc WITH HEADER LINE,
Need to copy from i_sub_afvc to i_del_afvc
Hi
I have one internal table structure which has few fileds and one include structure i have values in that internal table but i need to copy only those include stucture internal table values to other same include strucutre internal table how to do that plz help me out.
DATA: BEGIN OF t_ros,
stat LIKE zpmes002-zzstatus,
usr02 LIKE afvu-usr02,
usr10 LIKE afvu-usr10,
usr11 LIKE afvu-usr11,
labor(13),
changes.
INCLUDE STRUCTURE afvc.
DATA: END OF t_ros.
DATA: i_sub_afvc LIKE t_ros OCCURS 0.
DATA: i_del_afvc TYPE TABLE OF afvc WITH HEADER LINE,
Need to copy from i_sub_afvc to i_del_afvc
2009 May 31 6:51 AM
Hi,
Simply use move-corresponding from source workarea to target workarea..
DATA: i_sub_afvc LIKE t_ros OCCURS 0.
DATA: i_del_afvc TYPE TABLE OF afvc WITH HEADER LINE,
Since the above are internal tables, declare workareas for the corresponding:
DATA: wa_sub_afvc TYPE t_ros.
DATA: wa_del_afvc TYPE afvc,
Now use : Move-corresponding wa_sub_afvc to wa_del_afvc.
append wa_del_afvc to i_del_afvc.
Hope this helps you
Regards
Shiva
2009 May 31 7:41 AM
Like this.
loop at it1.
move-corresponding it1 to it2.
append it2.
clear it2.
endloop.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |