Reg: Suppress Print popup while printing ALV

Hi Experts,
I am using FM REUSE_ALV_LIST_DISPLAY to print the report and convert the spool to PDF and email it as attachment.
When iam calling the FM for printing by passing parameter IS_PRINT, it is asking me to enter printer details as popup. I need to suppress this popup. I tried passing the default print parameters to this IS_PRINT, but still no result.
Can anyone help me on this.
Thanks
Naveen

Hi
You need to pass first ALV data to spool and a PDF doc as email and then again call the FM grid display .
Clear Spool Number
  CLEAR: gv_spool.
Check for presence of any recipients
  IF s_reclst[] IS NOT INITIAL.
    sy-batch = 'X'.                                       "#EC WRITE_OK
    gs_alv_print-print =  'X'.
    gs_alv_print-prnt_info = ' '.
    gs_alv_print-no_print_selinfos = 'X'.
    gs_alv_print-no_print_listinfos = 'X'.
    gs_alv_print-no_coverpage = 'X'.
    gs_alv_print-reserve_lines = 1.
    gs_alv_print-print_ctrl-pri_params-pdest = 'PRINTER'.
    gs_alv_print-print_ctrl-pri_params-primm = 'X'.
    CALL FUNCTION 'REUSE_ALV_list_DISPLAY'
      EXPORTING
        i_callback_program = gv_repid
        is_layout          = gs_alv_layout
        is_variant         = gs_alv_variant
        it_fieldcat        = gt_alv_fieldcat
        it_sort            = gt_alv_sort
        it_events          = gt_alv_events
        is_print           = gs_alv_print
      TABLES
        t_outtab           = gt_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.
Get the Spoolnumber
    gv_spool = sy-spono.
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid              = gv_spool
      TABLES
        pdf                      = gt_pdf_output
      EXCEPTIONS
        err_no_abap_spooljob     = 1
        err_no_spooljob          = 2
        err_no_permission        = 3
        err_conv_not_possible    = 4
        err_bad_destdevice       = 5
        user_cancelled           = 6
        err_spoolerror           = 7
        err_temseerror           = 8
        err_btcjob_open_failed   = 9
        err_btcjob_submit_failed = 10
        err_btcjob_close_failed  = 11
        OTHERS                   = 12.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
Transfer the 132-long strings to 255-long strings
      LOOP AT gt_pdf_output INTO gs_pdf_output.
        TRANSLATE gs_pdf_output USING ' ~'.
        CONCATENATE gt_buffer gs_pdf_output INTO gt_buffer.
      ENDLOOP.
      TRANSLATE gt_buffer USING '~ '.
      DO.
        gs_objtxt = gt_buffer.
        APPEND gs_objtxt TO gt_objtxt.
        SHIFT gt_buffer LEFT BY 255 PLACES.
        IF gt_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDIF.
  ENDIF.
the above code will help you.
Thanks
kishore

