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


Please Help Members By Posting Answers For Below Questions

what are the important fields while preparing sales order,inquiry?

1907


What will happen when we use single buffered selected?

620


What is the table buffer?

570


Explain how do you get output from idoc?

616


Can we use flow logic control key words in abap/4 and vice-verse?

566






What are the types of subroutines?

624


Difference between sy-tabix and sy-index?

796


What are the advantages of abap query tool?

544


what is defference between repository and non repository Object?

6696


What are the steps to be followed to set lockobjects? : sap abap data dictionary

627


Explain what are the different functions used in sap script?

549


How do you find out whether a file exits on the presentation server?

573


What is difference between dialog program and a report?

595


What is the difference between synchronous and asynchronous update? : abap bdc

643


What is the reserve command?

668