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

internal table

Former Member
0 Likes
488

hi all,

i have 2 internal tables

gt_final1[] and gt_final[]

in gt_final1[] i have all the credit values where as in gt_final[] internal table i have all debit values

the problem is

for eg: in gt_final1[] there are 2line items

and in gt_final[] there are 3 line items

how can i move all 2+3 = 5 line items into one internal table suppose into gt_output.

gt_output = 5 line items

please help me how to write this

3 REPLIES 3
Read only

h_senden2
Active Contributor
0 Likes
431

if the definition of the records in all 3 itabs are the same, you can use the APPEND statement

APPEND LINES OF itab1 [FROM idx1] [TO idx2] TO itab2.

regards,

Hans

Read only

Former Member
0 Likes
431

Hi,

if I understand you right, you only want to move all entries in a third internal table without comparing both.

move-correspoding gt_final1 to gt_output.

move-correspoding gt_final2 to gt_output.

append gt_output.

If you want to compare them, please send the information, how you define the tables.

Regards

Nicole

Read only

Former Member
0 Likes
431

loop at it_final1.

it_output-num = it_final1-num.

it_output-name = it_final1-name.

append it_output.

endloop.

loop at it_final2.

it_output-num = it_final2-num.

it_output-name = it_final2-name.

append it_output.

endloop.

now u will have 5 rows in output.