Upload/download

Hi Everybody
Plz tell me when do we use ws_upload/download and in which case we use gui_upload/download
and also whatz the additional function provided by gui_upload over upload
THanks

HI
GOOD
GO THROUGH THIS
WS_UPLOAD functions to upload data from PC to SAP
Declare upload format
DATA: BEGIN OF ITAB OCCURS 0,
                  PLANT(2)               TYPE C,
                  MATERIAL(18)       TYPE C,
DATA: END OF ITAB.
PARAMETERS:  F-FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\TEMP\FILE.TXT'..
FILETYPE ->    'BIN' OR 'DAT' OR 'ASC' OR 'IBM' OR 'WK1' OR 'DBF' OR  'SPL' OR 'TRU'.
call function 'WS_UPLOAD'
  EXPORTING
    FILENAME                      = F-FILE
    FILETYPE                      = 'DAT'
  tables
    data_tab                      = ITAB
  EXCEPTIONS
    FILE_OPEN_ERROR               = 1
    FILE_READ_ERROR               = 2
    NO_BATCH                      = 3
    GUI_REFUSE_FILETRANSFER       = 4
    INVALID_TYPE                  = 5
    OTHERS                        = 6.
DOWNLOAD download a file to the presentation server (PC)
Download internal table to presentation server file(PC)
  DATA: ld_filename TYPE string,
Pre version 4.7 declaration e_file like rlgrap-filename.
  DATA: begin of it_datatab occurs 0,
  row(500) type c,
end of it_datatab.
  call function 'GUI_DOWNLOAD'
       exporting
            filename         = ld_filename
            filetype         = 'ASC'
       tables
            data_tab         = it_datatab[]
       exceptions
            file_open_error  = 1
            file_write_error = 2
            others           = 3.
  Download internal table to presentation server file(PC)
  Separating fields/columns by a tab
  DATA: ld_filename TYPE string,
Pre version 4.7 declaration e_file like rlgrap-filename.
  DATA: begin of it_datatab occurs 0,
  col1(50) type c,
  col2(50) type c,
  col3(50) type c,
      etc....
end of it_datatab.
  CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
        filename         = ld_filename
        filetype         = 'ASC'
      APPEND           = 'X' 
        write_field_separator = 'X'
      CONFIRM_OVERWRITE = 'X'
   TABLES
        data_tab         = it_datatab[]
   EXCEPTIONS
        file_open_error  = 1
        file_write_error = 2
        OTHERS           = 3.
THANKS
MRUTYUN

