cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Interactive Forms Set Fillable through SFP

Former Member
0 Kudos

Hello Gurus,

I have a question regarding adobe interactive forms. I have created an interface and form in transaction SFP. The form is being called as an email attachment during an issue creation. What i want to do is set the form fillable in the import structure /1BCDWB/DOCPARAMS. I tried to do this through the code initialization in the interface but it does not set the form fillable. I have no other code interaction with the from besides in the code initialization section of the interface. Is there a straight forward way to set it fillable? Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

SandySingh
Active Contributor
0 Kudos

Hello Timothy

You must be generating the PDF and emailing it as an attachment in background in your program.

Refer to code below, It should work


* get the name of the generated function module

   try.

       call function 'FP_FUNCTION_MODULE_NAME'

         exporting

           i_name     = 'DEMO_ADOBE_OFFLINE'

         importing

           e_funcname = fm_name.

     catch cx_fp_api.

       assert 1 = 2.

   endtry.

* set output parameters and open spool job

   fp_outputparams-preview  = 'X'.    " do not launch print preview

   fp_outputparams-nodialog = 'X'.    " suppress print dialog

   fp_outputparams-connection = cl_fp=>get_ads_connection( ).

   fp_outputparams-getpdf   = 'X'.

   call function 'FP_JOB_OPEN'

     changing

       ie_outputparams = fp_outputparams

     exceptions

       cancel          = 1

       usage_error     = 2

       system_error    = 3

       internal_error  = 4

       others          = 5.

   assert sy-subrc = 0.

* set the form to be editable

* Try to set fp_docparams- FILLABLE = 'F' instead of fp_docparams- FILLABLE = 'X'

 

fp_docparams-fillable = 'F'.

* call the generated function module to generate the pdf

   call function fm_name

     exporting

       /1bcdwb/docparams  = fp_docparams

       /1bcdwb/docxml     = xml

     importing

       /1bcdwb/formoutput = fp_result

     exceptions

       usage_error        = 1

       system_error       = 2

       internal_error     = 3

       others             = 4.

   assert sy-subrc = 0.

* close spool job

   call function 'FP_JOB_CLOSE'

*   IMPORTING

*     E_RESULT             =

     exceptions

       usage_error          = 1

       system_error         = 2

       internal_error       = 3

others               = 4.

Regards

Sandy

Former Member
0 Kudos

Hello Sandy,

Thank you very much for the reply. Could you tell me where i can run this code? The background job that is currently calling the form is standard SAP function and automatically set fillable to blank. Should I create an enhancement? Thanks again.

SandySingh
Active Contributor
0 Kudos

Hello Timothy,

If you are using a Standard background job, then you can create implicit enhancement to set parameter fp_docparams- FILLABLE = 'F'

Regards

sandy

Answers (0)