Skip to Content
0
Aug 25, 2009 at 01:18 AM

Total, Subtotal of a hidden column in an ALV grid

120 Views

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