cancel
Showing results for 
Search instead for 
Did you mean: 

layout to be generated as PDF output in a Spool

Former Member
0 Kudos

Hi ,

I am generating a layout using smartform. My requirement is layout has to be generated as PDF output in a Spool.

Please let me know how to write the code in my driver program to generate the spool or any FMs related to this.

Thanks in advance.

Regards,

Jyothi

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Jul 14, 2009 12:44 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

use below sample code hope this may help u out

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

........

IMPORTING

fm_name = fname

CALL FUNCTION fname

..

...

IMPORTING

job_output_info = impdata..

*****

i_itcoo[] = impdata-otfdata[].

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

use_otf_mc_cmd = 'X'

IMPORTING

bin_filesize = binsize

TABLES

otf = i_itcoo

doctab_archive = idocs

lines = t_pdf

EXCEPTIONS

err_conv_not_possible = 1

err_otf_mc_noendmarker = 2

OTHERS = 3.

CALL METHOD cl_gui_frontend_services=>file_save_dialog

CHANGING

filename = filename

path = path

fullpath = fullpath.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

bin_filesize = bin

filename = fullpath

filetype = 'BIN'

TABLES

data_tab = t_pdf

EXCEPTIONS

OTHERS = 99.

thank you

surya

Former Member
0 Kudos

Hi Jyothi,

When you execute smart form and see preview.

there say print .

As printing pop up comes cancel it.

check with t-code SP02.

you will see spool number with status error.

convert that spool number to pdf using program RSTXPDF4.

Regards,

Vijay

Former Member
0 Kudos

Hi ,

this question is already asked by many ,you could have checked before posting it, anyhow check this link.

[http://www.sapdev.co.uk/reporting/rep_spooltopdf2.htm]

Please let me know if you still need any more help.

Thanks and regards,

Rajeshwar