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: 

total in ALV Grid Display using oops

Former Member
0 Kudos

Hi ,

I have a requirement where in i have to calculate the total of the column selected.

earlier i that button was greyed out.Now after i had enabled that button and In the fieldcatalog

i have made the field do_sum as 'X'.but still i am getting an message'Desired operation cannot be performed for column'.

the button type is 1.

Please share your inputs on the same.

Thanks in Advance.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

For getting total you need to fill up the IT_SORT table parameter in call method go_grid->set_table_for_first_display

6 REPLIES 6

former_member194669
Active Contributor
0 Kudos

For getting total you need to fill up the IT_SORT table parameter in call method go_grid->set_table_for_first_display

0 Kudos

Hi,

IT_SORT is required for SUBTOTAL.

Regards

Abhii

Former Member
0 Kudos

Hi Ramanan,

When you have used DO_SUM , the total will be automatically displayed at the bottom of the column & I am not getting why you need to calculate total after clicking on the button.

If you want this to be done that way you to register events for the clicked button & all other processing.

Regards

Abhii

Former Member
0 Kudos

Hi raman

do as suggested below:

for example, if the filed is net total then

wa_fieldcat-row_pos = 0.

wa_fieldcat-col_pos = 1.

wa_fieldcat-fieldname = 'NET_BAL'.

wa_fieldcat-do_sum = 'X'.

wa_fieldcat-seltext_s = 'Net Total'.

wa_fieldcat-seltext_m = 'Net Total'.

wa_fieldcat-seltext_l = 'Net Total'.

APPEND wa_fieldcat TO t_fieldcat.

CLEAR wa_fieldcat.

regards,

munvar

Former Member
0 Kudos

Thanks for your replies.

In the fieldcatalog all my fields are char type.

so it not possible to calculate total.

Former Member
0 Kudos

Thanks for ur replies:)