Similar Messages

  • File Upload/Download Problem

    Hi,
    I have a fileupload button. The attributes type is XSTRING, which i bound it with "data" property of download.
    When i download this file with "download" element, it comes in a zip file and as XML files. Only the jpg files are downloaded correctly.
    How can i solve this?
    Thanks.

    Hi,
    I am so sory for my very late answer.
    If you want to upload/download files, you should have a node which includes attributes
    (attribute names are just example ):
    1) filename(type: for example afilename),
    2)mimetype (type : string),
    3) file(type : a data element with type 'RAWSTRING').
    You must match your fileupload element's attributes with them:
    "DATA" attribute --> file ,
    "fileNAME" attribute--> filename,
    "mimeTYPE" attritube -->mimetype.
    When you want to download this file, you should put a filedownload element and match this element's attributes with the node's attributes which i described above.

  • Is there a way to upload/download photos anonymously?

    Is there a way to anonymously upload/download photos to the web without any sort of identification?
    For example, if I'm using something like TOR to browse, and I find an icon on a site or Google Images that I want to use as my avatar for a social networking site, can I "Save As" from my TOR browser and download that image anonymously to my computer's desktop? Or does my information leak when I save to my computer?
    ...and then, in turn and perhaps more importantly, how do I upload that photo as my social network photo/avatar without any sort of identifying source tag or whatever from my computer?
    When I attempt to upload a photo to the site, it keeps showing something like /Users/[iMacUserName]/Desktop
    Is there any way to do this anonymously?
    Would having something like a VPN be more useful than TOR in this situation?
    I'm new to all this, so I'd really appreciate any information possible. If it makes more sense to send an IM or private email, please feel free to contact me that way as well.
    Any recommendations for a great VPN to use with mac would be great too.
    Thanks so much in advance for your time.

    The image isn't anything dirty, nor is it necessarily copyrighted... I mean, it's a photo still from a movie I like that I wanted to use as my avatar photo. So I suppose technically it's copyrighted, but I'm not trying to pass it off as really being me, or mine. I see people using that kind of thing for avs all the time.
    I guess what I'm trying to say is that I'm not worried about the image I'm using, I'm worried about other users on the site being able to somehow find out that the image was uploaded from my computer (IP address, location, etc)
    Like, could the admins at a social networking site see that the image was uploaded from my computer?
    When I prompt the "upload" it only gives me the option to directly upload it from my computer, and as I said in my OP, it comes up with my iMac computer ID or whatever as the source of the file. (In the upload bar). Once I upload it, I think this information disappears, as I've tried to inspect other users avatars and it says owner info is private... but can the admins see WHERE the photo was uploaded from?
    Does something like TOR block this? Or do I need something else? I tried to do some research on it and found another user asking a similar question and someone responded saying they needed to tunnel it or something?
    Again, I'm not asking this b/c I'm trying to upload some inapropriate photo, but because this site is very strict about multiple accounts, and I have another account there that I'm not ready to delete yet. I just want to have a second, 100% anonymous account. (and feel I should also put it out there that it's not to do anything illegal or harmful to anyone either) just for me.
    Thanks again for any more answers on this.

  • 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

  • File Upload/Download

    Hi
    When using the file upload/download functionality, APEX stores the uploaded object in a table by default. See: http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CJAHDJDA
    Is there a way to specify that the file should NOT be stored in a table, but rather, be stored on the file system?. Example in a directory object location.
    I intend to use the upload/download functionality to load csv files that will then be parsed as external tables.
    Thanks
    Kezie

    Hi,
    I modified the above procedure to point to my tables and trying to create the procedure in Apex database and am getting the following error:
    Procedure:
    CREATE OR REPLACE PROCEDURE write_blob_to_file
    ( p_docid IN NUMBER,
    p_directory IN VARCHAR2,
    p_filename IN VARCHAR2 DEFAULT NULL )
    IS
    l_file utl_file.file_type;
    l_buffer RAW(32767);
    l_amount BINARY_INTEGER := 32767;
    l_position INTEGER := 1;
    l_blob BLOB;
    l_length INTEGER;
    l_filename VARCHAR2(400);
    BEGIN
    SELECT BLOB_CONTENT, MPP_name
    INTO l_blob, l_filename
    FROM MPP_FILES
    WHERE id = p_docid;
    IF p_filename IS NOT NULL THEN
    l_filename := p_filename;
    END IF;
    l_length := dbms_lob.getlength( l_blob );
    l_file := utl_file.fopen( p_directory, l_filename, 'wb', 32767 );
    WHILE l_position < l_length LOOP
    dbms_lob.read( l_blob, l_amount, l_position, l_buffer );
    utl_file.put_raw( l_file, l_buffer, TRUE );
    l_position := l_position + l_amount;
    END LOOP;
    utl_file.fclose( l_file );
    EXCEPTION
    WHEN others THEN
    IF utl_file.is_open( l_file ) THEN
    utl_file.fclose( l_file );
    END IF;
    raise_application_error( -20001, SQLERRM );
    END write_blob_to_file;
    Error:
    ERROR at line 6: PLS-00201: identifier 'UTL_FILE' must be declared
    4. p_filename IN VARCHAR2 DEFAULT NULL )
    5. IS
    6. l_file utl_file.file_type;
    7. l_buffer RAW(32767);
    8. l_amount BINARY_INTEGER := 32767;
    Please let me know what am i missing. I am pretty new to PL/SQL and Apex.
    Also wondering is there a way to download files from tables using Java Stored Procedure. Please give some pointers.
    Ramesh K

  • Unable to upload/download large html files(71 MB) into  rooms

    Hi,
        I am unable to upload download HTML file(71 MB)into folders of collabration rooms.if it is uploaded also its getting Scripted/corrupted.
    other files are working properly.
    Is it because of large size or any other configuration settings.there is no error msg buts its getting scripted.
    Waiting for your response
    Thanks
    Amit kumar Koyal

    Hi Kerstin,
    the note also says: "This restriction is no longer valid".
    With SP19 I do run tests continously that test content up to 2GB.
    Amit: What portal version are you running? What repository implementation is the file stored in? If the file is stored in a file system, what is it's file size limitation?
    Regards,
    Michael

  • Upload / Download document to KM Content Server from WebDynpro Application

    I have a requirement where I need to upload / download document into / from KM Content Server from my WebDynpro Application.
    Is it technically possible and if Yes, can I get any Sample code for this.

    Hi Tahzeeb,
    first of all i would point you to the JavaDocs for KMC API.
    https://media.sdn.sap.com/javadocs/NW04/SPS15/km/index.html
    And here is a small example of reading and storing KM resources.
    For reading:
         * Returns a resource as an InputStream from the KM repository
         * at the given path. The IUser is needed for authorization.
         * @param user      IUser for checking authorisation.
         * @param resPath   Path to the KM resource.
         * @return          Requested resource as a stream.
        private InputStream getKmResource(final IUser user, final String resPath)
            throws ResourceAccessException {
            try {
                final IResourceFactory factory = ResourceFactory.getInstance();
                final RID rid = RID.getRID(resPath);
                final IResource kmResource =
                    factory.getResource(
                        rid,
                        new ResourceContext(getDeprecatedIUser(user)));
                if (kmResource == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                return kmResource.getContent().getInputStream();
            catch (WcmException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
    And for writing:
         * Stores a resource in the KM repository at the given path with the given name and mimetype.
         * Content is taken from the given inputstream.
         * @param user          IUser for checking authorisation.
         * @param resName   Name of the resource
         * @param resPath     Path to the resource
         * @param mimeType MimeType of the resource
         * @param inputStream  Resource content
         * @throws ResourceAccessException
        private void putKmResource(
            final IUser user,
            final String resName,
            final String resPath,
            final String mimeType,
            final InputStream inputStream)
            throws ResourceAccessException {
            try {
                final ResourceContext rContext = new ResourceContext(getDeprecatedIUser(user));
                final RID rid = RID.getRID(resPath);
                final ICollection kmCollection =
                    (ICollection) ResourceFactory.getInstance().getResource(rid, rContext);
                if (kmCollection == null) {
                    throw new ResourceNotFoundException(
                        "KM resource not found: " + resPath,
                        resPath);
                else {
                    IContent kmContent = new Content(inputStream, mimeType, -1);
                    IResource kmResource = kmCollection.createResource(resName, null, kmContent);
            catch (ResourceException e) {
                throw new ResourceAccessException("Error accessing KM resource: " + resPath, e, resPath);
            finally {
                try {
                    inputStream.close();
                catch (IOException e1) {
                    throw new ResourceAccessException("Error closing InputStream when accessing " + resPath, e1, resPath);
    Hope that helps for a start.
    Best regards,
      ok

  • File upload, download using ADF UIX and not JSP

    I have examples for the file upload, download using JSP
    But I want to use ADF UIX. Look and feel in this is impressing and I want to use this. Any one have example for this.
    Users will select a file from their desktop
    This will be stored into the database (Any document. Word, Excel)
    When they query the records then the UIX column need to give a hyperlink. Clicking on the link should prompt to download the file to the local system

    Sure, I use the Apache Commons File Upload package, so that is what I will discuss here ( [Commons File Upload|http://commons.apache.org/fileupload/] ).
    The Commons File Upload uses instances of ProgressListener to receive upload progress status. So first create a simple class that implements ProgressListener:
    public class ProgressListenerImpl implements ProgressListener {
        private int percent = 0;
        public int getPercentComplete() {
            return percent;
        public void update(long pBytesRead, long pContentLength, int pItems) {
            if (pContentLength > -1) { //content length is known;
                percent = (new Long((pBytesRead / pContentLength) * 100)).intValue();
    }So in your Servlet that handles file upload you will need to create an instance of this ProgressListenerImpl, register it as a listener and store it in the session:
    ServletFileUpload upload = new ServletFileUpload();
    ProgressListenerImpl listener = new ProgressListenerImpl();
    upload.setProgressListener(listener);
    request.getSession().setAttribute("ProgressListener", listener);
    ...Now create another servlet that will retrieve the ProgressListenerImpl, get the percent complete and write it back (how you actually write it back is up to you, could be text, an XML file, a JSON object, up to you):
    ProgressListenerImpl listener = (ProgressListenerImpl) request.getSession().getAttribute("ProgressListener");
    response.getWriter().println("" + listener.getPercentComplete());
    ...Then your XMLHttpRequest object will call this second servlet and read the string returned as the percent complete.
    HTH

  • Urgent : file upload / download functionality in oracle portal page

    Hi friends
    I am new to portal development and am working on oracle portal 9i rel2 . I need to know how to put the file upload and download functionality in any page. the functionality given in oracle portal user guide is not user friendly (i.e in the content area add item of type file" ) .... i need to now is their any way to achieve the simple , one button click upload download functionality ..like we do in yahoo mails etc.
    any help will be highly appreciated.
    regards
    Dheeraj

    Well, I do not know the exact location of the document, however you can find the document to do this in modplsql User Guide ..(File Upload/Download).
    I am pasting some hint:
    e.g.
    Create an html form..code something like this:
    <html>
    <head>
    <title>test upload</title>
    </head>
    <body>
    <FORM      enctype="multipart/form-data"
    action="pls/mydad/write_info"
    method="POST">
    <p>Author's Name:<INPUT type="text" name="who">
    <p>Description:<INPUT type="text" name="description"><br>
    <p>File to upload:<INPUT type="file" name="file"><br>
    <p><INPUT type="submit">
    </FORM>
    </body>
    </html>
    Create a table
    (who varchar2(..).
    description varchar2(..),
    file varchar2(..));
    Your procedure something like this:
    procedure write_info (
    who in varchar2,
    description in varchar2,
    file in varchar2) as
    begin
    insert into myTable values (who, description, file);
    htp.htmlopen;
    htp.headopen;
    htp.title('File Uploaded');
    htp.headclose;
    htp.bodyopen;
    htp.header(1, 'Upload Status');
    htp.print('Uploaded ' || file || ' successfully');
    htp.bodyclose;
    htp.htmlclose;
    end;
    You should be able to download/access the file using the following URL format:
    http://<host>:<port>/pls/<dad>/docs/<file_name>
    Where file name is = Look for the value in the "myTable" > file.
    Do tell how you get on this.
    Thanx,
    Chetan.

  • How to create a service to UPLOAD / DOWNLOAD and send emails with files?

    Good afternoon!
    I need to create a service that sends files via email or FTP, and a service to upload / download files on a server.
    I see on the internet does not have much aid to make it in the ADF.
    Could someone send me some links, documentation, so I can get the job done?
    Thank you,
    Lewis.

    "I see on the internet does not have much aid to make it in the ADF."  - You are kidding - do you?!
    1) Google: ADF Faces file upload
    2) Google: ADF Faces image download
    3) Google: ADF send mail
    I get all the relevant hits (documentation and blog entries) by using these 3 queries in Google.
    If you mean "Web Service" by "Service" then better - just Google for Web Service and image handling to find information on this. You don't use ADF to build Web Services, which is why you need to express your search criteria different
    Frank

  • How to upload/download to blob using ADF-toplink?

    I am using ADF-toplink,i tried upload to blob using some of the code given in the ADFBC upload/download application...IT WORKED... but download is not working...I want to know some better method for both uploading and downloading... IN ADF-TOPLINK only......

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

  • File Upload/Download storing in ECC

    hi Guys,
    Using webdynpro abap application I am uploading a file.I want to store this file in the backend database(R/3). I am not able to stroe the Xstring value to the table.
    So I have made my table with field with  data type as string.
    Is there an standard function module to convert Xstring to String.
    Because in another webdynpro application I want to download the file which was uploaded so we require a function module to convert string to xstring again.
    Tell me how to store the Xstring data of the file to database tabel and agian download it.
    Regards,
    Shamila.

    Hi,
    Chek this standard document
    http://help.sap.com/saphelp_nw70/helpdata/EN/b3/be7941601b1d09e10000000a155106/frameset.htm
    Also check these forum threads
    Re: download a file
    File Upload/Download
    File download in Local PC
    Re: File Download to Excel
    for file upload control you can look at WDR_TEST_EVENTS component

  • What file size is used for "optimized" upload/download?

    When I upload my photo files from Aperture (and previously from iPhoto) I routinely use the upload setting named "dowloading of optimized" files.  I know that this downsizes the files for faster upload/download, but still gives a file size acceptable for great onscreen presentation and for a resulting small print of someone downloads.  Can anyone tell what downsizing Aperture/iPhoto does in this case?  For example, 50% jpeg, email sized jpeg, etc.  Since Apple will kill the MobileMe galleries in June I have to switch to another photo presentation host.  For upload to such a host Aperture/iPhoto gives choices like 100% jpeg, 50% jpeg, etc.  What I want to do is end up with something similar to what I now get with the "optimized" setting.  Thank you.

    You will note that I referenced both programs (iPhoto & Aperture) in my original message above, and I have posted in both forums.  Since both programs offer the same (at least on the surface) option of "optimized" to MobileMe galleries, one might assume that both use the same or a similar system.  Lengthly testing of my own is the "best" solution only if I can not find anyone who is knowledgeable about what these programs do in the upload.  It has been my sincere joy over many many years that I often find people on these forums who possess knowledge much greater than I.  As to the programs changing the algorithum at any time, I doubt that since this MobileMe function will disappear in June.  Seems like a strange time to make changes. 

  • File upload & download through web Dynpro

    Hai All,
         Now i am working in webDynpro 2.0.9. For file upload
    and download through webdynpro "resource" is used.But in my webdynpro version 2.0.9. "resource" is not possible.so tell me how to upload & download by using this version & what is the alternative way for this.
    Thanks in advance.
    Kindly Regards,
    s.v.selva bala

    HI,
    Try out this code :
    FileInputStream is = new FileInputStream(file);
          long length = file.length();
          byte[] bytes = new byte[(int)length];
          long bytesRead = is.read(bytes);
          if (bytesRead < length)
           throw new IOException("Could not completely read file "+file.getName());
          is.close();
    element.setDocumentContent(bytes);
    Create a context attribute of binary type and assign the read data to it and bind the dataSource property of your File Upload and Download properties to this context Attribute.
    Regards
    Sid

  • Upload Download How To

    I have followed the Upload and Download Files in an Application How To.
    I can upload files into the application but I cannot download.
    When I click on the download link, the full URL appears in the address bar at the top of the screen, but the file does not open.
    Any ideas
    Gus

    Hi Gus,
    I had the same issues after following the upload/download document, and finally after much hunting around i followed the following:
    - You need to create the following function in the schema FLOWS_020100,
    - the function has to be written in upper case
    - and prefixed with the schema the procedure runs in (for example, when you use the function in the schema HR, please change accordingly):
    log as system
    alter session set current_schema=FLOWS_020100;
    create or replace function FLOWS_020100.wwv_flow_epg_include_mod_local(procedure_name in varchar2)return boolean
    is
    begin
    if upper(procedure_name) in ('YOUR_SCHEMA.PROCEDURE_NAME') then
    return TRUE;
    else
    return FALSE;
    end if;
    end wwv_flow_epg_include_mod_local;
    for more information on this function, follow:
    ref: showing blob content (mime type image/jpeg) in reports cloumn
    http://daust.blogspot.com/2006/04/xe-calling-stored-procedures.html
    So, the mistake i was making was creating the function without putting FLOWS_020100 before wwv_flow_epg_include_mod_local, meaning that the function was created in the schema that i found myself in when creating (System account), and not in FLOWS_020100
    It's quite late, but i hope this helps
    jed
    if you can think of a good synonym for "following", please advise...

  • 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!

Maybe you are looking for