Skip to Content
1
Former Member
Jun 17, 2010 at 09:51 AM

Adobe Forms function module - downloading the xstring output in PDF file

1853 Views

Hi Guys,

I'm using Adobe forms and fetching its output in an XSTRING PDF format. How can I download this XSTRING output to a PDF file and store on the local file system?

I'm using the following approach to getting a PDF output:

ls_outputparams-getpdf = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
  CHANGING
    ie_outputparams = ls_outputparams.

* Get the name of the generated function module
  CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    EXPORTING
      i_name     = 'ZADOBEFORM'
    IMPORTING
      e_funcname = lv_fmname.
  IF sy-subrc <> 0.
  ELSE.
*   Call the Adobe Form function module
    CALL FUNCTION lv_fmname
      EXPORTING
        /1bcdwb/docparams  = ls_docparams
      IMPORTING
        /1bcdwb/formoutput = ls_form_output
      EXCEPTIONS
        usage_error        = 1
        system_error       = 2
        internal_error     = 3.
    IF sy-subrc <> 0.
    ENDIF.
  ENDIF.

* Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'.

Now, the variable LS_FORM_OUTPUT-PDF contains the PDF output in XSTRING. My question is how can I download this as a PDF file to my local machine.

Kind Regards,

Shailesh.