Avoid print dialog in smartforms

Folks,
I am trying to avoid print dialog which comes up in smartforms. But my code is not working. Please help.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname                 = gv_form
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
IMPORTING
   fm_name                  = fm_name
EXCEPTIONS
   no_form                  = 1
   no_function_module       = 2
   OTHERS                   = 3
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
gv_control-no_dialog = 'X'.
gv_control-preview   = 'X'.
gv_control-no_open   = 'X'.
gv_control-no_close  = 'X'.
*gv_control-device    = 'LOCL'.
gv_output-tddest = 'LOCL'.
CALL FUNCTION 'SSF_OPEN'
  EXPORTING
*     ARCHIVE_PARAMETERS       =
*     USER_SETTINGS            = 'X'
*     MAIL_SENDER              =
*     MAIL_RECIPIENT           =
*     MAIL_APPL_OBJ            =
    output_options           = gv_output
    control_parameters       = gv_control
*   IMPORTING
*     JOB_OUTPUT_OPTIONS       =
  EXCEPTIONS
    formatting_error         = 1
    internal_error           = 2
    send_error               = 3
    user_canceled            = 4
    OTHERS                   = 5.
IF sy-subrc <> 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT gt_distributors INTO gs_distributors.
  CALL FUNCTION fm_name
    EXPORTING
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
   control_parameters         = gv_control
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
   output_options             = gv_output
   user_settings              = space
   gv_agmt                    = p_agr
   gv_dist                    = gs_distributors-kunnr
* IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
*   JOB_OUTPUT_INFO            =
*   JOB_OUTPUT_OPTIONS         =
EXCEPTIONS
   formatting_error           = 1
   internal_error             = 2
   send_error                 = 3
   user_canceled              = 4
   OTHERS                     = 5
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
*   IMPORTING
*     JOB_OUTPUT_INFO        =
  EXCEPTIONS
    formatting_error       = 1
    internal_error         = 2
    send_error             = 3
    OTHERS                 = 4.
IF sy-subrc <> 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
  IMPORTING
    errortab = gv_errtab.
IF NOT gv_errtab IS INITIAL.
*   add your handling
ENDIF.
A message is coming at the bottom saying...please main output device in the user master data. How do I maintain?
Message was edited by: Naren Somen

Hello all,
Thanks for the replies. They are really helpful. Actually my code is working fine in one client and in other client it is not working. The reason being user01-spld is empty. My code looks like this:
REPORT  zagreement                              .
TYPES: BEGIN OF ty_distributors,
         kunnr TYPE kunnr_v,
       END OF ty_distributors.
DATA: gt_distributors TYPE TABLE OF ty_distributors WITH HEADER LINE.
DATA: fm_name TYPE rs38l_fnam,
      gs_distributors TYPE ty_distributors.
DATA: gv_control TYPE ssfctrlop,
      gv_errtab  TYPE tsferror.
DATA: gv_form TYPE tdsfname VALUE 'ZAGREEMENT'.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER:  p_agr TYPE knuma_ag.
SELECTION-SCREEN: END OF BLOCK b1.
***distributors
PERFORM  get_distributors.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname           = gv_form
  IMPORTING
    fm_name            = fm_name
  EXCEPTIONS
    no_form            = 1
    no_function_module = 2
    OTHERS             = 3.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
gv_control-no_dialog = 'X'.
gv_control-preview   = 'X'.
gv_control-no_open   = 'X'.
gv_control-no_close  = 'X'.
CALL FUNCTION 'SSF_OPEN'
  EXPORTING
    control_parameters = gv_control
  EXCEPTIONS
    formatting_error   = 1
    internal_error     = 2
    send_error         = 3
    user_canceled      = 4
    OTHERS             = 5.
IF sy-subrc <> 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT gt_distributors INTO gs_distributors.
  CALL FUNCTION fm_name
    EXPORTING
      control_parameters = gv_control
      gv_agmt            = p_agr
      gv_dist            = gs_distributors-kunnr
    EXCEPTIONS
      formatting_error   = 1
      internal_error     = 2
      send_error         = 3
      user_canceled      = 4
      OTHERS             = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
  EXCEPTIONS
    formatting_error = 1
    internal_error   = 2
    send_error       = 3
    OTHERS           = 4.
