Skip to Content

Total in ALV

Hi

I have used to do_sum = 'X' option in the fieldCatalog for totalling the fields in the ALV. I am using the FM REUSE_ALV_GRID_DISPLAY. Now the total appears in the ALV. But i want the label "Total in Lakhs" to appear in the last row first column where the totals appear.(Yellow Line).

Can anyone Help.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 06:38 AM

    Hi,

    In the Layout Structure put you label in the "TOTALS_TEXT" field.

    ie.

    data: st_layout like slis_layout_alv.

    st_layout-totals_text = 'Total in Lakhs'.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING....

    is_layout = st_layout...

    Hope this helps.

    Cheers,

    Pat.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2005 at 07:36 AM

    Hi Patrick Yee

    I am still not able to get it even after setting this in the Layout.

    DATA: st_layout TYPE slis_layout_alv.

    st_layout-totals_text = 'Total in Lakhs'.

    st_layout-subtotals_text = 'A'.

    st_layout-zebra = 'X'.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_grid_title = text-001

    is_layout = st_layout

    it_fieldcat = fieldcat[]

    TABLES

    t_outtab = alv_tab[]

    EXCEPTIONS

    program_error = 1

    OTHERS = 2.

    Help !!!!

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Shanmugham,

      Humm it looks like the IS_LAYOYT-TOTALS_TEXT field is only working for FM 'REUSE_ALV_LIST_DISPLAY'. I don't seem to be able to get it to work for the 'REUSE_ALV_GRID DISPLAY' either. Can you use the ALV List FM instead?

      Cheers,

      Pat.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 07:45 AM

    Hi,

    Check whether the width of the column is enough to display the label "TOTAL IN LAKHS"

    Thanks,

    Ruthra.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2005 at 07:53 AM

    Hi,

    Try this option in the layout

    ls_layout-colwidth_optimize = 'X'.

    Colwidth_optimize (1) TYPE c: This parameter optimizes the length of the different columns in the output. The width of the different col. now depends on the max. Length of the data in the column.

    Value set: SPACE, 'X'

    'X' = <b>optimizes the column width so that all contents are displayed completely</b>

    Kindly reward points if u find it useful.

    Thanks,

    Ruthra.

    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.