Printing ALV output

Hi All,
Thanks in advance.
I have requirement to have a checkbox on the selection screen to print.
If the check box is checked the report has to print the ALV output with page number 
on the printer given on the selection screen .
Can anyone please suggest me how this can be done.
Thnanks,
Gayatri Hemnur
Moderator message: please research yourself first, look for available information and solutions.
Edited by: Thomas Zloch on Dec 15, 2010 3:29 PM

Hi,
I think you are talking about line-size.
... LINE-SIZE col
Effect
Creates a report with col columns per line.
If the LINE-SIZE specification is missing, the line length corresponds to the current screen width. The system field SY-LINSZ contains the current line size for generating lists. The maximum width of a list is 1023 characters. You should keep lists to the minimum possible size to improve useability and performance (recommendation: LINE-SIZE < 132). For very wide lists (LINE-SIZE > 255), you should consult the notes for using LINE-SIZE
greater than 255.
Notes
The specified LINE-SIZE must not appear in quotation marks.
If the you want the report list (i.e. the output) to be printable, do not define a LINE-SIZE with a value greater than 132 because most printers cannot handle wider lists. You cannot print lists wider than 255 characters at all using the standard print functions. To print the contents of the lists, you need to write a special print routine that arranges the data in shorter lines (for example, using the PRINT ON addition in the NEW-PAGE statement.
At the beginning of a new list level, you can set a fixed line width for the level using the ... LINE SIZE addition to the NEW-PAGE statement.
Example
REPORT ZREPNAME LINE-SIZE 132.
Kindly reward points by clicking the star on the left of reply,if it is useful.

Similar Messages

  • Creating Format type for printing ALV output.

    Dear Friends,
        I am using a format type for printing ALV output print which displays 65 rows and 255 columns on DINA4 page. I want to create a format type which will print 65 rows and 310 columns on 'LEGAL' page format .
    So plz suggest the ways along with help links if any.
    Regards,
    Madan.

    Hi Mandan,
    As long as I know the maximum column for printing is 255.
    Might be you can split your output into 2 rows...
    Regards,

  • Print ALV - output is wrong

    Hi together,
    after migration of our SAP-system in a Unicode one, I changed the device type to an Unicode-device type.
    But now, when I print a ALV list, the output at the printer is wrong. There's nothing "like a table" - everything is displaced, nothing in columns...
    How can i fix this?
    Thanks in advance
    Michael

    Hi together,
    just wanted to know if anybody got a solution for my problem...
    To make it more specific:
    I printed out 10 rows of the table VBRK. On my unicode-device type it looks like this:
    Faktura____|_FkArt_|_FkTyp_|_VBTyp_| ...
    884064014___|_F2____|_L___|_M____|_EUR____| ....
    884054014___|_G2_____|_A __|_O____|_EUR____| ....
    And one the non-Ucidode one:
    Faktura____|_FkArt_|_FkTyp_|_VBTyp_| ...
    884064014_|_F2____|_L_____|_M_____| EUR    | ....
    884054014_|_G2____|_A_____|_O_____| EUR    | ....
    So, I mean, non unicode looks like a tyble, unicode not! What I have to do?

  • Printing ALV Report output through Function Modules

    Hi All,
    I want to print my ALV Grid output through function modules/statement (not through print option in menu).
    This is because, i am generating a PDF from spool when user clicks on a button. If any changes happened in the ALV output layout, they will be captured in spool through printing it.
    So can you please tell me how to print the ALV Output through FMs or sending the ALV output to spool.
    Thanks & Regards,
    Senthil.
    Edited by: senthil nathan on May 17, 2010 2:49 PM

    Hi Dev,
    Thanks for the reply.
    I want to print the ALV when the user clicks on a button in toolbar. Lets say the user has made some changes to the layout, (E.g hiding a field) and when i print that output it should use the changed layout, If i use the FM suggested by you, i cant acheive this.
    If you try to print this manually, the system uses the changed layout and not the original. Thats why i want to know FMs/statement to print.
    Regards,
    Senthil.

  • ALV Output need to send to Printer

    Hi Folks,
    I need to send the ALV output to the printer. I built the ALV in OOps. The printer button is enabled in the scrren and when I give print it is goint to dump
    Below I have pasted the dump.
    Help me to solve this.
    Points will be rewarded.
    Regards,
    Raj.
    Short text
        Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLKKBL" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        You attempted to access an unassigned field symbol
        (data segment 81).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    rigger Location of Runtime Error
       Program                                 SAPLKKBL
       Include                                 LKKBLF01
       Row                                     1,315
       Module type                             (FORM)
       Module Name                             CHECKBOX_OUT
    ource Code Extract
    ine  SourceCde
    1285     "<<Unicode/Doublebyte 1
    1286   else.
    1287     write at (rs_fieldcat-outputlen) <hf> as icon no-gap quickinfo
    1288                                                  rs_fieldcat-tooltip.
    1289   endif.
    1290
    1291   g_tabname = l_tabname.
    1292
    1293   format hotspot off.
    1294 *End of Orginalcoding 4.6c
    1295
    1296 endform.                               " HEADER_FIELD_OUT
    1297 &----
    1298 *&      Form  CHECKBOX_OUT
    1299 &----
    1300 *       text                                                           *
    1301 ----
    1302 form checkbox_out using rs_layout type kkblo_layout
    1303                         r_tabname type stack-i_tabname
    1304                         r_sum     type c.
    1305
    1306   data: l_mark(1) type c.
    1307
    1308   if not rs_layout-box_tabname is initial and
    1309          rs_layout-box_tabname ne r_tabname.
    1310     format color off.
    1311     write at (2) space no-gap.
    1312     exit.
    1313   endif.
    1314
    >>>>>   if not r_sum is initial or <box> = '-'.
    1316     format color off.
    1317     write at (2) space no-gap.
    1318   else.
    1319     format color off.
    1320     if <box> = ' ' or <box> = 'X'.
    1321       g_mark = <box>.
    1322       if rs_layout-no_input = 'X'.
    1323         write g_mark as checkbox no-gap input off.
    1324       else.

    check these parts in ur method:
                I_SAVE                = <var. of type CHAR01 >
                I_DEFAULT             = <var. of type CHAR01 >
                IS_LAYOUT             = <structure of type LVC_S_LAYO >
                IS_PRINT              = <structure of type LVC_S_PRNT >

  • Printing Selection-Screen while printing ALV Grid output display

    Hi,
    I have a requirement wherein I want to print the Selection Screen also while printing the output in simple ALV grid Display.
    Currently when I print the ALV output report, only the header and the Body of the ALV is getting printed. But the requirement is that I also want to print Selection screen along with this.
    If anyone has faced a similar situation, plz let me know what needs to be done in order to print the selection screen also while printing the ALV report output.
    Rgds,
    Nitin

    Hi,
    You can use given function module to print your
    selection screen
    RS_REFRESH_FROM_SELECTOPTIONS
    >This will get Current contents of selection screen
    RS_LIST_SELECTION_TABLE
    >This will Generates list according to values in selection table(RSPARAMS)
    Sample
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
           EXPORTING
                curr_report     = p_repid
           TABLES
                selection_table = it_int_tab
           EXCEPTIONS
                not_found       = 1
                no_report       = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
        WRITE:1  'Selection Criteria'(i19),
             /1  sy-uline(18),
             /1  'Variant Name'(i21),
             23  sy-slset.
    *--  This function module lists the Selection Screen contents
        CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
             EXPORTING
                  report        = p_repid
                  seltext       = 'X'
                  newpage       = space
             TABLES
                  sel_tab       = it_int_tab
             EXCEPTIONS
                  sel_tab_empty = 1
                  OTHERS        = 2.
    Mark all helpful answers

  • ALV output to be printed in a specified layout

    Hi All,
    I have a ALV output, and I have a print Icon on the application tool bar, when I click on the print icon, the output should go to the printer in 80 character format.
    plz let me know if there is any function module for this.
    plz do the needful.
    Thanks in advance
    Regards,
    Narendra

    Hi Narendra,
      Are you using REUSE_ALV_LIST_DISPLAY fm?
      If so then try using SET_PRINT_PARAMETERS fm before the above fm call and then leave the printing to standard List->Printe Menu option.
      See if this helps..
    Sri

  • Printing ALV list with ADS (pdf printer) in non-english charset

    Hello!
    I have an issue about printing alv list with pdf printer in non-english charset. We have two printers. One for alv lists (SWINCF: Casc.Fonts SAPWIN Unicode) and one for pdf forms(adobe document service). I want to use one printer for any documents. But PDF printer prints non-english charset like ########.
    What can I do ?

    Hi, Roman!
    I want to use PDF printer for both types of output. I have a dedicated java instance for ADS.
    There is a device type for our Kyocera Printer. My pdf printer prints ALV list good exept russian charset.
    It prints like #####

  • Need to sent alv output as html or as pdf attachment in mail

    +Hello
    I want to send an ALV output as attachement in html or as pdf format. how to do that? line size is greater than 600(nearly 40 fields).
    +please help me in this query.
    Regards
    Guruvayurappan
    Moderator Message: Please search before posting your question. Thread locked.
    Edited by: Suhas Saha on Dec 29, 2011 4:57 PM

    Hi,
    For sending the ALV output as PDF attachment, you can create a spool (proper page size in print parameters) and convert the spool to PDF using the FM CONVERT_ABAPSPOOLJOB_2_PDF and then send the same as attachment in mail.
    For send the data as HTML attachment, try the below FMs
    WWW_ITAB_TO_HTML_HEADERS & WWW_ITAB_TO_HTML_LAYOUT to create the HTML layout
    WWW_ITAB_TO_HTML to create the HTML for the actual data.
    Hope this helps you.
    Regards,
    Sachinkumar Mehta

  • How to download the blocked ALV output to PDF file.

    How to download the blocked ALV output to PDF file.
    I am able to download the BLocked ALV output in PDF format,
    but the each bolck in ALV is displaying different pages of PDF.
    In my report I have 4 block in 1 page, I am able to see the output in PDF but in different page.
    How to avoid the Page-break in PDF.
    Thanks,
    Ravi Yasoda.

    hi,
    I believe that your have 4 containers on the screen with individual ALV display. in this case, there is no way to get combined PDF output to my knowledge.
    However you can use Smartform/Sapscript as output which would allow you to display ALV in blocks and also print it in one.
    Regards,
    Nirmal

  • ALV output to Excel

    I appreciate if anyone can let me know how to get the ALV output to an EXCEL file.I have done it thru list->export. Is there any other way?

    Hi Deepti,
       1) Once you have alv report displayed in the screen.
       2) Click button 'View' ( next to print button) on application toolbar
       3) Select Excel in Place
       4) This will download the same format as of Report
    I hope your ALV have all the Standard functions in Toolbar. If not copy the status from and get the function as mentioned above.
    Program - SAPLSALV
    Status - STANDARD
    OR For downloading into Excel sheet use EXPORT->LOCAL FILE->Spread sheet
    If you want to do programatically then:
    Refer the link:
    http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
    Please use the following FM
    CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
    EXPORTING
    I_FIELD_SEPERATOR =
    I_LINE_HEADER =
    i_filename =
    I_APPL_KEEP = ' '
    tables
    i_tab_sap_data =
    CHANGING
    I_TAB_CONVERTED_DATA =
    EXCEPTIONS
    CONVERSION_FAILED = 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.
    Another FM –
    MS_EXCEL_OLE_STANDARD_DAT
    A simple  option:
    a)   form download_file .
           call function 'WS_EXCEL'
      importing
          filename = excel_name
      tables
          data       = itab.
    Reward points if this Helps.
    Manish

  • In ALV output, select row(s), How can we know which record it has selected?

    Hi Experts,
    In ALV output, there are 10 records (rows) displayed. I want to select specific row (or rows) for mass printing ( I need to assign respective smartform for selected row(s)). How the system (or my self) will recognize that which record it has selected?
    We have one field is called MARK field or etc., which will shows which record selected by indicating 'X' in internal table. I dont know exactly.
    Could you please help me out.
    Thanks in advance.
    Sekhar

    declare a field chk(1) type c in your final itab.
    build fieldcatalaoge for that field.
    when 'CHK'.
    alvfld-checkbox = alvfld-edit = 'X'.
    give a button in alv 'process' with function code 'PRO'.
    then call alv
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program       = sy-repid
          it_fieldcat              = fieldcat[]
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'.
        tables
          t_outtab                 = it_tvse[].
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    then in form user_command do like this
    form user_command using ucomm like sy-ucomm cursor type slis_selfield.
    case sy-ucomm.
    when 'PRO'.
    Loop at itab where sel = 'X'.
    write your code here.
    endloop.
    endform

  • Repetition of header in ALV output once excel download is selected

    Hi Experts,
    I have alv report where I use FM as below
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = w_repid
          i_callback_top_of_page = 'TOP-OF-PAGE'  "see FORM
          is_layout              = l_layout
          it_fieldcat            = lt_fieldcat
          it_sort                = l_sort
          i_save                 = 'X'
        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.
    and top of page as below
    FORM top-of-page.
    * Title
      w_header-typ  = 'H'.
      w_header-info = text-033.
      APPEND w_header TO t_header.
      CLEAR w_header.
    * Report Name
      w_header-typ  = 'S'.
      w_header-key = text-034.
      w_header-info =  sy-repid.
      APPEND w_header TO t_header.
      CLEAR w_header.
    * Date
      w_header-typ  = 'S'.
      w_header-key = text-035.
      CONCATENATE  sy-datum6(2) '.'+
                   sy-datum4(2) '.'+
                   sy-datum(4) INTO w_header-info.
      APPEND w_header TO t_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    ENDFORM.                    "top-of-page
    Its displaying well in output, but when I select excel download, the header is getting printed 4 times in the alv output and in the excel download it is printing twice. Please advise how to keep the header once. Note : I am not using any paging concept, simple header at the top.
    Please advise.
    Regards,
    Kiran.

    Hi kiran,
    While creating top-of-page,
    You have to refresh your header internal table before populating it with data i.e,
    FORM TOP.
    Refresh IT_HEADER                   -->with this the header text will not get repeatedly printed
    WA_HEADER-TYP = 'S'.
    WA_HEADER-KEY = TEXT-001.
    WA_HEADER-INFO = SY-REPID.
    APPEND WA_HEADER TO IT_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'S'.
    WA_HEADER-KEY = TEXT-002.
    WA_HEADER-INFO = SY-UNAME.
    APPEND WA_HEADER TO IT_HEADER.
    CLEAR WA_HEADER.
    WA_HEADER-TYP = 'S'.
    WA_HEADER-KEY = TEXT-003.
    WA_HEADER-INFO = SY-DATUM.
    APPEND WA_HEADER TO IT_HEADER.
    CLEAR WA_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary       = IT_HEADER
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.
    Hope it helps you
    Regards
    Mansi

  • How to remove "Records passed" list when printing ALV report

    Hi all,
    I have developed an ALV report, in which I have used reuse_alv_list_display functional module to print the output. After pressing print button, when I view the output in spool request transaction, an additional list with Number of records passed and "Calculated total records" is displayed. How to remove this additional list.
    I am using Get_print_paramaters FM to print.
    Thanks,
    rajan

    Hi
    Suppress the messages of the FM by commenting the exceptions and message statement
    Regards
    Shiva

  • Print ALV List

    Hi experts,
    T code ME2m   after executing i would like to print that sheet . with all coloms in A4 size paper.
    how can Increse size of LETTERS  and  colom and rows.
    after pressing PRINT icon  we will get pop up window(Print ALV List.
    then Output device -  Local
    number of copies1
    Print from page   1         1
    Then i  clicked   PROPERTIES  
    then i double clicked  PARAMETER VALUE     X_65_255
    then i selected  Format  radio button  then i selected  X_58_170..
    then i executed..
    that tiem system giving message   like
    System cannot print the last 176 columns of the
    report
    but i am not getting all the fealds in the page ?
    how to do configuration for this.
    Regards,
    Anthyodaya.

    In ME2N menu List --> Export document to word processing -> Create word document-> Start MS word.
    After downloading,Click F11,Save it as word document,Adjust page set up to Land Scape and also custom paper format
    to accommodate all fields in print.

Maybe you are looking for

  • OLAP performance issue with Webi

    After lots of research I haven't found good information anywhere. We are an SAP shop, run SAP ECC, BW with BWA and for the last couple of years Business Objects as well. Since we are a utility company, our reporting needs for a good majority of our a

  • ISight  and PC for skype

    I read that it was difficult to use iSight with XP, but is it impossible? I have a Mac at home and a laptop from work with XP. at the moment, the Vskype is only for PC, and I want to get the iSight to use with both? thanks.

  • Contacts only partially sync'ed

    Hi, For whatever reason, only about 30 of my 300+ contacts on my iPhone are sync'ed to the iCloud. I've tried turning the contact syncing in iCloud settings on and off but that does not seem to work. I've noticed that all the contacts that actually g

  • Why it is giving compilation error

    byte b = 50; byte c = 50*2; //giving compilation error why????

  • When can i see when was the last MRP had run?

    Hi All, as per my understanding in MD03 we first run MRP & then we can see the list in MD04. so suppose now some MRP relevant parameters are changing then unless we run MD03 again , these changes wont reflect in MD04. is it correct? now i want to see