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

How to display Group heading in ALV report

In my project I have to display group heading in an ALV report. Heading1 as group heading for Col Head1 and Col head2, Heading2 as group heading for Col head3 and Col head4.

Heading 1 Heading 2

Col head1 Col Head2 Col Head3 Cold head4

Can this be done, if so how ?

Thanks & regards

Vivek Raj

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 Oct 14, 2005 at 03:27 AM

    Hi Vivek,

    You can do this by specifying the TOP-OF-LIST event.

    ie.

    DATA: st_events TYPE slis_alv_event.    "Event Structure
    
    * Internal Table for Event Table
    DATA: tbl_events TYPE slis_t_event.
    
    
    CLEAR st_events.
    st_events-name = slis_ev_top_of_list.
    st_events-form = 'TOP_OF_LIST_ROUTINE'.
    APPEND st_events TO tbl_events.
    
    FORM TOP_OF_LIST_ROUTINE.
      write:/ 'heading1, heading2'.
    ENDFORM.
    
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_interface_check       = ' '
                i_callback_program      = g_repid
                i_callback_user_command = 'PROCESS_USER_COMMANDS'
                it_fieldcat             = tbl_fieldcat
                i_default               = 'X'
                i_save                  = ' '
                is_layout               = st_layout
                it_events               = tbl_events
           TABLES
                t_outtab                = tbl_kna1
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    

    or you can use FM REUSE_ALV_COMMENTRY_WRITE.

    Hope this helps.

    Cheers,

    Pat.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2005 at 04:23 AM

    Hi,

    Check this link.

    http://www.sap-img.com/fu037.htm

    It discusses exactly similar thing.

    Kindly reward points by clicking the star on the left of reply[blue star-problem solved,green-6 points,yellow-2points],if it helps.

    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.