Application Development 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: 

append

Former Member
0 Kudos

Hi guys,

I need total subtotal and per details at the end of an internal table.

like

f1 f2 f3

4 3 4

3 4 -> tot and per for ex

but when iam appending

iam getting as

3 4

4 3 4

can u guide how i have insert as the last row.

regards

jansi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If you want to append data to the last row, then do this way..

describe table <internal table> lines v_lines.

v_lines = v_lines + 1.

append <data> to <internal table> index v_lines.

This will append data to the last row of the internal table..

5 REPLIES 5

Former Member
0 Kudos

How you are using the append statement, paste your code so that we can troubleshoot.

Regards

Karthik D

0 Kudos

append gs_final to gt_final.

regards

jansi

Former Member
0 Kudos

If you want to append data to the last row, then do this way..

describe table <internal table> lines v_lines.

v_lines = v_lines + 1.

append <data> to <internal table> index v_lines.

This will append data to the last row of the internal table..

Former Member
0 Kudos

can u explain clearly

0 Kudos

Hello Jansi,

Appending to an internal table will insert the data as last row. No need to use any complex logic as mentioned.

I doubt that you are sorting the data after appending and before display. So you remove the sort.

Regards

Farzan