Pdf file in txt format in application server

Hi all,
         can we use open datset to store pdf file in text format in application server.
when i am using this some data was getting correctly stored in appl server.but some data is getting converted to # symbols.of course the pdf data also contains some different characters in that place.
but  i want that pdf data in that format,i dont want that change of # symbols...how can i do that...
and while storing it,it is allowing only open dataset in binary mode only ..can anybody explain why?
regards,
sharma.

<b>Check this example....</b>
report ztest.
data: begin of itab occurs 0,
field(256),
end of itab.
data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
length like sy-tabix,
lengthn like sy-tabix.
call function 'GUI_UPLOAD'
exporting
filename = 'c:\temp\test.pdf'
filetype = 'BIN'
importing
filelength = length
tables
data_tab = itab.
open dataset dsn for output in binary mode.
loop at itab.
transfer itab-field to dsn.
endloop.
close dataset dsn.
clear itab.
refresh itab.
*- To crosscheck if it went well
open dataset dsn for input in binary mode.
do.
read dataset dsn into itab-field.
if sy-subrc = 0.
append itab.
else.
exit.
endif.
enddo.
call function 'GUI_DOWNLOAD'
exporting
filename = 'c:\temp\testn.pdf'
filetype = 'BIN'
bin_filesize = length
importing
filelength = lengthn
tables
data_tab = itab.
<b>TIP</b>
Use the TCode
CG3Z or CG3Y
for downloading to Application Server.
Regards,
Pavan

