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

Displaying Client standard header in ALV output

Hi everybody,

I am displaying the ALV report.

On the top-of-page Client standard header has to display.

Can any one suggest me how to achive this.

Thanks in advance.

Karunakar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2005 at 12:32 PM

    Hi Karunakar,

    I don't understand quite well your question. But if you would like to print a "standard" heading for your reports, you can use routine BATCH-HEADING(RSBTCHH0) at your top_of_page event (or routine, if you use ALV).

    For example:

    form top_of_page_routine.
      bhdgd-line1 = sy-title.
      bhdgd-line2 = 'Second line of text'.
      bhdgd-lines = sy-linsz.
      bhdgd-uname = sy-uname.
      bhdgd-repid = sy-cprog.
    
      PERFORM batch-heading(rsbtchh0).
    endform.

    and then...

    ...
      le_events-name = 'TOP_OF_PAGE'.
      le_events-form = 'TOP_OF_PAGE_ROUTINE'.
      APPEND le_events TO lt_events.
    ...
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
    ...
          it_events                      = lt_events
    ..
    

    Hope it helps. BR,

    Alvaro

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Dilip,

      Here is a simple template:

      FORM top_of_page USING cl_dd TYPE REF TO cl_dd_document.
      *
        DATA: l_string TYPE sdydo_text_element.
      
        l_string = sy-title.
        CALL METHOD cl_dd->add_text
          EXPORTING text      = l_string
                    sap_style = 'HEADING'.
      
        CALL METHOD cl_dd->new_line.
      
      * ...you could use several calls to "cl_dd->new_line" 
      * and "cl_dd->add_text" to get your heading lines, no
      * matter how many they are
      *
      ENDFORM.                    " top_of_page
      

      Then of course you should call the ALV:

          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
      ...
              i_callback_html_top_of_page       = 'TOP_OF_PAGE'
      ...
      

      You can also insert images (with "call method l_logo->add_picture", if you define "data: l_logo type ref to cl_dd_area") or even split the heading vertically (by using "call method cl_dd->vertical_split".

      I hope it helps. BR,

      Alvaro

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2005 at 06:34 PM

    Could you clarify?

    What type of ALV call are you making? The OO technique or the FM technique?

    Do you want the title online, batch or both?

    Are you referring to the standard title that SAP displays at the top of the GUI? For example, when you invoke SE80 it says 'Object Navigator' (4.6C) at the top? If this is what you want to change then take a look at the SET TITLEBAR command that you should issue in a PBO module to change the title online.

    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.