Open dataset in binary mode-data missing in pdf file

Hi,
I am downloading a pdf file to the appl server using the below code.
open dataset filename for output in binary mode.
OPEN DATASET file_name FOR OUTPUT IN BINARY MODE.
     LOOP AT lines INTO ls_lines.
       TRANSFER ls_lines TO file_name.
     ENDLOOP.
     CLOSE DATASET file_name.
     MESSAGE 'File has been Transfered' TYPE 'S'.
pdf file is downloading to the appl server.
I am reading the file using CG3Y transaction, an found that some tax values are missing.
please advice on how to fix this issue ASAP.

Pls find the code..
In this case, the pdf file tax values are missing out as shown above screenshot..
i also tried with legacy binary mode and binary mode code page 1100.
* Convert OTF Data to pdf data
   CALL FUNCTION 'CONVERT_OTF'
     EXPORTING
       format                = 'PDF'
     IMPORTING
       bin_filesize          = pdf_size
     TABLES
       otf                   = ls_job_info-otfdata
       lines                 = lines
     EXCEPTIONS
       err_max_linewidth     = 1
       err_format            = 2
       err_conv_not_possible = 3
       err_bad_otf           = 4
       OTHERS                = 5.
   IF sy-subrc <> 0.
     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   ENDIF.
   LOOP AT lines INTO ls_lines.
     ASSIGN ls_lines TO <fs_x> CASTING.
     CONCATENATE lv_content <fs_x> INTO lv_content IN BYTE MODE.
   ENDLOOP.
*  call SCREEN 9001.
   SHIFT wa_final1-vbeln LEFT DELETING LEADING '0'.
   SHIFT wa_final1-bstkd LEFT DELETING LEADING '0'.
   SHIFT wa_final1-kunnr LEFT DELETING LEADING '0'.
   IF sy-sysid = 'DEV' AND  sy-mandt = '046'.   " Development Server or Client.
     CONCATENATE 'E:\OrdAckNotfctn\Acknowledgements\' wa_final1-erdat
        '_' wa_final1-bstkd '_' wa_final1-vbeln '_' wa_final1-kunnr '.Pdf'
        INTO file_name.
     OPEN DATASET file_name FOR OUTPUT IN BINARY MODE. "TEXT MODE ENCODING DEFAULT.
     LOOP AT lines INTO ls_lines.
       TRANSFER ls_lines TO file_name.
     ENDLOOP.
     CLOSE DATASET file_name.
     MESSAGE 'File has been Transfered' TYPE 'S'.
   ELSEIF sy-sysid = 'SBX' AND  sy-mandt = '046'. " Testing Server or Client.
     CONCATENATE 'E:\OrdAckNotfctn\Acknowledgements\' wa_final1-erdat
          '_' wa_final1-bstkd '_' wa_final1-vbeln '_' wa_final1-kunnr '.Pdf'
          INTO file_name.
     OPEN DATASET file_name FOR OUTPUT IN LEGACY BINARY MODE. "TEXT MODE ENCODING DEFAULT.
     LOOP AT lines INTO ls_lines.
       TRANSFER ls_lines TO file_name.
     ENDLOOP.
     CLOSE DATASET file_name.
     MESSAGE 'File has been Transfered' TYPE 'S'.
   ELSEIF sy-sysid = 'PRD' AND  sy-mandt = '046'. " Production Server or Client.
     CONCATENATE 'E:\OrdAckNotfctn\Acknowledgements\' wa_final1-erdat
       '_' wa_final1-bstkd '_' wa_final1-vbeln '_' wa_final1-kunnr '.Pdf'
       INTO file_name.
     OPEN DATASET file_name FOR OUTPUT IN BINARY MODE. "TEXT MODE ENCODING DEFAULT.
     LOOP AT lines INTO ls_lines.
       TRANSFER ls_lines TO file_name.
     ENDLOOP.
     CLOSE DATASET file_name.
     MESSAGE 'File has been Transfered' TYPE 'S'.
   ENDIF.

