ALV group headings ?

Hi,
I need to create an ALV output of format as given below
Group1                Group 2          
COLUMN1     COLUMN2 COLUMN3 COLUMN4 COLUMN5 COLUMN6
The column headings 1,2 and 3 should be grouped under Group1 heading and that with 4,5 and 6 under Group2 heading.
Please help me to get this format in ALV.
Thanks in advance.
Regards,
Anu.

Is this really not possible?
What about this screen I've found in a similar SDN thread: http://www.erphome.net/wdb/upload/forum14_f_3551_1154572086.jpg
Is that a fake?
Anu, would you kindly post how you solved this? I've tried using IT_SPECIAL_GROUPS parameter but it affects column selection in the layout configuration only, not at display.
Thank you!

Similar Messages

  • Need help with Group Headings and showing them on drill down.

    Hi all:
    I think this is a simple question and feel that I should already know the answer but for some reason it eludes me.  What I would like to know is the proper way to hide/display group headings and have them show up on drill down BUT not repeat on each group header.
    What I have for grouping is as follows:
    Group Header #1 u2013 Sales Rep
      Group Header #2 u2013 Customer
        Group Header #3 u2013 Product Class
          Group Header #4 u2013 Stock Code
            Details
          Group Footer #4 u2013 summary calculated on this line
        Group Footer #3  u2013 summary calculated on this line
      Group Footer #2 u2013 summary calculated on this line
    Group Footer #1 u2013 summary calculated on this line
    My goal is to have my report show only the lines listed below by default and allow the user to drill down group by group to the details section:
    Group Header #1 u2013 Sales Rep
      Group Footer #2 u2013 summary calculated on this line
    Group Footer #1 u2013 summary calculated on this line
    If anyone could offer any help it would be greatly appreciated!
    Thanks,
    FatMan

    click section expert, then for example of GH3, highlight it, then click on the formula box for suppression, and put in the code....
    Drilldowngrouplevel < 3
    The result will be that this GH3 is suppressed whenever the report is showing GH1 and 2 but not 3.
    In addition to this, you must Hide(Drill-down ok) GH3. This is also done in the section expert.
    Then just do the same for GF3, and for GH4/GF4 make sure you use...
    Drilldowngrouplevel < 4

  • Keep Group headings with data - control your page breaks

    Trying to keep the group heading with the appropriate transaction information.  Currently, get a group heading at the bottom of a page and then the transactions print on the next page.   Difficult to determine what the transaction information is without the appropriate group headings displayed.   The amount of transaction data is not static, it varies from page to page.  Some of the reports can be close to 100 pages.   Please advise.

    Hi Kim,
    You can use the option u201CNew Page Afteru201D in Section Expert for Group Footer section so that the new group Header will display on the next page.
    Regards,
    Alpana

  • ALV Grouping specific rows subtotal

    Hi Gurus,
    I have one peculiar issue like,
    For Ex.
    Customer       Material    Amount
    12345             m1            100
    12346             m1            150
    12346             m2            160
    12346             m2            165
    12347             m2            170
    12347             m2            50
    12348             m3            150
    Now the report is showing as follows:
    Customer       Material    Amount
    12345             m1            100
    subtotal                   100
    12346             m1            150
    12346             m2            160
    12346             m2            165
    subtotal                  475
    12347             m2            170
    12347             m2             50
    subtotal                   220
    12348             m3            150
    subtotal                   150
    <b>Total                         945</b>
    But the requirement is we want the subtotals for material "M2" also only for material M2 not for other materials. So the output should look like following
    Customer       Material    Amount
    12345             m1            100
    subtotal                    100
    12346             m1            150
    12346             m2            160
    12346             m2            165
    <b>subtotal                  325</b>
    subtotal                    475
    12347             m2            170
    12347             m2             50
    subtotal                    220
    12348             m3            150
    subtotal                    150
    Total                         945
    Hope I am clear to you all, please help me out with the right solution. Urgent !!!
    Thanks in advance,
    Naveen

    Hi,
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    Check the program in the following link:
    http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    13. Top-of-page in ALV
    selection-screen and top-of-page in ALV
    14.  ALV Group Heading
    http://www.sap-img.com/fu037.htm
    How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    15. ALV output to PDF conversion
    It has an example code for PDF Conversion.
    http://www.erpgenie.com/abap/code/abap51.htm
    converting the output of alv in pdf
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Regards
    ANJI

  • ALV group by functionality.

    Hello, i have an ALV which displays the agreement as well as its items. I have the following scenario.
    Alv display:
    Suppplier1   Cost center1    Merchandise cat. 1   Amount x
    Suppplier1   Cost center1    Merchandise cat. 1   Amount y
    Suppplier1   Cost center1    Merchandise cat. 1   Amount z
    Assume that the lines above belong to a single agreement, items 10 , 20 and 30 respectively
    Since the supplier , cost ,center and merchandise cat are similar and I have hidden the item number from the ALV layout. client wants only 1 line to appear if i sum the amount by supplier, cost center and merchandise cat. Is this possible by the alv grouping functionality?

    I have the following code so far. It gives me error gd_sort is a table without header line and therefore has no component called Fieldname. I cannot add headerline to gd_sort as that will make the program to dump because of mismatch in data type. Any ideas?
          gd_sort      TYPE slis_t_sortinfo_alv,
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = repid
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gd_layout
          it_fieldcat             = fieldcatalog
          it_sort                 = gd_sort
          it_events               = gt_events
          is_print                = gd_prntparams
          i_save                  = 'X'
        TABLES
          t_outtab                = i_zopen_alv
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
    FORM build_sort.
      gd_sort-fieldname = 'VBELN_VA'.
      APPEND gd_sort.
    ENDFORM.                    "build_sort

  • ALV Sub Headings

    Hi Experts,
    I have an requirement in wich we need to display headings in the follwoing format
    Heading 1                                       Heading 2           Heading3
    Sub Heading1.1 Sub Heading 1.2    Sub Heading 2.1 Sub Heading2.2
    How to get the format in ALV grid display.
    Regards,
    Iff

    <b>DATA :   x_events TYPE slis_alv_event,
    it_events TYPE slis_t_event.
    x_events-name = slis_ev_top_of_page.
    x_events-form = 'TOP_OF_PAGE'.
    APPEND x_events  TO it_events.
    CLEAR x_events .
    FORM top_of_page.
    *-To display the headers for main list
      FORMAT COLOR COL_HEADING.
    WRITE: / sy-uline(143).
      WRITE: /   sy-vline,
              8 'HEADING1' ,
              18 sy-vline,
              19 'HEADING2 ' ,
              30 sy-vline,
              41'HEADING3',
              52   sy-vline.
    WRITE: /   sy-vline,
              8 'SUBHEADING1.1' ,
              18 sy-vline,
              19 'SUBHEADING1.2 ' ,
              30 sy-vline,
              41'SUBHEADING2.1',
              52   sy-vline,
              54'SUBHEADING2.2',
              70   sy-vline.
      FORMAT COLOR OFF.
    ENDFORM.
    </b>

  • ALV Group by

    In my ALV report, I would like to group by Sales Order. How to accomplish this. Thank you
          WHEN 'VBELN_VA'.
            wa_fieldcatalog-seltext_l = 'Order No.'.
            wa_fieldcatalog-reptext_ddic = 'Order No.'.
            wa_fieldcatalog-emphasize = 'X'.
            wa_fieldcatalog-key = 'X'.
            MOVE: wa_fieldcatalog-seltext_l TO wa_fieldcatalog-seltext_m,
                  wa_fieldcatalog-seltext_l TO wa_fieldcatalog-seltext_s.
            ADD 1 TO wa_fieldcatalog-col_pos.

    I have the following code so far. It gives me error gd_sort is a table without header line and therefore has no component called Fieldname. I cannot add headerline to gd_sort as that will make the program to dump because of mismatch in data type. Any ideas?
          gd_sort      TYPE slis_t_sortinfo_alv,
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = repid
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gd_layout
          it_fieldcat             = fieldcatalog
          it_sort                 = gd_sort
          it_events               = gt_events
          is_print                = gd_prntparams
          i_save                  = 'X'
        TABLES
          t_outtab                = i_zopen_alv
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
    FORM build_sort.
      gd_sort-fieldname = 'VBELN_VA'.
      APPEND gd_sort.
    ENDFORM.                    "build_sort

  • Alv report headings in two lines

    Hi all,
    I have created an ALV report. Now the requirement is that the 60 odd columns should be divided into 3 parts.
    The first 20 colums come under a common heading above the column heading.
    21 to 40 come under another heading and so on.
    How can I give two lines of column headings.
    It should look like this.
    Project                 No of Enquiries                           Sales orders
                       col1     col2     col3.....                  col21   col22        col23...
    Please help.
    Regards,
    BP

    in the field catalog u will have an option to mention the row position.. check that..
    fc-fieldname = 'KUNRES'.
    fc-row_pos = '2'.            "<< this is what u needed..
    fc-seltext_s = 'Total'.
    fc-do_sum = 'X'.
    APPEND fc. CLEAR fc.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_interface_check = ' '
    i_callback_program = alv_repid
    i_callback_pf_status_set = 'SET_STATUS'
    i_callback_user_command = 'USER_COMMAND'
    is_layout = alv_layout
    it_fieldcat = fc[]             "<<<<<<<<<<<<fiedl catalog here..
    i_default = 'X'
    i_save = 'A'
    is_variant = alv_variant
    i_tabname_header = 'HEADER'
    i_tabname_item = 'LIST'
    is_keyinfo = alv_keyinfo
    is_print = alv_print
    TABLES
    t_outtab_header = header
    t_outtab_item = list.

  • ALV Grouping

    hi guys I have a table
    username | last login    | user locked | Activity group
    DALEX     | 01.01.2007 | X                | XYZ1
    DALEX     | 01.01.2007 | X                | XYZ2
    SHERB    | 01.01.2007 | X                  | XYZ1
    SHERB    | 01.01.2007 | X                  | XYZ2
    and i want to have it to be outputted into groups like this
    DALEX     | 01.01.2007 | X   | XYZ1
    *empty|empty|empty*| XYZ2
    SHERB    | 01.01.2007 | X    | XYZ3
    *empty|empty|empty*| XYZ4
    I have tried sorting across multiple fields but it hides the 01.01.2007 for SHERB as it is the same data as DALEX.
    Does anyone know of a way to only output data in an ALV grid that is different from the first row for each username?

    hi,
      You can try in this way, but the report can not be sorted after we get the ALV output.
      Populate the final internal table with spaces..
    loop at <itab>.
      abc |  def |  pqr  |10
            |       |        | 20
      at new <f1>.
       populate 4 fields
      endat.
    //  clear first 3 fields
      append final.
      endloop.
    Regards,
    Sailaja.

  • ALV group ing

    Hi,
    Is it possible to have a heading for each group i have in alv.. ie.. if i give sort for 3 fields. say a , b and c.. and i giv group = 'UL'. but before each group displays i need to display some text. i cud do it using group = '*' and then write in top of page, but my user insists on getting this in a single page. is this possible?
    hope I am clear with my requirement..
    regards,
    suzie
    Edited by: Suzie on Dec 4, 2008 11:16 AM
    Edited by: Suzie on Dec 4, 2008 6:00 PM

    REPORT ZBLOCK_ALV.
    CONSTANTS :
      c_x VALUE 'X'.
    Macro definition
    DEFINE m_fieldcat.
      ls_fieldcat-fieldname = &1.
      ls_fieldcat-ref_tabname = &2.
      ls_fieldcat-tabname = &3.
      append ls_fieldcat to lt_fieldcat.
    END-OF-DEFINITION.
    DEFINE m_sort.
      ls_sort-fieldname = &1.
      ls_sort-up        = c_x.
      append ls_sort to lt_sort.
    END-OF-DEFINITION.
    TYPE-POOLS: slis.                      " ALV Global types
    TYPES:
    1st Table
      BEGIN OF ty_kna1,
        kunnr TYPE kna1-kunnr,             " Customer number
        ernam TYPE kna1-ernam,             " Name of Person who Created
        erdat TYPE kna1-erdat,             " Creation date
        name1 TYPE kna1-name1,             " Name 1                    .
      END OF ty_kna1,
    2nd Table
      BEGIN OF ty_mara,
        matnr TYPE mara-matnr,             " Material number
        ernam TYPE mara-ernam,             " Name of Person who Created
        ersda TYPE mara-ersda,             " Creation date
        mtart TYPE mara-mtart,             " Material type
        matkl TYPE mara-matkl,             " Material group
      END OF ty_mara,
    3rd Table
      BEGIN OF ty_vbak,
        vbeln TYPE vbak-vbeln,             " Sales document
        vkorg TYPE vbak-vkorg,             " Sales organization
        vtweg TYPE vbak-vtweg,             " Distribution channel
        kunnr TYPE vbak-kunnr,             " Sold-to party
        erdat TYPE vbak-erdat,             " Creation date
      END OF ty_vbak.
    DATA:
      gs_layout TYPE slis_layout_alv,
      gt_kna1 TYPE TABLE OF ty_kna1,
      gt_mara TYPE TABLE OF ty_mara,
      gt_vbak TYPE TABLE OF ty_vbak.
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.    "#EC NEEDED
    PARAMETERS p_max(2) TYPE n DEFAULT '02' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
    Read data
      SELECT kunnr ernam erdat name1
        FROM kna1
       UP TO p_max ROWS
        INTO TABLE gt_kna1.
      SELECT matnr ernam ersda mtart matkl
        FROM mara
       UP TO p_max ROWS
        INTO TABLE gt_mara.
      SELECT vbeln vkorg vtweg kunnr erdat
        FROM vbak
       UP TO p_max ROWS
        INTO TABLE gt_vbak.
    END-OF-SELECTION.
      PERFORM f_display_data.
          FORM USER_COMMAND                                             *
    FORM user_command USING u_ucomm     TYPE sy-ucomm
                            us_selfield TYPE slis_selfield.     "#EC CALLED
      DATA:
        ls_vbak TYPE ty_vbak.
      CASE u_ucomm.
        WHEN '&IC1'.                       " Pick
          CASE us_selfield-tabname.
            WHEN 'GT_MARA'.
            WHEN 'GT_KNA1'.
            WHEN 'GT_VBAK'.
              READ TABLE gt_vbak INDEX us_selfield-tabindex INTO ls_vbak.
              IF sy-subrc EQ 0.
                SET PARAMETER ID 'AUN' FIELD ls_vbak-vbeln.
                CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
              ENDIF.
          ENDCASE.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND
          Form  f_display_data
    FORM f_display_data.
      DATA :
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
        ls_sort     TYPE slis_sortinfo_alv,
        lt_sort     TYPE slis_t_sortinfo_alv, " Sort table
        lt_events   TYPE slis_t_event,
        ls_event    TYPE slis_alv_event.
      gs_layout-group_change_edit = c_x.
      gs_layout-colwidth_optimize = c_x.
      gs_layout-zebra             = c_x.
      gs_layout-detail_popup      = c_x.
      gs_layout-get_selinfos      = c_x.
    Build field catalog and sort table
      m_fieldcat  'KUNNR' 'KNA1' 'GT_KNA1'.
      m_fieldcat  'ERNAM' 'KNA1' 'GT_KNA1'.
      m_fieldcat  'ERDAT' 'KNA1' 'GT_KNA1'.
      m_fieldcat  'NAME1' 'KNA1' 'GT_KNA1'.
      m_sort  'KUNNR'.
    Build Event Table
      MOVE        'TOP_OF_PAGE'        TO ls_event-name.
      MOVE        'TOP_OF_PAGE'        TO ls_event-form.
      APPEND ls_event TO lt_events.
      MOVE        'END_OF_LIST'        TO ls_event-name.
      MOVE        'END_OF_LIST'        TO ls_event-form.
      APPEND ls_event TO lt_events.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = lt_fieldcat
          is_layout               = gs_layout
          it_events               = lt_events
          it_sort                 = lt_sort
          i_save                  = 'A'
        TABLES
          t_outtab                = gt_kna1.
    ENDFORM.                               " F_DISPLAY_DATA
          FORM top_of_page                                              *
    FORM top_of_page.                                           "#EC CALLED
      ULINE.
      WRITE : sy-uname, sy-title(56) CENTERED, sy-datum.
      ULINE.
    ENDFORM.                               " TOP_OF_PAGE
          FORM End_of_list                                              *
    FORM end_of_list.                                           "#EC CALLED
      DATA :
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
        ls_sort     TYPE slis_sortinfo_alv,
        lt_sort     TYPE slis_t_sortinfo_alv, " Sort table
        lt_events   TYPE slis_t_event,
        ls_event    TYPE slis_alv_event.
    Build field catalog and sort table
      m_fieldcat 'MATNR' 'MARA' 'GT_MARA'.
      m_fieldcat 'ERNAM' 'MARA' 'GT_MARA'.
      m_fieldcat 'ERSDA' 'MARA' 'GT_MARA'.
      m_fieldcat 'MTART' 'MARA' 'GT_MARA'.
      m_fieldcat 'MATKL' 'MARA' 'GT_MARA'.
      m_sort 'MATNR'.
    Build Event Table
      MOVE 'END_OF_LIST'   TO ls_event-name.
      MOVE 'END_OF_LIST_2' TO ls_event-form.
      APPEND ls_event TO lt_events.
      gs_layout-list_append = c_x.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = sy-cprog
          it_fieldcat        = lt_fieldcat
          is_layout          = gs_layout
          it_sort            = lt_sort
          it_events          = lt_events
          i_save             = 'A'
        TABLES
          t_outtab           = gt_mara.
    ENDFORM.                               " END_OF_LIST
          FORM End_of_list_2                                            *
    FORM end_of_list_2.                                         "#EC CALLED
      DATA :
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
        ls_sort     TYPE slis_sortinfo_alv,
        lt_sort     TYPE slis_t_sortinfo_alv, " Sort table
        lt_events   TYPE slis_t_event,
        ls_event    TYPE slis_alv_event.
    Build field catalog and sort table
      m_fieldcat 'VBELN' 'VBAK' 'GT_VBAK'.
      m_fieldcat 'VKORG' 'VBAK' 'GT_VBAK'.
      m_fieldcat 'VTWEG' 'VBAK' 'GT_VBAK'.
      m_fieldcat 'KUNNR' 'VBAK' 'GT_VBAK'.
      m_fieldcat 'ERDAT' 'VBAK' 'GT_VBAK'.
      m_sort 'VBELN'.
    Build Event Table
      MOVE 'TOP_OF_PAGE' TO ls_event-name.
      MOVE 'TOP_OF_PAGE' TO ls_event-form.
      APPEND ls_event TO lt_events.
      gs_layout-list_append = c_x.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = sy-cprog
          it_fieldcat        = lt_fieldcat
          is_layout          = gs_layout
          it_sort            = lt_sort
          it_events          = lt_events
          i_save             = 'A'
        TABLES
          t_outtab           = gt_vbak.
    ENDFORM.                               " END_OF_LIST_2

  • How do I remove the grouping headings in my list view web part?

    I don't have access to SharePoint Designer and so far, that is all I can find that people are saying to use.  I understand and know how to edit the HTML in SharePoint, just don't know what code to put in and where exactly to put it so that the Document
    Library List View web part is grouped how I want, but doesn't actually show the group titles.  Any help would be greatly appreciated.  Thank you!

    Hi,
    I understand that you want to hide list view group headers, based on your description, I can suggest as follow:
    Add this code to a Content Editor Web Part (CEWP) in the list view. Adding a CEWP in a SharePoint 2010 list view will unfortunately remove the list view selector.
    <script type="text/javascript" language="javascript">
    _spBodyOnLoadFunctionNames.push("HideHeaders");
    function HideHeaders()
    var elements = getElementsByClassName(document, "td", "ms-gb");
    var elem;
    for(var i=0;i<elements.length;i++)
    elem = elements[i];
    elem.childNodes[3].style.display = "none";
    elem.removeChild(elem.childNodes[4]);
    elements = getElementsByClassName(document, "td", "ms-gb2");
    for(var i=0;i<elements.length;i++)
    elem = elements[i];
    elem.childNodes[3].style.display = "none";
    elem.removeChild(elem.childNodes[4]);
    elements = getElementsByClassName(document, "tr", "ms-viewheadertr");
    for(var i=0;i<elements.length;i++)
    elem = elements[i];
    elem.style.display = "none";
    Written by Jonathan Snook, http://www.snook.ca/jonathan
    Add-ons by Robert Nyman, http://www.robertnyman.com
    function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
    oElement = arrElements[i];
    if(oRegExp.test(oElement.className)){
    arrReturnElements.push(oElement);
    return (arrReturnElements)
    </script>
    More information:
    http://edinkapic.blogspot.in/2008/06/hiding-list-view-group-headers.html
    http://spjsblog.com/2011/08/30/remove-group-label-in-grouped-list-view/
    If you have any questions, please reply me.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Header Line Per ALV group of items in GRID not LIST.

    Hello Experts,
    My question may seem very basic but i am stuck with it.
    I am using ALV Grid function (REUSE_ALV_GRID_DISPLAY) to display my ALV.
    Example Case :
    I have 10 line items .
    1)     2 line items are sports.
    2)     2 line items are books.
    3)     2 line items are Mobiles.
    My ALV displays like this :
    No.    Object     Object Type
    1)       Ball          sports
    2)       Bat          sports
    3)     Maths        Books
    4)     History      Books
    5)     Nokia         Mobiles
    6)     Samsung   Mobiles
    And i want it like this :
    No.     Object
    Sports <---- I want this to act as header per line item .
    1)        Ball
    2)        Bat
    Books
    3)       Maths
    4)       History
    Mobiles
    5)       Nokia
    6)       Samsung.
    I.e i need a row stating Object Type IN ALV Grid similar to how we make use of AT NEW EVENT in LIST REPORT.
    Thanks in Advance,
    Sudeep.
    Edited by: Sudeep Yerunkar on Jul 21, 2010 11:40 AM

    Hi,
    If GRID is a 'MUST' requirement, then you can try preparing your internal table in the manner you want the output.
    Something like this:
    - Sort the output internal table.
    - Loop on the output int table.
    - Use AT NEW object type
    - Append Object Type into another internal table
    - Then read rest of the records with same object type into another internal table and appending the same.
    Not sure about the efficieny but you can try.
    BR,
    Vishal.

  • ALV Group and Sort

    Hi,
    I am sorting the ALV Display on the basis of Assignment Field. It is getting sorted, but it is displaying the value in all the lines/rows. I want to display it only once(the first row) if the value is same.
    Also, the first line of the ALV Output is a checkbox.
    At present the check-box is displayed in all the rows.
    My requirement is to display the check-box once for every new Assignment. So, if there are 5 rows with the same Assignment Value then only one check-box should appear, either in the first or fifth row.
    Your help will be definitely appreciated.
    Thanks,
    ~ Payel

    There is no Direct solution in this case....
    1. Hade one extra field of type lenght 4 chars.
    2. populate the ICON value for unselected checkbox.
    3. Change the Fieldcatalog for the field which is added in step1.
    4. Populate the sort information.
    5. Handle the usercommand to check or uncheck based on action.
    Check the sample code..
    REPORT  zalv_total_sub.
    TYPE-POOLS: slis.
    INCLUDE <icon>.
    DATA: BEGIN OF it_flight OCCURS 0,
           carrid  LIKE sflight-carrid,
           connid   LIKE sflight-connid,
           fldate   LIKE sflight-fldate,
           seatsmax LIKE sflight-seatsmax,
           seatsocc LIKE sflight-seatsocc,
                  check(4),             "Step1
          END OF it_flight.
    DATA: it_fieldcat TYPE  slis_t_fieldcat_alv,
          wa_fcat LIKE LINE OF it_fieldcat,
          layout TYPE  slis_layout_alv.
    DATA: it_sort TYPE  slis_t_sortinfo_alv,
           wa_sort LIKE LINE OF it_sort.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_internal_tabname     = 'IT_FLIGHT'
        i_inclname             = sy-repid
      CHANGING
        ct_fieldcat            = it_fieldcat
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2.
    SELECT  carrid
           connid
           fldate
           seatsmax
           seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    SORT it_flight BY carrid.
    "Step 2....
    LOOP AT it_flight.
      it_flight-check = icon_wd_iframe.
      MODIFY it_flight.
    ENDLOOP.
    wa_fcat-do_sum = 'X'.
    MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
    WHERE fieldname = 'SEATSOCC' .
    CLEAR wa_fcat.
    "Step3...
    wa_fcat-hotspot = 'X'.
    wa_fcat-icon = 'X'.
    wa_fcat-col_pos = 1.
    MODIFY it_fieldcat FROM wa_fcat TRANSPORTING col_pos icon hotspot
    WHERE fieldname = 'CHECK' .
    wa_sort-fieldname = 'CARRID'.
    wa_sort-up = 'X'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO it_sort.
    " Step 4.
    CLEAR wa_sort.
    wa_sort-fieldname = 'CHECK'.
    wa_sort-up = 'X'.
    APPEND wa_sort TO it_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        i_callback_user_command = 'USER_COMMAND'  "Step5
        is_layout               = layout
        it_fieldcat             = it_fieldcat
        it_sort                 = it_sort
      TABLES
        t_outtab                = it_flight
      EXCEPTIONS
        program_error           = 1.
    "Step 5 implementation.
    FORM user_command USING ucomm TYPE sy-ucomm
    selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          CASE selfield-fieldname.
            WHEN 'CHECK'.
              READ TABLE it_flight INDEX selfield-tabindex.
              IF sy-subrc EQ 0.
                IF it_flight-check = icon_checkbox.
                  it_flight-check = icon_wd_iframe.
                ELSE.
                  it_flight-check = icon_checkbox.
                ENDIF.
                MODIFY it_flight  TRANSPORTING check
                 WHERE carrid = it_flight-carrid.
              ENDIF.
          ENDCASE.
      ENDCASE.
      selfield-refresh = 'X'.
    ENDFORM.                    "user_command
    Check it and let me know if any issues with the code.

  • ALV - Group columns and multiple header

    Hello,
    Is it possible to have a common header for multiple columns in an ALV grid ( OO based).
    Example:
    HdrLine1>>>     Header1           Header2
    HdrLine2>>>   Fld1 Fld2 Fld3    Fld4 Fld5 Fld6
    Thanks
    Hiri

    Thanks!
    I did some research and maybe I can use CL_GUI_COLUMN_TREE class to achieve this. Is there a way to edit the fields of the columns?
    HD

  • ALV Group Header

    Header12-----
    Header345----
    Header1
    Header2
    Header3
    Header4
    Header5
    I want to make an ALV header like this on a screen (not defauft screen 1000). Help me please. Thanks alot.

    Thanks!
    I did some research and maybe I can use CL_GUI_COLUMN_TREE class to achieve this. Is there a way to edit the fields of the columns?
    HD

Maybe you are looking for