2006 Apr 17 4:40 PM
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?
2006 Apr 17 4:47 PM
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
2006 Apr 18 10:37 AM
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.
2006 Apr 18 10:42 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |