Upload download files

Hi SDN,
My reqd is that i want to upload file to the application server and then download the file from <b>webdynpro ABAP.</b>
This file can be of any format eq excel,word,pdf..etc
file when downloaded also needs to be opened in the same format.
there can be two files with the same name when uploaded,( file name needs to be a combination ).
I need to get back an unique key while uploading the file.
Kindly tell me how to proceed.
Please pass any FM or sample code that will help me
TIA
Bidyut

Thanks for your reply Anuj.
We have no separate server for archiving the files.
please help
Bidyut
Message was edited by:
        Guest

Similar Messages

  • Upload/Download file to/from a document library in a SharePoint online site

    Hi,
    I am referring to the below blog for Upload/Download file to/from a document library in a SharePoint online site.
    http://blogs.msdn.com/b/rohitpuri/archive/2007/04/10/upload-download-file-to-from-wss-document-library-using-dav.aspx?CommentPosted=true#commentmessage
    I would like to know if this is feasible with a SharePoint online site.
    If feasible, how can I resolve the below exception I am getting while using the code.
    “The remote server returned an error: (403) Forbidden”.
    Thanks,
    Thanan

    Hi,
    Actually what I am trying to achieve is the two things.
    1) By using only the user's name, need to upload/download from/to the document library of SharePoint online site using the CSOM. (i.e., achieving Single Sign On / Windows Authentication)
    2) I need to achieve the above only by passing the document URL; not by hardcording/ configuring the document library name in the windows application.
    Can anyone pls help on this now?
    [Below code is working fine. But need to arrive the solution whereas the above 2 conditions are not violated.
    using (var clientContext
    = new ClientContext("https://yoursiteurl.com"))
               string passWd
    = "password";
               SecureString securePassWd
    = new SecureString();
               foreach
    (var c in passWd.ToCharArray())
                    securePassWd.AppendChar(c);
                clientContext.Credentials
    = new SharePointOnlineCredentials("username", securePassWd);
               using
    (var fs =
    new FileStream("fileName",
    FileMode.Open))
    var fi =
    new FileInfo("fileName");
    var list = clientContext.Web.Lists.GetByTitle("Doc Library");
                   clientContext.Load(list.RootFolder);
                   clientContext.ExecuteQuery();
    var fileUrl = String.Format("{0}/{1}", list.RootFolder.ServerRelativeUrl,
    fi.Name);
    Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContext, fileUrl,
    fs, true);
    Thanks,
    Thanann

  • Uploading/Downloading Files in Webdynpro ABAP

    Hello,
    I am trying to Upload/Download Files in Webdynpro ABAP using the following link:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    It works fine and the file(either .doc or .txt) gets uploaded successfully. But when I download it ,it is not able to retrieve the contents.
    May be the SAP ECC system does not work with Microsoft Office 2007.
    Please help.
    Thanks.

    I guess it has problem with .doc extension but
      .txt you can read
    and also .docx and .xlsx will provide the content
    it is only this .doc and .xls which will create problem.
    e.g. .docx after downloading will give one .zip file.
    change its extension to .doc or .docx. the content will be there.
    thanks
    sarbjeet singh.

  • Firefox crashes when uploading/downloading files from/to 'desktop folder'

    Hello
    I'm hoping, that you can help me!
    I'm using Firefox 28.0 on MacBook Pro Mavericks 10.9.2
    Firefox crashes/freezes when I try to upload/download files from/to my 'desktop folder'.
    I't only happens, when I use this folder. Download to 'download folder' or any other folder works fine.
    Download to 'desktop folder' when using Safari also works fine.
    I't only happens when desktop and firefox tries to communicate.
    It's very annoying when I accidentally forget, that the bugs is there, and I have to force quit and start all over again. And sometimes I don't even have a choice, because 'desktop' randomly opens as default folder, when I try to upload things.
    Thank you so much in advance!
    Kind regards Elizabeth

    Hi ESwan,
    I am not a Mac user so not the best person to attempt to assist but here goes.
    I am presuming that info such as
    PID: 1695 Event: cpu usage (microstackshots only)
    Relate to the Mac OS X crash & event logging and reporting.
    What we need are the ones that Firefox itself generates and submits for processing by Mozilla Firefox
    * See [[Firefox crashes - Troubleshoot, prevent and get help fixing crashes#w_get-help-fixing-this-crash]]'''#w_get-help-fixing-this-crash'''
    From what you say the crashes occur after a certain action and I am hoping that you will be able to use the easy method as in the article linked above. Navigate to about:crashes by keying ''about:crashes'' into the address bar. You are loolking for the ones starting wth ''bp-'' Paste two or three of those into your next post. Include the bp- part but not any link information before that. After they are pasted into the forum the forum software changed them to be links.

  • How to upload/download file to/from server using FiledownloadUI ?

    Hi experts,
    I don't have much experience of WDABAP. I have to upload a file  to server and then download it again. I have implemented  this functionality but I am unable to view contents of .xls/.doc/.docx/.msg file only  txt file contents are properly visible. I have used  following command to upload the file:-
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    I had  also tried this but it is throwing  exception that it can be used only for character type data.
    OPEN DATASET fname FOR OUTPUT IN TEXT MODE  ENCODING UTF-8    WITH SMART LINEFEED.  
    Thanks in advance.
    Problem Solved!
    Regards,
    Vishesh
    Edited by: Vishesh@1986 on Sep 26, 2011 7:37 AM

    I have resolved the issue myself!!!

  • Uploading & Downloading Files into DMS Server using Web Dynpro Java

    Hello Friends,
          I want to Upload a file from Portal to Document Management Server and to Download a file from Document Management Server to Portal,  In short, I want to give the user the facility to Upload a File into DMS Sever via Portal and also to download the file from DMS Sever via Portal.
      Can anybody give me a Input for the same from Both Java Development End as well as ABAP End, more inputs are required from ABAP end, since i have a very less ABAP Experience on working with DMS. Few Questions i have in my mind?
    1. How to actually access the file contents with the help of Document Number?
    2. With the help of Doc-Number we can extract the file from DMS sever but to provide a option for downloading in portal, the   RFC should convert the File Contents into X-String or is there some other way?
    +3. While Uploading the Data should be given in Which format to RFC? Are there any limitation with respect to size or formats. Is there any Standard RFC i can use directly in WD4 Java application to upload the file into DMS Server and which will return me the Document Number? +
    Please give me your valuable inputs.
    Thank You.
    Edited by: TusharShinde on Feb 21, 2011 11:13 AM
    Now, I am able to download the File in Portal via my WD4 Java Application from DMS Server by passing the Document Number, but I am facing the problem in downloading the PDF files, Its not working for PDF files. Please give me inputs for the same.
    Thank You.
    Edited by: TusharShinde on Feb 22, 2011 10:13 AM

    HI,
    Thanks for reply.
    I am able to download the file From DMS server but I am still not able to Upload the File to DMS Server via Portal. For Download also it is working for all file formats but not for PDF any specific reason for the same.
    function zhrf_rfc_dms_download_document.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(LV_DOCUMENT) TYPE  DOKNR
    *"  EXPORTING
    *"     VALUE(LV_FADA) TYPE  XSTRING
    *"  TABLES
    *"      LT_DOC STRUCTURE  BAPI_DOC_FILES2
    *"      LT_OUT STRUCTURE  ZST_DMS_FILE_XSTRING
    data: ls_docfiles type bapi_doc_files2,
             ls_dms type dms_doc_files,
             lt_docfiles type standard table of bapi_doc_files2.
    *      data: LT_OUT  type table of  ZST_DMS_FILE_XSTRING.
      data :wa_out like line of lt_out.
      select single * from dms_doc_files
        into ls_dms
        where doknr = lv_document."Retrieve file
      if sy-subrc = 0.
        ls_docfiles-documenttype = ls_dms-dokar.
        ls_docfiles-documentnumber = lv_document.
        ls_docfiles-documentpart = ls_dms-doktl.
        ls_docfiles-documentversion = ls_dms-dokvr.
    *    ls_docfiles-documenttype = '321'.
    *    ls_docfiles-documentnumber = LV_DOCUMENT.
    *    ls_docfiles-documentpart = '000'.
    *    ls_docfiles-documentversion = 'A0'.
      endif.
      call function 'BAPI_DOCUMENT_CHECKOUTVIEW2'
        exporting
          documenttype    = ls_docfiles-documenttype
          documentnumber  = ls_docfiles-documentnumber
          documentpart    = ls_docfiles-documentpart
          documentversion = ls_docfiles-documentversion
          documentfile    = ls_docfiles
          getstructure    = '1'
          getcomponents   = 'X'
          getheader       = 'X'
    *      pf_http_dest    = 'SAPHTTPA'
          pf_ftp_dest     = 'SAPFTPA'
        tables
          documentfiles   = lt_docfiles.
      data: i_bin type standard table of sdokcntbin,
            i_info type standard table of scms_acinf,
            v_info type scms_acinf,
            v_id type sdok_phid,
            v_cat type sdok_stcat.
      if sy-subrc = 0.
        loop at lt_docfiles into ls_docfiles.
          v_id = ls_docfiles-docfile.
          v_cat = ls_docfiles-storagecategory.
          call function 'SCMS_DOC_READ'
            exporting
              stor_cat              = v_cat
              doc_id                = v_id
              phio_id               = ls_docfiles-file_id
            tables
              access_info           = i_info
              content_bin           = i_bin
            exceptions
              bad_storage_type      = 1
              bad_request           = 2
              unauthorized          = 3
              comp_not_found        = 4
              not_found             = 5
              forbidden             = 6
              conflict              = 7
              internal_server_error = 8
              error_http            = 9
              error_signature       = 10
              error_config          = 11
              error_format          = 12
              error_parameter       = 13
              error                 = 14
              others                = 15.
        endloop.
        if sy-subrc <> 0.
        else.
          data: v_xstring type xstring.
          read table i_info into v_info index 1.
          call function 'SCMS_BINARY_TO_XSTRING'
            exporting
              input_length = v_info-comp_size
            importing
              buffer       = v_xstring
            tables
              binary_tab   = i_bin
            exceptions
              failed       = 1
              others       = 2.
          if sy-subrc <> 0.
          endif.
        endif.
        wa_out-file_name =  ls_docfiles-docfile.
        wa_out-binary = v_xstring.
        lv_fada = v_xstring.
        append wa_out to lt_out.
      endif.
    endfunction.
    The above is the RFC Code,  I am using in my WD4Java app for downloading the file From DMS Server, Is there any Improvement suggested for above RFC to make it work in more efficient way. Please give me input for my Upload RFC.
    Thank You.

  • How to upload & Download file in Adf using Jdeveloper 11.1.2 ??

    Hi All,
    I have just started working on Oracle ADF, Thanks a lot guys for solving our queries.
    I'm using Jdeveloper 11.1.2, How to upload and download file in ADF..?
    I have seen couple links on net but none of them worked on jdeveloper 11.1.2......
    Please Help......

    Hi guys,
    I'm able to download file in ADF using af:fileDownloadActionListener.......
    does any one knows how to upload a file using ADF???

  • HR Renewal: Client infotype with upload/download file functionality

    Hi Gurus,
    I am writing to you today cuz a client of mine asked me to adapt one of their client-specific infotype for HR Renewal. Now the old-legacy infotype was developed by someone else so I am just to adapt the functionality for decoupled infotype framework and front-end.
    The infotype has no subtype and record from 01.01.1800 to 31.12.9999 with a table-control listing all the pdf (or other format) file for a particular employee (such has income tax statement; SEPA bank account sheet; ID card etc... any kind of personal document relevant to employees). (that data is listed from a client Z table when opening the infotype; e.g. there is not sub-strucutrue in the pnnnn to  represent that information).
    upload, download and open file functionality is done via the infotype old-framework screen 2000 by some custom code merely replicated what is available by cl_gui_services.
    File are stored directly on the SAP system not using the GOS option;
    back-end stuff is more or less done and working at least I can do pretty much what I want in puit_ui tcode; read;modify... off course no file upload there
    front-end is another story; I have managed the FPM views for the infotype (dataset; biz card, etc) and also I have managed to list the existing file in the ATS list.
    However What I need still to do is to be able to upload from NWBC files to the back end system; and also download or open them. this seems to be a little harder than expected.
    I am now doubting if I should rather do a P&F FPM form based or if I can achieve what it is suppose to do? or maybe I should go back to the client and talk him through changing that infotype architecture? using subtype instead of a connection to a Z table and GOS services to store employee files seems way easier for me; but still I am facing the upload/download functional which I dont really no how to wrap around the FPM either it is ATS or GL2. I have checked indian-specific infotype 3743 has this uploading functionality (GOS) but no corresponding FPM I could inspire myself on!
    Also, not sure if I am missing something but when I try to change the value of one the field on the infotype pnnnn structure (that infty actually has one checkbox field) and save I end up with a dump because to BOL model does not find my entity (lo_entity). it s not the first infotype I am enabling for HR Renewal and I never had this error before.. I wonder what I am missing....
    Would you gurus oriente me a lil on how I should best proceed? should I rather use P&F? Your help and advise would greatly be appreciated!
    Thanks.

    Hello:
    So after some thinking through:
    - upload and download are handler by the FPM ATS feeder (client copy with enhanced options into to manage event method).
    - lo_entity without pointer causing dump occurred because I had inconsistently used the set automatic tag option into the FPM configuration floorplan editor.
    - PAOC_ASR_PERSONAL_FILE would be my recommendation but client want to follow on its own mini-dev for personal file hosting.
    Thank you gurus!

  • Safari cant upload/download files, other browsers crash

    MY Ipad 3th generation can't upload or download any files in Safari From the new Ios 8.
    This have nothing to do with Safari because other browsers like Chrome crash directly if you want to upload a file from your photo library.
    This all happened after the update to Ios 8.
    I hope that they come fast with an update.

    Hi
    I wonder if you installed any software like Speed Download ?
    http://www.yazsoft.com/products/speed-download/faqs/?how-to-un-install-speed-dow nload-properly.

  • How is the upload/download file content area implemented

    Hello all,
    I have read that one content area4s purpose is to allow users to store documents. How is it implemented? I mean,
    How can a user upload/download doc to a specific folder? Should this functionality be implemented by us or does
    Oracle Portal provide any mechanism for doing this?
    Thansk a lot

    Beatriz,
    You can specify privileges on the folder based on users/groups. I am not sure I understand "I need to restrict its access just only to add element-"
    Are you trying to ensure that people can upload docs, but not make any style changes ? Right now, if you can add a document
    , then you can also delete it.
    Also, I have listed a few links below that you might find helpful.
    http://portalstudio.oracle.com/servlet/page?_pageid=832&_dad=ops&_schema=OPSTUDIO
    http://www.amazon.com/exec/obidos/ASIN/0072222492/qid=1023990826/sr=8-3/ref=sr_8_3/002-0139635-0918453
    http://www.amazon.com/exec/obidos/ASIN/0130600377/qid=1023990826/sr=8-2/ref=sr_8_2/002-0139635-0918453
    hth
    HEllo again,
    I have found that one way to do that upload is through 'add element' -->file item in the content area.
    We have a group-defined structure and I need to restrict its access just only to add element--> Is it possible?If so, how?
    What are the privileges I have to set to allow a user to add elements in a content area? At this moment we have:
    * In the content area access tab : user X-->Administer
    *iN THE page's content area, acces tab-->Manage
    If this userX connects and tries to edit the content area--> add element, the item list shows no value it4s in empty. What
    else steps should I follow.
    I would thank any idea

  • Uploading/Downloading files

    I am currently starting/working on a project where I am using jsp/java to upload and download files. I have found beans for the upload/download, but here's my question: Does anyone have any arguments for using a file structure storage plan as opposed to using a database to store the files that are uploaded?
    I would really like to hear any arguments one way or the other.
    Thanks!

    There u go...it's on top again:)
    but, seriously, I think its a choice that u have to make. I dont see any argument supporting either side. I've done it without the database, and things work pretty well for me. In case of a database u will need to query the DB for the file and in the other case, u will need to know the location. It's all in the implementation. I could given u more on what I think..but....go figure!
    VP

  • SSL and uploading/downloading files

    When I download/upload file via HTTP and using SSL, is my attached file sent encrypted or SSL is only for message itself? In other words I download file from https://myfoo.com/myfile.txt <-- will this file be encrypted during transmission?
    Thank you.
    Andrei

    Yes the transmission is encrypted.
    SSL is about encrypting the mediumin network layer, aka the content of the tcp packets, not end to end encryption; so your file will be transmitted in an encrypted form along with other control data. But on the client side when put together you don't have to do further decryption.

  • How to upload/download file into/from blob column in ADF/JDev 11g.

    Hello to all.
    I found demo from Kuba user on that page: http://kuba.zilp.pl/?id=1
    But that demo is for release 10g and too complicated for me for this time (I'm fish in Jdeveloper).
    I can create some simple table view (of form view) with oracle connection with table with blob data.
    Blob column will content doc/xls/pdf ...etc.
    Now I can add two buttons for download and upload.
    What I have to do in next time?
    Is it possible to use some component or something?
    Thank you
    Ben

    I was able to accomplish downloading from a blob, but I'm trying to dynamically set the ContentType.
    As the table may contain different types of files, I'm setting the ContentType to #{row.Fileext}, where Fileext is set in SQL select as follows:
    pseudocode: get file extension, and set the content type based on file extension.
    sql select :decode(substr(fdv.file_name,instr(fdv.file_name,'.',-1,1)+1),'log','text/plain; charset=utf-8','xml','text/xml','xls','application/vnd.ms-excel','tif','image/tiff','jpg','image/jpeg','unknown')
    I rather use a fuction/method, and tried the following instead:
    ContentType = #{backingBeanScope.backing_processReqs.FileAttachContType}
    where FileAttachContType =
    public class ProcessReqs {
    public String FileAttachContType() {
    // code to substring filename for extension and decode values
    return strContType
    But I get the following error:
    Error 500--Internal Server Error
              javax.el.PropertyNotFoundException: The class 'sunrider.reqpoportal.view.backing.ProcessReqs' does not have the property 'FileAttachContType'.
                   at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
                   at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
                   at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    Ideas?
    PS: Kuba, I've been trying to get to your blog all day, and it would just time out.
    Thanks everyone in advance!
    -R
    Edited by: user6631964 on Jul 24, 2009 5:55 PM

  • How To Upload/Download Files in WDP from KM

    Hi folks,
    I'm developing an Web Dynpro application for Portal and using a upload and download component.
    I'd like to use the KM as a file repository. How can I send and get those files to/from KM application in Portal?
    Using: SAP Studio 2.0.9 SP9 (WDP), SAP WebAS 6.40.
    By the way, is it possible to send those files to mobile/pda using MI Client?
    Regards,
    Rogerio

    Hi Rogerio,
    see https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/tutorial on using knowledge management functions in web dynpro.htm
    Hope it helps
    Detlev
    PS: Please consider rewarding points if answers are helpful on SDN. Thanks in advance!

  • After upgrade from DW8 to DWCS6, 2 problems: uploading/downloading (file structure?)

    Hi,
    I took a big leap and upgraded from DW8 to DWCS6. Also went from MAC G5 PPC to IMAC with Mavericks.
    I transferred my site files over and set up a new site in DWCS6, pointing to the site files. No problem.
    However, I have run across two problems since then.
    1. If I open a file on the local site on the computer, it does not see the images folder. I can navigate to it and re-associate the image, but it is not automatic. I did nothing to change the structure of the local site, except move it as a whole from one computer to another. If I add an additional ../ to the SRC, then it comes up. If I then upload that page, the link still exists correctly. I don't understand the problem at all...please help!
    2. When I want to upload a local file using the put command, I get an error message, something like it cannot create a certain folder in which the file exists. However, that file already exists on the remote end. I can drag the file over and then there is no problem.
    I believe I can see that the problem is the same with both uploading and downloading, but can't quite figure out how to fix it. Any ideas? I figure this is probably common, or at least, I hope it is!
    Thanks in advance,
    Linda

    Wow, thanks so much for the super-fast reply:
    I will attach three images showing what you asked for. When I went back to check I noticed that the local files actually do seem to link up the images...it is only when I bring them down (get them) from the remote site that there is a problem...I'm embarrassed to say that I don't remember it being this way earlier, but since I have done nothing to 'heal it' it might have been....only thing I did do was piece by piece link them up on the pages on which I was working.
    Anyway, here are the screenshots. If you need more, or if they are unclear, let me know.
    I really appreciate your help. If you write back and I do not answer immediately, it is only because I am out for a while.
    Debbie
    #1 /users/Madiba/Documents/Sites/Plumsite
    #2 /Users/Madiba/Documents/Sites/Plumsite/images
    ../../images/DVD2/dvd21001m.jpg

Maybe you are looking for

  • Gnome 3.2 Locks immediately after login

    I have Arch & Gnome 3.2 installed on my Thinkpad W520. On the first login after boot(Using GDM) , the screen dims and locks as if the screensaver had been activated, and I have to type in my password to unlock it. Does anyone know how to fix this, or

  • DataGrid, itemRenderer, viewStacks

    I am using an inline itemRenderer for an image on a Datagrid which rests in a viewStack. However, if the Datagrid is not in the first index of the viewStack the itemRenderer will not load. I've tried changing the creationPolicy of the viewStack with

  • OIM 11g: Issue while evaluating rule for Role Membership

    Hello All, I have configured few General Rules using 2 of our User Defined Fields, these general rules are used to determine role membership. What we observed that once "Identity Status" attribute is set to "Disabled" for OIM User Profile then OIM st

  • XSLT output file with date

    Is there a way to change the Output settings for the Run Configuration of an XSLT file so that the output file contains a date/time string in its name?

  • Macbook Pro with the HP 2100TN

    I'm interested in running the Macbook Pro using leopard with the HP 2100TN. I've been using the Laserwriter 8 print driver via the Ethernet port using OS 9.2.2 with a Power G3. What are my options? Would I need to use OS 9.2.2 And if I need to use OS