Similar Messages

  • PDF file to be doewnloaded to application server.

    Hi ,
    Can we download a PDF converted file to the application server.
    Will the commands OPEN DATASET , READ DATASET and TRANSFER DATASET work out for PDF file format.
    Pls. provide your ideas.
    Thanks,
    stock

    Hi
    report ztest.
    data: begin of itab occurs 0,
            field(256),
          end   of itab.
    data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
          length  like sy-tabix,
          lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
         exporting
              filename   = 'c:\temp\test.pdf'
              filetype   = 'BIN'
         importing
              filelength = length
         tables
              data_tab   = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
      transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear   itab.
    refresh itab.
    *- To crosscheck if it went well
    open dataset dsn for input in binary mode.
    do.
      read dataset dsn into itab-field.
      if sy-subrc = 0.
        append itab.
      else.
        exit.
      endif.
    enddo.
    call function 'GUI_DOWNLOAD'
         exporting
              filename     = 'c:\temp\testn.pdf'
              filetype     = 'BIN'
              bin_filesize = length
         importing
              filelength   = lengthn
         tables
              data_tab     = itab.
    Regards,
    Raj

  • Download PDF File from Archiv to SAP Application Server

    Hi,
    I need to download the PDF file from an NAST-Dataset (how is stored from the message via SAP ArchivLink) to the SAP Application Server.
    1) At first i read the Archiv-Link data via function module WFMC_GET_ARCHIVE_OBJECT_TYPE
    2) Then i get the Connection-Infos via function module ARCHIV_GET_CONNECTIONS_INT
    3) Now i read the file from archiv as table via function module ARCHIVOBJECT_GET_BYTES
    4) Save to the SAP Appl.Server via:
       - OPEN DATASET ld_dpfad FOR OUTPUT IN BINARY MODE
       - LOOP and TRANSFER lf_archivobject TO ld_dpfad.
       - CLOSE DATASET ld_dpfad.
    In the dialog of NAST-Dataset (Messages) i can open the PDF-File without any errors (display originals). But after the filetransfer to the SAP Appl.Server i get the following errors during the file opening dialog from Adobe Acrobat Reader:
    - the embedded font u201CArialu201D cant to be extract
    - not enough data for the picture
    The reader can display the PDF-File but only without the picture (Logo) and with alternative font.
    The same transfer from archiv and sending as an attachement to the BOR-Object via function module SO_DOCUMENT_INSERT_API1 works very fine and without any errors.
    Can any one please help me to solve this Issue?
    Thanks in Advance,
    Thomas

    Hello Keith,
    Many thanks for your answer.
    In the past i didnu2019t need the BINARCHIVOBJECT-Parameter and so i overlook this option.
    Now, the File looks a little bit different, but only in the STREAM-section.
    During the Fileopen-Dialog i get only one message now - "not enough data for image" and the image will not displayed. The rest seems to be correct.
    The relevant coding is now:
      ld_doc_typ = pf_connections-reserve.
      CALL FUNCTION 'ARCHIVOBJECT_GET_BYTES'
        EXPORTING
          archiv_id                = pf_connections-archiv_id
          archiv_doc_id            = pf_connections-arc_doc_id
          document_type            = ld_doc_typ
          length                   = ld_length1
          offset                   = ld_offset
        IMPORTING
          binlength                = ld_length                        
          offset                   = ld_offset
        TABLES
          binarchivobject          = lt_binarchivobj                  
        EXCEPTIONS
          error_archiv             = 1
          error_communicationtable = 2
          error_kernel             = 3
          OTHERS                   = 4.
    Zieldatei zum Schreiben öffnen
        OPEN DATASET ld_dpfad FOR OUTPUT IN BINARY MODE.
    Inhalte in Zieldatei schreiben
      LOOP AT lt_binarchivobj INTO lf_binarchivobj.
        TRANSFER lf_binarchivobj TO ld_dpfad NO END OF LINE.          
      ENDLOOP.
    Zieldatei schließen
      CLOSE DATASET ld_dpfad.
    Where is the error for the image data?
    Ciao Thomas
    Push up by: Thomas Engler on May 3, 2010 4:54 PM

  • How to run a "exe" file that is residing in application server.

    Hi,
    I have a requirement in which a .exe (Windows executive) file needs to be run through code, which is residing in the application server. That exe file is nothing but a pdf-excel converter that will convert a pdf file to excel. The corresponding pdf file is also in the application server. Is there any function module to make this happen? I have come across the FM GUI_EXEC, but it operates on exe and pdf files that are in the presentation server.

    HI Anirban
    SM49 /SM69 might be of help
    Could you please look into the link below.
    Re: sm49/sm69

  • Wrongly transformed the sentences of left and right paragraphs into one sentence in PDF files to txt files by Acrobat 9 Pro

    I found that the when transforming PDF files into TXT files by Acrobat 9 Pro, the Acrobat will wrongly transform the sentences of the left hand side and right hand side paragraphs into one sentence, while the correct format should be the later sentence follows the former sentence in each paragraph.
    An example PDF is : http://cardiovascres.oxfordjournals.org/content/cardiovascres/45/1/200.full.pdf
    Is there any solution for this problem? Or should I use other software (or other version of Acrobat) to solve the problem? Thank you.

    PDF is not a word processor file format.
    It has no "styles", "format", "layout", "columns", "rows", "tables", etc.
    PDF writers paint the content to the canvas that is the PDF page.
    Depending on what was used and how it operates this painting can be like a paint by numbers affair.
    ISO 32000-1:2008, the ISO standard for PDF explains it all.
    So, when exporting to text from your PDF the progression is left to right, top down.
    Remember, PDF has no awareness of "columns". What we see is our construct not PDF's.
    What you and I see as two columns with a specific read order is our imposition.
    What is on the PDF page is simply a line of text characters.
    That is how it is with all versions of Acrobat. Applications can only make use of what the file format supports eh.
    What to do?
    Master content in a logical hierarchy in the authoring file.   
    Always use the build-in Headings for Headings.     
    Use the built-in "table" feature.  
    Use a PDF writer process that is compliant with the ISO standard and that supports proper output of Tagged PDF.   
    A well-formed Tagged PDF will export properly.  
    Two key design considerations for Tagged PDF are:  
    (1)  Support Accessible PDF   
    (2)  Support Export of PDF page content. 
    What constitutes a "well-formed tagged PDF?"
    This would be a PDF that is ISO 14289-1, PDF/UA-1 compliant.
    Be well... 

  • How to change the excel file name which is in Application server...

    hi friends,
    my requirement is getting failed, when i'm trying to change the file name which is in Application server using the FM: SXPG_COMMAND_EXECUTE.
    when i execute above FM, i can see all my required details in SM69 like:
    COMMAND NAME: ZSPOOL_TEST1      
    OS: Windows NT
    TYPE: Customer 
    OS COMMAND: cmd rename Y:\OBRZ.PDF OBRZ38582.PDF
    once the above FM is executed, i'm getting SY-SUBRC = 2 (exception: COMMAND_NOT_FOUND).
    so, can any one guide me how to resolve this issue or is there any other way to rename the file which is in AS?
    thanks in advance...

    Hi ,
    First you can tranfer the AS server file to a new application server file.
    Then you delete the original file .
    To do that you can write code as follows --
    DATA : w_file(8) TYPE c VALUE 'FILE_NAM', " your present AS file name
           w_new(8) TYPE c VALUE 'NEW_FILE',
           fs_itab(255) TYPE c,
           t_itab LIKE TABLE OF fs_itab.
    OPEN DATASET w_file FOR OUTPUT IN BINARY MODE.
    DO.
      READ DATASET w_file INTO fs_itab. " Reading value from the AS file to field string
      IF sy-subrc NE 0.
        EXIT.
      ELSE.
        APPEND fs_itab TO t_itab. " Populating internal table form the file value
      ENDIF.
    ENDDO.
    OPEN DATASET w_new FOR INPUT IN BINARY MODE. " creating a new file if that does not exist
    LOOP AT t_itab INTO fs_itab.
      TRANSFER fs_itab TO  w_new. " Transfering to file
    ENDLOOP.
    CLOSE DATASET w_file..
    DELETE DATASET w_file. " Dleting the old file
    CLOSE DATASET w_new.  " Closing the final file
    Regards
    Pinaki

  • Wrongly transformed the sentences of left and right paragraphs into one sentence in PDF files to txt files by Acrobat 11

    I found that the when transforming PDF files into TXT files by Acrobat 11, the Acrobat will wrongly transform the sentences of the left hand side and right hand side paragraphs into one sentence, while the correct format should be the later sentence follows the former sentence in each paragraph.
    An example PDF is : http://cardiovascres.oxfordjournals.org/content/cardiovascres/45/1/200.full.pdf
    Is there any solution for this problem? Or should I use other software (or other version of Acrobat) to solve the problem? Thank you.

    Hi Anubha,
    Same problem occurred when converted into word file.
    I convert the PDF into txt as I need to use the txt format for running some analyses (and I have thousands of such PDF).
    However, I found the same problem even if I use the original PDF file, so I am seeking the solution.
    Actually the PDF can be converted to any format if the problem can be solved! Thank you.

  • How to check if the file already exists in the application server directory

    Hi all. I'm on devsuite 10g.
    I transfer file from local machine to application server using webutil function webutil_file_transfer.client_to_as and I want to check if the file I'm transfering already exists on the server directory.
    How can I make this?
    Thanks all,
    Fabrizio

    use the text_io package and open the file in read-mode.
    like this
    declare
    xFileType text_io.file_type;
    begin
    xFileType := text_io.fopen('c:\temp\test.txt','R'); --file on the middle tier
    -- file exists;
    text_io.fclose(xFileType);
    exception
    when others then
    --file doesn't exist
    end;
    regards
    Christian

  • Converting batch pdf files to txt files

    Hello all,
    I am a intermediate level programmer with experience in Visual Basic 6. I am developing a small application to read data from pdf files. However, i was unable to directly read the data from pdf files. So, i converted them to txt files and then was able to process them.
    However, the first step of converting pdf files to txt files is still doen manually. I want to automate it. Can someone help on how to go about it using VB6?
    Im using Adobe Reader X (Ver 10.1.6) and Window 7 Operating System.
    Thanks
    Rupam

    Can you provide  afull details on how to convert PDF file autocad drawing to original autocad system....thanking

  • Deploying a war file in Oracle Apps's application server

    Hi all, i have a war file which i want to deploy inside oracle apps's application server, i just want to know the location to put my war file in so that the application server will auto deploy it.And also provide port and url(Application server) where i can access that web app.

    Babu,
    There are a lot of dependencies involved. app severes before 10g are not generic j2ee server. what kind of files are you putting in ur war file?
    --Shiv                                                                                                                                                                                                                                                                                                                                       

  • When I convert a pdf file to word format, it show the error "Save As failed to process this document

    Hi,
    I have just upgrade the creative cloud CC version and upgrade the acrobat pro to XI version.
    when I convert a pdf file to word format, it show the error "Save As failed to process this document. No file was created."
    Actually, I have delete the image, use other pdf file and download a sample pdf file to test it. Same error is shown. I have try all the other format , like the excel, rtf, text, powerpoint, still same thing happen.
    Please show me what else I can do to fix this problem.
    Thx.
    Alfred Li

    alfredadli wrote:
    Please show me what else I can do to fix this problem.
    Fisrt step would be to ask in the proper forum.
    http://forums.adobe.com/community/acrobat

  • How to apply  special right  to the PDF  file using the LiveCycle Rights Management Server.?

    How to apply special right to the PDF  file using the LiveCycle Rights Management Server.?
    I want  to edit bar code field data using Adobe Reader. Bar Code field was designed and data was changing using Acrobat X1 Professional (Trial Version). But can't do so in adobe reader.

    I think that product has nothing to do with it. You would use LiveCycle Reader Extensions.

  • How to get well structured XML format in application server ?

    Hi Experts,
                    I have developed program to download XML format in application server. The below format which i am getting in
    application server :
    <?xml version="1.0" encoding="utf-16" ?> - <asx:abap xmlns:asx="http://www.sap.com/abapxml"  version="1.0">asx:values>- <TAB>- <item>  <EBELN>4151503309</EBELN>   <BUKRS>1000</BUKRS>
      <VENDOR>T-K515A09</VENDOR>   <EKORG>1000</EKORG>  <EKGRP>001</EKGRP>
    But i want the format like  below one which i am getting when i am downloading presentation server . I want it to achieve
    in application server.
    <?xml version="1.0" encoding="utf-16" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
    - <TAB>
    - <item>
      <EBELN>4151503309</EBELN>
      <BUKRS>1000</BUKRS>
      <VENDOR>T-K515A09</VENDOR>
      <EKORG>1000</EKORG>
      <EKGRP>001</EKGRP>
    Pls anyone help me out regarding this.
    Thanks
    Ramesh Manoharan

    Hi
       I am new to transformation ( strans ) .Pls send me if you have any document. Is it possible to get below format in application
    server using transaction STRANS ?
    <?xml version="1.0" encoding="utf-16" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
    - <TAB>
    - <item>
    <EBELN>4151503309</EBELN>
    <BUKRS>1000</BUKRS>
    <VENDOR>T-K515A09</VENDOR>
    <EKORG>1000</EKORG>
    <EKGRP>001</EKGRP>
    Thanks
    Ramesh Manoharan

  • Smartform into PDF and store in folder of  application server

    Hi Gurus,
         I have to solve this issue please help meu2026
    1.Convert Smartform into PDF and store in folder of  application server
    2.print the PDF stored in folder(Application Server) automatically
    Please give suggestion for the above..
    Moderator message: "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Oct 7, 2011 10:39 AM

    hi uma,
    http://www.kodyaz.com/articles/sap-smartforms-download-as-smartform-pdf-using-ws_download-and-cl_gui_frontend_services.aspx
    check this out...
    thanks,
    ram

  • Can Bridge CC create a list of files in .txt format ?

    hi all,
    i'd like to know if i can create a list of files in .txt format using Bridge CC
    It could be a good way to verify the integrity of an external database.
    thank you all
    rafa

    hi mark,
    this is my situation:
    i shoot a great number of items everyday.
    So i have a db in excel format with the name of item, the shooting date and other informations about the files.
    now, with my batch file, i create a list of file in specific folders (to work, worked, deliverde etc)
    in this way i can comparate all files and i can update tha state of working in db file
    if bridge could create a list, i can make this comparation faster.
    this is the why of my question.
    can you help me to create the opportune script in bridge?
    sorry for my english
    rafa

Maybe you are looking for

  • Unable to save exported Aperture TIFFs as jegs when opened in Photoshop

    I'm using the latest version of Aperture and need to do major retouching of the images I have edited using Aperture. When I "export versions" of the images, I normally choose "TIFF-50% of size" or "TIFF - fit within 1024x1024", but when I open them w

  • How do you turn off the bottom left info bar?

    The bar keep popping up when you move over a link.

  • Concept on KM

    Hi Trying to clarify on KMs. When I import a KM from impexp folder ODI stores the information from the XML into work repositories tables?.. I tried the following it worked. 1) Imported IKM Oracle Incremental Update into my Project and created an inte

  • Create table taking much time

    Hi all, I have to copy one table with more than 1 lakh records from one schema (deloitte) into another schema (dell). It is taking more time but not getting output as early as possible. Is there any alternative way to make it more faster for copying

  • Invalid Migration key

    Dear expert I am import sap system through system copy methored during starting of ABAP Import phase it's prompt me to enter Migration key I gave it but it say's Invalid /usr/sap/DEV/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s) /usr/sap/