Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Force the preview mode

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

Former Member
Not what you were looking for? View more on this topic or Ask a question