Application Development and Automation 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: 
Read only

Save smartforms in an unique file

Former Member
0 Likes
624

I generate some smartforms . The number of smartforms that generate the report is 10000 weekly.We generate in format pdf.

At this moment the client need to save all the smartforms in an unique file pdf.

does somebody knows a solution?

can i save the smartform in the spool and how?

I generate some smartforms . The number of smartforms that generate the report is 10000 weekly.We generate in format pdf.

At this moment the client need to save all the smartforms in an unique file pdf.

does somebody knows a solution?

can i save the smartform in the spool and how?

3 REPLIES 3
Read only

Former Member
0 Likes
600

Hi,

Yes you can do that.

In the OUTPUT_OPTIONS of the SMART Form function, there is a a field called GET_OTF, switch it on.

Now, the output will be available in a TABLE OTFDATA in the output parameters.

Pass this table to te function CONVERT_OTF_2_PDF and the output is a PDF format of the SMART Form.

Take a look at this code, that I got in one of the threads in the Forum.

1) create smartform object

2) CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = [smartform object]

IMPORTING

fm_name = [function module]

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

3) CALL FUNCTION [function module]

EXPORTING

....

IMPORTING

job_output_info = output_data

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

4) CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

IMPORTING

bin_filesize = pdf_length

bin_file = pdf_xstring

TABLES

otf = output_data-otfdata

lines = lines

EXCEPTIONS

.....

Regards,

Ravi

NOte : Please mark the helpful answers

Message was edited by: Ravikumar Allampallam

Read only

Former Member
0 Likes
600

At this moment i do this . I Generate the pdfs with the functions you have mentioned me.

I want to join the different pdfs in a unique pdf but the table with the information of pdf, contain in binary the character EOF (end of file).

I call the function of the smartform several times .Now i would like to join the pdfs in an unique file ,without made more changes.

Read only

0 Likes
600

Hi,

YOu can scan the file for the eof character and replace it with spaces.

Append new otf lines into the same internal table.

Then call the CONVERT_OTF_2_PDF Function with the consolidated internal table.

REgards,

Ravi