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: 

ALV - Configuring totals for new columns??

Former Member
0 Kudos

I have made a copy of program RFUMSV00 into a Z program and added new columns in the ALV tables that are outputted (they are created dynamically).

When i go to run this program, you can click on "Output Lists" and click on "Configure" and you can choose to Sum the columns.

My new columns look like numbers (dollar amounts) as they should, but when you click on the sum button, i get the error "Desired operation cannot be performed for column".

This is a legal requirement needed asap, so any help is greatly appreciated!!!

THANK YOU!

3 REPLIES 3

former_member181966
Active Contributor
0 Kudos

I guess, there’s something wrong with the declaration part of your new columns ( On which you`re doing SUM ) . Can you just cut and past the declaration part?

0 Kudos

It is kind of built dynamically using:

lt_fieldcat TYPE slis_t_fieldcat_alv, "Field catalog

and i have DO_SUM = 'X' and they are defined the same as the ones that are currently being summed....

0 Kudos

Hi Margo,

Can you pass this way when you are sorting the ALV..

Do this while filling the field catalog lt_fieldcat in your case..

DATA:GT_SORT TYPE SLIS_T_SORTINFO_ALV.

DATA:GS_SORT TYPE SLIS_SORTINFO_ALV.

GS_SORT-SUBTOT = 'X'.

APPEND GS_SORT TO GT_SORT.

Pass the totals table like below..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_PF_STATUS_SET = 'FRM_PF_STATUS'

i_callback_user_command = 'USER_COMMAND'

is_layout = Gs_layout

it_fieldcat = Gt_fieldcat

it_sort = <b>Gt_sort</b>

IT_EVENTS = GT_EVENTS[]

TABLES

t_outtab = ITAB.