2006 Jun 20 2:03 PM
hi!
i just want to know if there is any function module to convert a smart form into a pdf file .
Actually i need to convert this smartform into a function module and send to client mail id.
thanks in advance
Durga Prasad
2006 Jun 20 2:08 PM
Hi Durga,
You can use build the OTF table and then pass the OTF table to the FM CONVERT_OTF to convert to pdf and you can use GUI_DOWNLOAD ,if you want to store it in your local PC....
Regards,
SP.
2006 Jun 20 2:08 PM
Hi Durga,
You can use build the OTF table and then pass the OTF table to the FM CONVERT_OTF to convert to pdf and you can use GUI_DOWNLOAD ,if you want to store it in your local PC....
Regards,
SP.
2006 Jun 20 2:08 PM
hi prasad,
Check this for smartform to PDF
http://www.sap4.com/wiki/index.php/Genera_PDF_a_partir_de_Smartforms
or
All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
s_control_parameters-no_dialog = 'X'.
s_control_parameters-getotf = 'X'.
CALL FUNCTION v_func_name "call your smartform
EXPORTING
output_options = s_output_options
control_parameters = s_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
Regards,
Naveen
2006 Jun 20 2:13 PM
Get the name of the generated function module using the function module SSF_FUNCTION_MODULE_NAME (see also: Integrating the Smart Form into the Application).
To get a device type suitable for the current language, call the function module SSF_GET_DEVICE_TYPE.
Set the device type using the parameter TDPRINTER of the standard parameter OUTPUT_OPTIONS (see also: Output Options). Transfer this parameter, together with the parameters for the OTF output, to the generated Smart Forms function module, as described under Returning a Form as a Table to the Application Program.
Get the OTF output from table OTFDATA of the standard parameter JOB_OUTPUT_INFO (see also: Querying the Output Result).
To convert the OTF output to PDF, transfer the OTF table to the function module CONVERT_OTF. To do this, set the parameter FORMAT to 'PDF'. The output can be returned either as a binary string (parameter BIN_FILE) or as a character table (parameter LINES). SAP recommends the first variant.
You can then store the PDF output using the function module GUI_DOWNLOAD, for example, as a local file on your PC
rewards if it helps,
regards
cnu
2006 Jun 20 2:12 PM