Download as txt

Hi ,
      can any one help me in download as txt file using the function module SO_OBJECT_SEND along with email .
a sample code using this function module would be helpfull.
Thanks,
vinay .

Check thread ...
Re: FM : SO_OBJECT_SEND  not working
Hope this’ll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"

Similar Messages

  • .JS files download as .TXT files how can I download the files corectly

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/750416]<br>
    Thanks - c</blockquote><br>
    Recently upgraded to version 3.6.3 and since then when I try to download .JS files they actually download as .TXT files. I can download word files without a problem. I'm downloading scripts from my internet hosted database. In previous versions of FF I didn't have a problem. Is there a setting that I need to change or plugin I need?

    Try "Reset Download Actions": http://kb.mozillazine.org/File_types_and_download_actions

  • Download a txt-File

    Hi,
    The following Code downloads Files from a Server, but it has one Problem, if I want to download a txt-File there are 3 Line-Feeds too much at the End of the downloaded File
    I think it is a Problem with the Part, where the header is created.
           FileInputStream fips = new FileInputStream(strSourceFilename);
            BufferedInputStream bips = new BufferedInputStream(fips);
            response.setContentType("application/octet-stream");
            response.setHeader("Content-Disposition","attachment; filename="+strFilename);
            OutputStream ops = response.getOutputStream();
            BufferedOutputStream bops = new BufferedOutputStream(ops);
            int i=0;
            byte [] ba = new byte[1000];
            while((i=bips.read(ba))!=-1){
            bops.write(ba,0,i);
            ops.close();
            fips.close();
            bops.close();
            bips.close();Thanks a lot for your help

    Try this once
    if any problem mail To me [email protected]
    <%@ page import="java.io.*" %>
    <%try {
    String ROOT_PATH;
    ROOT_PATH = getServletContext().getRealPath("/");
    out.println(ROOT_PATH);
    FileInputStream in = new FileInputStream(ROOT_PATH + "a.txt");
    response.setContentType("text/html");
    response.setHeader("Content-Disposition", "attachment; filename=a.txt");
    int i;
    while ((i=in.read()) != -1) {
    out.write(i);
    in.close();
    out.close();
    catch(Exception e)
    System.out.println("...error while loading: "+e.toString());
    %><html><head></head><body>Error: can't open file historic_flow_rates.csv</body></html><%
    %>

  • UNICODE Problem when Download to TXT/ASC file.

    Dear Experts,
    Due to the Unicode system takes each chinese character as a byte, the field(10) can take 10 Chinese Characters, not like before only 5 characters allowed.
    The problem is when the data is downloaded to a txt file, the field ,length 10, contained Characters, is displayed 10 chinese characters(that's 20 bytes in txt file). It causes the displayed field length are varied between the definition length of field and the actual output.
    ex.
    102’†•¶ŽšŒ^‘ª00012345       --> the output I actully want.
    102’†•¶ŽšŒ^‘ª     000012345  --> unicode makes this in txt file, lenth 10, fill 5 characters but still leave 5 space.
    How to make system take the chinese characters as 2 bytes when download....or any other better idea for this?
    anyone who can solve this, that's life saving..!!!
    thanks in advnace.

    Sorry, the chinese chararcters cannot display properly,
    so just assume each '@' as a chinese character. Five chinese Characters should occupy whole field length(10),
    but Unicode makes it like line 2, still leave 5 space culomn behind(using  to represent the empty column).
    ex.
    102@@@@@00012345      --> the output I actully want.
    102@@@@@000012345 -- the actual output.
    thanks.
    Message was edited by: Ching Heng Ling

  • Problem in downloading records .txt format

    Hi,
    I have to download records in a .txt file from two custom tables(Header and Item table) while the header records and item records are identified by the first two characters of each string downloaded in the .txt file. Can you help me out by giving some code piece on this.
    Swarup Banerjee.

    can i know the file format (fields) and 3-4 first records of it.
    if possible send more details.

  • Downloading in .txt format separated by comma

    Hello everyone,
    In order to download an internal table in .txt format separated by comma (,) , I am using :
    1.        SAP_CONVERT_TO_CSV_FORMAT
    2.       GUI_DOWNLOAD
    The problem is that the file downloaded is separated by ; and not comma.
    I am not passing any Filetype in GUI_DOWNLOAD and the extension is .TXT.
    I dont want to use REPLACE ALL OCCURANCES OF  before calling GUI_DOWNLOAD.
    Can someone plz suggest another way ?
    Thanks

    CONSTANTS :  c_delim TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
    CONCATENATE   'Physical Inventory Document'
                    'Item '
                    'Material '
                    'Material Description'
                    'Material Group'
                    INTO wa_excel_dwnld-line
                                   SEPARATED BY c_delim.
                   APPEND wa_excel_dwnld TO it_excel_dwnld.
                   CLEAR: wa_excel_dwnld.
    LOOP AT it_output INTO wa_output.
    CONCATENATE   wa_output-iblnr
                      wa_output-zeili
                      wa_output-matnr
                      wa_output-maktx
                      wa_output-matkl  
                     INTO wa_excel_dwnld-line
                           SEPARATED BY c_delim.
        APPEND wa_excel_dwnld TO it_excel_dwnld.
    ENDLOOP.
    CLEAR wa_excel_dwnld.
    DATA: l_flname     TYPE string,
                          l_string     TYPE string.
    MOVE p_file TO l_flname.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_flname
          filetype                = 'ASC'
          write_field_separator   = '#'
        TABLES
          data_tab                = it_excel_dwnld
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
    Download in CSV if you want comma separated file.
    Revert if you need any more help.

  • OpenOffice .odt file downloaded as .txt

    Hello,
    when I try to download a .odt file from the web (right-click/download link), the file is saved as anyfile.odt.txt ...
    I have then to change the file type and answer "yes" to the message "do you really want to change the file type".
    OpenOffice.org 2 is installed and running correctly on my machine and is the default app for .odt files.
    Any suggestion ?
    Thanks

    Try "Reset Download Actions": http://kb.mozillazine.org/File_types_and_download_actions

  • Downloading as .txt including header,itab footer with specific path

    i have a specifix path like C://asd , an internal table itab, and a footer and header. I tried to use GUI_DOWNLOAD but, i can only send an internal table to this function.
    I need to download these things .txt like this format
        The account 21324.2342                           (Header)
        123 1231 123 1234 123 1234 123 1234    (itab[1])
        321 4321 321 4321 321 4321 321 4321    (itab[2])
        123 1231 123 1234 123 1234 123 1234    (itab[3])
        321 4321 321 4321 321 4321 321 4321    (itab[4])
        123 1231 123 1234 123 1234 123 1234    (itab[5])
        321 4321 321 4321 321 4321 321 4321    (itab[6])
        Sum is 123412                                           (Footer)

    Hi ,
    In function module GUI_DOWNLOAD there is a parameter called as append.
    Cal this FM for 3 times,
    1: For Header with append not used.
    2: For Internal table with append as 'X'.
    3: for Footer with append as 'X'.
    In all the call keep the file name same .
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                  = lv_filename
          filetype                  = 'ASC'
        CHANGING
          data_tab                  = gt_header
        EXCEPTIONS
          OTHERS                    = 1.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename = lv_filename
          filetype = 'ASC'
          append   = c_x
        CHANGING
          data_tab = p_gt_line
        EXCEPTIONS
          OTHERS   = 1.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename = lv_filename
          filetype = 'ASC'
          append   = c_x
        CHANGING
          data_tab = gt_control
        EXCEPTIONS
          OTHERS   = 1.
    Regards,
    Ganesh.
    Edited by: Ganesh Lathi on Dec 21, 2011 8:08 AM

  • How to download a .txt file correctly. Please help as soon as possible!

    Hi everybody,
    I need to implement download that prompts the user to save a txt file.
    If I use "attachment" in response.setHeader, my IE 5.50 crashes after downloading 4 to 6 files consecutively.
    I tried to change the response.setHeader to "inline" and the response.setContentType to "application/zip" or "application/UNKNOWN", and although it works in IE 5.50, my IE 5.00 never prompts asking to save the file, it always opend the file into the browser window, and I need a prompt.
    I saw many questions related with this problem in this forum, but none that answered accurately to this problem.
    Please help as soon as possible, I dont have much time to do this.
    Thank you very much.

    Thank you gypsy617 for your reply, but it still does not work!
    I made all the changes to
    1)res.setContentType("application/x-download");
    2)res.setHeader("Content-Disposition", "attachment; filename=" + filename);
    3)OutputStream out = res.getOutputStream();
    4)returnFile(filename, out);
    5) and i sent the file content as bytes
    But the real problem is regarding the "attachment" option !!!
    In my application, in the same page, there are a lot of links that users can download, each one a link that calls a action. It works well for the first downloaded file, for the second, ..., and then, when we try to download the file number 4 or 5, IE says that there is a problem and it must close (and it asks us to send a report - something like "Exception Information Code:0xc0000005 Flags:0x00000000 Record:0x0000000000000000 Address:0x0000000077a7710a").
    I know that the problem is the "attachment" because if I choose "inline", IE never crashes. But i really need a Save As dialog, the txt files cannot be openned into the browser window, so i cant use inline.
    Any idea?
    Thank you.

  • Help! m4v video files appear and download as .txt

    We always used QuickTime .mov files and everything worked correctly.
    We are now trying to make all videos available in iPod compatible format.
    And are no able to do it correctly on iWeb.
    Video streaming works correctly.
    But I made a little JPG button for people to click and stream it, or right click and download the movie.
    This is where Safari confuses the .m4v video with a .txt file.
    Internet Explorer also doesn't work correctly.
    I tried to rename the file to .mp4, but the results are the same.
    Anybody knows how to make this work?
    The URL is www.vidacomunidadecrista.com.
    At the bottom right there's a blue text box. It's a link to the test page.
    Please try to use the "video" button with the left and right mouse buttons.
    Many thanks for your help!
    Pedro

    You should be able to get the download to work by creating a ZIP of the movie file and then creating a link to the ZIP (Link to: A file) in the "link" inspector.

  • Mpeg4 downloading as .txt

    Ihave been trying to download a QT movie file(mpeg) but it shows up in the download window as .txt.
    I have QT7pro and I'm thinking my problem is in the system prefs.
    Do I use html or udp in the transport settings?
    What mime settings should be active?

    Right-click (Control-click) and choose "Save Linked File".
    It sounds like the server (not your computer) is not properly configured to serve that file type and the author of the page didn't use the proper method to call the browser plug-in.

  • Mp4 movies download with .txt extension

    I notice others before had the same problem that was never resolved.
    the problem is that when a mp4 movie is downloaded, it results in
    a .txt extension and the browser window fills with text.
    if the file is saved to disk and the extension is removed, it
    plays just fine.
    WHAT IS THE PROBLEM WITH SAFARI AND HOW CAN IT BE CHANGED!!!
    any advice would be greatly appreciated. this seems like an unnecessary problem that should NOT exist.

    I believe that the file is identifying itself correctly.
    there is no problem with downloading the move in firefox or camino.
    the website is my own
    http://math.bu.edu/people/sf/spiralmov.html
    you can try it with any of the movies on this page.
    a friend of mine on a different computer running safari
    identified this problem.
    thanks
    stefanos

  • How do I upload/download a txt file using struts

    what do I need on my JSP page and how do I implement this functionality in an action?

    both work differently
    upload: <html:file tag (i thin) with a FormFile property in your ActionForm
    download use a servlet that uses the outputstream from hte response to send the file

  • Download to txt

    Hi,
    I broke the sdata into fields of an internal table and now i want to pass this table to a txt file.But when i pass i think he eliminates the blank spaces and when i look to the file it´s all messed up.what i want is the file to look like like a table with the headers on the top and the fields corresponding to the header allign underneath.
    Thanks,
    Ricardo

    Hi,
      A Sample program.
    DATA: BEGIN OF ITAB OCCURS 0,
            F1(4) TYPE C,
            F2(4) TYPE C,
            F3(3) TYPE C,
          END OF ITAB.
    START-OF-SELECTION.
    ITAB-F1 = 'ABCD'. ITAB-F2 = 'EFGH'. ITAB-F3 = 'IJK'.
    APPEND ITAB. CLEAR ITAB.
    ITAB-F1 = 'ABCD'. ITAB-F2 = ''. ITAB-F3 = 'IJK'.
    APPEND ITAB. CLEAR ITAB.
    ITAB-F1 = 'ABCD'. ITAB-F2 = 'EFGH'. ITAB-F3 = 'IJK'.
    APPEND ITAB. CLEAR ITAB.
    ITAB-F1 = 'ABCD'. ITAB-F2 = 'EFGH'. ITAB-F3 = 'IJK'.
    APPEND ITAB. CLEAR ITAB.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'C:\481.TXT'
       WRITE_FIELD_SEPARATOR           = 'X'
      tables
        data_tab                        = ITAB.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Sailaja.

  • Format probelm about the downloaded txt file

    I encounter a problem. after the 4.7 system upgrade to ECC6.0 ..(sandbox)
    Our report can't download the correct txt file.
    I wrote a test program.
    REPORT  ZTEST  NO STANDARD PAGE HEADING.
    write: / '123',
             / 'abc'.
    I download from menu :system->list->save_>local file: not converted.
    but  when opening the txt file , it shows:
    2008.09.09                                                                   test                                                                          1----
    123abc
    everything is in one line. and  add  the current date ..and '----
    Help.. what's the problem?
    Many thanks
    Edited by: hand consultant on Sep 9, 2008 8:13 AM

    Hi,
    Ganesh Modhave,
    It is strange problem. Because in the same computer, I downloaded the txt file from 4.6c system. And the result is OK.
    So I guess some upgrade issue result in the problem..
    I path the gui 710 to level 2.,,........ It's okey now ,thanks.

Maybe you are looking for

  • How to upload XML file from Application server.

    Hi, How to upload XML file from Application server.Please tell me as early as possible. Regards, Sagar.

  • Max Resolution - Is 16M 5312x2988 support or beyond on its way?

    Hello, I'm wondering if there are plans to add support for file resolutions of 16M 5312x2988 or beyond?

  • AP Elements that vanish

    Hello, I'm new to this program and using CA4. When I put in ap Divs to lay my page out, they show up on the AP Elements box as Div1 which I then relabel inside the Elements box. When I then try to nest them they vanish in apparently random order. Its

  • Serial no. now invalid?

    I have FC Studio 2 which I purchased for my Mac Pro. Recently, my computer wouldn't boot up so I took it to a registered Mac repair shop in my community.  It works now but I just tried to open my FCPro software, and the serial number is invalid! I ne

  • Need Help With Distiller

    We just upgraded our computers to Win 7 and Acrobate upgraded to ProX. We are using Indesign CS5. Since the upgrade I can't print to a distiller. I seem to have lost my ppds. Priting to a ps file and distilling to pdf is a requirement for printing ou