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

ALV GRID DISPLAY

Former Member
0 Likes
714

Hello friends,

I have the output in the ALV grid display.

I need to find the total only for one field and display at the end in the same column at the bottom.

How can this be done.

Shejal.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
690

Hi,

Have DO_SUM = 'X' in the field catalog for the field that you want to total..

Thanks,

Naren

Hello friends,

I have the output in the ALV grid display.

I need to find the total only for one field and display at the end in the same column at the bottom.

How can this be done.

Shejal.

7 REPLIES 7
Read only

Former Member
0 Likes
691

Hi,

Have DO_SUM = 'X' in the field catalog for the field that you want to total..

Thanks,

Naren

Read only

0 Likes
690

u mean jsut changes here as follows.

w_fieldcat-tabname = 'it_output'.

w_fieldcat-fieldname = 'DMBTR'.

w_fieldcat-outputlen = '10'.

w_fieldcat-col_pos = '5'.

w_fieldcat-row_pos = '1'.

w_fieldcat-seltext_l = 'Value'.

APPEND w_fieldcat TO i_fieldcat.

CLEAR w_fieldcat.

Just by adding

w_fieldcat-DO_SUM = 'X' .,

before the append statement.

athanks,

Shejal.

Read only

0 Likes
690

Thanks Naren and Karthivel.

Shejal.

Read only

Former Member
0 Likes
690

In the field catalogue just make the do_sum = 'X'.

Example,

ls_fieldcat-fieldname = 'NETWR'.

<b>ls_fieldcat-do_sum = 'X'.</b>

Regards

Kathirvel

Read only

Former Member
0 Likes
690

Hi,

Yes..

Thanks,

Naren

Read only

0 Likes
690

Thanks,

Shejal.

Read only

Former Member
0 Likes
690

Hi Shejal,

This will do,

<b>

w_fieldcat-tabname = 'IT_OUTPUT'.</b>

w_fieldcat-fieldname = 'DMBTR'.

w_fieldcat-outputlen = '10'.

w_fieldcat-col_pos = '5'.

w_fieldcat-row_pos = '1'.

w_fieldcat-seltext_l = 'Value'.

<b>w_fieldcat-DO_SUM = 'X' .</b>

APPEND w_fieldcat TO i_fieldcat.

CLEAR w_fieldcat.

Regards

Kathirvel