Printing top of Page in Center

Hi all i have a title in ALV report i want this Tiltle to be printed on Center

Hi,
FORM top_of_page.
  DATA: l_commentary TYPE slis_t_listheader,
        ls_line      TYPE slis_listheader,
        l_datum(10),
        l_uzeit(8),
        first_flag.
  CLEAR ls_line.
  ls_line-typ  = 'H'.
  ls_line-info = text-020.
  APPEND ls_line TO l_commentary.
  CLEAR ls_line.
  ls_line-typ  = 'S'.
  ls_line-key  = text-021.
  ls_line-info = p_bukrs.
  APPEND ls_line TO l_commentary.
  CLEAR ls_line.
  ls_line-typ  = 'S'.
  ls_line-key  = text-022.
  ls_line-info = g_f_butxt.
  APPEND ls_line TO l_commentary.
  CLEAR ls_line.
IF p_rad1 = 'X' AND p_ason_d IS NOT INITIAL.
    ls_line-typ  = 'S'.
    ls_line-key  = text-023.
    WRITE: p_ason_d-low TO ls_line-info.
    APPEND ls_line TO l_commentary.
  ELSEIF p_rad2 = 'X' AND s_capt_d IS NOT INITIAL.
    ls_line-typ  = 'S'.
    ls_line-key  = text-024.
    WRITE: 'From' TO ls_line-info.
    WRITE: s_capt_d-low TO ls_line-info+5.
    WRITE 'To' TO ls_line-info+17.
    WRITE: s_capt_d-high TO ls_line-info+23.
    APPEND ls_line TO l_commentary.
  ELSEIF p_rad3 = 'X' AND s_dact_d IS NOT INITIAL.
    ls_line-typ  = 'S'.
    ls_line-key  = text-025.
    WRITE: 'From' TO ls_line-info.
    WRITE: s_dact_d-low TO ls_line-info+5.
    WRITE 'To' TO ls_line-info+17.
    WRITE: s_dact_d-high TO ls_line-info+23.
    APPEND ls_line TO l_commentary.
  ENDIF.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = l_commentary
      i_logo             = 'ENJOYSAP_LOGO'.
        I_END_OF_LIST_GRID =
ENDFORM.                    "top_of_page
Here, in the Bolded section, you can see adjusting the contents as we wish. You can adjust it to the centre of the report output.
Thanks and Regards,
Suresh

