Application Development 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: 

in smartforms

Former Member
0 Kudos

in smartforms,o/p of smartform how u convert to pdf format

5 REPLIES 5

Former Member
0 Kudos

Hi,

Use function module "SX_OBJECT_CONVERT_OTF_PDF" or "CONVERT_OTF_2_PDF"

Another option is for Smart Forms to return OTF and for you to convert it to PDF yourself:

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.

It is also possible to send the PDF output in a BSP application to the Web browser for display (as of Internet Explorer 5.5 with Support Package 2). You can display a Smart Form in the BSP application SF_WEBFORM_04 as a PDF in the browser or in a separate window. OTF is converted to PDF (as described above) in the event handler OnInitialization of the BSP page pdfform.pdf.

SAP Help Link...

http://help.sap.com/saphelp_nw2004s/helpdata/en/27/67443cc0063415e10000000a11405a/frameset.htm

Thanks and Regards,

Bharat Kumar Reddy.V

Message was edited by: Bharat Reddy V

Former Member
0 Kudos

hi,

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

former_member188685
Active Contributor
0 Kudos

Former Member
0 Kudos

Hi Vanamali,

1.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....

2.Check this for smartform to PDF

http://www.sap4.com/wiki/index.php/Genera_PDF_a_partir_de_Smartforms

3.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

Reward Points for the helpful solutions.

Regards,

Harini.S

Former Member
0 Kudos

hi

good

check with these function modules

CONVERT_ABAPSPOOLJOB_2_PDF convert abap spool output to PDF

CONVERT_OTF Convert SAP documents (SAPScript) to other types.

'CONVERT_OTFSPOOLJOB_2_PDF'

THANKS

MRUTYUN