05-08-2006 9:14 PM
Hi ,
Is it possible to create Subtotal in hierarchial ALV
at item level . When I try to do that in my report ,
I get message
" Subtotals cannot be calculated using item characteristics ".
Also setting flag IT_SORT-subtot = 'X' , did not work .
Please advise .
Thanks ,
K T .
05-08-2006 9:22 PM
05-08-2006 9:30 PM
Hi ,
I am using the hierarchial ALV not a simple ALV ,
Using
Call Function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' .
This is where subtotal function does not seem to work at item level .
Thanks ,
K T .
05-08-2006 9:40 PM
Yes, is posible, look sort table, you have problems in there. Example (This is working for me):
pt_sort-spos = 1.
pt_sort-fieldname = 'DESC_FLTYP'.
pt_sort-tabname = 'GT_HEAD'.
pt_sort-up = 'X'.
pt_sort-subtot = 'X'.
APPEND pt_sort.
05-08-2006 10:12 PM
Hi, your setting of IT_SORT-subtot = 'X' is necessary, however u also need something like this in the catalog definition for the ALV:
gt_itab_catalog-fieldname = 'TOTWR'.
gt_itab_catalog-tabname = 'ITAB1'.
gt_itab_catalog-seltext_l = 'Total'.
gt_itab_catalog-just = 'R'.
gt_itab_catalog-col_pos = 9.
gt_itab_catalog-outputlen = 15.
<b> gt_itab_catalog-do_sum = 'X'.</b>
APPEND gt_itab_catalog.
Hope it helps.
Regards,
Gilberto Li