Skip to Content
0
Mar 19, 2009 at 04:52 PM

alv subtotals problem

18 Views

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.