cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive form in Webdynpro application

Former Member
0 Kudos

Dear Experts,

My requirement is to show the interactive adobe form in my webdynpro ABAP applicatiion, using the class cl_wd_runtime_services=>attach_file_to_response,

For this I have to converts the pdf into xstring.

Request you to please suggest.

Warm Regards,

Upendra Agrawal

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Upendra,

If you have form already in your application as a part of your view, then bind the pdfsource property to a context attribute of type xstring. This will contain pdf form in xstring format. You can pass this attribute to the class method.

In case you are uploading the form using an upload UI element in WD application, again the data property of the upload UI should be bound to the attribute you are using as pdfsource of the form. Later you can use the same attribute as pdfsource to the form ui element. It won't require any class to show the uploaded form

In case your scenario is different please explain it.

Regards,

Vaibhav

Former Member
0 Kudos

Dear Vaibhav,

Thank you for the suggestion, but in my scenario, I do not have the interactive form as a part of my view.

Instead, i just have a Download button.

By clicking on the download button, my adobe form which is designed separately in TCode SFP,

should be downloaded to the users machine.

For this I have used the class cl_wd_runtime_services=>attach_file_to_response( ),

But here I have to pass the Interactive form as a xstring, whereas I am having the form in Rawdata.

Kindly suggest.

Upendra

vaibhav_tiwari
Contributor
0 Kudos

Hi Upendra,

Check WD Component : WDR_TEST_ADOBE

View: DOWNLOAD

Method: ONACTIONDOWNLOAD_PDF

Instead of DemoAdobeOffline.pdf give your form name.

Refer this view for all the other details.

Regards,

Vaibhav

former_member198445
Participant
0 Kudos

Hi,

Try this..

ie_outputparams-getpdf = 'X'.
  ie_outputparams-nodialog = 'X'. " suppress printer dialog popup
  CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
      ie_outputparams = ie_outputparams.

  i_name = 'YOUR_FORM_NAME'.

  TRY.
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = i_name
        IMPORTING
          e_funcname = i_funcname.
    CATCH cx_fp_api_repository.
    CATCH cx_fp_api_usage.
    CATCH cx_fp_api_internal.
  ENDTRY.

  fp_docparams-langu = 'E'.
  fp_docparams-country = 'US'.
  fp_docparams-fillable = 'X'.

  CALL FUNCTION i_funcname
  EXPORTING
    /1bcdwb/docparams  = fp_docparams
  IMPORTING
    /1bcdwb/formoutput = fp_formoutput
  EXCEPTIONS
    usage_error        = 1
    system_error       = 2
    internal_error     = 3.

  CALL FUNCTION 'FP_JOB_CLOSE'
    EXCEPTIONS
      usage_error    = 1
      system_error   = 2
      internal_error = 3
      OTHERS         = 4.

  lv_data = fp_formoutput-pdf.

  wdr_task=>client_window->client->attach_file_to_response(
  i_filename = Test.PDF'
  i_content =  lv_data
  i_mime_type = 'PDF' ).

Hope it helps..

Regards, Amith

Answers (0)