Write Special Characters in PDF file from SAP Script

Hi there,
Need a quick help...
We are converting SAP Script to PDF using the function module CONVERT_OTF
and saving the file on presentation server using GUI_DOWNLOAD...
But in certain cases where the item text is maintained with some special
characters like @#$% u03B1 u03B2 u03B3 u03B4 ®... then, some of these characters are seen
as junk/garbage characters...
how do we handle this??
P.S. Our Forms are already using Korean Font...
Any help is highly appreciated
Kind Regards,
Tanuja

Hi,
Use the FM  CONVERT_OTF to get the Binary data and  down load it as PDF .
sample
*/ Convert the OTF data into PDF.
    call function 'CONVERT_OTF'
     exporting
       format                      = 'PDF'
     importing
       bin_filesize                = lv_bin_filesize
        bin_file                   = lv_xstring
      tables
        otf                        = lt_otf_data-otfdata[]
        lines                      = lt_pdf_data
     exceptions
       err_max_linewidth           = 1
       err_format                  = 2
       err_conv_not_possible       = 3
       err_bad_otf                 = 4
       others                      = 5  .
*/ Convert the Xstring data into PDF
    call method cl_document_bcs=>xstring_to_solix
      exporting
        ip_xstring = lv_xstring
      receiving
        rt_solix   = lt_mess_att .
Then down load the table lt_mess_att  with extension PDF.
Edited by: UmaMaheswaraRao Surapaneni on Apr 1, 2009 5:44 PM

