Applying color to Heading of a page in ALV reports

Hi Experts,
I want to apply color to heading of a page in ALV reports ,if any one knows please help me.
Regards,
Satya.

Is that what you mean?
DATA it_sflight TYPE TABLE OF sflight.
SELECT * FROM sflight INTO TABLE it_sflight UP TO 10 ROWS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program          = sy-repid
    i_callback_html_top_of_page = 'TOP_OF_PAGE'
    i_structure_name            = 'SFLIGHT'
  TABLES
    t_outtab                    = it_sflight
  EXCEPTIONS
    program_error               = 1
    OTHERS                      = 2.
FORM top_of_page USING document TYPE REF TO cl_dd_document.
  DATA lo_table_area TYPE REF TO cl_dd_table_area.
  CALL METHOD document->add_text
    EXPORTING
      text         = 'Some text'
      sap_emphasis = cl_dd_area=>heading
      sap_color    = cl_dd_area=>list_negative.
  CALL METHOD document->add_table
    EXPORTING
      no_of_columns               = 2
      cell_background_transparent = space
    IMPORTING
      tablearea                   = lo_table_area.
  CALL METHOD lo_table_area->add_text
    EXPORTING
      text      = 'Some text2'
      sap_color = cl_dd_area=>list_key.
  CALL METHOD lo_table_area->add_text
    EXPORTING
      text      = 'Some text3'
      sap_color = cl_dd_area=>list_background.
  CALL METHOD lo_table_area->new_row.
ENDFORM.                
If not, please let us know which part of ALV you exactly want to color.
Regards
Marcin

