cancel
Showing results for 
Search instead for 
Did you mean: 

converting the layout from OTF format into PDF

Former Member
0 Kudos

Hi Experts,

I am new to SMART FORMS,I don't have a clue about how to convert the layout from OTF format into PDF format and how to store it in Presentation server.

Please send me a Model program or step by step approach of the same.

Useful inputs will be rewarded higher points.

Thanks in Advance,

Dharani

Accepted Solutions (1)

Accepted Solutions (1)

raguraman_c
Active Contributor
0 Kudos

Hi,

1.To convert spool to OTF

<b>CONVERT_ABAPSPOOLJOB_2_PDF</b> - Converts spool to PDF

<b>CONVERT_OTFSPOOLJOB_2_PDF</b> - Converts forms to PDF

2. To save file in Presentation server.

You can use Function Module <b>Download</b>. Go thru' the function module. This function module is obselte. You can use the class. <b>CL_GUI_FRONTEND_SERVICES</b>.

3. <b>SO_NEW_DOCUMENT_ATT_SEND_API1</b> you can try this function module for sending the attachment.

Feel free to revert back.

Answers (1)

Answers (1)

anversha_s
Active Contributor
0 Kudos

hi,

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

sample code.

DATA: p_output_options TYPE ssfcompop,

p_control_parameters TYPE ssfctrlop.

p_control_parameters-no_dialog = 'X'.

p_control_parameters-getotf = 'X'.

CALL FUNCTION v_func_name "call your smartform

EXPORTING

output_options = p_output_options

control_parameters = p_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

and if u need more u can check below links also

Check the below links..

VISIT THIS LINK

PLZ REWARD POINTS IF IT HELPS YOU

FM is CONVERT_OTF.

CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1 
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.

also check sample programs

RSTXPDF4/5.

rgds

Anver