Similar Messages

  • Need guidance entering my own data in a PDF file

    Please refer to this example:
    http://www.gnupdf.org/Introduction_to_PDF
    I am trying to teach myself PDF internals. My immediate objective is to save some private data in my PDF files. My data is structured as "variable/value" pairs but I chose not to save it as custom properties because of its bulk and the possibility of confusion and undesired manipulation by the end user.
    The above example immediately suggests that I should use an object of "dictionary" type. Let's try to assemble the file manually:
    44 0 obj
    <<
      (Favorite Baseball Team) (Boston Red Sox)
      (Age) (35)
      (Planet of Birth) (Klingon)
    >>
    endobj
    Is the above initial attempt correct? I will of course use the corresponding API to create the dictionary, but I am concerned about breaking things. Won't Acrobat get confused when it finds this foreign stuff?
    TIA,
    -Ramon

    Hi Leonard,
    Thanks for your always valuable help. FYI, my data is of a global nature. I suppose I should come up with some unique name ("MyPrivateData" or something) and place such entry in the Catalog?
    This thread brings up a related topic. It is about the uniqueness of the JavaScript namespace. My PDF files are generated automatically and JavaScript code is added to them. I haven't done any tests yet, but I foresee the following problem: those generated PDF files may end up being merged with each other which brings the potential of namespace conflicts.
    Let's say that the first JS-laden document has 3 pages and another one has 2 pages. I suppose there is no way to restrict it like: "this JS code applies to the first 3 pages only". As soon as the 2 documents are merged all the JS code (and worst of all: the variable and function names) applies to the 5 combined pages, correct?
    There are 2 possible solutions:
    - Perhaps there is a way to declare some JS code as belonging to one page only?
    - Use collections. This brings a whole new layer of complexity and expense.
    Thanks again,
    -Ramon

  • How to Extract Data from the PDF file to an internal table.

    HI friends,
    How can i Extract data from a PDF file to an internal table....
    Thanks in Advance
    Shankar

    Shankar,
    Have a look at these threads:-
    extracting the data from pdf  file to internal table in abap
    Adobe Form (data extraction error)
    Chintan

  • How to upload data in the pdf file to the R/3 with fileupload element ?....

    Hi Experts,
    I need to upload the data in the pdf file to the R/3 with fileupload element.
    But I am not able to get the correct data(it is confusion code) in the pdf file when I debug the programe. However, I am able to get the data if the data is in the txt or excel file.
    Do you give some hint for this problem ?
    Thanks & Regards,
    Tao

    Hi, experts,
    The version of R/3 : ABAP: 10, BASIS:11.
    Best regards,
    tao

  • Can I use Visual Basic to covert form user data from multiple .pdf files to a single .csv file?

    Can I use Visual Basic to covert form user data from multiple .pdf files to a single .csv file?  If so, how?

    You can automate Acrobat using IAC (InterApplication Communications), as documented in the Acrobat SDK. Your program could loop through a collection of PDFs, load them in Acrobat, extract the form data from each, and generate a CSV file that contains the data.
    Acrobat can also do this with its "Merge Data Files into Spreadsheet" function, but this is a manual process.

  • Merge data and a PDF file?

    Hi,
    I´m trying to render/merge data into a PDF file using FormServer (7.0) and .NET. I notice that if I use the xdp version of the pdf, FormServer will return a pdf with the merged data. However, I cannot acomplish this if instead of a xdp file document I use a pdf file (dynamic 7.0 created with livecycle designer 8).
    This works:
    String sFormPreference = "PDFForm";
    String sFormQuery = "ExpenseClaim.xdp";
    This doesn´t woks:
    String sFormPreference = "PDFForm";
    String sFormQuery = "ExpenseClaim.pdf";
    Isn´t it possible to merge data directly into a PDF using FormServer. I rather use a pdf file instead of a xdp file, because, a xdp file will need to be converted to a PDF file. Thus it will spent more time accomplishing the merge.
    Thank you

    Try using PDFMerge as the transformation.
    Chris
    Adobe Enterprise Developer Support

  • Open dataset in text mode utf-8 no funciona

    Hola que tal, soy nuevo en el foro tengo un problema espero me puedan ayudar si alguien de casualidad se ha topado con esto,
    lo que pasa es que necesito descargar un archivo en proceso de fondo que me deje el archivo .txt de tipo UTF-8 no ANSI para la version 4.6C de SAP hice una función vasandome en el guidownload y me funciono pude generar el archivo en ese formato pero solo funciona en línea, ocupo que lo haga en proceso de fondo,
    Estoy buscando una función que me guarden en proceso de fondo que no sea el open dataset, encontre una que se llama pero no me ha funcionado me manda un 2 la función es
    CALL FUNCTION 'RZL_WRITE_FILE_LOCAL'
        EXPORTING
        APPEND               = ' '
          NAME                 = l_nfile
        TABLES
          LINE_TBL             = i_archivo
       EXCEPTIONS
         ARGUMENT_ERROR       = 1
         WRITE_ERROR          = 2
         OTHERS               = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    o si ustedes conocen una forma de guardar un archivo de tipo UTF-8 con el open dataset u otra función que se ejecute en proceso de fondo para la veresion 4.6C de SAP pues sse los agradeceria si me pudieran ayudar.
    Saludos!!!

    Hi,
    I have a problem, i need to save a file in the server by job, but i need to save teh file in utf-8 format, right now i'm usign the 4.6C version's sap, and it dosen't has the instruction
    open dataset namefile for output in text mode encoding utf-8.
    only has open dataset namefile for output in text mode and a i think that if i'm using this function the file will be save in ansi format and i need to save the file in utf-8 format.
    right now i have a function for save the file in utf-8 format in my pc but it dosen't work in job so i need a function for save the file in job in my pc or in the server,
    sorry  with my english is bad.
    Saludos!!

  • 'Open in 32-bit mode' checkbox missing...

    I recently loaded MainStage 3, and went to disable the 'Open in 32-bit mode' option, so I could run it in 64-bit, but the checkbox does not exist.  It is still there for the MainStage 2 icon, but not for the MainStage 3 icon.  Has anyone had this experience and know a solution?

    Thanks for your response.  This is from page 13 of the MainStage 3 manual:
    To open MainStage in 64-bit mode, Control-click the MainStage icon in the Applications folder, choose Get Info from the shortcut menu, then deselect the “Open in 32-bit mode” checkbox
    I tried your suggestion, but can't find in Activity Monitor where it indicates the bit mode.  Can you clarify?  Thanks again.

  • Need Help on Recovering Saved Data in a PDF File

    Hi,
    It took me several days to fill up an important immigration document in pdf format. During the time, I was able to save it and open it again with the data in the form fields.
    The motherboard of the laptop was fried the other day. All the files on the harddrive are safe. I got a usb hd enclore and copy the files off the harddrive.
    However, when I open the pdf file, the data fields are now all empty. What to do to recover the saved data fields? Is that possible?
    Thank you very much!

    Hi~
    Don't be worry, I think to use some tools to recover your  pdf file will be help.
    I used a tool last month, and it recovered the pages as well as images in one pdf file of mine.
    Follow this steps, it is very easy to repair: http://www.datanumen.com/apdfr/recovery.htm
    You can  have a try, good luck!
    Julie

  • Open in "iBooks" button has stopped working (for PDF files)..plz help!!

    The "open in iBooks" prompt was working just fine until last night..but when I tried the same today on a PDF file (as usual..) ..it did not work:(

    That issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • How to extract data from offline PDF files as batch processing

    Hello.
    I want to use Adobe Interactive forms as batch processing.
    For instances,
    1. Users download offline PDF files.
    2. Users inputs data on their local PCs.
    3. Users upload these PDF files in one folder.
    4. Program can read data form PDF files on that folder. and put data to ERP at night.
    I' d like to know how to implement a program with Java or ABAP.
    Regards.
    Koji.

    Hi,
    It's possible to do it but first be sure that the SAP system can read the directory while your program is executed in background .
    Then you have to read the content of the directory and process each file you found.
    Look at this standard ABAP object cl_gui_frontend_services , you will find method for browsing a directory and retrieve list of file .
    Afterwards you have to process each file , for this have a look at this wiki code sample i wrote for processing inbound mail with adobe interactive form, it should help you [Sample Code for processing Inbound Mail with Adobe Interactive Forms|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCodeforprocessingInboundMailwithAdobeInteractive+Forms]
    Hope this help you .
    Best regards.

  • How to read data from the PDF file

    Hi
    i need pdf related API details and sample program to retrive the data from the pdf.

    Did you even try looking this one up yourself? Google "java pdf" and you get plenty of results. The first one looks pretty promising, and I'm sure there is plenty of documentation with the API.

  • How can I add an expiration date to a pdf file?

    How can I apply an expiration date to a pdf document in Acrobat Pro X? Can this be done in Acrobat XI?

    Read this:
    http://forums.adobe.com/thread/1085319?tstart=0

  • Is it possible to overwirte data in a *.pdf file using LabVIEW??

    hi,
    i have a requirement to overwrite a pdf file using LabVIEW, i have to use coloring text also.
    i have downloaded Exaprom PDF 1.0 toolkit. but it is to generate a new pdf file.
    please suggest ideas
    regards
    phani srikanthSpell Check
    phani srikanth

    Modifying an existing PDF file is several magnitues more complicated than creating one from scratch. The PDF standard is VERY complicated and contains a myriad of features with their specific syntax elements. In order to modify an existing PDF you have to be able to understand every syntax element that occures in the PDF, or you may end up corrupting the file.
    When you create a new PDF you can pick out the syntax elements that your tool supports and forget about the 95 other procent.
    There are many PDF Toolkits than can create PDF files, a few that can open PDF files and present them, and almost none that can edit them. The Adobe PDF Editor being one of the few that can do that, but nobody is going to give away such a Toolkit for free.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Text missing in PDF files

    I have been trying to print out a form from a local university for my daughter.
    http://www.wlv.ac.uk/PDF/uow-direct-app-home.pdf
    I am using Leopard 10.5.2 - but when I preview this form in finder, nearly all of the text is missing. If I try to print it to my non-postscript printer - again, all the text is missing. If I print it to my PostScript printer, then it prints.
    I notice the PDF has badly (i.e. none) embedded fonts, so Acrobat has to use the Substitute "Adobe Serif MM" font.
    Anyone else getting this problem with this PDF?
    Funnily (well, not so funny, when i recently switched to Mac as it's 'THE' platform for graphics - cough!) the PDF renders and prints fine on my XP machine.
    Steve

    OK... I think i may have a handle on this.
    As I use my Mac for design work, the only fonts I routinely have activated are the "must have" fonts in the /System/Library/Fonts directory.
    Everything else is removed, and activated via Font Agent pro.
    I think Preview has a problem when a PDF file does not have fonts properly embeded. I just activated all the standard fonts that Microsoft, and Apple plonk in ~/Library/Fonts and /Library/Fonts - including a copy of Palatino, and, hey presto - Quick view works again.
    However, this doesn't explain the text vanishing when printing from Acrobat itself to a non-postscript printer.

Maybe you are looking for

  • Merge PDF Documents

    Hi, I have Adobe Acrobat XI I have a PDF Cover Letter, containing recipients, created from Word mail merge and using Excel as the datasource.  One recipient details per page. I have another PDF Legal letter, that cannot be edited, and cannot include

  • BPM workspace different port question

    Hi, I have a UI project, that is used for BPM human tasks. When I deploy the UI part to the SOA server(default port 8001)  then login to BPM workspace and click to my task all works fine(task details page is displayed). But when I deploy the UI part

  • Sales order-Purchase order

    Dear Friends, Can any1 explain me the process or the cycle so that which triggers sales order and purchase order?.....the reason for this question is in one of the threads I read that purchase order will take reference as purchase requisition and pur

  • Secure Zone help?

    Hello, I am having trouble with my sites secure zones. I have 38 clients that need to access my private zone right now to view their images. None of them can access it right now. This is a message that they are getting Secure Zone Access Denied You c

  • WRT100 works for 1 wireless, but fails 2 others to internet

    I just bought my sister and BIL a used WRT100. I set everything up, and followed the directions on how to reset to default, and then programmed the router for use in their home. When I got done the setup (using WPA2 complete with a secure passphrase)