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: 

CONVERT_OTF Greek Character issue

Former Member
0 Kudos

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

9 REPLIES 9

sagar_pawar14
Explorer
0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

Hi Sagar,

As a smartform output i amable to see it. Its just when we download it, it i snot working.

Thanks & Regards,

Sachin

0 Kudos

Hi Sachin,

Try passing the language to control parameter.

CONTROL_PARAMETERS-LANGU = 'EL'.

Thanks,

N

0 Kudos

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

former_member197132
Participant
0 Kudos

Hi Sachin,

please Share your Code.

Regards

Shailendra

Laszlo_B
Active Contributor
0 Kudos

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:

  • go to Report RSTXPDF3 and activate parameter USE_CASCADING. This will automatically enable cascading font conversion in the entire system and for every PDF conversion - so first it might be considered whether this can be used.
  • alternatively, Function Module CONVERT_OTF now has an Import parameter USE_CASCADING. If you enable this parameter while calling CONVET_OTF, it should correctly convert PDFs again.

Best regards,
Laszlo

former_member192023
Active Participant
0 Kudos

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?