ALV Report Print

Hi All,
can any one tel the solution fort me
is there any function module to print ALV report with out giving print option manually( user press print button)

Hi,
execute that report and on output list GOTO LIST->PRINT.
OR
if u want to print the code itself then PROGRAM->PRINT.
In the output screen
GOTO LIST IN THE MENU
SELECT EXPORT IN IT
THEN SELECT EXPORT SPREAD SHEET
to get other basic format for the alv output.
-Thanks & Regards
Saurabh Goel

Similar Messages

  • Problem in ALV report printing

    Hi,
    I am facing issue while printing the ALV report. The no. of columns in output are dynamic.
    System is giving the printout for 9 columns . If no. of columns are increasing than its printing only one line with garbage values.
    Can anybody help to fix this issue. We need print of 27 (3 static + 24 dynamic (for 12 months)) columns in one go.
    Thanks in advance,
    Vijeta
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Jun 9, 2009 9:30 AM

    Hi
    The font size depends on the format you've choosen for the print.
    The abap list arranges the page as grid: colunmXrow.
    Every colunm of a page means a character.
    If you use the standard format X_65_200, it means you're page is arranged for 65 row and 200 colunm:
    that means the size of a character is optimized to can print 200 chararcter in a A4 page.
    If you use the standard format X_65_132 it means you're page is arranged for 65 row and132 colunm:
    that means the size of a character is optimized to can print 132 chararcter in a A4 page.
    So that mean the size of format X_65_132 will be bigger than X_65_200, because in the same space (page A4) it needs to write 132 char instead of 200.
    If your report print NN char, u should use the format wiith number colunm is closer to NN.
    If there isn't a format or u use the first available format or u create a new one by trx SPAD.
    Max

  • ALV Report Print Problem.

    Hi,
    When I Print any ALV Report then In the First Row BackColor is white,
    but in Second it is Gray,and this alternative for all remaining rows,
    How Can I SET it to White For ALL Rows.
    Thx,
    Hitesh Jain.

    Hi Jain,
    I'm not aware of a way to wrap the test or set break points in an ALV report.  Typically I just try to reduce the number of columns to print and determine if the data is truly needed or just redundant.
    To change the font, you need to change the Format setting.  This setting is in the same popup box I described earlier.  This time under General Properties, double click on Format.  Just play around with the different Format options loaded.  If you need additional formats, you should work with your BASIS team because it depends on the Output Devices that are loaded in your system. 
    Otherwise, you may just need to export the ALV report into Excel to make it "pretty".  In Excel, you could create a macro to automate your formatting steps.  Just a thought.
    Good luck,
    Cindy

  • Alv report Print out Problem

    Hi Experts,
       I am having problem while taking print out of Alv report format. In that report, 1 column contains  Unit  Values.
    Eg.  Unit value - 'LE' , AFTER USING CONVERSION EXIT LOGIC it is converted into 'AU'  which is finally displayed in the Alv -Report display format. 
    while taking Print-out of that report , that field Unit Value 'AU' is Shown in this format  "****'.
    Please give me your Valuable Suggestions.
    Thanks and Regards
    BalaNarasimman M

    while defining filed catalog define the data type also
      clear l_fieldcat.
      l_fieldcat-fieldname  = 'MEINS'.
      l_fieldcat-datatype = 'UNIT'.
    l_fieldcat-no_out     = ' '.
      l_fieldcat-do_sum = 'X'.
      l_fieldcat-seltext_l  = 'UOM'.
      append l_fieldcat to p_fieldtab.
    may be it would help.
    anya

  • ALV Report Print problem after 255 character line size

    Hi ABAP Gurus,
    I have created one alv report where i am getting output more then 255 character line size.
    so whenever i tried to print this report it print only line upto first 255 character and truncated after it in printing.
    is there any way i can print this report without truncation ....
    Thanks,
    Jack

    no there is no such way because you acan print at most 99 columns and utmost 255 characters .
    and alternative is take your filed in separate screen and make it appear through hotspot in another filedcatalog.then u will get more space .
    reward if useful
    keep rockin
    vivek

  • ALV report Print out.

    Hi,
    I have developed a ALV report .
    I also want to take the print out of this report.
    How can i do this.

    Hi,
    Refer this code
    DATA : wa_variant  TYPE disvariant,       "Work area for variant
           wa_variant1 TYPE disvariant,       "Work area for variant
           wa_layout   TYPE slis_layout_alv,  "Work area for layout
           wa_print    TYPE slis_print_alv,   "Work area for print
    *&      Form  sub_alv_display                                          *
    This form displays the output using REUSE_ALV_GRID_DISPLAY          *
    function module                                                     *
    FORM sub_alv_display .
    *--Local Internal Table
      DATA : li_sort  TYPE slis_t_sortinfo_alv.
    *--Define print list
      wa_print-no_print_listinfos = c_chk.
      wa_print-no_coverpage = c_chk.
    *--If the No zero stock lines is checked in the selection screen
      IF  p_sline IS NOT INITIAL.
        DELETE i_final WHERE einme = c_zero.
      ENDIF.
      IF NOT i_final[] IS INITIAL.
    *--Call the function module to display the ALV report
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program = v_repid
            is_layout          = wa_layout
            it_fieldcat        = i_fieldcat
            i_default          = c_chk
            i_save             = c_save
            is_variant         = wa_variant
            it_events          = i_events
            is_print           = wa_print
            it_sort            = li_sort
          TABLES
            t_outtab           = i_final
          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.
      ELSE.
    *--No data found for the given selection criteria.
        MESSAGE i001.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                                  "sub_alv_display
    Regards,
    Prashant

  • ALV report - Print issues

    When trying to print an ALV report (Ctrl+P), printer has issues due to the shading (backgound colors) of the report.
    So here is my question,
    Is there a way to supress the report formatting while printing?
        or
    Can you convert an ALV into an unfomatted basic report?

    In the output screen
    GOTO  LIST IN THE MENU
    SELECT EXPORT IN IT
    THEN SELECT EXPORT SPREAD SHEET
    to get other basic format for the alv output.

  • ALV Report printing to A3 format

    Hi
    We have written an ABAP ALV report to extract information from any number of Sales Orders from a given set of criteria. A number of layouts have been created. The layouts have been defined by the business (as they wanted the same format as they were previously used to). The default layout is about 337 columns wide, thus sending it over the 255 A4 limit. I can print the layout on an A4 landscape on 2 sheets of paper, but this is not practical when you have up to 30 pages of content (thus 60 sheets of A4 paper).
    As such, I am experimenting with printing to A3. This is what I have tried so far (from information gleaned from Forum posts and elsewhere):
    Created a new Page Type (used template DINA3 to create ZDINA3.
    Created a new Format Type (e.g. Z_65_400_A3) and use ZDINA3 with 65 rows and 400 columns.
    Assigned this new Format Type to a Device Type, in this case, SWIN.
    In the Device Type, I have had to change the List Handler printer driver to "Print driver for SWIN using SAPLPD/Windows", otherwise I end up with 3 lines.
    I have also set the paper size on the printer to A3, but nothing else. Leaving this as A4 results in an A4 print!
    I have set up a number of Escape characters in the Device Type configuration:
    Printer Initialzation
    SAPWIN data stream
    \e%SAPWIN%
    \i<::XPAGES>
    \i<::XPGINIT>
    \i<::XPARAM>
    \i<::XLINEMOD>
    \i<::XFONT>
    End Of Page
    \f
    End of Line
    \n
    XLINEMOD: Line handling
    ##usage: Line handling
    ##DO NOT CHANGE the first two lines!
    output complete line with one call (do not use for proportional fonts)
    \eOa1
    XPARAM: Local settings
    ##usage: Local settings
    ##DO NOT CHANGE the first two lines!
    Schrift 5 Punkt einstellen.
    \eS92X
    #8,5 lpi
    \el8.5;
    XPGINIT: Orientation
    ##usage: Orientation
    ##DO NOT CHANGE the first two lines!
    Landscape-Mode
    \ePL
    I have tried to use the same example as <a href="http://www.sap-img.com/basis/how-can-i-print-a3-format-in-sap.htm">http://www.sap-img.com/basis/how-can-i-print-a3-format-in-sap.htm</a> but although I am getting an A3 sheet of paper, there are still issues with it:
    Portrait instead of Landscape
    Text appears to be double line spaced
    Font is very small (believe this can be resolved by specifying the size of a font)
    Firstly, any tips or tricks on printing to A3?
    Secondly, what is the List Driver checkbox used for on the Format Type (other than to show the portrait and landscape page types)?
    I do tend to scan these forums before posting, but in this case I have not managed to resolve this by looking in the Forum or elsewhere.
    Many thanks
    Nick

    Hi
    Due to getting no joy with this, I ended up creating an A3 Smartform and using a Windows printer capable of printing it. I also have the option of an A4 or A3 sheet in the Selection Screen, so this gives me the output in the format that was needed.
    Defining a Printer Output definition proved too tricky and I had to find a way to do it.
    Whether you can use a Smartform to print your ALV grid across several pages I do not know, but might be worth considering. I used a custom print button to trigger the correct page size (as selected on the Selection Screen).
    Regards
    Nick

  • Alv report print problems

    Hi all
    I have a problem when i print my alv grid report it first prints the title page then the revelent pages can i remove that title page.
    thanks

    have you checked with your windows administrator??

  • When 'PRINT' in ALV report using FM

    Hi
    I am getting an error when trying to execute and print option in the selection screen. my client system version is 4.6C
    in the dump  the error at :
    I am using FM at my report.
    set_auto_redraw(cl_gui_alf_grid_base)
    can you provide code for when 'PRINT' rs_selfild (dynamic form) for resue*grid_display
    Thanks

    Hi Dana,
    This thread answers ur question..
    alv REPORT PRINTING
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Printing ALV report

    Hi everyone,
    I have a report that was created with ALV, everything works fine until we print.
    When we print the report, it is printed in one page and that's ok, but the size is reduced, I mean the size is very small, any idea why we have this issue?.
    Thanks
    Eduardo Campos.

    HI Hduardo Campos,
    For printing ALV report or Normal report we need separte format while printing.
    Please fallow the fallowing steps to achieve your requirement.
    Steps:
    1. You have to create your own page format.
    SPAD-> Full Administration -> Device Types -> Page Formats -> Define the respective Page formats
    2. You have to define your own format type and attach the newly created page format to that.
    3. while creating the format type using existing script code from other formats.
    ( Here while wrting the script just test the font & font size as per your requirement)
    4. While ALV report printing select the Format option and enter your newly created format name( If you are not seeing report format option then select the properties option then select the report format then enter the required format name)
    fallow the above steps, so that you will able to print ALV report successfully.
    Still if you are facing any problem, let me know i will send you the detailed screen shots for the same.
    Right now in my current project i am using the same procedure and succesfuuly achieved the results.
    Regards,
    Rajani

  • In ALV Report output heading is printing twice.

    Hi Experts,
    Im working on ALV Reports.
    Im printing header text by using listheader and commentary write function module.
    the problem is when i sort any column in ALV ouput the heading is printing twice.
    Again if i sort the column the heading is printed is 4 times.
    so if anybody knows the solution how we can avoid repetition of heading ,
    Please reply me as soon as possible.
    regards
    Imrangs.

    Hi Noorie,
    Thanks a lot.
    Your answer is perfect.
    Bye.
    Regards,
    Imran

  • Print ALV Report

    I am using class CL_SALV_TABLE to generate an ALV report.
    When the report is printed, I want to be able to display the report name, date and time and page number. How to do this?

    Try this way
      data: lr_display_settings type ref to cl_salv_display_settings,
            l_title type lvc_title.
      l_title = text-t01. " Your title ie report name & date & time
      lr_display_settings = gr_table->get_display_settings( ).
      lr_display_settings->set_list_header( l_title ).
      gr_table->display( ).

  • Reg : Print Issue in ALV Report

    Hi Experts,
                     I have created an ALV Report for USER Requirement and it is working fine. While taking printout the SORTED Field is not working, it gets repeated in the Print... How to rectify..?

    hi,
    did u use SORT-UP equal to 'X'?
    wa_sort-up = c_x.
    ags.

  • Display/Print the Selection criteria entered by USER on the ALV Report o/p?

    Hi Experts,
    I hv a requirement of to print/display the Selection criteria entered by user in the selection screen.........on the top portion of the ALV report output lay out.
    There is a FM for this purpose, but, I forgot its name!!
    So, let me know the FM or FMs, so that, will choose, which is best one,
    or the piece of code, which covers all select-option entries..........appreciated.
    thanq
    Edited by: SAP ABAPer on Sep 3, 2008 6:35 PM

    Use the Function RS_REFRESH_FROM_SELECTOPTIONS get the selection details, now format the data accordingly in the TOP_OF_PAGE using the calss CL_DD_DOCUMENT.
    Check the below mention code.
    REPORT  ztest_page.
    TABLES: sflight.
    DATA : it_flight TYPE TABLE OF sflight WITH HEADER LINE.
    DATA BEGIN OF it_sel_opt OCCURS 0.
            INCLUDE STRUCTURE rsparams.
    DATA END   OF it_sel_opt.
    SELECT-OPTIONS: s_carrid FOR sflight-carrid.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE it_flight
       WHERE carrid IN s_carrid.
    END-OF-SELECTION.
      CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
        EXPORTING
          curr_report     = sy-repid
        TABLES
          selection_table = it_sel_opt
        EXCEPTIONS
          not_found       = 01
          no_report       = 02.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program          = sy-repid
          i_callback_html_top_of_page = 'TOP_OF_PAGE'
          i_structure_name            = 'SFLIGHT'
        TABLES
          t_outtab                    = it_flight
        EXCEPTIONS
          program_error               = 1
          OTHERS                      = 2.
    *&      Form  top_of_page
    *       text
    *      -->DOCUMENT   text
    FORM top_of_page USING document TYPE REF TO cl_dd_document.
      DATA : dl_text(255) TYPE c.  "Text
    * Add new-line
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
      CLEAR : dl_text.
    * program ID
      dl_text = 'Program Name :'.
      CALL METHOD document->add_gap.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_heading_int.
      CLEAR dl_text.
      dl_text = sy-repid.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
      CALL METHOD document->new_line.
      CLEAR : dl_text.
      dl_text = 'Selection Criteria'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 34.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
      CALL METHOD document->new_line.
      CLEAR : dl_text.
      CONCATENATE 'SELECT Option' 'SIGN' 'OPTION' 'LOW' 'HIGH'
      INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
      CALL METHOD document->add_gap
        EXPORTING
          width = 34.
      CALL METHOD document->add_text
        EXPORTING
          text         = dl_text
          sap_emphasis = cl_dd_area=>heading
          sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
      CALL METHOD document->new_line.
      LOOP AT it_sel_opt.
        CLEAR : dl_text.
        CONCATENATE it_sel_opt-selname  it_sel_opt-sign
         it_sel_opt-option it_sel_opt-low it_sel_opt-high
        INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
        CALL METHOD document->add_gap
          EXPORTING
            width = 34.
        CALL METHOD document->add_text
          EXPORTING
            text         = dl_text
            sap_emphasis = cl_dd_area=>heading
            sap_color    = cl_dd_area=>list_negative_inv.
    * Add new-line
        CALL METHOD document->new_line.
      ENDLOOP.
    ENDFORM.                    "top_of_page

Maybe you are looking for