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: 

Smartforms to Pdf Convertion

Former Member
0 Kudos
151

Dear Experts,

I have a requirement to convert smartforms to pdf. I know how to convert and save as a local file.

But, If I want to open that pdf from ABAP program, is there any OLE or any function module to open pdf.

Can I open the pdf file without saving to presentation server, like in internet pdf files will be opened in internet explorer and if we want we will save it as local file. Like that Can I explore the pdf file directly without saving to presentation server, and if I want, I should save from Acrobat reader. Is there any function module for that?

Thanks and regards,

Venkat

1 ACCEPTED SOLUTION

Sm1tje
Active Contributor
0 Kudos
85

Function module SSFCOMP_PDF_PREVIEW can be used for this.

Some additional info:

1. First determine the name of the function module for the smartform. (fm SSF_FUNCTION_MODULE_NAME)

2. Call smartform FM and retrieve OTF. Do this by setting the GETOTF field to 'X' in FM parameter CONTROL_PARAMETERS.

3. In export parameter JOB_OUTPUT_INFO you get the OTF data for PDF preview.

4. Use OTF for input into SSFCOMP_PDF_PREVIEW.

Edited by: Micky Oestreich on Jun 15, 2009 8:50 AM

4 REPLIES 4

Sm1tje
Active Contributor
0 Kudos
86

Function module SSFCOMP_PDF_PREVIEW can be used for this.

Some additional info:

1. First determine the name of the function module for the smartform. (fm SSF_FUNCTION_MODULE_NAME)

2. Call smartform FM and retrieve OTF. Do this by setting the GETOTF field to 'X' in FM parameter CONTROL_PARAMETERS.

3. In export parameter JOB_OUTPUT_INFO you get the OTF data for PDF preview.

4. Use OTF for input into SSFCOMP_PDF_PREVIEW.

Edited by: Micky Oestreich on Jun 15, 2009 8:50 AM

Former Member
0 Kudos
85

Hello Micky,

I went with your solution and I am getting the pdf output preview. But I am unable to maximize the output acrobat reader window. Will it always come as popup only???

Thanks and regards,

Venkat

Former Member
0 Kudos
85

Hi,

DATA: r_options type ssfcompop.

r_options-tddest = 'LOCL'. "Spool: Output device

r_options-tdimmed = 'X'.

r_options-tddelete = space.

r_options-tdnewid = 'X'.

r_control-device = 'PRINTER'.

r_control-no_dialog = 'X'.

r_control-langu = sy-langu.

Pass this one to Smartform function module under output_options = r_options.

now once you execute this,it generated a spool.

Former Member
0 Kudos
85

hi,

1.Get OTF data from Smartform.

2. Create PDF from OTF by using FM 'CONVERT_OTF'. ( pass bin file o/p to below FM)

3. convert PDF data to binary format by using FM 'SCMS_XSTRING_TO_BINARY'