if u have two internal table such as itab1 and itab2.in
itab1 has four fields such as f1,f2,f3,f4 and in itab2 has
two fields such as f1,f2.then how can u copy data from
first internal table to second internal table.
Answer Posted / abhishek buckal
REPORT ZAB_INTERNAL.
TABLES: mara.
TYPES: BEGIN OF str,
f3 TYPE pstat_d,
f4 TYPE mbrsh,
f1 TYPE matnr,
f2 TYPE ernam,
END OF str.
DATA:ITab TYPE TABLE OF STR.
DATA: wa LIKE LINE OF itab.
TYPES: BEGIN OF str1,
f1 TYPE matnr,
f2 TYPE ernam,
END OF str1.
DATA: ITab1 TYPE TABLE OF STR1.
DATA: wa1 LIKE LINE OF itab1.
select pstat mbrsh matnr ernam FROM mara into TABLE itab.
LOOP at itab into wa.
MOVE-CORRESPONDING wa to wa1.
APPEND wa1 to itab1.
ENDLOOP.
LOOP at itab1 into wa1.
WRITE: /01 wa1.
ENDLOOP.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Explain the advantages of different types of bdc's?
How can we determine a vendor is Bloc/Unblock from the table LFA1?
What is foreign key relationship? : abap hr
How to eliminate duplicate entries in internal tables?
How do you save data in bdc tables? : abap bdc
What is hotspot?
How do you send files to the legacy systems from SAP and vice versa? How does one know that the legacy files have come on to the SAP server you are working on?
How do you find number of records present in internal table?
what precautions or prerequisites do you follow to update a record into database table and how
On which event we can validate the input fields in module programs?
What are th control break events in abap?
What is your approach to find exit and BAdi?
What is occurs in internal table?
What are the 2 other types of views, which are not allowed in release 3.0?
What is an abap instance?