Multiple Heading in ALV Grid

Hello ,
I have a requirement to display Multiple heading in ALV Grid, I am using the Class 'cl_gui_alv_grid'. please let me know if you have Any suggestions.
Ex:
|                 Divison                     |     
Sub D:1
Sub D: 2
Sub D: 3
    Like wise i have few more divisions to display and Under we need to display the Sub Division also .
Thanks in Advance..  Waiting for your suggestions.
With Best Regards
Nags

Hi,
I had attempted to do it in the object oriented way, but found no ready solution, so I settled for the below solution.
Please use the function REUSE_ALV_COMMENTARY_WRITE.
This allows you to print multiple lines in the header.
I had a requirement of showing 5 lines in the header.
So i went on like:
DATA: it_list_commentary TYPE slis_t_listheader,
           wa_list_commentary TYPE slis_listheader.
wa_list_commentary-typ = 'H'.
wa_list_commentary-info = <text>.
APPEND wa_list_commentary TO it_list_commentary.
wa_list_commentary-typ = 'S'.
wa_list_commentary-info = <text>.
APPEND wa_list_commentary TO it_list_commentary.
I fed he internal table with all 5 lines like above.
Finally I called the function.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = it_list_commentary.
Regards,
Prosenjit.
Edited by: prosenjit chaudhuri on Jan 28, 2009 6:14 AM

