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, Subtotal of a hidden column in an ALV grid

former_member125661
Contributor
0 Kudos

I have a requirement for an ALV grid where I have to use a custom formula for a column's total and subtotal.

This value is a function of another column which is hidden (No_out = 'X').

I am unable to access the total and subtotal of this hidden column . I am able to access this only when I unhide the column in the field catalog.

THis is how I access the total and subtotal of the GRID. I use oops ALV of the class CL_GUI_ALV_GIRD.

call method o_grid->get_subtotals

importing

ep_collect00 = total

ep_collect01 = subto.

assign total->* to <ftotal>.

assign subto->* to <fsubto>.

I thought I would manipulate <ftotal>-mycolumn and <fsubto>-mycolumn . But both these are functions of a hidden column

and <ftotal>-hiddencolumn and <fsubto>-hiddencolumn is always empty unless I unhide them. I cannot display these columns to users as they are just logical columns of a dynamic internal table I have built. :-s

4 REPLIES 4

Jelena
Active Contributor
0 Kudos

This is not feasible. You'll have to use something else instead of a hidden column.

Former Member
0 Kudos

This message was moderated.

former_member125661
Contributor
0 Kudos

Found an alternative way to resolve this using field symbols.

0 Kudos

HI,i have the same issue, how did you solve it?

Regards.