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

Similar Messages

  • 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: Display Header,  line item, information after page break .............

    Hi .
    I am facing problem in displaying a particular layout in ALV.
    the layout is as follows:
    1. Header part
    2. Line item
    3. There is field customer and after every change of customer do page break and display information like how many record read and how many record processed. below is brief detail about how to get read and processed record.
    I have two internal table  say table1 and table2.
       Looping table1
      increase the counter as counter_read = counter_read +1.
    compare the record with table2.
    if matches
    increase the counter as counter_process = counter_process + 1.
    4. At the end of report display a error log.
       to get the error log we will follow the above logic and if record not matched then display as error record.
    Please help ASAP to find the solution.
    Thanks in advance

    There is a knowledge base article C2014229 (1210986 - Subreports do not have a Page Header) , but instead of providing link I will just copy content here:
    Symptom
    Since subreports are objects in the Main Report, they do not contain Page Headers. How can you create a fake page header for subreports?
    Resolution
    To create a fake page header for subreports, use the following steps:
    1. In the subreport, create a formula:
    @FakePageHeader
    //name of formula
    WhileReadingRecords;
    2. Go to the 'Insert' menu and click 'Group'. Select the @FakePageHeader formula.
    3. Select the 'Repeat Group Header on Each New Page' option, and click 'OK'.
    This inserts a new group at the lowest, or innermost, grouping level. You will need to move this group to the highest, or outermost, grouping level.
    4. Go to 'Report' menu and click 'Group Expert'. Use the up arrow to move this newest group up to the top of the list.
    5. Move all the headers that you would like repeated into this Header for the @FakePageHeader group.
    Hope it will help.

  • Subdivide a ALV column header

    Hi experts ,
    I have an requirment to divide a ALV column header.
    I want to add a header row grouping the column headers.
            Departure                                               Arrival        <-- This row is what I want to add
    Airport    Gate    Date                         Airport    Gate    Date
    Thanks,
    Regards ,
    Swashrayee
    Edited by: SWASHRAYEE77928 on Feb 1, 2012 7:30 AM
    Moderator Message: UserID sent for deletion, for ignoring multiple Moderator warnings.
    Edited by: kishan P on Feb 1, 2012 12:05 PM

    Hello,
    Take a look on this code:
      DATA:
        lv_title              TYPE        string,
        lt_columns            TYPE        salv_wd_t_column_ref,
        lr_column_settings    TYPE REF TO if_salv_wd_column_settings,
        lr_salv_wd_table      TYPE REF TO iwci_salv_wd_table,
        lr_table              TYPE REF TO cl_salv_wd_config_table,
      FIELD-SYMBOLS:
        <fs_column> LIKE LINE OF lt_columns,
      lr_salv_wd_table = wd_this->wd_cpifc_cmp_alv( ).
      lr_table         = lr_salv_wd_table->get_model( ).
      lr_column_settings ?= lr_table.
      lt_columns = lr_column_settings->get_columns( ).
      LOOP AT lt_columns ASSIGNING <fs_column>.
        lr_col_header = <fs_column>-r_column->get_header( ).
        lr_col_header->set_ddic_binding_element( space ).
        lr_col_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none ).
          lv_title = cl_wd_utilities=>get_otr_text_by_alias( alias = 'HISTORIC' ).
          lr_col_header->set_text( lv_title ).
          CLEAR lv_title.
    I suggest you to put this code in some method called over the method WDDOMODIFYVIEW.
    Regards.

  • 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

  • How to display the last value of a field in a group in the group header

    I need to display the last quiz score from a group of quiz scores as part of the header of a group of units (the quiz score values are in the detail record).  I can not use the group footer, which would be the natural place to find the last value.  It must be in the group header because there will be a subsequent group within the unit group.  In other words, the grouping is as follows:
    Unit Group Header (Display last quiz score in unit)
    SubUnit Group Header (Display other detail summaries)
    Detail Record (including quiz score)
    SubUnit Group Footer
    Unit Group Footer
    While there is a minimum/maximum summary function, there is not a first/last function.
    Fuskie
    Who is constantly amazed at the ability of users to request report features that are not easily implented through Crystal Reports...

    Hi Fuskie,
    One suggestion to display the last quiz score in the Group Header, other than what had already been suggested, will be to use a linked subreport in the Group Header. It is not an efficient way to display the information, but it could do the trick.
    Another suggestion will be to insert a subreport in the report header, then store the last quiz score in an array for each group, then share it with the main report and display the  values in the appropriate group. In this way it will only connect twice to the data source, one for the main report and once for the subreport, instead of multiple connection for each group.
    Finally, the most efficient way will be to have this value calculated on the database side using a command object or a stored procedure.
    Patrick

  • Blank Page with repeated group header getting displayed

    Hello All,
    One more help i need,
    Am having a formula field in the group header for the same reprot which i have posted earlier and am displaying some text based on the condition and the option repeat group header is checked for each page.
    the issue here i am having is while exporting the report to .txt (flat file)
    the formula field is displaying same static data (i.e. the formula field is not evaluating while exporting to .txt)
    could you please help in resolving this.
    Thanks
    Ranjeet

    Hi Ranjeet,
    Can you attach that report with sample data to this thread?
    --Naga

  • Traffic lights in ALV list header

    how do i display traffic lights as icons in ALV list header. for example, in the code below, i want to display a green icon at the end of closed items and a red icon at the end of the open items:
                closed : 4 [green-icon]
                open   : 2  [red-icon]
    CLEAR header_alv_wa-info.
      header_alv_wa-key  = 'closed:'.
      header_alv_wa-info = gv_closed.
      header_alv_wa-typ  = 'S'.
      APPEND header_alv_wa TO headeralv.
      CLEAR header_alv_wa-info.
      header_alv_wa-typ  = 'S'.
      header_alv_wa-key  = 'open:'.
      header_alv_wa-info = gv_open.
      APPEND header_alv_wa TO headeralv.

    Hi,
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    the above links will give u the code for the same..
    Regards,
    Aparna

  • How to print Group Header on page break in a subreport - CR XI

    Post Author: rickcf
    CA Forum: General
    I have a subreport that has 3 groups with only one group that has a heading.  When the report prints and a subreport group is split between two pages (on a page break) I would like the group heading to also print again at the top of the page- even with the word "continued..." also.  Right now only the main report page header prints.  How can I do this since there is no page header in a subreport?
    Thanks
    Rick

    Post Author: rickcf
    CA Forum: General
    Is there any way to test during detail processing time to see if a page break is occuring?  If so I could print out a fake header on the detail line, suppressing it only if the page breaks.  That is the only thing I can come up with to solve the issue.
    I am surprised the is not an option to reprint the group header on a page break.  That seems like a needed option and that is the standard in Foxpro reporting - there is a checkbox option to cover this scenario.
    A coworker did find a workaround to add a psudo page header to a subreport so if I can add that and put my group info in there it will also work.  I have not looked at the code yet though.
    I have another issue I am working on so this one might take a while to get back to.
    Rick

  • Data Concatenation - Looking to have result in the Group header

    Dear all,
    Few months ago, I try to concatenate cells under a Group,
    I succeed using the formula gave by Raghavendra 
    Initialize:
    whileprintingrecords;
    stringvar i:="";
    Place the above formula in group header and suppress group header section.
    evaluate:
    whileprintingrecords;
    stringvar i;
    i:=i", "name field;
    Place the above formula in detail section and suppress the details section.
    display:
    whileprintingrecords;
    stringvar i;
    country field" - "i;
    Place the above formula in group footer and right click go to format field and check the option "can grow" in common tab.
    My today issues is that I'm still looking for concatenation but I need it in the Header of the Group, not in the footer
    As far as I understood
      - Crystal Report is reading line by Line, so I can't retrieve the value in the Header before the value are calculate.
      - Moreover I've issue on initialize the value
    I thougth an GlobalVar Array can work, but I can't find the way to do it
    My request is, I've have this DataSet
    Paris | Louvre
    Paris | Eiffel
    Sydney | Opéra
    I'm looking Group on City to have in the Header, the value concatened
    Paris | Louvre, Eiffel
    Sydney | Opéra
    Thanks in advance
    Edited by: Alexandre VANNIER on Dec 2, 2008 2:09 PM

    if i have manual running totals that need to display in the header i do the following
    i create the group - ie- jobid
    i either insert a sub group below or create a 2nd group with the same field
    then i create a 3rd group with the same field
    i place my reset in the 1st group
    calc in 2nd
    display in 3rd

  • Supress Group Header in Report when Subreport is blank

    well the title says it all.
    I want to supress the main report group header when the subreport (is in details) is blank.
    I'm stuck on this:
    I'v created a shared variable in both report and subreport and it gives me the number I want but not where I wanted to appear. If I put the variable on the group footer it shows me the correct value but if I put it in the group header it shows me the previous group footer result.
    This is what I got:
    Group Header
    Client 1
    Shared Variable=0
    Details
    Contract 01
    Contract 02
    Group Footer
    Shared Variable=2
    Group Header
    Client 2
    Shared Variable=2
    Details
    Group Footer
    Shared Variable=0
    This is what I want:
    Group Header
    Client 1
    Shared Variable=2
    Details
    Contract 01
    Contract 02
    Group Footer
    Shared Variable=2
    Group Header
    Client 2
    Shared Variable=0
    Details
    Group Footer
    Shared Variable=0
    Can I do that?
    Edited by: Pedro Pinto on Jul 29, 2008 2:47 PM

    I'm going to try my best. This is what I get:
    Main Report
    Group Header
    Client 01   --    0->shared variable
    Details
    Subreport 1
    Group Footer
    2->Shared Variable
    In subreport for client 01:
    Detailsa
    Contract 01
    Contract 02
    Detailsb
    Total of contracts = 2->Shared Variable
    Main Report
    Group Header (supress this section)
    Client 02   --    2->shared variable
    Details
    Subreport 1
    Group Footer
    0->Shared Variable
    In subreport for client 02:
    Detailsa
    Detailsb
    Total of contracts = 0->Shared Variable
    For Client 03 it doesn't show anything but if Client 04 if it has contracts it only shows the contracts but not the name of the client.
    I've already did supress when is blank but in the details.

  • Group heading on each page..

    I am trying to get BI Publisher to output a group heading on each page of my report.. At this time, I am using the Word/RTF version to build my layout.
    I have information in the word document header and footer, and tried adding the group by column in the header, but that only returned my first group value, always!.
    is there a safe solution? I have looked through the forum and seen many questions on this and not any simple answers..
    Thank you,
    Tony Miller
    UTMB/EHN

    Just checking to see if you received the e-mail and the file that was attached... I am still looking for solutions to the issue..
    Thank you,
    Tony Miller
    UTMB/EHN

  • Repeating Group header on each page

    Hello Everybody,
    I have two groups in my report. For my first group value, i have given report - group expert - options and checked "Repeat group header on each page" assuming that my first group values will appear on each page. But it is not doing so. In one of the page the group footer values are appearing without my first group values.
    I belive my problem is my second group values are ending in one page and first group values are  extended to next page . Can any one please hep me.

    if that is the case Narukonda 1, there are several sap notes dealing with this issue...please see this sap note [here |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313333333133373339%7D.do]which deals with both orphaned group footers and group headers.

  • How to repeat group head on each page

    I have problem with repeat group heaf on each page, I've ticked the option 'Repeat group head on each page' from the Change Group Option. But the group head didn't appear on each page when I previewed the report. Does anyone have a solution/explaination to this?
    Cheeers

    Sorry Gents, I did't make my porblem clear.
    To James Terry
    Yes, My reports contain one or more sub-groups (only group 1's group header needs to be repeat on each page).
    To Graham Cunningham
    I found pages , containing only group 1's group footer summarized info, don't display group 1's group header. Just like what you said ' It will only repeat on pages that display group information'. Is this a bug or sort of default rule? What else can I do if I want the group header to repeat on each page no matter whether there is group info or not, besides moving the info from group header to pager header?
    Thanks a lot.
    Regards
    Joseph

  • Repeat Group Header On Each Page with Underlay Following Sections

    How to overcome the following problem?
    1. I am using Crystal report 13.0.5.891
    2. I have designed the report with Group Header as [Underlay following section]
    3. I have checked the group to repeat on each page
    4. Number of lines in the group header may vary
    5. Number of lines in details may also vary
    My objective is to print the separator line placed in group footer, after the
    header lines or after the detail lines which one is taking the maximum lines.
    This is not happening, and I am getting the following output, which is not meeting my requirement
    Where the "LINE IN GROUP FOOTER" should appear after "Group 1 Header Line 6" in the second page
    as the report ends there, but in the output, the line is coming just after the end of detail record.
    like following
    As a result of this, the next record of the group is overlapping with the first record and creating a mesh
    ------------------------------------------------------------------------------------------------------------------------------------ PAGE 1 OF 2
    Column Heading 1                       Column Heading 2                      Column Heading 3
    Group 1 Header Line 1                 Detail Record 1 Line 1
    Group 1 Header Line 2                 Detail Record 1 Line 2
    Group 1 Header Line 3                 ----------------------------------------------------------------------------------
    Group 1 Header Line 4                 Detail Record 2 Line 1
    Group 1 Header Line 5                 Detail Record 2 Line 2
    Group 1 Header Line 6                 Detail Record 2 Line 3
                                                      Detail Record 2 Line 4
                                                      Detail Record 2 Line 5
    ======================LINE IN GROUP FOOTER========================
    PAGE BREAK
    ------------------------------------------------------------------------------------------------------------------------------------ PAGE 2 OF 2
    Column Heading 1                       Column Heading 2                      Column Heading 3
    Group 1 Header Line 1                    Detail Record 3 Line 1
    Group 1 Header Line 2                    Detail Record 3 Line 2
    Group 1 Header Line 3                    Detail Record 3 Line 3
    Group 1 Header Line 4                    Detail Record 3 Line 4
    ======================LINE IN GROUP FOOTER========================
    Group 1 Header Line 5
    Group 1 Header Line 6
    Thanks in advance.

    Thanks for you response.
    I have updated the crystal report to 13.0.13.1597.
    Still I am getting the same issue. I am generating the report in PortableDocFormat and exporting the byte array to download from the web browser. The application is developed in ASP.NET 2012 .net version 4.5.
    I am also uploading 2 images of the final pdf that I am getting, for your opinion.
    The report appeared in the first image is ok, where the first group has 2 child records and the second group has 1 child, but whenever I am changing the mapping in the database, where the first group has 1 child and second group has 2 child, my report is not working. as it is clear from the second image
    Also after installing the new version of CR, my existing codes are not working, and giving the following exception in the line where ExportToStream is written.
    Unable to cast object of type 'FileStreamDeleteOnClose' to type 'System.IO.MemoryStream'.
    I have modified the existing code to overcome this exception.

Maybe you are looking for

  • DNS Issues - Can ping server name and IPs but not FQDNs.

    Hi All,  Hopefully some one can help me here, I am having an issue where one of my domain attached servers cannot ping any FQDNs in the environment but it can ping the host names and the IPs and look up the host names from a reverse look up.  We have

  • Calendar; Can't view event as a list in Mountain Lion

    iCal-In Snow Leopard, I could create an event, and make a "list" within that event (see example below).  I could see the whole list in iCal in the Month view.  In ML, it only shows the first line of the list.  I can view the list if I turn on "Show I

  • Pass Message not working properly

    My pass message in the quiz manager should say - My company's name and number(next line)Thank you for your partipation (next line) Please click the "Email your evaluation" button. This is what it produces: My company's name - 205-9xx-xxxx&#x0D; Thank

  • Help - can't open .mpg file with Quicktime 7.3

    Hi folks, Just tried to open a .mpg file of a recent santa visit for my little boys and Quicktime indicated it couldn't open it saying it wasn't a movie. I upgrade to Quicktime pro but that didn't solve the problem. Any thoughts as regards possible s

  • Zen Touch Car Charger Usage Questi

    ]Hi, I have the Zen Touch and plan on using it mostly in the car. ?All of my MP3's are at 92kbps and I have the volume set fairly high. ?I don't want to worry about the Zen's battery running out, so I have purchased the official car charger (DC throu