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

Add text to alv report

Hi expert,

In alv report totals are displayed as "TOTAL", And i need to display grand total as "GRAND TOTAL" as a text, but it over wright the text as "TOTAL" as "GRAND TOTAL".

I will return the code below.

FORM subtotal_text CHANGING p_total TYPE any

p_subtot_text TYPE slis_subtot_text.

DATA: text TYPE string.

data: v_len type i,

V_LINE TYPE I.

v_len = lines( it_output ).

IF p_subtot_text-criteria = 'LIFNR'.

LOOP AT it_output INTO wa_output.

  • ON CHANGE OF wa_output-lifnr.

CONCATENATE wa_output-name 'TOTAL' INTO text SEPARATED BY SPACE.

p_subtot_text-display_text_for_subtotal = text.

CLEAR text.

  • ENDON.

ENDLOOP.

ENDIF.

  • if sy-index = v_len.

  • p_subtot_text-display_text_for_subtotal = 'GRAND TOTAL'.

  • endif.

  • ENDLOOP.

Thank you,

Dinesh.B

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2009 at 04:46 AM

    hi

    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.