Similar Messages

  • I want read PDF file from SAP directory and create a spool request or print

    Hi all,
    I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body  help me in this.
    Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
    Thanks in advance,
    Sunny

    Hi Sunny,
    Check these links.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    http://www.erpgenie.com/sap/abap/pdf_creation.htm
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Print a pdf file from sap

    Hello,
    I'm looking for a way to print a .pdf file from sap . The file  was created manualy and is in a newtwork folder.
    I have to send the print to a network printer . Is it possible to use the AcroRd32.exe as a command line?
    Thank you.

    hii,
    try this
    CONVERT_OTFSPOOLJOB_2_PDF
    http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm
    PDF - Printing a PDF file from ABAP or SAP Script
    regards,
    Sri.

  • Error when opening PDF files from SAP.

    Hi Gurus
    I have posted this question in ABAP Development section also. Please read the below text.
    We are having a strange intermittent problem with Adobe Reader. When we try to open PDF files from SAP Frontend we get an error pop-up. The pop-up does not have any text. The title of the pop-up has "Adobe Reader". There is a blue question mark and an OK button.
    This issue occurs few times a day in Windows Vista.
    This issue does not occur in Windows XP.
    Since past few weeks, we have been trying to find some error/warning/atleast some text in log files of SAP, OS, Adobe Reader, Registry entries, Event Viewer. So far, we have not found anything.
    SAP is not able to help as this issue occurs intermittently and said when they tried, the issue did not occur. They made two attempts and in each attempt they tried 10 times to reproduce the issue. This issue occurs intermittently.
    Environment
    SAP R/3 4.7 EE SAP_Basis 620 Support Package 61
    Windows Vista Enterprise
    Adobe Reader 9.0 and Adobe Reader 9.1 (tried with both versions)
    SAPGUI 710 Patch 12 (latest patch). It also occured in Patch 11.
    Please suggest
    Thank you
    Pavan

    Now I got to capture the screenshot, however not able to attach/upload here but it says:
    'Reading Untagged Documents'
    lets say i tried to open 6 page document then it said:
    'This 6-page document is untagged and must be prepared for reading. While the document is being
    analyzed, your assistive technology will not be able to interact with this application. '
    then it asked for Reading options
    then a checkbox for to confirm 'Always use the settings from the Reading Preferences (Do not show this dialog again)
    then 'OK/START' and 'cancel' buttons
    It seems, this is the problem with Adobe w.r.t Vista.
    thanks
    Bhudev

  • Creating an RDI  file from SAP script

    Hello All,
    I would like to create an RDI file from SAP Script.
    Please can anyone let me know how do we do it programmatically.
    I am aware of the option of setting RDI parameter to 'X'.
    However my requirement is to allow user to have a print preview option and simulatenously create RDI file .
    Thanks and Regards
    Amruta

    See:
    http://discussions.apple.com/message.jspa?messageID=11535851#11535851

  • Upload PDF file from SAP Portal and save in SAP

    A file in PDF format needs to be uploaded from SAP Portal and the file is to be saved in SAP. Request for help, how to do the same. What are the FM to be used etc..
    Thanks,

    hi
    Use FM  GUI_UPLOAD with file type as BIN
    there are similar threads...pls refer to them for more details:
    https://www.sdn.sap.com/irj/sdn/profile?userid=3166533
    Upload pdf file to SAP
    PDF File
    reward if helpful
    regards,
    madhu

  • How to write special characters in PDF using iText

    How to write special characters encoded with UTF-8 in PDF using iText.
    Regards,
    Pandharinath.

    I don't know what your problem is but that's almost certainly the wrong question to ask about it. Java (including iText) uses only Unicode characters. (You may consider some of them to be "special" if you like but Unicode doesn't.) And when it does that, they aren't encoded in UTF-8 or any other encoding.
    So can you describe your problem? That question doesn't make sense.

  • Open PDF file from SAP ?

    Hi gurus,
    Is there any FM or command that We can open a pdf file from our computer , This means that Open pdf with Acrobat reader but will be triggered in ABAP .
    Thanks

    Hi,
    First you need to download the pdf file onto the frontend computer then the MF WS_EXECUTE will do the job:
    CALL FUNCTION 'WS_EXECUTE'
          EXPORTING
            document           = 'X'
            program            = path_document
          EXCEPTIONS
            frontend_error     = 1
            no_batch           = 2
            prog_not_found     = 3
            illegal_option     = 4
            gui_refuse_execute = 5
            OTHERS             = 6.
    A good directory to download you file would be the SapWorkDir, I have seen in the standard that sap get this directory using WS_QUERY:
    CALL FUNCTION 'WS_QUERY'
          EXPORTING
            query          = 'CD'
          IMPORTING
            return         = path_for_copy
          EXCEPTIONS
            inv_query      = 1
            no_batch       = 2
            frontend_error = 3
            OTHERS         = 4.
    Hope it helps
    Regards,
    Renaud Wanschoor

  • Print JPEG/PDF Files in SAP Script

    Hi,
      I just want to know is it possible to print an Image of type JPEG/JPG in SAP Script, these images are
      uploaded from transaction OAOR not from Se78, so is it possible to display images uploaded from
      OAOR in SAP Script, if it is possible then please tell how to display these Images in SCript?
    Thanks In advance..
    Kalyan..

    Hi,
    [How to Print PDF Format In SAP SCRIPT]
    [Re: How to Print PDF Format In SAP SCRIPT]
    [https://forums.sdn.sap.com/click.jspa?searchID=22871024&messageID=7056757]

  • How to get pdf file from sap presentation server using java connector

    Hi Friends,
    with the below code i am able to get po details in pdf in presentation server.
    DATA : w_url TYPE string
           VALUE 'C:\Documents and Settings\1011\Solutions\web\files\podet.pdf'.
    CALL FUNCTION 'ECP_PDF_DISPLAY'
            EXPORTING
              purchase_order       = i_ponum
           IMPORTING
      PDF_BYTECOUNT        =
             pdf                  = file  " data in Xsting format
    *Converting Xstring to binary_tab
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer                = file
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
            TABLES
              binary_tab            = it_bin " data in binary format
    **Downloading into PDF file
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
      BIN_FILESIZE                    =
              filename                        = w_url
              filetype                        = 'BIN'
             TABLES
              data_tab                        = it_bin
    when i am using java connector , to retirve the file from presentation server , the follwoing error i am getting...
    init:
    deps-jar:
    compile-single:
    run-single:
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in Control Framework
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
            at PdfGen.<init>(PdfGen.java:35)
            at PdfGen.main(PdfGen.java:78)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)
    i debugged too, problem with <b>gui_download......</b>
    I am very glad to all with your suggestions!!
    Regards,
    Madhu..!!

    Hi
    You can try to create an external command (transaction SM69).......sorry I've forgotten,,,,they works on application
    How do you call CL_GUI_FRONTEND_SERVICES=>EXECUTE?
    Max
    Edited by: max bianchi on Oct 13, 2011 10:27 AM

  • Technical issue SAP F110 related issue. getting extra characters in outgoing file from sap.

    Hi Technical guru's,
    SAP system creating a outgoing file through F110- t-code, this outgoing file has extra characters (DOC.NO:)
    We need to remove these extra characters. Once Payment run has been carried out through F110, in SM37 in job spool it is showing like screen attached with name “file from sm37”.
    But when we look in to outgoing file directory extra characters as I mentioned above is appearing below is the related screen attached with name “out gooing file”.
    Gurus can anyone please suggest me where I can check about this. I have checked the program available in the job as well in the F110 transaction.But could not find any hint.
    Programs which I find in SM37.
    SAPF110S
    SAPFPAYM_SCHEDULE
    RFFOSE_B
    Programs which are available in F110.
    RFFOAVIS
    RFFOEDI1
    RFFOSE_B
    Does extra  characters coming through functional configuration (DME configuration) or coming through SAP standard programs.
    I am Technical person. I need to solve this issue guys please help me in this.
    If above information is not sufficient  let me know what are the other information should I provide.

    I didn't get any resolution so far also I can't convert into Adobe form because this is a production issue which should be fix by making the requied setting or changes in SAP script itself we can't go for new developmet for this isuue.

  • INSO-filter doesn't work correct with german special characters in pdf-files

    During testing the interMedia Text I watched that some words from pdf-files are not indexed. That's why I use the INSO-filter at the DOS command-line:
    ctxhx xxx.pdf xxx.txt <<The xxx.pdf-file includes the phrase:
    "... generell |berwiegende vffentliche Interessen im Sinne ..."
    The result in the xxx.txt-file is:
    "... generell |berwiegende Interessen im Sinne ..."
    The word "vffentliche" is lost. Is this a bug in INSO-filter or an incorrect using?
    Thanks for helping.
    Michael

    Actually, The inso filters do not even work for me for PDF file versions 1.2+. Is anyone else experiencing the same difficulties ? How often does Oracle update the INSO filters to keep up with vendors (Adobe/Microsoft) coming out with newer versions of their document products ?
    null

  • Open Jpg, Excel, word, pdf files from SAP screen.

    Hi SAP Fans,
    We have built a customer screen with some fields at top and ALV grid at bottom (using Container and ABAP 00). In this ALV grid display, we show list of files uploaded into SAP using WS_UPLOAD and stored in cluster table. When user double clicks on any file, we should be able to open file in a pop-up and show its contents. If User double clicks on Excel, it should show Excel file, if user double clicks on Pdf, it should show in Acrobat reader. How is this done ? Do I have to code for each document type ?
    Any help is appreciated.
    Niranjan

    hi,
    use WS_EXECUTE FM..
    REPORT ZWSEXECUTE.
    DATA: BEGIN OF ITAB OCCURS 3,
          LINE(50),
          END OF ITAB.
    PARAMETERS: PROG(70) DEFAULT
                'C:Program FilesMicrosoft OfficeOfficeWINWORD.EXE'.
    PARAMETERS: FILE1(70) DEFAULT 'C:TEMPTEST.TXT'.
    * Tick to print the Text file after saving from MS
    WORDS
    PARAMETERS: S_UP  AS CHECKBOX.
    * Tick to create new or overwrite Text file
    PARAMETERS: S_NEW AS CHECKBOX.
    IF S_UP = 'X'.
       CALL FUNCTION 'GUI_UPLOAD'
            EXPORTING
                 FILENAME        = 'FILE1'
            TABLES
                 DATA_TAB        = ITAB
            EXCEPTIONS
                 FILE_OPEN_ERROR = 1.
       IF SY-SUBRC = 0.
         LOOP AT ITAB.
           WRITE: / ITAB.
         ENDLOOP.
       ELSE.
         WRITE: / 'File open error.'.
       ENDIF.
    ELSE.
    IF S_NEW = 'X'.
       CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
                 FILENAME = 'FILE1'
            TABLES
                 DATA_TAB = ITAB
            EXCEPTIONS
                 FILE_WRITE_ERROR              = 1
                 NO_BATCH                      = 2
                 GUI_REFUSE_FILETRANSFER       = 3
                 INVALID_TYPE                  = 4
                 OTHERS                        = 5.
    ENDIF.
    CASE SY-SUBRC.
         WHEN 1.
              WRITE: / 'GUI DOWNLOAD FILE WRITE ERROR'.
         WHEN 2.
              WRITE: / 'GUI DOWNLOAD NO BATCH'.
         WHEN 3.
              WRITE: / 'GUI DOWNLOAD GUI REFUSE
    FILETRANSFER'.
         WHEN 4.
              WRITE: / 'GUI DOWNLOAD INVALID TYPE'.
         WHEN 5.
              WRITE: / 'GUI DOWNLOAD OTHERS'.
    ENDCASE.
    CALL FUNCTION <b>'WS_EXECUTE'</b>
      EXPORTING
         PROGRAM       = PROG
         COMMANDLINE   = 'FILE1'
         INFORM        = ' '
      EXCEPTIONS
         FRONTEND_ERROR           = 1
         NO_BATCH                 = 2
         PROG_NOT_FOUND           = 3
         ILLEGAL_OPTION           = 4
         GUI_REFUSE_EXECUTE       = 5
         OTHERS                   = 6.
    CASE SY-SUBRC.
       WHEN 1.
         WRITE: / 'FRONTEND ERROR'.
       WHEN 2.
         WRITE: / 'NO BATCH'.
       WHEN 3.
         WRITE: / 'PROGRAM NOT FOUND'.
       WHEN 4.
         WRITE: / 'ILLEGA OPTION'.
       WHEN 5.
         WRITE: / 'GUI REFUSE EXECUTE'.
       WHEN 6.
         WRITE: / 'OTHERS'.
    ENDCASE.
    ENDIF.

  • Uploading PDF-file from unix to SAP internal table

    Hi,
    i have to write an abap that sends a pdf-file from a unix (SAP server) by mail to some people.
    The mailing part is done, but for creating the attachment. I'm reading the pdf-file into an internal table (in a binary way). Then i'm using this int.table to send the mail.
    The email is sent with an attachment, but i cannot open the pdf-file because of an error ( file damaged ). So before sending it by mail, i'm downloading the pdf file to my pc by using WS_DOWNLOAD with the same internal table. The download file gives the same error.
    If i look at the size :
    - originally pdf file 71743 bytes
    - resulting pdf file 71665 bytes (281 lines x 255)
    The creation of the internal table is as follows :
    open dataset g_file for input in binary mode.
      check sy-subrc eq 0.
      do.
    *    read dataset g_file MAXIMUM LENGTH 255 into wa_pdf.
        read dataset g_file into wa_pdf.
        if sy-subrc ne 0. exit. endif.
        append wa_pdf_hex to i_pdf.
      enddo.
      close dataset g_file.
    where:
    types:  tt_pdf  type table of soli,   "raw 255 long
    data: i_pdf type tt_pdf,
             wa_pdf like line of i_pdf
    Is there a better way to read in the pdf-file ? Any suggestions ?
    regards,
    Hans
    [email protected]

    Hello Hans,
    this is a little example from a program to send mail with picture. The problem is the same
    form p_create_mail tables itab_html.
      data : object_hd_change like sood1 occurs 0 with header line,
             objpara          like selc  occurs 0 with header line,
             receivers        like soos1 occurs 0 with header line,
             packing_list     like soxpl occurs 0 with header line,
             fic_attach       like soli  occurs 0 with header line,
             struct_user_adress like usaddress ,
             v_file(80) type c ,
             v_buff(255) type c ,
             v_num(9) type n,
             v_length type i ,
             v_total_length type i,
             v_len(9) type n.
      move : 'HTM'  to object_hd_change-file_ext ,
             'PIOU' to object_hd_change-objdes.
      append object_hd_change.
    * Find email addr for the username.
      loop at s_bname.
        call function 'SUSR_USER_READ'
          exporting
            user_name                  = s_bname-low
          importing
            user_address               = struct_user_adress
          exceptions
            user_name_not_exists       = 1
            internal_error             = 2
            others                     = 3.
        select single smtp_addr
               into receivers-recextnam
               from adr6
               where addrnumber eq struct_user_adress-addrnumber
               and   persnumber eq struct_user_adress-persnumber.
        if sy-subrc eq space.
          move 'U' to receivers-recesc.
          append receivers.
        endif.
      endloop.
    * Get the picture.
      move '/sap_interfaces/D27/pzr_00/data/test/logopharma.gif'
           to v_file.
      open dataset v_file for input in binary mode.
      do.
        read dataset v_file into v_buff length v_length.
        v_total_length = v_length + v_total_length.
        move v_buff+0(v_length) to fic_attach-line+0(v_length).
        append fic_attach.
        if sy-subrc ne space.
          exit.
        endif.
      enddo.
      describe table fic_attach lines v_num.
      describe field fic_attach-line length v_len.
      move : 'Logo' to packing_list-objdes ,
             'Logo' to packing_list-objnam ,
             '1'    to packing_list-body_start ,
             'raw'  to packing_list-objtp ,
             'GIF'  to packing_list-file_ext .
      packing_list-body_num = v_num.
      packing_list-objlen   =  v_num * v_len.
      append packing_list.
    * Send mail.
      call function 'SO_OBJECT_SEND'
           exporting
               object_hd_change           = object_hd_change
               object_type                = 'RAW'
               owner                      = sy-uname
           tables
               objcont                    = itab_html
               objpara                    = objpara
               receivers                  = receivers
               packing_list               = packing_list
               att_cont                   = fic_attach
           exceptions
               others                     = 01.
    endform.                     " P_CREATE_MAIL.
    Regards
    Frédéric

  • Generate PDF file from a report using greek characters

    Dear all,
    I tried to generate a PDF file from a Report having greek characters on it.While in previewer I could see everything OK, when PDF file was generated all greek characters had been substituted by symbols...
    Any ideas, suggestions and workarounds are welcome.
    Thanx a lot!

    hi Kiriakos,
    which version are you using ?
    please test this with reports 9i since PDF support
    has been enhanced there.
    to test i would suggest to run the report from rwclient
    as well and specify desformat=pdf and to a generate to
    file within builder to see if the same behavior occurs.
    if this problem reproduces there as well i suggest
    to contact oracle support to log the problem.
    regards,
    christian

Maybe you are looking for

  • A/R Summary (FCV1) and DSO Calculations (FDK43)

    Someone please explain to me the following: 1.relationship between the A/R summary (FCV1) and the credit management reports such as FDK43. 2.What is the DSO calculation for FDK43 report based on? The time the report is run? 3. What are the SAP standa

  • Problems in uploading from excel sheet to internal table

    hi experts, i got one problem regarding uploading data from excel sheet to int.table. I used FM ALSM_EXCEL_TO_INTERNAL_TABLE but in that the value is char of 50. but i need a case where i have to send value more than 50 characters. please suggest me

  • Acrobat Reader 9.0 PDF - Commenting property "Not Allowed"

    Hi, I saved a document in Illustrator as PDF but unfortunately the Commenting property is set to "Not Allowed" and I cannot mark-up the file in Acrobat Reader. What is strange is all properties are set to "Allowed" when I open the same document in Ac

  • Add a dimension to Phased Submission!?

    Hi, we have only accounts in the phased submission in process control. Now we need to expand to C4. So I activated the option "SupportSubmissionPhaseForCustom4" and load the metadata to the application. And what happened!? In process control the clos

  • "Cannot place this file.  No filter found for requested operation"

    Hello, Saw earlier postings on this but not quite the same situation and/or the solutions didn't work.  Using InDesign CS 6.  Trying to place many JPEG files.  First one placed.  After that, stopped working.  Trying closing out of InDesign and restar