Similar Messages

  • No column heading in second page in alv report when save in excel file

    Hi Expert,
    How can i remove the column header from Alv report when program execute in background and save in excel file right now
    its comming column header in each page. Client dont want header column in excel from second page. is this possible?
    with regards
    chandan_viji

    Hi Ravi,
    thanks for reply i have solved this problm throug line count and NEW-PAGE LINE COUNT 10000 bcoz client want output in excel file only one page header.
    with regards
    chandan_viji

  • Regarding Header(top-of-page) in ALV Report

    Dear All,
    I am displaying name and address of company on the top of alv report and after that alv grid is displaying.
    e.g.
    'XYZ' LTD.
    ADDRESS1,PINCODE1.
    ACCOUNTING DOC.NO. DOC TYPE G/L ACCT. AMOUNT
    123456 DD 6353 444400
    123457 DD 6334 455500
    Issue : Header is coming on all the pages I want it to come only on first page.
    I am using REUSE_ALV_COMMENTARY_WRITE function for top of page.
    Pls , suggest any suitable suggestion.
    Thanks & regards,
    Sandip Sonar

    Hi,
    check the below code
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      i_callback_program = i_repid
      it_fieldcat = header
      is_layout = gt_layout
      i_callback_top_of_page = 'TOP-OF-PAGE1'
      i_grid_title = xyz
      it_sort = gt_sort[]
      i_default = 'X'
      i_save = 'U'
      is_variant = gt_variant
      it_events = gt_events
    tables
      t_outtab = t_output.
    form top-of-page1.
    data: header type slis_t_listheader,
          wa     type slis_listheader,
         flag(1).
    if flag is initial.
    TITLE AREA
    wa-typ = 'S'.
    wa-info = text-h04.
    append wa to header.
    wa-typ = 'S'.
    write sy-datum to wa-info mm/dd/yyyy.
    concatenate text-h03 wa-info into wa-info separated by space.
    append wa to header.
    wa-typ = 'S'.
    concatenate text-h02 sy-uname into wa-info separated by space.
    append wa to header.
    wa-typ = 'S'.
    concatenate text-h01 sy-repid into wa-info separated by space.
    append wa to header.
    ********" LOGO
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = header
    i_logo = 'ENJOYSAP_LOGO'.
    *********" LOGO
    flag = 'x'.
    endif.
    endform.
    Edited by: sateesh kumar on Nov 30, 2009 10:47 AM

  • Repeat a Header on each page of a Report that includes expressions - Report Builder 3.0

    Is there a way of repeating an header on each page of a report with the built-in expressions representing the new value on each header.  Example, Page 1 is correct but page 2 - the permit number, address and Tract does not match up, it repeats all the
    information from page 1.

    Hi KittyCat101,
    According to your description, you want repeat a show with expression to show Permit Number and Address dynamically on each page. Right?
    In Reporting Services, table header is not in any group row, so when you put expression with data field into header row, it will only return the first row of that data row. This is the reason why it always shows the information as Page 1.
    In this scenario, we can make records group on Permit Number. Then we put the Permit Number and Address in the group header. Set page break between each group instance.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to give colors to the top-of-page in ALV Grid

    How to give colors to the top-of-page in ALV Grid
    in table GT_LIST_TOP_OF_PAGE i am filling 3 rows ,i need 3 different colors to be displyed on top-of-page(one color to one row)
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    I_LOGO = 'ENJOYSAP_LOGO'
    IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    please help mee

    HI Kranthi,
    Check out teh foll. link,
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Hope this helps.

  • How to give colors to the top-of-page in ALV List Display

    how to give colors to the top-of-page in ALV List Display....

    Check this blog.........
    It provides your required output...........
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    See the point 7 for complete code...
    Regards,
    Pavan

  • How doi print Any variable at the end of page in ALV report?

    Hi,
    Anyone can tell me that How do i print Any variable at the end of page in ALV report?
    Exmale: at the ende of alv report i want to print total no of employee who has taken house loan or education loan.

    Hi,
    Go through these links
    Thread in sdn regarding FOOTER IN ALV
    [ALV  FOOTER;
    Wiki in sdn regarding HEADER AND FOOTER IN ALV
    [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Objects%20-%20ALV%20Model%20-%20Using%20Header%20and%20Footer]
    Header and Footer in ALV
    [http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm]
    Hope this helps.
    Thank you,
    Pavan.

  • How to declare top of page in alv report

    hi guru
    how to declare top of page in alv report
    thanks
    subhasis

    Hi,
    check this simple program.
    REPORT ZBHALV_LIST.
    TABLES:MARA.
    SELECT-OPTIONS: MATNR FOR MARA-MATNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    ERSDA LIKE MARA-ERSDA,
    MTART LIKE MARA-MTART,
    MBRSH LIKE MARA-MBRSH,
    END OF ITAB.
    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE MATNR
    IN MATNR.
    TYPE-POOLS SLIS.
    DATA:FCAT TYPE slis_t_fieldcat_alv.
    DATA:LAYOUT TYPE slis_layout_alv.
    DATA:EVE TYPE slis_t_event WITH HEADER LINE.
    DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SORT-UP = 'X'.
    SORT-SPOS = 1.
    SORT-FIELDNAME = 'ERSDA'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    SORT-SPOS = 2.
    SORT-FIELDNAME = 'MTART'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    EVE-NAME = 'TOP_OF_PAGE'.
    EVE-FORM = 'TOPOFPAGE'.
    APPEND EVE.
    EVE-NAME = 'TOP_OF_LIST'.
    EVE-FORM = 'TOPOFLIST'.
    APPEND EVE.
    EVE-NAME = 'END_OF_LIST'.
    EVE-FORM = 'ENDOFLIST'.
    APPEND EVE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-no_hline = 'X'.
    LAYOUT-NO_VLINE = 'X'.
    LAYOUT-window_titlebar = 'MATERIAL DETAILS'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = SY-REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = FCAT
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    IT_SORT = SORT[]
    IT_EVENTS = EVE[]
    TABLES
    T_OUTTAB = ITAB .
    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 TOPOFPAGE.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM TOPOFLIST.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS-LISTTOP'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM ENDOFLIST.
    REFRESH HEAD.
    HEAD-TYP = 'H'.
    HEAD-INFO = 'MATERIALS-LISTEND'.
    APPEND HEAD.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEAD[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.
    Regards,
    Priyanka.

  • How to give the no of lines per a page in alv report

    hi
    could u plz inform me
    how to give the no of lines per page in alv report
    in ordinary report we can give line-count na
    how can we give in alvs.
    thanx
    kals.

    Hi Kalyan,
    There is another Forum(Abap Development) where u can post abap related stuffs and u can also get quick answers there..
    Cheers...
    Santosh

  • How to give no of lines per page in alv report

    hi
    could anybody tell me
    how to give no of lines per page in alv report
    i need bottom of page too
    if possible plz send the code too
    it ll be very helpful to me
    thanx
    kals.

    Hi,
    This is possible, using some of the events in the ALV.
    You could use AFTER_LINE_OUTPUT event and call you form after say, a certain line count is reached on the list output.
      MOVE 'AFTER_LINE_OUTPUT' TO gw_event-name.
      MOVE 'AFTER_LINE_OUTPUT' TO gw_event-form.
      APPEND gw_event TO gt_events.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                it_events                = gt_events[]
    and define the form for each event as follows - this would be a dynamic call by the ALV.
    *&      Form  after_line_output
    *       Form for the After Line Output Event in the internal table
    *      --> rs_lineinfo
    FORM after_line_output USING rs_lineinfo TYPE slis_lineinfo.
      IF sy-linno eq v_linno.          "Defaulted value for line count
        perform write_footer.
        NEW-PAGE.
      ENDIF.
    ENDFORM.                    " after_line_output
    For lines per page:
    rs_lineinfo-tabindex would give you the index of the current line in the list, which you could use to read the t_outtab table, and reduce the line count of items displayed on the earlier page.
    There are a few other events too, like BEFORE_LINE_OUTPUT and END_OF_LIST which you can use as required and print the data.
    Regards,
    Anil.

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

  • Eliminate page heading in the spool of ALV report

    Hi,
    We are running the ALV report in the background, and when we view the spool
    the page heading and the column heading is displayed for all the pages, Is there some way to
    eliminate this.
    The download from the on-line exec is fine,but the download from the spool includes the column
    headings for each page. Is there some way to check if the ALV report is run in the batch mode
    and to disable the heading from Page 2 to N.
    Appreciate any input.
    Thank you
    Lalitha

    Hi,
    I need to avoid the column headings also, I need the heading in the first page, but not on the subsequent pages.
    Is there any setting in the ALV function modules to prevent this ?
    So wanted to know if there is some setting to accomplish that.
    Thank you
    Lalitha

  • How to gve the colors to the TOP-OF-PAGE in ALV Grid Disply..

    i want to give 3 different colors in the top-of-page(there are three different lines each line should disply in different colors)...
      plaese tell me how can i do that...........

    Hi
    Try like this...
    form build_events.
      clear   gv_event.
      refresh i_events.
    Get the ALV events
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = i_events
        exceptions
          list_type_wrong = 1
          others          = 2.
      if sy-subrc = 0.
        sort i_events by name.
      endif.
    Form for Top-of-Page ---------------------------------*
      read table i_events with key name = slis_ev_top_of_page
                                          into gv_event
                                          binary search.
      if sy-subrc = 0.
        move gc_top_of_page to gv_event-form.
        modify i_events from gv_event index sy-tabix.
      endif.
    Form for End-of-List ---------------------------------*
      read table i_events with key name = slis_ev_end_of_list
                                          into gv_event
                                          binary search.
      if sy-subrc = 0.
        move gc_end_of_list to gv_event-form.
        modify i_events from gv_event index sy-tabix.
      endif.
    Specify the ALV layout
      wa_layout-max_linesize = gv_linsz.
      wa_layout-min_linesize = gv_linsz.
    endform.                    " build_events
    form top_of_page_d.                                        
      format color col_heading.
      write: / 'Satyanarayana'
      format color col_total.
      write: / 'Sayana'.
      format reset.
    endform.
    Satya.

  • How to repeat row header in all pages in Financial Reporting?

    Hi,
    I have created a simple Financial Report with landscape mode, I could not able to view the row header in second page. Please help me out , how to repeat row header in all pages?
    Edited by: Awesome on Dec 13, 2012 2:04 PM

    Hi,
    Refer following link which states how to change the Page Setup setting (just an addition to above poster's explanation):-
    http://docs.oracle.com/cd/E12825_01/epm.111/fr_user/frameset.htm?1900.html
    Regards,
    Edited by: 918547 on Dec 14, 2012 6:17 PM

  • Conditional Formula to supress page header in 1st page of the report

    hi,
    how to programatically add a conditional formula to supress a section only on the first page of the report.
    i am using CR XI R2 RAS server.
    thanks in advance
    Padmanaban V

    Try it first in CR Designer, then when you get the formula collect you'll see how it's done. If you can't do it in the designer then you can't do it in code, same set of API's.

Maybe you are looking for

  • Can two apple id share music on one iTunes account

    Can two apple id's share music on one itunes account

  • Adobe Media Encoder won't take mov. files!?

    My Adobe Media Encoder will not take mov. files! That should not be a problem, right? When I click the Add-button the mov. files is not listed up unless I choose to show all files. And when selecting the file, the program says the file could not be i

  • This Computer is not Authorized to play...

    First off I've searched the forum and follwed some suggestions including deleting the TS file. I bought an album from the iTunes store and two songs (of the 12) wont play. I get the above error. If I enter the info to authorise the message  says that

  • Beginner advise needed on how to find link for app on ipad.

    I am an absolute beginner with a recently purchased ipad 2. I have just purchased garageband from the app store but how do I open it? There is no link on my ipad anywhere but when i check settings it says that garageband is installed. Can someone ple

  • Can address book use aperture faces?

    Saw that Lion Address Book can use a link to iPhoto faces.  Upgraded to Aperture some time ago - is there any way of having Address Book look for the Aperture faces instead of iPhoto?