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: 

Using REUSE_ALV_GRID_DISPLAY function module to display subtotal text

Former Member
0 Kudos

Hi all,

I managed to display the subtotal but now I need to display subtotal caption / text beside it... example:

Subtotal Consumption (USD) : 1000.00

I managed to get the subtotal 1000.00...How do I display the caption / text 'Subtotal Consumption (USD)'?

Please help...Thanks..

5 REPLIES 5

Former Member
0 Kudos

Hi,

In the layout varaible

layout-subtotals_text = 'Subtotal text'.

regards,

Santosh Thorat

Former Member
0 Kudos

hI,

Use this

<b>layout-subtotals_text = 'U r Text'.</b>

With Rgds,

S.Barani

former_member386202
Active Contributor
0 Kudos

Hi,

Try like this

wa_layout-subtotals_text = 'Subtotal'.

Regards,

Prashant

Former Member
0 Kudos

HI

code.

-


wa_layout-zebra = 'X'.

wa_layout-subtotals_text = 'Total'.

wa_layout-totals_text = 'Sum of Marks'.

alv statement.

-


is_layout = wa_layout

Declaration.

-


DATA : wa_layout type slis_layout_alv.

Eg:2

Try this one

form build_layout.

gd_layout-no_input = 'X'.

gd_layout-colwidth_optimize = 'X'.

gd_layout-totals_text = 'Totals'(201).

endform. " BUILD_LAYOUT

Also check this sample program

http://www.sapdevelopment.co.uk/reporting/alv/alvlist_code.htm

Former Member
0 Kudos

Hello all,

Thanks for the reply...

I have tried it before I post this message but I cannot get the desired output.

DATA g_layout TYPE slis_layout_alv.

CLEAR g_layout.

g_layout-colwidth_optimize = ' '.

g_layout-f2code = '&ETA'.

g_layout-zebra = 'X'.

g_layout-detail_popup = 'X'.

g_layout-get_selinfos = 'X'.

g_layout-cell_merge = 'X'.

g_layout-reprep = 'X'.

g_layout-no_subtotals = ' '.

g_layout-colwidth_optimize = 'X'.

g_layout-subtotals_text = 'Test subtotal text'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_interface_check = ' '

i_callback_program = g_repid

is_layout = g_layout

it_fieldcat = gt_fieldcat

it_sort = gt_sort[]

i_save = g_variant_save

is_variant = g_def_variant

it_events = gt_events

is_print = g_print

TABLES

t_outtab = itab

EXCEPTIONS

program_error = 1

OTHERS = 2.

Please advice...Thanks....