Skip to Content
author's profile photo Former Member
Former Member

Using REUSE_ALV_GRID_DISPLAY function module to display subtotal text

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..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 04:01 AM

    Hi,

    In the layout varaible

    layout-subtotals_text = 'Subtotal text'.

    regards,

    Santosh Thorat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 04:21 AM

    hI,

    Use this

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

    With Rgds,

    S.Barani

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 23, 2007 at 04:44 AM

    Hi,

    Try like this

    wa_layout-subtotals_text = 'Subtotal'.

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 05:09 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 05:13 AM

    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....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.