IF sy-subrc <> 0.
*   error handling
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* analyse internal error table of Smart Forms
CALL FUNCTION 'SSF_READ_ERRORS'
  IMPORTING
    errortab = gv_errtab.
IF NOT gv_errtab IS INITIAL.
*   add your handling
ENDIF.
*&      Form  get_distributors
*       text
*  -->  p1        text
*  <--  p2        text
FORM get_distributors .
***distributors
  SELECT  kunnr
    FROM  a941
    INTO  TABLE gt_distributors
   WHERE  knuma_ag EQ p_agr.
  IF sy-subrc <> 0.
***no distributors found for this agreement
  ENDIF.
ENDFORM.                    " get_distributors
Your answers are really helpful and I am awarding points to all of them.
Thanks,

Similar Messages

  • Avoid popup dialog in smartforms

    hi all,
    i'm facing a problem, i want to avoid popup dialog in smartforms.
    i have set structure SSFCTRLOP-no_dialog = 'X'. but it still show popup dialog. did i miss something?

    Hi,
    I had the same issue, no need to set device to PRINTER since the underlying function module will default that if blank.
    On debugging the SMARTFORM function module.
    It turns out that the parameter USER_SETTINGS defaults to 'X', which will display the printer dialog popup.
    Changing this setting (USER_SETTING) to ' ' (SPACE) when calling the generated SMARTFORM function module as below then stopped the pop up appearing.
    (The actual issue is that the destination specified was being overwritten with *, so it was looking to the users settings for a printer. Normally LOCAL PRINTER, changing the user_setting to ' ' keeps the printer specified and no need for the printer dialog popup)
    * Get function module name
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
         EXPORTING
           formname           = i_formname
         IMPORTING
           fm_name            = l_fm_name
         EXCEPTIONS
           no_form            = 1
           no_function_module = 2
           OTHERS             = 3.
       IF sy-subrc <> 0.
         CASE sy-subrc.
           WHEN 1.
             RAISE no_form.
           WHEN 2.
             RAISE no_function_module.
           WHEN OTHERS.
         ENDCASE.
       ENDIF.
      CALL FUNCTION l_fm_name
         EXPORTING
           control_parameters   = i_ctrl_params
           output_options       = i_output_opts
          user_settings        = ' '                                        <--- *** Set this to SPACE ***
           t_line_items         = it_trolley_items
         IMPORTING
           job_output_options   = l_job_output_options
         EXCEPTIONS
           formatting_error     = 1
           internal_error       = 2
           send_error           = 3
           user_canceled        = 4
           OTHERS               = 5.
    This fixed the issue in my case, every case is different.
    Hope this helps someone, even though this is posted long after the original question.
    Thanks
    Jodh Atwal

  • How to get rid Print Dialog in Smartforms

    Hi,
    We are using ECC 6.0. I have the following code for calling smartforms:
    DATA: ltp_control_parameters TYPE ssfctrlop,
            ltp_output_options TYPE ssfcompop.
      ltp_control_parameters-no_dialog = 'X'.
      ltp_control_parameters-preview = 'X'.
      ltp_control_parameters-preview = 'LOCL'.
      ltp_output_options-tddest = 'LOCL'.
    The problem is that the print dialog appears and asking for output device. How to get rid this?
    thanks,
    sid

    hi all,
    thank you for replying. i got rid of the print dialog box by filling in defaults->spool control->output device in the user profile->own data. And i just set the following in my code:
      ltp_control_parameters-no_dialog = 'X'.
      ltp_control_parameters-preview = 'X'.
    And also previously i mistakenly reset ltp_control_parameters-preview to 'LOCL' (refer to my previous post).
    regards,
    sid

  • Avoid Print Dialog Box

    My company is exporting Postcards in Illustrator CS6. What we do is have a large data set imported into the Variables applet and use the Actions applet to record and export action and play it through the whole data set. We later combine the PDF files and print them as a batch.
    My question is: Is there a way to create an action that will automatically print the data set while avoiding the print dialog box? It will make the process simple and move faster.
    Also, what are your was of creating postcards? Catalogs?
    How do people create a catalog with over 60 pages and keep the file size low?

    Take a look at AI's Batch Process dialog. You can use data sets there.

  • Smartform avoid print window

    Hi Experts
    what r the necessary parameters should be passed to the fm
    GET_PRINT_PARAMETERS for avoiding print dialog window.
    i want to avoid dialog window.And how to declare those parameters, pls explain me
    my printer name is 'LP01'.
    i need one copy, how to set these to the fm.
    Pls help me.
    Thanks in advance
    Regards
    Rajaram

    Hi Ram,
    declare two variable of type :
    data: gfl_ctrlop TYPE ssfctrlop,
    gfl_compop TYPE ssfcompop,
    enter these values:
    gfl_compop-tddest = 'LP01'. "Spool: Output device
    gfl_ctrlop-getotf = 'X'.
    gfl_ctrlop-no_dialog = 'X'. "To hide the print priview screen
    gfl_compop-tdnoprev = 'X'.
    pass these variables in function module of smart form.
    window will get suppresed.
    CALL FUNCTION g_fname
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = gfl_ctrlop
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = gfl_compop
    USER_SETTINGS = 'X'
    header_data = gfl_header_data
    item_table = git_item_data
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = g_return
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Regards:
    Talwinder

  • Adobe Reader 9.4.6: how to skip print dialog

    Hello,
    in our company we implement a freestanding self-services kiosk project.
    The kiosk uses a browser, which links with internal application server, which contains the required information.
    There's also an option to print some documents via Adobe ActiveX PlugIn. Explored some versions of Adobe Reader, we considered that the most appropriate is version 9.4.6. We strongly needed to set Adobe Reader so that the only clickable button in upper toolbar is “Print” button, and also side navigation panel is hidden (because pdf file opens in the frame within the kiosk system page). We've succeeded with this issue.
    But now we experience one more problem. When the user clicks the "Print" button, the print dialog appears. Is it possible to choose default printing settings and start printing avoiding print dialog by some standard options?
    Or maybe you can provide us an event, which initiates Adobe print dialog, so that we can use it to fire the OK within java script.
    Best regards
      Anton.

    Looks like you need a silent print, take a look at:
    http://blogs.adobe.com/acdc/2011/03/silent-print-in-acrobat-using-javascript.html
    The steps are for Acrobat. You'll need to see if they work with Reader.

  • How to avoid the dialog box "SAVE, Open, Cancel" When we take a pdf print.

    I have an item entry form. User select different items and then submit the order by pressing submit button.
    I want that when the user click the submit button he is directet to the print preview page. I have done that and it is running fine but the issue is when user click on the submit button the dialog box appear showing file name and an option to save or open the file. I want to avoid that dialog box and I want that the file is opened directly.
    In shot I want that the user goes directly to the open file option instead of giving him the options.
    Thx,

    Hello Syed,
    I thought this is a browser behavior. In Firefox it asks the first time what I want to do.
    If I select open and select the checkbox to do that always like that, it's opening directly.
    I searched a bit in javascript, use an iframe or specify different targets, the behavior is the same, unless I check the checkbox I get the dialog box. Maybe there's a workaround, but I didn't find that yet.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • How to Skip Print dialog window in smartforms

    Hi Experts,
    while printing the smartforms i dont want Print dialog window. I want as and when i pressed the print
    button it'll directly print with the specified printer.
    I tried with lot of option but it is not working for me . May be i missed some prameter to pass.
    Have a look in to my code below and make me correct .
    DATA : WA_CPARAM TYPE SSFCTRLOP,
           WA_OUTPUT TYPE SSFCOMPOP,
           JOB_OUTPUT_INFO TYPE SSFCRESCL.
          WA_CPARAM-PREVIEW = 'X'.
           WA_CPARAM-NO_DIALOG = 'X'.
          WA_CPARAM-DEVICE = 'PRINTER'.
          WA_OUTPUT-TDNOPRINT = 'X'.
           WA_OUTPUT-TDDEST = 'LP06'.
           WA_OUTPUT-TDIMMED = ' '.
           WA_OUTPUT-TDNEWID = 'X'.
          WA_OUTPUT-TDDELETE = 'X'.
           WA_OUTPUT-BCS_LANGU = SY-LANGU .
          WA_OUTPUT-TDPRINTER = 'X'.
    CALL FUNCTION FNAM
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS = WA_CPARAM
       OUTPUT_OPTIONS     = WA_OUTPUT
       USER_SETTINGS      = ' '
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS = T_SSFCOMPOP
      USER_SETTINGS = ' '
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       = SSFCRESPD
       JOB_OUTPUT_INFO            =  job_output_info
      JOB_OUTPUT_OPTIONS         = WA_OUTPUT
        TABLES
        ITAB1                      = IT_ZADVMUTH1
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks In Advance.
    Satya

    Try with below parameters, it may help you to close the thread.
    WA_CPARAM-device = 'LP06'.
    WA_CPARAM-no_dialog = 'X'.
    WA_OUTPUT-tdnoprev = 'X'.
    WA_OUTPUT-tddest = 'LOCL'.
    WA_OUTPUT-tdnewid = 'X'.
    SELECT SINGLE * FROM usr01
    INTO ls_usr01
    WHERE bname = sy-uname
         AND spdb  = 'G'.
    If sy-subrc EQ 0.
    WA_OUTPUT-tdimmed = ' '.
    ELSE.
    WA_OUTPUT-tdimmed = 'X'.
    ENDIF.
    Regards,
    SaiRam

  • Suppressing smartforms Print dialog box

    Hi,
      I want to suppress Print Dialog Box in smartform and directly go to print preview. I have set the CONTROL_PARAMETERS ,NO_DIALOG to 'X' and PREVIEW 'X' but still print dialog box is not suppressed. i even set OUTPUT_OPTIONS-TDDEST but it disappear and each time it display the print dialog with output device(TDDEST) field empty.
    Thanks in advance.

    Hi,
    Chek this sample program in 4.7:SF_EXAMPLE_03
      control-no_dialog = 'X'.
      control-preview   = 'X'.
      control-no_open   = 'X'.
      control-no_close  = 'X'.
      call function 'SSF_OPEN'
        exporting
    *     ARCHIVE_PARAMETERS       =
    *     USER_SETTINGS            = 'X'
    *     MAIL_SENDER              =
    *     MAIL_RECIPIENT           =
    *     MAIL_APPL_OBJ            =
    *     OUTPUT_OPTIONS           =
          control_parameters       = control
    *   IMPORTING
    *     JOB_OUTPUT_OPTIONS       =
        exceptions
          formatting_error         = 1
          internal_error           = 2
          send_error               = 3
          user_canceled            = 4
          others                   = 5.
      if sy-subrc <> 0.
    *   error handling
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        exit.
      endif.
    *   now call the generated function module
        call function fm_name
             exporting
    *                   archive_index        =
    *                   archive_parameters   =
                        control_parameters   = control
    *                   mail_appl_obj        =
    *                   mail_recipient       =
    *                   mail_sender          =
    *                   output_options       =
    *                   user_settings        = 'X'
                        customer          = customer
                        bookings             = bookings
                        connections          = connections
    *        importing  document_output_info =
    *                   job_output_info      =
    *                   job_output_options   =
             exceptions formatting_error     = 1
                        internal_error       = 2
                        send_error           = 3
                        user_canceled        = 4
                        others               = 5.
        if sy-subrc <> 0.
    *     error handling
          message id sy-msgid type sy-msgty number sy-msgno
                  with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
      endloop.
      call function 'SSF_CLOSE'
    *   IMPORTING
    *     JOB_OUTPUT_INFO        =
        exceptions
          formatting_error       = 1
          internal_error         = 2
          send_error             = 3
          others                 = 4.
      if sy-subrc <> 0.
    *   error handling
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    * analyse internal error table of Smart Forms
      call function 'SSF_READ_ERRORS'
           importing
                errortab = errtab.
      if not errtab is initial.
    *   add your handling
      endif.
    I hope this will work.
    Regards,
    Anjali

  • Smartform output without print dialog window

    i mean..,
    when i clicked execute button in smartforms
    i don't want to give the values in print dialog window (like LP01 and clicking print preview button)
    i want the smart from output when i click on execute button ..,
    so can anybody help me plllllzz.
    Moderator message: please search for available information/documentation before asking, do not use SMS speak.
    Edited by: Thomas Zloch on Nov 10, 2010 1:55 PM

    you can help yourself by searchin the SDN, this has been asked & answered more than once.
    Just a tip on a sidenote: Studying the interface of the FM which calls the smartform can help a lot.

  • Print Dialog not opened -Smartform

    Hi Experts
                We have defined a output type and assigned a smartform for Invoice.
               The problem is we have included 60 billing items into a single billing document.
               So, when we try VF02 and the Issue output type, it opens the window and select the output type then give the print preview, the print dialog window is not opened.
               when i try it debug mode, the RV_MESSAGE_DIALOG fm returns the value(4) as  OTHERS.
                 So it leaves the transaction, how to solve this problem, what could be the reason actually. Its most urgent, pls anyone help me.
    Thanks in advance.
    Regards
    Rajaram

    solved

  • Avoid a print dialog window

    Hello,
    I need to print production papers using adobe forms.
    Unfortunatelly after saving a production order i get the print dialog window.
    Is it possible to print immidiatly to the standard windows printer withtout to select it amnually?
    Which setting are possible in "fill_outputparams" for SFPOUTPUTPARAMS?
    Thanks in advance,
    Evgenij

    Hello
    You will have to read the current Print parameters using FM CALL FUNCTION 'GET_PRINT_PARAMETERS' and pass it to structure sfpoutputparams
    Try to set the printer to LOCL .
    gs_fpoutparams-dest       = 'LOCL'.
    DATA: ls_options TYPE itcpo.
         DATA: lv_dialog TYPE c.
         DATA: ls_pri_params TYPE pri_params.
    *        gs_fpoutparams TYPE sfpoutputparams.
         lv_dialog = 'X'.
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
             no_dialog      = 'X'
             mode           = 'CURRENT'
           IMPORTING
             out_parameters = ls_pri_params.
         ls_options-tdcopies   = ls_pri_params-prcop.
         ls_options-tddest     = ls_pri_params-pdest.
         ls_options-tdnewid    = ls_pri_params-prnew.
         ls_options-tdimmed    = ls_pri_params-primm.
         ls_options-tddelete   = ls_pri_params-prrel.
         ls_options-tdlifetime = ls_pri_params-pexpi.
         ls_options-tdtitle    = ls_pri_params-prtxt.
         ls_options-tdcover    = ls_pri_params-prsap.
         ls_options-tdcovtitle = ls_pri_params-prtxt.
         ls_options-tdreceiver = ls_pri_params-prrec.
         ls_options-tddivision = ls_pri_params-prabt.
         ls_options-tdautority = ls_pri_params-prber.
         gs_fpoutparams-device     = ls_options-tdprinter.
         gs_fpoutparams-preview    = ls_options-tdpreview.
         gs_fpoutparams-dest       = ls_options-tddest.
         gs_fpoutparams-reqnew     = ls_options-tdnewid.
         gs_fpoutparams-reqimm     = ls_options-tdimmed.
         gs_fpoutparams-reqdel     = ls_options-tddelete.
         gs_fpoutparams-reqfinal   = ls_options-tdfinal.
         gs_fpoutparams-senddate   = ls_options-tdsenddate.
         gs_fpoutparams-sendtime   = ls_options-tdsendtime.
         gs_fpoutparams-schedule   = ls_options-tdschedule.
         gs_fpoutparams-copies     = ls_options-tdcopies.
         gs_fpoutparams-dataset    = ls_options-tddataset.
         gs_fpoutparams-suffix1    = ls_options-tdsuffix1.
         gs_fpoutparams-suffix2    = ls_options-tdsuffix2.
         gs_fpoutparams-covtitle   = ls_options-tdcovtitle.
         gs_fpoutparams-cover      = ls_options-tdcover.
         gs_fpoutparams-receiver   = ls_options-tdreceiver.
         gs_fpoutparams-division   = ls_options-tddivision.
         gs_fpoutparams-lifetime   = ls_options-tdlifetime.
         gs_fpoutparams-authority  = ls_options-tdautority.
         gs_fpoutparams-rqposname  = ls_options-rqposname.
         gs_fpoutparams-arcmode    = ls_options-tdarmod.
         gs_fpoutparams-noarmch    = ls_options-tdnoarmch.
         gs_fpoutparams-title      = ls_options-tdtitle.
         gs_fpoutparams-nopreview  = ls_options-tdnoprev.
    *    gs_fpoutparams-noprint    = ls_options-tdnoprint.
         gs_fpoutparams-nodialog = 'X'.
         gs_fpoutparams-noprint = ' '.
         CALL FUNCTION 'FP_JOB_OPEN'
           CHANGING
             ie_outputparams = gs_fpoutparams
           EXCEPTIONS
             cancel          = 1
             usage_error     = 2
             system_error    = 3
             internal_error  = 4
             OTHERS          = 5.
         IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    Regards
    Sandy

  • Smartform does not display when trying to suppress print dialog

    this is related to my other thread. But that was solved and this is another problem.
    When I provide values for control_parameters and output_options to suppress the print dialog (no_dialog = 'X', tddest = 'LOCL'), the print preview does appear at all.
    When I try to remove them, the print preview is ok. (I have device LOCL)
    Has this ever happened to you?
    Kyle

    Hi  ,
    This will be happen when the LOCL printer(Default) is configured  in SAP 
    Check your user settings   in su01  Defaults Settings - uotput device
    Let me know if any concerns......

  • How to print set of documents without showing print dialog box

    I have created a smartform tht prints a Payment Advice. Its input includes range of Document numbers.
    I call the smartform function in loop for all those document numbers. Now my problem is tht everytime tht function is executed the print dialog opens up askin for Printer name and then on pressin 'print', one document is printed and so user has to press print tht many times. To avoid this i added code:
    DATA: it_ssfcompop TYPE ssfcompop.
    DATA : gst_control_parameters TYPE ssfctrlop.
    DATA : gt_job_output_info TYPE ssfcrescl.
        it_ssfcompop-tddest = 'LOCL'.
         IT_SSFCOMPOP-TDNOPREV = 'X'.
         it_ssfcompop-tdnewid = sy-prnew.
         it_ssfcompop-tddelete = sy-prrel.
         it_ssfcompop-tdimmed = 'X'.
         it_ssfcompop-tdnoprint = 'X'.
         CLEAR gst_control_parameters.
         gst_control_parameters-no_dialog = 'X'.
         gst_control_parameters-preview = 'X'. "Deactivate preview!
         gst_control_parameters-GETOTF = 'X'.
    and called smartform function like this:
      CALL FUNCTION FM_NAME
           EXPORTING
            BUKRS                      = BUKRS-LOW
            BELNR                      = BELNR
            GJAHR                      = GJAHR-LOW
            CONTROL_PARAMETERS         = gst_control_parameters
            OUTPUT_OPTIONS             = it_ssfcompop
         IMPORTING
            JOB_OUTPUT_INFO            = gt_job_output_info.
    this shows print preview but still does not print. What could be error. Please help.

    Try this
    * Work Area declarations
    w_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    w_doc_chng typE sodocchgi1,
    w_data TYPE sodocchgi1,
    w_buffer TYPE string,"To convert from 132 to 255
    * Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i,
    v_lines_txt TYPE i,
    v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZONE'
    importing
    fm_name = v_form_name
    exceptions
    no_form = 1
    no_function_module = 2
    others = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

  • Avoid Printer selection Dialogue box when printing Crystal report in JAVA

    Hi i am calling crystal report in my servlet using Report Client Document SDK, now i want to print the report directly to the default printer set without selecting the printer from the select printer dialogue box. In other words want to avoid the select printer dialogue box from appearing . Can any body suggest me how do i do this .
    Any suggestions appreciated.

    In javascripting the code is
    function Print()
    if (document.all)
    WebBrowser1.ExecWB(6, -1) //use 6, 1 to prompt the print dialog or 6, 6 to omit it;
    WebBrowser1.outerHTML = "";
    <object ID="WebBrowser1" WIDTH="0" HEIGHT="0"
    CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
    But the above code does not work in windows XP SP2.... and i cannot restrict my clients OS.
    where as C#,ASP.NET  provides the functionality to print directly to printer as
    The ReportDocument class provides PrintToPrinter method that may be used to print a CR direct to the printer. If no printer is selected, the default printer will be used to send the printing pages to.
    The PrintToPrinter method takes four parameters.
    nCopies : Indicates the number of copies to print.
    collated : Indicates whether to collate the pages.
    startPageN : Indicates the first page to print.
    endPageN : Indicates the last page to print.
    The following steps will guide you to achieve the same:
    Add crystal report (.cr) file to your ASP.NET application.
    Add a report instance on the page level.
    Dim report As MyReport = New MyReport
    Populate reports data on Page_Init 
      ' Get data in a DataSet or DataTable
            Dim ds As DataSet = GetData()
            ' Fill report with the data
         report.SetDataSource(ds)
    Print Report
    report.PrintToPrinter(1, False, 0, 0)
    If you wish to print certain page range, change last two parameters From to To page number.
    If you want to set page margins, you need to create a PageMargin object and set PrintOptions of the ReportDocument.
    The following code sets page margins and printer name:
    Dim margins As PageMargins =  Report.PrintOptions.PageMargins
       margins.bottomMargin = 200
       margins.leftMargin = 200
       margins.rightMargin = 50
       margins.topMargin = 100
       Report.PrintOptions.ApplyPageMargins(margins)
       ' Select the printer name
       Report.PrintOptions.PrinterName = printerName
    Thn Why not a java SDK for Crystal report can provide such a functionality...
    Edited by: rtabassum on Mar 25, 2010 6:34 AM
    Edited by: rtabassum on Mar 25, 2010 6:36 AM
    Edited by: rtabassum on Mar 25, 2010 6:42 AM

Maybe you are looking for

  • Issue with uploading XML file from application server into internal table

    i Need to fetch the XML file from the application server and place into internal table and i am getting error message while using the functional module   SMUM_XML_PARSE and the error message is "line   1 col   1-unexpected symbol; expected '<', '</',

  • How to populate value in other field after entering in one field?

    hi everyone.   when i enter value in one field , automatically some xyz value should be populated  in second field. How would this be possible without any enter? I mean i don want to perform any action like press enter or like that.

  • Itunes 11.4 on Windows 7 crashes within 10 seconds of opening

    When I open itunes after a few seconds (regardless of whether or not I try to interact with iTunes or I just let it be), a popup says "iTunes has stopped working ... Windows will close the program and notify you if a solution is available." I was exp

  • Don't understand cffunction and cfcomponent

    I am trying to alter Forta's ajax related select tutorial to fit my needs.  I am having trouble understanding the details of this .cfc though. <cfcomponent output="false">     <!--- Get array of media types --->     <cffunction name="get_states" acce

  • How do I add headers to the Table of Contents?

    Hi there, I have a book that mainly consists of text boxes rather than inline text. The main title (on each page) is what I want to show up in the table of contents so the reader can just tap the title and jump to the page. How I tried to do this was