03-19-2009 4:52 PM
hi gurus i just want subtotals in my alv but it only sort the fields by NOACRE but no subtotals are shown
what shold i do ? this is a portion of my source code my container is a docking container
data gt_sort type lvc_t_sort
performs build_sortcat
form build_sortcat .
data wa_sort like line of gt_sort.
wa_sort-spos = 1 .
wa_sort-fieldname = 'NOACRE'.
wa_sort-subtot = 'X' .
wa_sort-up = 'X'.
wa_sort-group = '01'.
append wa_sort to gt_sort.
clear wa_sort.
endform.
create object custom_container
exporting
repid = sy-repid
dynnr = sy-dynnr
extension = 1500
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
create object grid1
exporting i_parent = custom_container.
gs_variant-report = sy-repid.
gs_variant-variant = dispo.
call method grid1->set_table_for_first_display
exporting
is_variant = gs_variant
i_save = 'A'
i_default = 'X'
is_layout = gs_layout
changing
it_fieldcatalog = gt_fieldcat
it_sort = gt_sort[]
it_outtab = it_file[].
call method grid1->set_ready_for_input
exporting
i_ready_for_input = 0.
03-19-2009 5:00 PM
HI,
Pass X to the DO_SUM in fieldcaltalog for the field's you want subtotal.
03-19-2009 5:00 PM
HI,
Pass X to the DO_SUM in fieldcaltalog for the field's you want subtotal.
03-19-2009 5:20 PM