Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

itab moving

Former Member
0 Likes
529

Hi Friends,

My requirement is as follows:

I have two internal table itab & jtab.

Itab having without header line & jtab is with header line.

Now i wanted to modify the fields & move these fields from itab to jtab.

Will u tell me how to do this.

my logic is like

move-corresponding itab-kunnr to jtab-kunnr.

move-corresponding itab-land1 to jtab-land1.

modify transporting jtab-kunnr jtab-land1.

I am getting error.

Plz tell me as earliest as possible.

5 REPLIES 5
Read only

former_member186741
Active Contributor
0 Likes
511

loop at itab into jtab.

append jtab.

endloop.

Read only

gopi_narendra
Active Contributor
0 Likes
511

Hi

wa_itab type <itab type>.

loop at itab into wa_itab.

move-corresponding wa_itab to jtab.

append jtab.

clear : wa_itab,jtab.

endloop.

Regards

- Gopi

Message was edited by: Gopi Narendra

Read only

former_member188770
Active Participant
0 Likes
511

Hi ,

U will have to declare work area for itab , an additional work area.

then u can move to Jtab.

also i think u dont have to use move-corresponding if the structure is same .

Read only

Former Member
0 Likes
511

Since u dont have header line,do one thing declare a work area and move the content to work area and then move the work are contents to jtab.

Some thing like this:

loop at itab into wa.

move-corresponding wa to jtab.

endloop.

wa:is work area.

Check and see.

Regards

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
511

Hi,

Since itab is without header line,you need an explicit workarea for moving.

Declare an explicit workarea.

data wa like line of itab.

loop at itab into wa.

move-corresponding wa-kunnr to jtab-kunnr.

move-corresponding wa-land1 to jtab-land1.

append jtab.

endloop.

Kindly reward points if it helps.

Message was edited by: Jayanthi Jayaraman