cancel
Showing results for 
Search instead for 
Did you mean: 

Force the preview mode

Former Member
0 Kudos

I have created the adobe form... Everything it is ok now but I want to skip the Printer Dialog box and display the pdf direcly (preview) directly....


TRY.
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = 'ZMPP2010FORM'
        IMPORTING
          e_funcname = gv_fm_name.
    CATCH cx_root.
*      MESSAGE e004 WITH pa_form.
* No active form &1 available
  ENDTRY.

  gs_outputparams-nodialog = 'X'.
  gs_outputparams-preview  = 'X'.
  gs_outputparams-device = 'LOCL'.
     gs_docparams-langu   = 'EN'.
    gs_docparams-country = 'BE'.

* Open print job
  CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
      ie_outputparams = gs_outputparams
    EXCEPTIONS
      OTHERS          = 1.

  IF sy-subrc <> 0.
*    MESSAGE e020.
* Form processing could not be started
  ENDIF.

      CALL FUNCTION gv_fm_name
      EXPORTING
        /1bcdwb/docparams  = gs_docparams
        BEGDA = thisBEGDA
        ENDDA = thisENDDA
        PERNR = thisPernr
        .

        CALL FUNCTION 'FP_JOB_CLOSE'.

Who cans help me ?

Thanks

J

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try these settings - It works for me.

wa_sfpoutputparams-device = 'PRINTER'.

wa_sfpoutputparams-nodialog = 'X'.

wa_sfpoutputparams-dest = 'LOCM'.

wa_sfpoutputparams-preview = 'X'.

wa_sfpoutputparams-connection = 'ADS'.

Regards,

Shyam