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: 

My subtotal text criteria(slis_subtot_text) is not getting populated...

aris_hidalgo
Contributor
0 Kudos

Hello Experts, 

After following many examples and making sure that my sort table is populated, 
my subtotal text is still not being displayed. Below is the code:

*&--------------------------------------------------------------------*
*&      Form  subtotal_text
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->IM_OUTPUT_FIN     text
*      -->IM_SUBTOTAL_TEXT  text
*----------------------------------------------------------------------*
FORM subtotal_text USING im_output_fin TYPE any
                         im_subtotal_text TYPE slis_subtot_text.

  IF im_subtotal_text-criteria = 'TAB_COUNTER'.
    im_subtotal_text-display_text_for_subtotal = 'Subtotal'.
  ENDIF.
ENDFORM.                    "subtotal_text

The im_subtotal_text has no values whatsoever. 
1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

There are two internal table that needs to be passed to the ALV FM / Method

a) Sort table

b) Field Catalog

For showing the sub totals and grand totals do the following

In the Field Catalog set the field DO_SUM to 'X'. In your case field MENGE

In the sort table set the field SUBTOT to 'X'. In your case the field LIFNR.

Sample report

http://www.sap-basis-abap.com/sapalv.htm

1 REPLY 1

Former Member
0 Kudos

hi

There are two internal table that needs to be passed to the ALV FM / Method

a) Sort table

b) Field Catalog

For showing the sub totals and grand totals do the following

In the Field Catalog set the field DO_SUM to 'X'. In your case field MENGE

In the sort table set the field SUBTOT to 'X'. In your case the field LIFNR.

Sample report

http://www.sap-basis-abap.com/sapalv.htm