12-29-2014 1:37 PM
Hello ABAP Experts,
We are using smartform to print training certificate. Do download same in PDF we are using FM CONVERT_OTF .
However this FM does not display Greek characters ( For trainee name ) Correctly when download in PDF. It shows garbage characters..
Same issue is happening for Chinese too. Also when we translated entire smartform text in other languages like Turky, Slovakia, Czech, Same issue is happening for these languages..
Please let us know if you know solution for same.
Thanks & Regards,
Sachin
12-29-2014 2:09 PM
Hi,
please go throuh the below procedure and sample Code, this might help you.
Procedure
When we activate the Smartform the system generates a Function Module. The function module name we can get from Smartfrom screen from menubar
“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 smartform, which in turn is then used to pass data from the report to Smartform. 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 smartform.
In export tab of the FM generated by smartform 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 Smartform 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 smartform) 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 smartfrom 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.
Here is a sample code of program to perform the function.
12-29-2014 2:33 PM
Hi Sagar,
Thanks for your reply But all these things are already done. Issue is we are unable to display user name in Greek language. Not sure if it is font support issue or FM issue.
Thanks & Regards,
Sachin
12-29-2014 2:57 PM
Are you able to see the PDF output on screen(with out downloading) with all correct data(like user name in Greek).
If yes then there might be issue with font in PC/laptop.
12-29-2014 3:39 PM
Hi Sagar,
As a smartform output i amable to see it. Its just when we download it, it i snot working.
Thanks & Regards,
Sachin
12-30-2014 9:55 AM
Hi Sachin,
Try passing the language to control parameter.
CONTROL_PARAMETERS-LANGU = 'EL'.
Thanks,
N
12-30-2014 11:24 AM
Hi ABAP N,
Already tried passing EL still not working. Furthermore for Greek i dont want entrire form to be translated, its just Master data for name is in greek & only that should be in greek.
Thanks & Regards,
Sachin
12-31-2014 9:29 AM
12-31-2014 12:08 PM
Hello Sachin,
if you have a Unicode system and SAP Note #1704919 is already implemented, you can turn on the "cascading font" solution for PDF conversion.
"Cascading fonts" mean that automatically the correct font will be selected for the text - so the Language key has minimal influence here. (This is somewhat of a Unicode solution.)
As this Note describes, you can:
Best regards,
Laszlo
12-31-2014 12:27 PM
Hi Sachin.
The PDF form can be display normal in SAP system but not work in local PC.
So is it because in your local PC don't have the Greek fonts?