Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Smartform to PDF

Former Member
0 Kudos

Hi,

I'am developing a function mudule to convert a smartform into a PDF for send by e-mail. I want to know if there is a function module to convert a smartform into a PDF format.

Thanks

Santiago

3 REPLIES 3

Steven_UM
Contributor
0 Kudos

Hi there,

There is a standard function module to convert a spool request (result of SAP script, SMART forms or report output) into a PDF document ...

If I recall well out of the top of my head it is called something like 'Convert_otf_to_pdf' ... a search on PDF will give you the answer ...

I used it before and it works superb ...

Steven

Former Member
0 Kudos

Hello Saniago,

If you have installed SAP Connect it is just a customizing

setting.

BR

Michael

0 Kudos

Hi!

All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:

s_control_parameters-no_dialog = 'X'.

s_control_parameters-getotf = 'X'.

CALL FUNCTION v_func_name "call your smartform

EXPORTING

output_options = s_output_options

control_parameters = s_control_parameters

IMPORTING

job_output_info = s_job_output_info

call function 'CONVERT_OTF_2_PDF'

tables

otf = s_job_output_info-otfdata

lines = t_pdf

Hope this helps!

Kind regards,

Igor Barbaric