Similar Messages

  • Header in ALV grid

    Read the posted messages but still have some query regarding layout of Header in ALV grid. Using ALV Grid (not OO concept) in the report.
    - Can texts be printed in two sections in a single row like
    Name :                                 Designation:
    Age:                                   Cost Centre:
    - How to increse the row size of the header. Right now have to scroll to see the complete header.
    Looking forward for replies.
    Thanks
    anu

    The font size depends on what you have specified  for the parameter SLIS_LISTHEADER ( H = Header, S = Selection, A = Action are the valid values), I don't think we have selection of the font size as such.
    So, in your case you can specify Name / Designation as Header and Age / Cost Center as Selection so that they appear in different font.
    I am guessing you are using the function REUSE_ALV_COMMENTARY_WRITE, for writing the header.
    regards,
    Ravi
    Note : Please mark all the helpful answers

  • Reg. lengh of header of alv grid.....have ur points.

    Hi all,
    -I want to show text on the right side of the header of ALV grid.
    -Secondly i have limit of around 60 characters in a line...i want to add more words in the same line.....
    <b>see the code...here..</b>
      wa_listheader-typ = 'S'.
      wa_listheader-info = 'THE FUNCTIONAL LOCATION WISE PERCENTAGE   IMPLEMENTAION'.
      APPEND wa_listheader TO it_listheader.
      CLEAR wa_listheader.
    <b>Thanx in advance..</b>
    Have ur points.
    Regards,
    pradeep phogat

    Try this
    WA_LINE-TYP = 'S'..----
    ><b>'H' to print in header</b>
    CONCATENATE 'THE FUNCTIONAL LOCATION WISE PERCENTAGE IMPLEMENTAION'.
    V_RYEAR INTO WA_LINE-INFO
       SEPARATED BY SPACE.
    APPEND WA_LINE TO IT_LIST_TOP_OF_PAGE.
    Thanks

  • How to make 1st column as header in ALV grid

    Hi Experts,
    How to make 1st column as header in ALV grid as attached. Please help.
    Thanks in advance.

    Hi manoj,
    Try with,
    FM REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Regards,
    Venkat.

  • Folder for multiple details in ALV GRID DISPLAY

    Hi All,
    I am developing one ALV GRID DISPLAY report. Here I am displaying the material and production order details in the report. If we have the multiple production order details for one material , then in that case , we have to place one folder at the first material level, in that folder I need to show all the multiple production order details.
    I am using FUNCTION MODULE to develope the report, not using any Objects to develope this. 
    Thanks in advance.
    Ramesh.

    Here is a simple example of such an ALV.
    report zrich_0001.
    type-pools: slis.
    data: begin of head occurs 0,
           matnr type afpo-matnr,
           maktx type makt-maktx,
           EXPAND type c,
          end of head.
    data: begin of detail occurs 0,
           aufnr type afpo-aufnr,
           matnr type afpo-matnr,
           werks type aufk-werks,
           pwerk type afpo-pwerk,
           psmng type afpo-psmng,
          end of detail.
    start-of-selection.
      select * into corresponding fields of table detail
                   from afpo
                      inner join aufk
                        on afpo~aufnr = aufk~aufnr
                      inner join afko
                        on afpo~aufnr = afko~aufnr
                                  up to 500 rows
                                        where aufk~auart = 'PP01'.
      if not detail[] is initial.
        sort detail ascending by matnr.
        select distinct * into corresponding fields of table head
                  from makt
                     for all entries in detail
                        where matnr = detail-matnr
                          and spras = sy-langu.
      endif.
      perform call_alv.
    *       FORM call_alv                                                 *
    form call_alv.
      data: gt_fieldcat type slis_t_fieldcat_alv,
            gs_keyinfo  type slis_keyinfo_alv,
            gs_layout   type slis_layout_alv.
      data: ls_fieldcat type slis_fieldcat_alv.
      clear gs_keyinfo.
      gs_keyinfo-header01 = 'MATNR'.
      gs_keyinfo-item01   = 'MATNR'.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'MATNR'.
      ls_fieldcat-reptext_ddic = 'Material'.
      ls_fieldcat-tabname      = 'HEAD'.
      ls_fieldcat-outputlen    = 18.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'MAKTX'.
      ls_fieldcat-reptext_ddic = 'Description'.
      ls_fieldcat-tabname      = 'HEAD'.
      ls_fieldcat-outputlen    = 40.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'AUFNR'.
      ls_fieldcat-reptext_ddic = 'Production Order'.
      ls_fieldcat-tabname      = 'DETAIL'.
      ls_fieldcat-outputlen    = 12.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'WERKS'.
      ls_fieldcat-reptext_ddic = 'Production Plant'.
      ls_fieldcat-tabname      = 'DETAIL'.
      ls_fieldcat-outputlen    = 4.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'PWERK'.
      ls_fieldcat-reptext_ddic = 'Planning Plant'.
      ls_fieldcat-tabname      = 'DETAIL'.
      ls_fieldcat-outputlen    = 4.
      append ls_fieldcat to gt_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'PSMNG'.
      ls_fieldcat-reptext_ddic = 'Quantity'.
      ls_fieldcat-tabname      = 'DETAIL'.
      ls_fieldcat-outputlen    = 20.
      append ls_fieldcat to gt_fieldcat.
      gs_layout-expand_fieldname = 'EXPAND'.
      call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
           exporting
                it_fieldcat      = gt_fieldcat[]
                is_layout        = gs_layout
                i_tabname_header = 'HEAD'
                i_tabname_item   = 'DETAIL'
                is_keyinfo       = gs_keyinfo
           tables
                t_outtab_header  = head
                t_outtab_item    = detail.
    endform.
    Regard,s
    RIch Heilman

  • Check Box in Header of ALV GRID only............

    Hi Experts,
                   Can anyone help me out... in keeping the Check box at the Header Level.....
    This requirement is in the copy of the standard transaction "ME2N". 
    1. In ME2N when you click on the Chage Layout button of ALV grid
    and choose "Sorting" tabe.
    2. Add any 3 fields say 1. Vendor/Supply plant 2. Purchasing group and 3. Purchasing document in the Sort criteria and choose accending order radio button and check box in the sum .
    3. Now click on the Displayed Column tab and remove the above 3 fields from the Displayed colums and add it column set
    4. Now report shows the heirarchial one in the sorting manner.
    5. I want the Check Boxes at all levels both in the header and the item level.
    When I click on the Header level check box all the item level check box should get checked. When I add the check box in the field catalog I am able to see the check box in the item level only because only item level data appears in the internal table and Header level is displayed based on the ALV grid sorting option and that row records are unknown in the internal table.
    Is there some thing which I can do to get the check box at the header level retaining all the functionality of ME2N and ALV GRID.....
    It would be great help if some one solves me this issue... Points will be awarded.
    Br,
    Laxmi.

    Hi Bharath,
               Thanks for your response. Select ALL already existing... My requirement is not to get the whole report records selected at  particular level all items and header should get selected. Say for example  I have Vendor2 i.e,  vendor 1 and vendor2. So in the Vendor 1 i will have Purchasing group1 , Purchasing document 1 and say 10 items under Purchasing document. say same as like in Vendor2. So if Click on the Vendor1 all the sub items of it have to selected so that I can perform further action only for these items not for the enter items of the report.
    Br,
    Laxmi.

  • List header for alv grid using abap objects

    Hai all,
          I have displayed alv grid in container control using abap objects i.e. using method set_table_for_first_display.
    now i need to display list header for this alv grid.
    please help me how to create with a sample coding.
    Thanks and regards,
    Prabu S.

    Create a splitter using CL_GUI_EASY_SPLITTER_CONTAINER with a top and bottom half.  Put the alv grid in the bottom half.  Use cl_dd_document (documented in help.sap.com )  to build the header in the top half.  Use events on CL_GUI_ALV_GRID to handle the top-of-list printing.
    Or, if available, use CL_SALV_TABLE, and read the documentation on that.  When I needed a header for my report, that's what I did.  There's plenty of good documentation about if you'll search for it.
    matt

  • Header in alv grid using class

    Hello All,
        I developed alv grid using class method.
    First I created CREATE OBJECT GR_CCONTAINER
    then  CREATE OBJECT GR_ALVGRID
    then  PERFORM FIELD_CATALOG TABLES GT_FIELDCAT----
    for field catalog
        PERFORM LAYOUT CHANGING GS_LAYOUT.----
    for header
        p_gs_layout-grid_title = 'class method'.
      p_gs_layout-sel_mode = 'D'.
      APPEND P_GS_LAYOUT TO IT_LAYOUT.
    and finally CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
    the report is cooming fine but in header it comes only "class method".
    but i need also
    1. reporting date
    2. reporting time.
       can any body tell me how i can i put 2 more heading line
    Thanks,
    Rakesh

    Hi Dude,
    Please refer the below link how to handle  the header in alv using abap oo
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/abapObjects-ALVModel-UsingHeaderand+Footer
    Hope it clears,..............
    Thanks & Regards
    Ramakrishna Pathi

  • How to capture multiple rows of ALV grid when user selected?

    Actually,It is easy to get one single line.However, my user wants select several lines of ALV grid  by condition  .  i need to process the selected lines ,so i need to put these lines into an internal table. But now, i have no idea to capture the lines.
    What method for an ALV Grid will return the lines the user has selected?
    Appreciate for your help!
    Edited by: Heyman52 on Aug 25, 2010 4:28 AM
    Edited by: Heyman52 on Aug 25, 2010 4:30 AM

    Hi,
    Once user selects multiple rows and press another button for further execution, you can modify your internal table with marked rows using selection column.
    You need to add user command code in your ALV grid call. Please refer below code.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM       = SY-REPID
            I_CALLBACK_PF_STATUS_SET = 'F_GUI_STATUS'
            I_CALLBACK_USER_COMMAND  = 'F_USERCOMMAND'
            I_GRID_TITLE             = TEXT-026
            IS_LAYOUT                = WA_LAYOUT
            IT_FIELDCAT              = I_FIELDCAT
          TABLES
            T_OUTTAB                 = I_OUTTAB
          EXCEPTIONS
            PROGRAM_ERROR            = 1
            OTHERS                   = 2.
        IF SY-SUBRC NE 0.
          MESSAGE S475 DISPLAY LIKE 'E'.
          LEAVE LIST-PROCESSING.
        ENDIF.
    *- User command for details display.
        PERFORM F_USERCOMMAND USING I_UCOMM
                                    I_SELFIELD.
    FORM F_USERCOMMAND USING FP_R_UCOMM LIKE SY-UCOMM
                             FP_SELFIELD TYPE SLIS_SELFIELD.
    IF L_V_REF_GRID IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            E_GRID = L_V_REF_GRID.
      ENDIF.
      IF NOT L_V_REF_GRID IS INITIAL.
        CALL METHOD L_V_REF_GRID->CHECK_CHANGED_DATA.
      ENDIF.
    ENDFORM.
    You can then read your final internal table as below and take the selected records in another internal table.
    LOOP AT I_OUTTAB ASSIGNING <FS_OUTTAB> WHERE SEL EQ 'X'.
            APPEND <FS_OUTTAB> TO I_CHECK.
          ENDLOOP.
    Edited by: Archana Pawar on Aug 25, 2010 11:16 AM

  • Selecting Multiple Rows from ALV GRID Display

    Hi,
    I am having a ALV GRID Display. I want to select multiple rows from the Output and move them to an internal table.
    Please let me know how do I acheive this.
    Thanks in advance,
    Ishaq.

    Hi,
    Have a look on the following code. It displays the selected rows which hv been selected in basic list.
    TABLES:
      spfli.
    TYPE-POOLS:
      slis.
    DATA:
      BEGIN OF t_spfli OCCURS 0,
        checkbox.
            INCLUDE STRUCTURE spfli.
    DATA:  END OF t_spfli.
    DATA:
      t_sspfli LIKE STANDARD TABLE OF t_spfli .
    DATA:
      fs_spfli LIKE LINE OF t_sspfli.
    DATA:
      fs_layout TYPE  slis_layout_alv,
      w_program TYPE sy-repid.
    SELECT *
      FROM spfli
      INTO CORRESPONDING FIELDS OF TABLE t_spfli.
    *fs_layout-info_fieldname = 'COLOR'.
    fs_layout-box_fieldname = 'CHECKBOX'.
    w_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program       = w_program
        i_callback_pf_status_set = 'FLIGHT'
        i_callback_user_command  = 'SPFLI_INFO'
        i_structure_name         = 'SPFLI'
        is_layout                = fs_layout
      TABLES
        t_outtab                 = t_spfli
      EXCEPTIONS
        program_error            = 1
        OTHERS                   = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  FLIGHT
          text
         -->RT_EXTAB   text
    FORM flight    USING rt_extab TYPE slis_t_extab..
      SET PF-STATUS 'FLIGHT' EXCLUDING rt_extab.
    ENDFORM.                    "FLIGHT
    *&      Form  SPFLI_INFO
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM spfli_info USING ucomm LIKE sy-ucomm
                           selfield TYPE slis_selfield.
      selfield-refresh = 'X'.
      CASE ucomm.
        WHEN 'FLIGHT'.
          LOOP AT t_spfli.
            IF t_spfli-checkbox = 'X'.
              t_spfli-checkbox = ' '.
             t_spfli-color = 'C51'.
              MODIFY t_spfli TRANSPORTING checkbox.
              fs_spfli = t_spfli.
              APPEND fs_spfli TO t_sspfli.
            ENDIF.
          ENDLOOP.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR fs_spfli.
      fs_layout-info_fieldname = 'COLOR'.
    fs_layout-confirmation_prompt = 'X'.
      fs_layout-key_hotspot = 'X'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = w_program
          i_structure_name   = 'SFLIGHT'
          is_layout          = fs_layout
        TABLES
          t_outtab           = t_sspfli
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      REFRESH t_sspfli.
    ENDFORM.                    "SPFLI_INFO
    Regards,
    Chandu

  • Selecting multiple rows in ALV grid display

    Hi,
    I have an ALV grid display in my report.
    My grid contains multiple rows.
    I have to select multiple rows at a time, to perform some operations on the selected rows.
    How can it be achieved?
    Thanks,
    Sandeep.

    Hi ,
    you have to use a box fieldname in the report to be able to select multiple lines at a time :
    - in your internal table declaration put the first field as 'box_fieldname' of type c1
    - then in your work area for layout add, lwa_layout-box_fieldname =     'box_fieldname'
    - in the perform for handling user commands, all selected lines will have an "X" in the field name  'box_fieldname'
    Thanks and Regards,
    Dev.

  • Multiple Selection in ALV grid

    HI All,
    I am displaying output using ALV grid method. On screen i am selecting multiple rows & based on selection i want process further. How can i determine whcih rows user has selected ?
    Regards,
    Rahul

    Hi,
    In IT_FIELDCAT you can pass one field with attributes of check box.
    for example.
    Declare:
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    FIELDCAT_LN LIKE LINE OF GT_FIELDCAT.
    Pass the below values.
    FIELDCAT_LN-FIELDNAME = 'CHECK'.
    FIELDCAT_LN-TABNAME = 'ITAB1'.
    FIELDCAT_LN-KEY = ' '. "SUBTOTAL KEY
    FIELDCAT_LN-NO_OUT = ' '.
    FIELDCAT_LN-SELTEXT_L = 'Check Box'.
    FIELDCAT_LN-CHECK-BOX = 'X'.
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    <b>rEWARD IF USEFULL</b>

  • Selecting multiple rows in alv grid

    my requirement is i want to send the data from alv grid to smartforms using check boxes from report output but without using either oo framework or layout-box_fieldname.can anybody give me the solution?

    in fieldcatalog you have to use CHECKBOX = 'X'  INPUT = 'X' and EDIT = 'X' for the columns which ever you want to be check box .
    You need use the Function moduel in the user command to get the updated data with checked value.
    GET_GLOBALS_FROM_SLVC_FULLSCR
    follow the sample code.
    REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
    TYPE-POOLS: SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    L_LAYOUT TYPE SLIS_LAYOUT_ALV,
    X_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    CHK(1),
    color(4),
    END OF ITAB.
    SELECT VBELN
    POSNR
    FROM VBAP
    UP TO 20 ROWS
    INTO TABLE ITAB.
    X_FIELDCAT-FIELDNAME = 'CHK'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 1.
    X_FIELDCAT-INPUT = 'X'.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-CHECKBOX = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-SELTEXT_L = 'VBELN'.
    X_FIELDCAT-HOTSPOT = 'X'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-SELTEXT_L = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 3.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_LAYOUT-info_fieldname = 'COLOR'.
    *L_LAYOUT-ZEBRA = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = L_LAYOUT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_FIELDCAT = IT_FIELDCAT
    TABLES
    T_OUTTAB = ITAB
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    "Copy the standard program SAPLKKBL , STANDARD status to your program
    SET PF-STATUS 'STATUS'.
    ENDFORM. " STATUS
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    DATA: GD_REPID LIKE SY-REPID, "Exists
    REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    IF REF_GRID IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = REF_GRID.
    ENDIF.
    IF NOT REF_GRID IS INITIAL.
    CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
    ENDIF.
    loop at itab where chk = 'X'.
    "collect all the records to an internal table here..
    endloop.
    "Now call your smartform here using SSFFunction module and the get the dynamic function . From there call the Function with the selected values, to show the smartform
    RS_SELFIELD-refresh = 'X'.
    break-point.
    ENDFORM. "USER_COMMAND
    Regards
    Vijay Babu Dudla

  • Multiple header in ALV list

    hi abapers,
    i got a requirement to disply material no.'s in descending order in lav grid/list both..
    now, when i did sorting of the column, grid is displaying the output fine but in list HEADER IS GETTING PRINTED MULTIPLE TIMES, one for each new matnr [although it gets descendigly sorted],
    below is my code of sorting, could you please expalin why is this happening,. ?? is this compatibiltiy issue ??
    *&      Form  ZF_SORTING
          text
         -->P_I_SORTINFO  text
    FORM zf_sorting USING p_i_sortinfo TYPE slis_t_sortinfo_alv.
      DATA l_sortinfo TYPE slis_sortinfo_alv.
      REFRESH p_i_sortinfo.
      CLEAR l_sortinfo.
    *&-- passing attributes to sort the column
    L_SORTINFO-SPOS = '1'.           " 1 sorting position
      l_sortinfo-fieldname = 'MATNR'.      "fieldname
      l_sortinfo-tabname = 'I_FINAL'.      "final table
      l_sortinfo-down = 'X'.          "enable
      l_sortinfo-group = ' * '.      "DONT REPEAT COMMON ITEM
      APPEND l_sortinfo TO p_i_sortinfo.
    ENDFORM.                    " ZF_SORTING
    *&      Form  zf_display_alv_list
          text
    -->  p1        text
    <--  p2        text
    FORM zf_display_alv_list .
    *&--calling FM to display LIST LAYOUT
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = v_progname
          I_CALLBACK_PF_STATUS_SET = 'ZF_PF_STATUS_SET'
          is_layout                = wa_layout
          it_fieldcat              = i_fieldcat
          I_DEFAULT                = 'X'
          it_events                = i_eventcat
          it_sort                  = i_sortinfo
          I_SAVE                   = C_SAVE        "all user/default
          IS_VARIANT               = IT_VARIANT1
        TABLES
          t_outtab                 = i_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " zf_display_alv_list
    Please help,

    Hi,
    Did you find a solution for this?, I am also having a similar requirement.
    If you have any work around please share.
    Thanks.

  • Multiple Header in ALV

    Hello everybody,
    i am working on a report programme in which req. is to print header everytime set of 3 fields changes and also if record overflows.
    1. if record overflows : header is same as in previous page
    2. if new set of field occurs : new header should be printed.
    Can someone please suggest me how to do this using ALV report.
    Details : I have to do subtotaling with a particular set of field 4 times. 2 times on the same field which i am doing it manually and creating an internal table which conatins all the information.
    Regards,
    Abhishek Gupta

    Hello everybody,
    i am working on a report programme in which req. is to print header everytime set of 3 fields changes and also if record overflows.
    1. if record overflows : header is same as in previous page
    2. if new set of field occurs : new header should be printed.
    Can someone please suggest me how to do this using ALV report.
    Details : I have to do subtotaling with a particular set of field 4 times. 2 times on the same field which i am doing it manually and creating an internal table which conatins all the information.
    Regards,
    Abhishek Gupta

Maybe you are looking for