cancel
Showing results for 
Search instead for 
Did you mean: 

output in pdf format

Former Member
0 Kudos

i am working on smartforms ie dunning letters and here there is no print program and coding is done inside the smart form , now i have a requirement ie for few conditions i have to display the output in pdf format . how can i do this?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you for your answer , but in my smartform i dont have a print program or report , its dunning letters all the required coding in done inside the form and in one smartform there are many condition, and only for few conditions the output should be in pdf format

Former Member
0 Kudos

Hi,

Generally You will get o/p data in OTF format and convert it to PDF format using some FM , search in se37 for "convert*pdf".

Hope this will guide you.

Reward if helpful.

Jogdand M B

Former Member
0 Kudos

Hi Ashwin,

Check this info.

Procedure

When we activate the Smart form the system generates a Function Module. The function module name we can get from Smart form screen from menu bar

“Environment => Function Module_Name” . In a report we can get this Function module name by calling a Function Module standard SSF_FUNCTION_MODULE_NAME. This function module at runtime calls the FM generated by smart form, which in turn is then used to pass data from the report to Smart form. In the report given below the FM generated is “ /1BCDWB/SF00000152 ”. In this FM we can see CONTROL_PARAMETERS in import tab. This is of type SSFCTRLOP. We need to set the GETOTF of this to be ‘X’. Setting this field will activate the OTF field in smart form.

In export tab of the FM generated by smart form we can see a parameter JOB_OUTPUT_INFO which is of type SSFCRESCL. The SSFCRESCL is a structure of having one of fields as OTFDATA. OTFDATA in turn is a table of type ITCOO. ITCOO has two fields TDPRINTCOM and TDPRINTPAR. TDPRINTCOM represents command line of OTF format data and TDPRINTPAR contains command parameters of OTF format data.

In every Smart form output in OTF format, TDPRINTCOM begins and ends with ‘//’. ‘EP’ represents the end-of-page value for TDPRINTCOM field.

In addition we need to set few fields at the place where we call this FM(generated by smart form) in our program. While calling this FM we should set control_parameters, output_options, user_settings and job_putput_info fields as shown in program.

Once these settings are done we can call Function Module CONVERT_OTF to convert the OTF data of smart form output to PDF data format. Once these are done we can call method “cl_gui_fronted_services=>file_save_dialog” to specify the directory path where we want to save the output PDF file. After this we can call Function Module GUI_DOWNLOAD to download the PDF file on our local system.

Hope this resolves your query.

Reward all the helpful answers.

Regards

Former Member
0 Kudos

1. u have to get OTF data of this SF check options for GETOTF field ,

2.then u have to convert this OTF into PDF by using fm CONVERT_OTF

3.u have to down this data into local PC as a PDF by using GUI_DOWNLOAD.

Regards

Prabhu