Skip to Content
avatar image
Former Member

CONVERT_OTF Greek Character issue

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 31, 2014 at 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:

    • 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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2014 at 02: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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Narmadha M

      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

  • avatar image
    Former Member
    Dec 31, 2014 at 09:29 AM

    Hi Sachin,

    please Share your Code.

    Regards

    Shailendra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 31, 2014 at 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?

    Add comment
    10|10000 characters needed characters exceeded