Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

alv subtotals problem

alejandro_romero2
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Pass X to the DO_SUM in fieldcaltalog for the field's you want subtotal.

2 REPLIES 2

Former Member
0 Kudos

HI,

Pass X to the DO_SUM in fieldcaltalog for the field's you want subtotal.

0 Kudos

thanks a lot it works now