01-30-2009 1:58 AM
hi all,
I want to modify subtotals in alv OO, somebody knows how can i do that?
regards.
Thanks.
01-30-2009 4:30 AM
Hi,
While modifying field catalog , try the following.
Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.
LOOP AT i_fieldcat ASSIGNING <lfs_fieldcat>.
CASE <lfs_fieldcat>-fieldname.
WHEN 'LOSGR'.
<lfs_fieldcat>-coltext = text-007.
<lfs_fieldcat>-do_sum = c_x.
ENDCASE.
ENDLOOP.
Or if you want to use field symbols.
data: total type ref to data,
subtotal1 type ref to data.
field-symbols <total> like gt_sflight.
field-symbols <subtotal1> like gt_sflight.
call method grid1->get_subtotals
importing
ep_collect00 = total
ep_collect01 = subtotal1.
assign total->* to <total>.
assign subtotal1->* to <subtotal1>.
Hope this helps.
Thanks
Arun kayal
01-30-2009 3:41 AM
HI ,
which type of alv function module u are using...
let me know clearly...
Thanks & Best Regards,
Praveen.
01-30-2009 3:56 AM
>
> which type of alv function module u are using...
> Praveen.
If you Read the question carefully, This is regarding the OOALV. so no Function modules involved.
01-30-2009 4:30 AM
Hi,
While modifying field catalog , try the following.
Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.
LOOP AT i_fieldcat ASSIGNING <lfs_fieldcat>.
CASE <lfs_fieldcat>-fieldname.
WHEN 'LOSGR'.
<lfs_fieldcat>-coltext = text-007.
<lfs_fieldcat>-do_sum = c_x.
ENDCASE.
ENDLOOP.
Or if you want to use field symbols.
data: total type ref to data,
subtotal1 type ref to data.
field-symbols <total> like gt_sflight.
field-symbols <subtotal1> like gt_sflight.
call method grid1->get_subtotals
importing
ep_collect00 = total
ep_collect01 = subtotal1.
assign total->* to <total>.
assign subtotal1->* to <subtotal1>.
Hope this helps.
Thanks
Arun kayal