Similar Messages

  • Print top of page in ALV Grid by passing in i_callback_html_top_of_page

    How to print top of page while displaying data in ALV Grid ........as i m passing  subroutine for  top of page' in parameter i_callback_html_top_of_page

    i_callback_html_top_of_page is different than i_callback_top_of_page...
    if you want to use callback_html you will need to define a form routine something like this:
    form html_top_of_page using r_top type ref to cl_dd_document.
      data: text type sdydo_text_element.
    *  data: s_table type ref to cl_dd_table_element.
    *  data: col_key type ref to cl_dd_area.
    *  data: col_info type ref to cl_dd_area.
      data: a_logo type ref to cl_dd_area.
      data:
        l_string_with_html type string,  "WA Html String Handling
        l_text_wa(20) type c.              "WA String Handling
      call method r_top->initialize_document.
    ** Set Background Color on TOP-document = small white square works well
    *  this should be a graphic stored in BDS
      call method r_top->set_document_background
                                    exporting picture_id = 'SmWhiteSquare'.
    ** split TOP-Document to make space for the logo on the right
      call method r_top->vertical_split
                                    exporting split_area = r_top
                                              split_width = '70%'
                                    importing right_area = a_logo.
    ** and add a Company logo - stored in BDS as above
      call method a_logo->add_picture
                            exporting picture_id = 'YourLogoHere'.
    ** fill TOP-Document space on the left with data
    * first the title
      text = sy-repid.   " 'Var with My report name'.
      call method r_top->add_text exporting text  = text
                                        sap_style = 'HEADING'.
      call method r_top->new_line.
    * your code here (may list report selections params or whatever)...
    endform.

  • In ALV I want to align Top-Of-Page in Center which contains some TEXT

    Hi Abap Gurus',
                          In ALV's i want to align TOP-OF-PAGE in center.
    Which contains some TEXT.
    Can you please help me out.
    Points will be Given.
    Many thanks
    Anil Roy.

    hi anil
    The header line is always left-justified .
    We basically have three options for formatting :
    S , A and H.
    every line in Alv top-of-page is of 60 char length(slis_listheader-info).so i think the only option we have is to add required spaces to the left and display the required string
    regards
    navjot
    reward if helpfull

  • My HP1610 all in one prints top of page, unable to read faint printing on majority of page.New cartr

    I have installed a new black cartridge in my 1610 All in One, Previous cartridge was low on ink when it stopped printing the majority of the page. Print test on new cartridge is fine. Top of page and all of line border is fine. From 1 1/2 inch from top printing is too faint to read. Line border prints completely. Bottom of page prints faintly but enough to read. What now?

    Welcome to the HP Community , I read through your post about the printing issues you have been having, and I hope to help you! Seeing how the printer will make copies and test print tells us that the printer itself is fine and there is no hardware issues. However, seeing how printing from two different computers will not work, flags a software problem on the computers. Please try out the steps below and get back to me with the results and we will go from there. If you did not install the Full Driver, run the HP Printer Install Wizard for Windows to search and install the complete driver and software. This will need to run on both computers individually. Manually restart the print spoolers on the computers:1. Click Start
    2. Type "Services" in the search field.
    3. Open SERVICES
    4. At the bottom, click "Extended View"
    5. Search for Print Spooler
    6. Right-click it and choose Properties
    7. Select as Automatic in the drop down box, close the Window
    8. Right click on Print Spooler and choose "Stop", wait until it stops and then right click again and "Start".
    9. Close out of Services and try printing from Notepad.10. Try printing from a web browser now, if there is a problem with the print, try a different web browser.  Show thanks for my reply to help you today by hitting the "thumbs up" icon below!I hope to hear from you, good luck! 

  • Scroll Bar in ALV Top Of Page

    Hi Ppl,
    I am using REUSE_ALV_COMMENTARY_WRITE to display top of page in ALV. The issue is i want to restrict the top-of-page height.
    As of now if i have 10 lines to print...the top-of-page comes with 10 lines in display.
    But i want some (say 4 or 5) to be visible with scroolbar and rest can be viewed by use of the scroll--bar movement!!
    Any soln?? Please reply
    Regards,
    Santosh!!

    Hi Santosh,
    I am not sure if that is possible by using FM approach. - REUSE_ALV_COMMENTARY_WRITE
    But yes its possible if you are using Docking Container. with split container approach. ie. OOPs .
    Refer sample code.
    Constants Declaration
    CONSTANTS: c_x             TYPE c          VALUE 'X',
               c_mode          TYPE char1      VALUE 'O',
               c_mask          TYPE char9      VALUE ',*.*,*.*.',
               c_error_log     TYPE tabname    VALUE 'ZERROR_LOG',
               c_succ          TYPE iconname   VALUE '@01@',    "#EC *
               c_fail          TYPE iconname   VALUE '@02@',
               c_object        TYPE emg_object VALUE 'PARTNER'," Legacy obj
               c_opbuk         TYPE opbuk_kk   VALUE 'UK01',
               c_split         TYPE c
                               VALUE cl_abap_char_utilities=>horizontal_tab,
               c_path          TYPE char100
                               VALUE '/local/data/interface/A28/DM/OUT'.
    *Variables Declaration
    DATA:  flg_pre     TYPE c,             " Flag -  Presentation browse
           flg_x       TYPE c,
           cnt_total   TYPE char8,         " Total Records processed
           cnt_success TYPE char8,         " Total Records success
           cnt_failed  TYPE char8,        " Total Records failed
           cnt_repeat  TYPE char8.
    *-- ALV Grid data declaration
          CLASS v_lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
         handle_print_top_of_page FOR EVENT print_top_of_page OF
                                            cl_gui_alv_grid,
         handle_top_of_page       FOR EVENT top_of_page OF
                                            cl_gui_alv_grid.
    ENDCLASS.                    "o_lcl_event_receiver DEFINITION
          ALV Data declaration
    DATA : o_alvgrid          TYPE REF TO cl_gui_alv_grid,
           o_split            TYPE REF TO cl_gui_easy_splitter_container,
           o_dockingcontainer TYPE REF TO cl_gui_docking_container,
          <b> o_container_top    TYPE REF TO cl_gui_container,
           o_container_bot    TYPE REF TO cl_gui_container,
           o_html             TYPE REF TO cl_dd_document,</b>       o_event_receiver   TYPE REF TO lcl_event_receiver,
           ok_code            LIKE sy-ucomm,
           i_fieldcat         TYPE lvc_t_fcat,
           wa_fieldcat        TYPE lvc_s_fcat,
           wa_layout          TYPE lvc_s_layo.
          CLASS LCL_EVENT_RECEIVER IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    *-- Top of Page
      METHOD handle_print_top_of_page.
      ENDMETHOD.                    "handle_print_top_of_page
      METHOD handle_top_of_page.
      ENDMETHOD.                    "handle_top_of_page
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    *-- ALV List data declaration
    DATA:  i_field_cat1       TYPE slis_t_fieldcat_alv,
           w_lay_out1         TYPE slis_layout_alv,
           w_field_cat        TYPE slis_fieldcat_alv,
           i_events1          TYPE slis_t_event,
           w_event            TYPE slis_alv_event,
           w_print            TYPE slis_print_alv.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STANDARD'.
      SET TITLEBAR 'TITLE'.
    *-- Create Instances
      PERFORM f0040_create_object.
    *-- Create Field catalog
      PERFORM f0050_field_catalog
                        TABLES i_fieldcat
                        USING c_error_log.
    *-- Modify Field Catalog
      PERFORM f0060_modify_fldcatalog
                        TABLES i_fieldcat.
    *-- Set ALV Layout
      PERFORM f0070_layout.
    *-- Generate ALV Grid
      PERFORM f0080_display_list
                        TABLES  i_error
                                i_fieldcat
                          USING wa_layout.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Form  f0040_create_object
    FORM f0040_create_object .
      IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    *-- Create Container
        CREATE OBJECT o_dockingcontainer
          EXPORTING
            ratio                     = '95'
         EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
        IF sy-subrc NE 0.
          MESSAGE i000 WITH text-013.   " Error in object creation
          LEAVE LIST-PROCESSING.
        ENDIF.
    *--Create Splitter Container
        CREATE OBJECT o_split
          EXPORTING
            parent            = o_dockingcontainer
            sash_position     = 20
            with_border       = 0
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3.
    *--Get the containers of the splitter control
        o_container_top = o_split->top_left_container.
        o_container_bot = o_split->bottom_right_container.
      ENDIF.
      CREATE OBJECT o_alvgrid
         EXPORTING
           i_parent = o_container_bot.
    *-- Print Top of Page
      PERFORM f0041_top_of_page.
    ENDFORM.                    " f0040_create_object
    <b>&----
    *&      Form  f0041_top_of_page</b>
    FORM f0041_top_of_page .
      DATA: lws_text  TYPE sdydo_text_element.
      IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    *-- Object for HTML top container
        CREATE OBJECT o_html
            EXPORTING style            = 'ALV_GRID'
                      background_color = 35.
    *-- Top of Page
        CALL METHOD o_alvgrid->list_processing_events
          EXPORTING
            i_event_name = 'TOP_OF_PAGE'
            i_dyndoc_id  = o_html.
    *-- Total Record Text
        CALL METHOD o_html->add_text
          EXPORTING
            text         = text-014
            sap_emphasis = text-017.
        CALL METHOD o_html->add_gap
          EXPORTING
            width = 8.
    **-- Total record Value
        lws_text = cnt_total.
        CALL METHOD o_html->add_text
          EXPORTING
            text         = lws_text
            sap_emphasis = text-017.
        CLEAR  lws_text.
        CALL METHOD o_html->new_line
          EXPORTING
            repeat = 1.
    **-- Total Success text
        CALL METHOD o_html->add_text
          EXPORTING
            text         = text-015
            sap_emphasis = text-017
            fix_lines    = c_x.
        CALL METHOD o_html->add_gap
          EXPORTING
            width = 12.
        lws_text = cnt_success.
        CALL METHOD o_html->add_text
          EXPORTING
            text         = lws_text
            sap_emphasis = text-017
            fix_lines    = c_x.
        CLEAR  lws_text.
        CALL METHOD o_html->new_line
          EXPORTING
            repeat = 1.
    *-- Total Failed text
        CALL METHOD o_html->add_text
          EXPORTING
            text         = text-016
            sap_emphasis = text-017
            fix_lines    = c_x.
        CALL METHOD o_html->add_gap
          EXPORTING
            width = 16.
        lws_text = cnt_failed.
        CALL METHOD o_html->add_text
          EXPORTING
            text         = lws_text
            sap_emphasis = text-017
            fix_lines    = c_x.
        CLEAR  lws_text.
    *-- Display Report Header
    <b>    CALL METHOD o_html->display_document
          EXPORTING
            parent = o_container_top.</b>
      ENDIF.
    ENDFORM.                    " f0041_top_of_page
    *&      Form  f0050_field_catalog
    FORM f0050_field_catalog  TABLES   p_fieldcat STRUCTURE lvc_s_fcat
                              USING value(p_structure).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = p_structure
        CHANGING
          ct_fieldcat            = p_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE i000(zo_spa) WITH text-017.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " f0050_field_catalog
    *&      Form  f0070_layout
    FORM f0070_layout .
      wa_layout-zebra      = c_x.
      wa_layout-cwidth_opt = c_x.
    ENDFORM.                    " f0070_layout
    *&      Form  f0080_display_list
    FORM f0080_display_list  TABLES  p_output
                                     p_fieldcat
                             USING value(p_layout).
    *-- Display Report
      CALL METHOD o_alvgrid->set_table_for_first_display
        EXPORTING
          i_save                        = 'A'
          is_layout                     = p_layout
        CHANGING
          it_outtab                     = p_output[]
          it_fieldcatalog               = p_fieldcat[]
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE i000(zo_spa) WITH text-022.    " Error in Displaying
        LEAVE LIST-PROCESSING.
      ENDIF.
    **-- Create Event object
      CREATE OBJECT o_event_receiver.
      SET HANDLER o_event_receiver->handle_print_top_of_page
                                     FOR o_alvgrid.
    ENDFORM.                    " f0080_display_list
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE user_command_0100 INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT' OR  'CANC'.
          PERFORM f4000_free_objects:
                   USING o_alvgrid 'ALV' text-031,
                   USING o_dockingcontainer 'DOCKING' text-032.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          PERFORM f4000_free_objects:
                   USING o_alvgrid 'ALV' text-031,
                   USING o_dockingcontainer 'DOCKING' text-032.
          SET SCREEN '0'.
          LEAVE SCREEN.
        WHEN OTHERS.
          PERFORM f4000_free_objects:
                    USING o_alvgrid 'ALV' text-031,
                    USING o_dockingcontainer 'DOCKING' text-032.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  f4000_free_objects
    FORM f4000_free_objects  USING pobject
                            value(ptype)
                            value(ptext) TYPE c.
      DATA: lo_objectalv TYPE REF TO cl_gui_alv_grid.
      CASE ptype.
        WHEN 'ALV'.
          lo_objectalv = pobject.
          IF NOT ( lo_objectalv IS INITIAL ).
            CALL METHOD lo_objectalv->free
              EXCEPTIONS
                cntl_error        = 1
                cntl_system_error = 2
                OTHERS            = 3.
            CLEAR: pobject, lo_objectalv.
            PERFORM f4010_error_handle USING ptext.
          ENDIF.
        WHEN 'DOCKING'.
          DATA: lo_objectdock TYPE REF TO cl_gui_docking_container.
          lo_objectdock = pobject.
          IF NOT ( lo_objectdock IS INITIAL ).
            CALL METHOD lo_objectdock->free
              EXCEPTIONS
                cntl_error        = 1
                cntl_system_error = 2
                OTHERS            = 3.
            CLEAR: pobject, lo_objectdock.
            PERFORM f4010_error_handle USING ptext.
          ENDIF.
        WHEN OTHERS.
          sy-subrc = 1.
          PERFORM f4010_error_handle
                       USING text-031.
      ENDCASE.
    ENDFORM.                    " f4000_free_objects
    *&      Form  f4010_error_handle
    FORM f4010_error_handle  USING value(ptext) TYPE c.
      IF sy-subrc NE 0.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel = text-031
            txt2  = sy-subrc
            txt1  = ptext.
      ENDIF.
    ENDFORM.                    " f4010_error_handle
    Reward points if this Helps.
    Manish

  • How To Print Field Value in TOP-OF-PAGE During Line Selection.

    How To Print Field Value in TOP-OF-PAGE During Line Selection when double click on field.

    (If my memory serves me well (not used for long time ago)
    Assign values to system fields sy-tvar0 - sy-tvar9, they will replace the placeholders "&0" through "&9" in the list headers and column headers.
    TOP-OF-PAGE DURING LINE-SELECTION.
         WRITE: / 'Interactive Report &3'.
      WRITE record-vbeln TO sy-tvar3.
    Regards,
    Raymond

  • ALV- top-of-page: print varaibale in right corner,...

    Hi,
    In ALV (REUSE_ALV_GRID_DISPALY), i've requirement to print shop name at the top right corner of the top-of-page and sy-datum at top left corner.
    How can I print a varaible at top right corner in top-of-page of ALV? and
    how to print page no in ALV top-of-page?
    How can I set portrait format to print the ALV?
    regards,
    Ravi

    pls ignore
    pk
    Edited by: kishan P on Mar 9, 2009 6:01 PM

  • How to print the top of page part along with the ALV list and generate PDF

    HI all,
             I have created one ALV by using oops concept .
             and also am able to get the top of page where I have One standard logo on the right hand side
             and some details on the left side .
               Now my requirement is to while printing the list the logo and other top of page details should appear
               In the PDF output but currently while am pressing the print preview button only the alv data is coming
              am already using the method
        handle_top_of_page
          FOR EVENT print_top_of_page
                 OF cl_gui_alv_grid,
    may be am missing something ... How to get the top of page along with the logo printed ?

    Hi  Surya,
    After generating the grid display  click on print button,
    a spool number is generated. capture the spool number and convert it to pdf using the fm:
    CONVERT_ABAPSPOOLJOB_2_PDF  and save the file
    Hope this will solve your problem.
    Regards,
    R K.

  • How to Print the space in Top-of-Page in ALV output

    Hi gurus,
         I had a problem in Printing the Spaces in Top-of-Page.
    My Requirement is like.
    Material no: (space with 18 char)  to   5235268
    but it is coming like .
    Material no: to  5235268
    i wrote the code like this.
    form Top_of_page.
    IF s_matnr IS NOT INITIAL.
          wa_header-typ = 'S'.
          wa_header-key = 'Material No:' .
          IF s_matnr-high IS INITIAL.
            MOVE s_matnr-low TO wa_header-info.
          ELSE.
            CONCATENATE s_matnr-low  ' to ' s_matnr-high INTO wa_header-info SEPARATED BY space.
          ENDIF.
          APPEND wa_header TO tb_header.
          CLEAR wa_header.
        ENDIF.
    Thanks & Regards,
    Anil.

    Hi Anil ,
    If u concatenate anything with space , your space will be lost.
    Give a try for this if your  s_matnr-high is initial.
    data : c(21) type c.
    IF s_matnr-high IS INITIAL.
    Concatenate '(19 spaces )to'  into C.   concatenate C s_matnr-low  into wa_header-info SEPARATED BY space.
    endif.
    <b>Please Note i wanted to put spaces at "(19 spaces)to"  but posting this message is removing those spaces so have put it in words.</b>you have to take Variable c with first 19spaces and then 'to' as shown.
    Here the Variable C is with 21 length for 18 spaces , one space to separate the 18 spaces from 'to' , and then 2 chars for 'to'.
    I hope this will help you.
    Regards,
    AShwini

  • Print Apps won't print with C510a eStation. Prints thin line at top of page.

    My C510a eStation printer will not print using the Print Apps.  It just prints a thin line at top of page.  Everything works fine until I print.
    All other print functions work.  It prints from computer via WiFi.  It prints when I send an email to it.  It copies via the Zeen.  It just won't print using the Print Apps.
    Does anyone else have this problem?  What is the solution?
    12/23/2010 3:00PM.  I just got off the phone with an HP engineer.  She said that the eStation is still in the TESTING phase and to call to report problems so they can improve the product.  (I would have thought the product would have been fully tested before being released to the public!)
    She had me reset the Zeen display by holding down the volume keys while powering up.  This erased everything that had been done on the Zeen by me and resulted in no HOME screens, which will have to be set up by me.  The only app at the bottom of the blank home page was Yahoo!.  Even the printer app was missing.  I had to move it from the app tray to the home page.  Now, I have to spend hours, again, setting up the Zeen.
    After the reset, the printer apps seem to work now.  The Zeen will copy using the printer app.  My computer still seems able to print and scan to/from the eStation.
    The eStation C510a eStation printer and Zeen display are very exciting.  However, they are not for someone not willing to spend the time to get it to work properly.  If you have a cell phone, be prepared to use up a lot of minutes while on support.
    The HP engineer said that it will soon have a new release of Android operating on the Zeen which will allow it to be faster.
    This question was solved.
    View Solution.

    I have decided to return this printer to the store as it just has too many problems.  HP has essentially told me they will not issue updates to solve the problems.  I hate this, as I really loved the product.

  • How to make top of page in alv  to be printed.

    hello expert:
    i used following function to output alv.
    but after been printed into spool, i cannot find the top of page.
    how to set the print parameter to print the top of ALV.
      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
        TABLES
          t_outtab                    = it_comp
        EXCEPTIONS
          program_error               = 1
          OTHERS                      = 2.
    thank you and best regards,
    Kevin Gao

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_INTERFACE_CHECK           = ' '
         i_bypassing_buffer          = 'X'
       I_BUFFER_ACTIVE             = ' '
         i_callback_program          = sy-repid
       I_CALLBACK_PF_STATUS_SET    = ' '
       I_CALLBACK_USER_COMMAND     = ' '
       I_CALLBACK_TOP_OF_PAGE      = 'HTML_TOP_OF_PAGE'
        I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
       I_CALLBACK_HTML_END_OF_LIST = ' '
        i_structure_name            = <DYN_WA>
       I_BACKGROUND_ID             = ' '
       I_GRID_TITLE                =
       I_GRID_SETTINGS             =
         is_layout                   = gds_layout
         it_fieldcat                 = gdt_field_cata
       IT_EXCLUDING                =
       IT_SPECIAL_GROUPS           =
        it_sort                     = gdt_sortinfo
       IT_FILTER                   =
       IS_SEL_HIDE                 =
       I_DEFAULT                   = 'X'
         i_save                      = 'X'
         is_variant                  = gt_var
         it_events                   = gdt_eventcat
       IT_EVENT_EXIT               =
        IS_PRINT                    = gds_print
       IS_REPREP_ID                =
       I_SCREEN_START_COLUMN       = 0
       I_SCREEN_START_LINE         = 0
       I_SCREEN_END_COLUMN         = 0
       I_SCREEN_END_LINE           = 0
       I_HTML_HEIGHT_TOP           = 0
       I_HTML_HEIGHT_END           = 0
       IT_ALV_GRAPHICS             =
       IT_HYPERLINK                =
       IT_ADD_FIELDCAT             =
       IT_EXCEPT_QINFO             =
       IR_SALV_FULLSCREEN_ADAPTER  =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER     =
       ES_EXIT_CAUSED_BY_USER      =
       TABLES
         t_outtab                    = <dyn_table>
       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.
      CALL METHOD document->add_gap
        EXPORTING
          width = 100.
      text =  'Company Code Data'.
      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.
      text = 'User Name : '.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 6.
      text = sy-uname.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 50.
      text = 'Date : '.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 6.
      text = sy-datum.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 50.
      text = 'Time : '.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 6.
      text = sy-uzeit.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
    ENDFORM.                    "HTML_TOP_OF_PAGE

  • ALV print issue in top-of-page

    Hi,
    I have developed a alv report using REUSE_ALV_GRID_DISPLAY function module. I am using top-of-page event in events table to output top-of-page details. It is showing output correctly on screen but when I do a print preview, it is showing only the grid details and no header info from top-of-page. Please advise what can be the issue? I might be missing some parameter somewhere..I am creating my field catalog manually w/o reference to a structure or internal table..can this be a issue..
    Thanks in advance

    Have you passed the program name in parameter I_CALLBACK_PROGRAM
    DATA:f_repid TYPE sy-repid.
    f_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program      = f_repid  "  Program name

  • TOP OF PAGE printing according to SORT - ALV main internal table

    Hi guys
    I manage to solve my previous issues but 1 minor problem here
    Lets say I have an itab which has 3 records
    Sales Order | Purchase No, | Distributor
    1                  |   123               | abc
    1                  |   123               | abc
    2                  |   456               | TGIF
    I'm using FM REUSE_ALV_BLOCK_LIST_APPEND to display the ALV
    its working for the main INTERNAL TABLE but  when it comes to top of page, it doesn't follow the sort
    I want it to print
    Sales Order: 1
    Purchase No: 123
    Distributor: abc
    TABLE 1
    Sales Order: 2
    Purchase No: 456
    Distributor: TGIF
    TABLE 2
    But now its printing
    Sales Order: 1
    Purchase No: 123
    Distributor: abc
    TABLE 1
    Sales Order: 1
    Purchase No: 123
    Distributor: abc
    TABLE 2
    Sales Order: 2
    Purchase No: 456
    Distributor: TGIF
    TABLE <empty table>
    My codes was working previously but its not longer the same.
      READ TABLE it_report INTO l_report INDEX SY-tabix
      WRITE: text-003,          "Sales Order Number
            AT 22 l_report-ebeln.
      WRITE: / text-004,        "Purchase Order Number
             AT 25 l_report-purch_no.
      WRITE: / text-005,        "Distributor Number
             AT 22 l_report-kunnr.
      WRITE: / text-006,        "Ship to Name
             AT 16 l_report-wename1.
      WRITE: / text-007,        "Order Date
             AT 14 l_report-vdate.
      WRITE: / text-008,        "Delivery Date
             AT 17 i_vdatu.
    Can anyone help me out here?  How do I make it print just like the SORT for ALV?

    Refresh the work areas then it work fine

  • Officejet Pro only prints top 1/3 of page

    I'm printing documents by wireless connection but only the top  1/3 of the page is now printing. I started by printing a 5 page pdf document, and the first 3 pages all look ok. The next page only has the top 1/3 of the page printed though and then it looks as if it's run out of ink. I've run a printer status report and that prints off without any problems at all. Scans below. 

    Hello,  Please try the below steps that should resolve the issue. Open the PDF doucument .
    Click on   File > Properties .  Document Properties  will be displayed.
    Under " Document Properties " window, Click on "Security" tab.
    Check if "Printing: Allowed". If it is not probably you will not be able to print.
    Else try the below steps .....
    File > Print . Make sure Your printer is selected, then Click on "Advance " at bottom.
    Make sure "Print as Image " is having check. Click OK . And click on OK again to Print.

  • Print with  write statements from webynpro does not trigger top-of-page

    Print launched from webdynpro application via application server created with write statements does not trigger top-of-page event. When print is done from sapgui it works ok. The idea is to reuse backend print which was created for sapgui with abap list made application log in webdynpro application.

    Hi,
    here a short extract like i do it:
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
       HANDLE_PRINT_TOP_OF_PAGE
             FOR EVENT PRINT_TOP_OF_PAGE OF CL_GUI_ALV_GRID,
    ENDCLASS.                    "LCL_EVENT_HANDLER DEFINITION
    * Event-Händer Implementierung
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
      METHOD HANDLE_PRINT_TOP_OF_PAGE.
          PERFORM PRINT_TOP_OF_PAGE.
      ENDMETHOD.   
    ENDCLASS.
      CREATE OBJECT GR_EVENT_HANDLER.
      SET HANDLER
      GR_EVENT_HANDLER->HANDLE_PRINT_TOP_OF_PAGE  FOR GR_ALVGRID_LEFT.
      CALL METHOD GR_ALVGRID_LEFT->SET_TABLE_FOR_FIRST_DISPLAY
    FORM PRINT_TOP_OF_PAGE.
      LINSZ = SY-LINSZ - 16.
      WRITE: / 'Report:   ', SY-REPID,
               AT LINSZ 'Datum:',  SY-DATUM.
      WRITE: / 'Benutzer: ', SY-UNAME,
               AT LINSZ 'Zeit: ', SY-UZEIT.
    ENDFORM.
    hope it helps.
    Regards, Dieter

Maybe you are looking for