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
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.
What are the different modes of processing batch input sessions? : abap bdc
What are null values? : abap data dictionary
Persistent class
Why we are using Macros instead of Function Modules
Did you create primary index?
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
What are the different buffering methods?
What are the types of parameters in the function modules?
Can we write the code both call transaction and session method in single program?
10) How to get Item Header in Sales Order?
What are the personnel administration related Infotypes
What is the difference b/t Session method and call transaction method ??
How do you use structures in the abap programs?
What is meant by performance analysis? Have done anything to improve the performance?