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

alv heading change

Dear all,

I have saved a user specific layout.

When i see the print preview system shows the report name,whereas i want to view the name of layout as report heading(name).

Can it be possible?

If yes plz give us the valuable inputs.

Thanks in advance.

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 Jan 20, 2008 at 12:50 PM

    Hi Sourabh,

    I think that your requirement is to have a custom (user-defined) title fo your alv report. If this so, you may use the following code to achieve that:

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = gv_repid

    i_callback_top_of_page = 'TOP_OF_PAGE'

    is_layout = gs_layout

    it_fieldcat = gt_fcat[]

    it_sort = gt_sort[]

    TABLES

    t_outtab = gt_final.

    FORM top_of_page.

    • Header Type

    gs_header-typ = 'H'.

    • Write first line of title

    CONCATENATE text-003 ''

    INTO gs_header-info.

    APPEND gs_header TO gt_header.

    CLEAR:

    gs_header.

    • Write second line

    gs_header-typ = 'H'.

    CONCATENATE text-004

    text-005

    INTO gs_header-info

    SEPARATED BY space.

    APPEND gs_header TO gt_header.

    CLEAR:

    gs_header.

    ENDIF.

    • Display the header title

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    it_list_commentary = gt_header.

    CLEAR:

    gt_header.

    REFRESH:

    gt_header.

    ENDFORM. "TOP_OF_PAGE

    Hope it helps you and yes, if it does, plz don't miss on awarding points.

    Regards,

    Rumi

    Edited by: rumi kamal on Jan 20, 2008 1:50 PM

    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.