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

IN SCRIPTS IF WE HAVE EMPTY SECOND LAYOUT AND IF WE HAVE MENTIONED ABOUT IT IN NEXT PAGE ATTRIBUTE THEN IN OUTPUT HOW WE GET THE SECOND PAGE OUTPUT.

1640


What are the different modes of processing batch input sessions? : abap bdc

821


What are null values? : abap data dictionary

812


Persistent class

1057


Why we are using Macros instead of Function Modules

1760






Did you create primary index?

708


hi I am in training of functional module, i am unable to understand what exactly use of IDOC,BAPI,DIM and BIM. As LSMW and BDC methods are used for data conversion from legacy to sap. Might be it is silly question. please explain me

1930


What are the different buffering methods?

719


What are the types of parameters in the function modules?

813


Can we write the code both call transaction and session method in single program?

785


10) How to get Item Header in Sales Order?

1696


What are the personnel administration related Infotypes

2238


What is the difference b/t Session method and call transaction method ??

5553


How do you use structures in the abap programs?

746


What is meant by performance analysis? Have done anything to improve the performance?

698