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
Differentiate screen painter from menu painter.
What is roll area?
Explain the difference between cluster tables and pool table?
What is the difference between sum and collect?
What is a data element?
What is lock mechanism? How do we create lock objects in abap?
Explain sap abap 3-tier architecture?
I need some information regarding Vcentric Test pattern ? with questions.
What is direct input method ?
How do you save data in bdc tables? : abap bdc
What are data classes? What are the various data classes available for selection? : abap data dictionary
How to copy table across clients?
Are you familiar with all steps for setting up a workflow?
What are the time related infotypes? : abap hr
What is the use of enqueue function module? : sap abap data dictionary