Skip to Content

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

Print Preview of Sample Program LP01 not displaying form

Hey,

I have successfully configured ADS in NW2004s ABAP stack.

I ran the FP_PDF_TEST_OO program which checks the ABAP Adobe configuration and displays the version number of Adobe document.

The problem however is when I implement the sample " Part I: Adobe Print Forms" given on the site https://www.sdn.sap.com/irj/sdn/interactiveforms.

When I run the program and do a Print Preview of the form, with the default printer LP01, I do not see a PDF as mentioned in the sample. The control returns to the start page. Also, the download button on the screen results in a PDF that has 0 bites.

During the debugging, data from the database gets retrieved properly, and the correct function name gets retrieved. Would you guys know what I might be missing.

Thank you for the help.

Sumit.

I did the interface, form, and building the context several times and that seems fine.

Attached is the code:

REPORT  ZTSA_EMPLOYEE_ADS_REPORT.

 parameter: i_empid type ZTSA_employee-employeeid obligatory.

 type-pools: abap.

 start-of-selection.
 data: ie_outputparams type sfpoutputparams.

 call function 'FP_JOB_OPEN'
 changing
 ie_outputparams = ie_outputparams.

 try.

   data: i_name type fpname,
   i_funcname type funcname.
   i_name = 'ZTSA_EMPLOYEE_FORM'.

   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.

 data: isemployee type ZTSA_EMPLOYEE_STRUCT.

select *
into corresponding fields of isemployee
from ZTSA_EMPLOYEE
where employeeid = i_empid.
endselect.


 data: fp_docparams type sfpdocparams.
 data: fp_formoutput type fpformoutput.

 call function i_funcname
 exporting
 /1bcdwb/docparams = fp_docparams
 employee = isemployee
 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.

Former Member

Helpful Answer

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