Similar Messages

  • Suppress "Print ALV List" dialog.

    HI All,
    Is there a way of suppressing the "Print ALV List" dialog that is displayed when you print an alv using REUSE_ALV_BLOCK_LIST_DISPLAY.   The is_print parameters does not contain any option, though there is a supress_dynpro option before the dialog is called, not sure how to set this is_print parameters.
    Rgds,
    James.

    Hi,
    <li>You can not suppress print parameters popup screen using REUSE* function module. It comes thats it.  I tried for longtime to suppress, could not pass
    <li>But when you print classical reports you can suppress it.
       REPORT ZTEST_NOTEPAD.
      DATA:G_LAY     TYPE PRI_PARAMS-PAART,
           G_LINES   TYPE PRI_PARAMS-LINCT,
           G_COLS    TYPE PRI_PARAMS-LINSZ,
           G_VAL     TYPE C.
      DATA:W_PRIPAR  TYPE PRI_PARAMS,
           W_ARCPAR  TYPE ARC_PARAMS.
      PARAMETERS:
          P_DATA(10) TYPE C.
      START-OF-SELECTION.
        G_LAY   = 'X_65_132'.
        G_LINES = 65.
        G_COLS  = 132.
        "Read, determine, change spool print parameters and archive parameters
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
          EXPORTING
            IN_ARCHIVE_PARAMETERS  = W_ARCPAR
            IN_PARAMETERS          = W_PRIPAR
            LAYOUT                 = G_LAY
            LINE_COUNT             = G_LINES
            LINE_SIZE              = G_COLS
            NO_DIALOG              = 'X'
          IMPORTING
            OUT_ARCHIVE_PARAMETERS = W_ARCPAR
            OUT_PARAMETERS         = W_PRIPAR
            VALID                  = G_VAL.
        IF G_VAL  NE SPACE AND SY-SUBRC = 0.
          W_PRIPAR-PRREL = SPACE.
          W_PRIPAR-PRIMM = SPACE.
          NEW-PAGE PRINT ON
            NEW-SECTION
            PARAMETERS W_PRIPAR
            ARCHIVE PARAMETERS W_ARCPAR
            NO DIALOG.
        ENDIF.
        WRITE 'Output in spool'.
        NEW-PAGE PRINT OFF.
        CALL FUNCTION 'ABAP4_COMMIT_WORK'.
        DATA:TEXT TYPE STRING.
        CONCATENATE 'Spool' SY-SPONO 'is generated' INTO TEXT SEPARATED BY SPACE.
        MESSAGE TEXT  TYPE 'S'.
    Thanks
    Venkat.O

  • Font is small while printing alv list report

    Hi,
    while printing ALV list report font is too small, can you tell me where i can increase the font size. I tried in GUI font ,In which i can increase the font for GUI, not for ALV priniting . Can any body help me to solve this problem?
    Regards,
    siva kumar

    HI Kushboo,
    I think You are talking about header text in ALV , while printing ALV list i need to increase all the font size.. In fieldcatlog there is no option called Style...for increasing ALV font line item details. Can you tell me which style you are talking about?
    Regards,
    siva kumar

  • Suppress Print Dialogue while calling ADOBE FORM

    Hi,
    How to suppress the Print dialogue when I call PDF FORM.
    In Smart form interface we have a field no_dialogue in the structure SSFCTRLOP to suppress print dialogue.
    But in the Function Module generated by Adobe Form or in the Adobe Form Interface we don't have such structure to control the print dialogue.
    awaiting the answers.
    Ram.
    Edited by: RamMohan Rao on Sep 17, 2008 7:29 PM

    Hi,
          Try to generate the interface and adobe form and also the generated FM "/1BCDWB/SAPLSM00000027"
    Regards,
    Srini.

  • 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

  • Problem with printing ALV lists

    Hey Guys,
    I have a problem with printing ALV lists ,
    I created a report with several ALV lists (not grids) on the same screen but when i attempt to print the report
    it prints each alv list on a different page..so if i have 3 alv lists in the same report it will print the report on 3 pages
    How can i print  them all in one page?
    Thanks in advance
    Noha Salah.

    Hey Max,
    I tried setting the Layout-list_append  before my block_list_append function call
    And setting the is_print-NO_NEW_PAGE , it printed the 3 lists on one page the only problem i have
    is that the lists are truncated and the list formats has totally been messed up..how can i restore them back
    to their original format?

  • 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 #####

  • Blank Page prints even though "Suppress Printing If No Records" option is t

    Blank Page prints even though "Suppress Printing If No Records" option is thicked.
    My environment:
    Crystal Report Developer Full version 11.5.11.1470
    Windows Server 2003 SP2 32-bit.
    We have a third party vendor application written in Java -let's call it "print deamon", but my company doesn't have access to the source code.
    The print deamon essentially listens to the core application which is located remotely, receive some print instructions such as label name, printer name, crystal reports version (8.5 or 11) and a few parameters that are passed to the crystal report template.
    When the version is Crystal Reports 11 and the template is open and query is executed (using Oracle JDBC) and if the template's query does not retrieve any rows, a blank page still prints even though the option to suppress printing is thicked.
    With Crystal Reports 8.5 version, we have no issues.
    recycling the blank page is not an option in our high volume print environment, these paper and labels are wasted big time, third party vendor says this is an issue with crystal reports XI api.
    These are some of the libraries the Print Deamon uses:
    09/25/2009  10:29 AM         2,055,844 cecore.jar
    09/25/2009  10:29 AM           211,919 celib.jar
    09/25/2009  10:29 AM           830,301 corbaidl.jar
    09/25/2009  10:29 AM           371,142 CRDBJavaServerCommon.jar
    09/25/2009  10:29 AM           121,413 CRDBXMLServer.jar
    09/25/2009  10:29 AM           670,312 CrystalCharting.jar
    09/25/2009  10:29 AM             2,162 CrystalCommon.jar
    09/25/2009  10:29 AM            94,290 CrystalContentModels.jar
    09/25/2009  10:28 AM           110,657 CrystalDatabaseConnectors.jar
    09/25/2009  10:29 AM           686,963 CrystalExporters.jar
    09/25/2009  10:29 AM            67,807 CrystalExportingBase.jar
    09/25/2009  10:29 AM           581,270 CrystalFormulas.jar
    09/25/2009  10:29 AM           330,909 CrystalQueryEngine.jar
    09/25/2009  10:29 AM         2,271,217 CrystalReportEngine.jar
    09/25/2009  10:29 AM           453,829 CrystalReportingCommon.jar
    09/25/2009  10:29 AM         1,985,441 ebus405.jar
    09/25/2009  10:29 AM    <DIR>          external
    09/25/2009  10:29 AM           227,996 jrcadapter.jar
    09/25/2009  10:29 AM             9,988 jrcerom.jar
    09/25/2009  10:29 AM            94,180 keycodeDecoder.jar
    09/25/2009  10:29 AM           448,627 MetafileRenderer.jar
    09/25/2009  10:29 AM           380,520 rasapp.jar
    09/25/2009  10:29 AM           843,544 rascore.jar
    09/25/2009  10:29 AM           283,131 ReportPrinter.jar
    09/25/2009  10:29 AM           793,445 ReportViewer.jar
    09/25/2009  10:29 AM            95,382 rpoifs.jar
    09/25/2009  10:29 AM            40,545 Serialization.jar
    09/25/2009  10:29 AM             3,777 URIUtil.jar
    Let me know if there's anything we can do before engaging our third party vendor to produce their source code.
    Thank you - Kleber

    It's not relavent now is it? Do what ever works in CR XI.
    Also you may want to upgrade to CR XI R2. Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
    Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    Once updated you can then go to the Keycode site and get a XI R2 keycode to enable oll of the features.
    Thank you
    Don

  • Suppress printing of blank records

    This should be simple, but I have tried everything I can think of, and trolled through the archives, without finding an answer.  Please don't chastise me for asking a question which has already been answered, too simple, in the wrong section, or any of the other sins you regularly accuse us of...
    I am printing a series of form letters which are selected on the basis of a couple of criteria.  I want to exclude records with blank fields.  (My database supports null values, but these field entries are blanks, not nulls.  The fields are string (alphanumeric) values. My selection criteria (for the 1 month letter) are below.  The first two criteria work fine; it is in the third line that I am trying to exclude the blank records.  I have tried: {LetterEnt.Gr_LastName}<>"",  {LetterEnt.Gr_LastName}<>" ", and then I got clever and tried the entry below.  None of these work.
    {LetterEnt.Letter1} = "X" and
    {LetterEnt.Site} = "Q" and
    Length({LetterEnt.Gr_LastName})>0

    +Message: AFAIK, if there are no records, there are no detail sections, so
    your report must show text from other sections.+
    (Is AFAIK some sort of "geek code" (in which case you have gone completely over my head), or are you addressing somebody by that name?  (My name is David).)
    If there are no records, there are indeed detail sections - with blank address fields.  See my previous more detailed exposition of the exact nature of the problem.
    +It is also not clear what "forces" a printout.  Are you using Crystal
    Designer (my assumption since you are posing in the Crystal Report Design
    forum) or something else (Crystal Enterprise)?  Crystal Designer doesn't
    force printouts - a user must initiate the printout.+
    Am I using Crystal Designer?  I don't know.  The program is called Crystal Reports XI in my computer.  Are you suggesting that I am in fact asking my question in the wrong forum? (I would have presumed that something called "Crystal Reports Design" deals with design issues in Crystal Reports, but if I am in error, I do apologise.  Perhaps you could direct me to the more appropriate resource.)
    What "forces" a printout? You are correct insofar as the operator has to push the Print button (at least as presently functioning.  At one stage I had the letters printing out behind the scenes using an Active-X control.  This ran for 2 weeks, then fell apart and I eventually gave up trying to make it work; but that is another story.)  How does this happen?  Crystal is adding completely blank pages as the first page on some of the reports, so it is not always immediately apparent to the operator that there is a letter sitting there with a blank address.  (And this, too, is a separate issue.  I have gone through all the instructions in the knowledge base as to how to get rid of the leading blank sheet.  None of the instructions have worked, and I eventually gave up trying.  Thinking about it, I have had an awful lot of frustration with this program.  Perhaps I am unreasonable, but if I can't get something to work after 3 or 4 hours' trying, I give it up as a bad job and live with the fault.)
    +You can always suppress those other sections with a condition such as
    IsNull({some field that is never Null).+
    It is not clear to me what this means.  All the sections other than the detail section are blank - always.
    +There are 3rd-party Crystal Reports tools that allow you to skip
    processing (printing/exporting/emailing) if the report comes up with zero
    records.+
    Aha!  Am I interpreting this correctly, as saying that I cannot do what I want to do (suppress printing of letters with blank addresses) in Crystal Reports, and that to do this I need to get a third party add-on?

  • How not to suppress printing grouping items

    In group by reports, the printing of group items is suppressed until the values change. How can I get the report to not suppress printing the duplicates values?

    In the select query , specify the group columns once more with alias names and make its frequncy below the grouped items..
    Now your report will work as though you have not grouped it and also will return the group values..
    For eg :
    Select emp_code,emp_Dept ,emp_name, emp_dept dept_wise_emp
    From employee_master
    First group is emp_dept
    Below level has rest of the columns..
    Select the sum /count of the desired columns from the report wizard...

  • 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.

  • Print alv

    how to print alv report(any fm)...hi ...urgent

    Hi
    http://help.sap.com/saphelp_erp2004/helpdata/en/88/efea8afed811d2b493006094192fe3/content.htm

  • 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,

  • Suppress printing the last two pages

    I have created a form that has the last two pages of the form screen only visible. Saved the form and printed it but the last two pages print blank. Is there any way to suppress printing the last two blank pages. If I was the only person using the form I just wouldn't print the last two pages but this is going into a production environment where seeing the last two pages is important but printing the last two pages isn't.
    Thanks.

    Take a look at the script produced by the "Print Button".
    xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
    The doc for print is available at http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/001735.html
    Steve

  • Allow buyer to suppress printing of item delivery schedule on PO

    Gurus,
    Is it possible to allow buyer to suppress printing of item delivery schedule on PO. If possible can you please propose me a solution.
    Regards

    not with std config for PO creation but can be possible for PO  changes
    by seeting in the SPRO
    MM-Purchasing-messages-fields relevant for printout changes
    here u can do the settings for PO

Maybe you are looking for

  • How can I move my sons songs from my iTunes account to his new one we're opening just for him?

    my son is building quite a collection on out family's itunes account. We now want him to have his own and move his songs to his new itunes account. how can this be done? Thanks, RKB

  • Can we use 2 different apple accounts on one iPad?

    We have just bought an iPad and both already have iPhones. We are currently trying to set up our iPad but can only seem to have one ID in. Is there a way of logging in and out of the two different accounts on the one iPad? Any help would be appreciat

  • Can horizontal scroll bar be removed?

    The listbox controls have horizontal scroll bar that can not be removed by property notes. Is there a way to change it to invisible? Also how do I change the controls from raised or recessed to flat? Thank you for your help.

  • How to restart Seeburger x.400 service

    Hello guys, actually i knew how to restart the service but now i am not able to find it anymore. We have an external adapter engine and think that the messages are not send because adapter might be down on seeburger machine. Could you give me a hand

  • Ora-12526 in DBCA

    Hi, I am using oracle 11g r2. I have dropped a database of "XYZ" sid using DBCA. and re-creating it with same sid using DBCA, but it is throwing ORA-12526 on "Database Creation Option" page at finish button click. Please help me out. Thanks & Regards