How to upload  and download a files into AL11 directory in ABAP

Hi,
               How to upload  and download a files into AL11 directory in ABAP
thanks
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Mar 21, 2011 9:18 AM

You should try one of these forums for an answer to your question:
http://swforum.sun.com/jive/forum.jspa?forumID=116
http://community.java.net/netbeans
http://linux.java.net

Similar Messages

  • How to upload and download any file from plsql through weblogic server

    hi all,
    how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
    Thanks and Regards,
    MSORA

    hi bala ,
    for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
    bye
    vamshi

  • How to upload and Download the file in a system through java programing

    I am trying to upload a file as well as want to download the uploaded file in my system....I don't have any server an all.
    I want to implement this in my system only .
    I got this code but i don't know ,where i have to make the change and what are the parameters i have to pass.
    can any one help me on this code ....please
    here some piece of code
    File Upload and Download Code Example
    package com.resource.util;
    public class FileUpload
    public void upload( String ftpServer, String user, String password,
    String fileName, File source ) throws MalformedURLException,
    IOException
    if (ftpServer != null && fileName != null && source != null)
    StringBuffer sb = new StringBuffer( "ftp://" );
    // check for authentication else assume its anonymous access.
    if (user != null && password != null)
    sb.append( user );
    sb.append( ':' );
    sb.append( password );
    sb.append( '@' );
    sb.append( ftpServer );
    sb.append( '/' );
    sb.append( fileName );
    * type ==> a=ASCII mode, i=image (binary) mode, d= file directory
    * listing
    sb.append( ";type=i" );
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    try
    URL url = new URL( sb.toString() );
    URLConnection urlc = url.openConnection();
    bos = new BufferedOutputStream( urlc.getOutputStream() );
    bis = new BufferedInputStream( new FileInputStream( source ) );
    int i;
    // read byte by byte until end of stream
    while ((i = bis.read()) != -1)
    bos.write( i );
    finally
    if (bis != null)
    try
    bis.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    if (bos != null)
    try
    bos.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    else
    System.out.println( "Input not available." );
    }

    At least that is what the code you posted suggests to me.It looks like that to me too.
    I believe that
    URLConnection urlc = url.openConnection(url);Will return you an FTP URLConnection implementation if you pass it a ftp:// url
    So for simple FTP ops, you don't need any external libs.
    Actually, looking at your code, this is already what you are doing, so I really don't get this:
    am not using FTP server..... i want to implement in my system only ....So How i will do.
    Can you give me any idea based on this code Can you explain a bit more what you need?
    patumaire

  • How to upload and download a file in server side program

    Give me a sample code for the file upload and download using Server side program.

    You should try one of these forums for an answer to your question:
    http://swforum.sun.com/jive/forum.jspa?forumID=116
    http://community.java.net/netbeans
    http://linux.java.net

  • How to upload and download files using FTP to a server(webserver) in JSP

    I have to upload and download multiple files Of(size >5 MB)using FTP to a
    Server(webserver) in JSP
    how to do that ?

    Or he could create his own tag libraries, no? :)One supposes that, technically, one could create a taglib wrapper around an existing FTP library. There might be licensing issues with distributing that taglib wrapper.
    Of course, one could find the FTP RFC online, read it, and implement one's own FTP client implementation, complete with a tag library access point.

  • Apex application file -upload and download a file.

    hi
    im having an issue with an application i created,its about uploading and downloading a file in application.the application is working and was able to upload and download a file but i have not idea there the file is stored in the application database,try to search for the file,its something dealing with the apex_application_file and i cant find it.
    Any idea where the file is stored?
    thnx
    nivesh

    Dear nivesh!
    If you upload a file into an APEX application the file is temporarily stored in the APEX_APPLICATION_FILES table. If you close your current application page the APEX_APPLICATION_FILES table will be cleared. You should create your own table to store files in a BLOB column. I've create an example for uploading images into an APEX application on apex.oracle.com. If you want to have a look at it please use the following credentials:
    Workspace: flo_demo
    Username: dev_null
    Password: password
    Application: 61811
    Yours sincerely
    Florian W.

  • Upload and Download of files

    I am working on a web site development work. I am working with STRUTS framework tht is made over the jsp tag library..Can any one help me about how to upload and download files from server and to the server.If possible using struts framework. Pls do give a pratical example..
    regards jay

    Like this:
            //upload
            String fileName = formFile.getFileName();
         Sting  destFile = "c:/upload/" + fileName;//path to save the upload file on server
         try {
                 InputStream     in = formFile.getInputStream();
              OutputStream     out = new FileOutputStream( new File(destFile) );
              int n = 0;
              byte[] buff = new byte[8192];
              while( (n = in.read( buff, 0, 8192 )) != -1 ) {
                   out.write( buff, 0, n );
              out.close();
              in.close();     
            }catch(Exception e){
            //download
            String serverFile = "c:/upload/a.txt";//file path on server to be downloaded
            File serverF = new File(serverFile);
            response.setContentType("text/html");
         response.setHeader("Content-Disposition","attachment;filename="+serverF.getFileName()+";");
         try {
             ServletOutputStream outStream = response.getOutputStream();
             FileInputStream stream = new FileInputStream(serverF);
             BufferedInputStream  bis = new BufferedInputStream(stream);
             BufferedOutputStream bos = new BufferedOutputStream(outStream);
             byte[] buff = new byte[2048];
             int bytesRead;
                try{
                 while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
                      bos.write(buff, 0, bytesRead);
             } catch (Exception e) {
                } finally {
            if (bis != null) bis.close();
            if (bos != null) bos.close();
            if (stream != null) stream.close();
         }catch (IOException e){
         }

  • How to upload a SAP request files into our PRD ?

    dear all ,
    there is a software installed on windows 2008, this software will connect to our SAP production server to collect some data.
    there is a problem within the connection, the software vendors send some files with *.E6D Extension and ask us to install on SAP production server to resolve the problem.
    the files are
    K900086.E6D
    K900096.E6D
    K900102.e6d
    R900086.E6D
    R900096.E6D
    R900102.e6d
    i think these files are are change requests copied from the transport directory from a SAP DEV server
    my question is how to upload or install these file into SAP PRD server?
    thanks in advance
    Mahmoud Younis

    Hi,
    Firstly copy the cofiles and datafiles of above mentioned requests into /usr/sap/trans .../cofiles and /data of PRD.
    Then Login to PRD in default client
    go to tcode STMS
    select the production server
    From Menu , Extras -> Other request , add each of these transport request into the import queue of PRD.
    Then run the import of these requests as per the sequence specified.
    Hope this answers your query.
    Regards,
    Deepak Kori

  • Upload and download the file same name but different extension from the document library.

    HI,
         I am using the Client Object Model (Copy. Asmx ) To upload and download the file from the document library.
    I am having the mandatory File ID for the each Document.
    I tried to upload the the document (KIF53.txt) with File ID (KIF53) uploaded successfully.
    Again I tried to Upload the document(KIF53.docx) With File ID(KIF53) its uploaded the file but it not upload the File ID in the Column
    Please find the below screen shoot for the reference.

    thanks ashish
    tried 
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder IsFolder alredy Exist.
    private string IsFolderExist(string InputFolderName)
            string retStatus
    = false.ToString();
            try
                ClientContext context
    = newClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
    context.Credentials = CredentialCache.DefaultCredentials;
                List list
    = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
                FieldCollection fields
    = list.Fields;
                CamlQuery camlQueryForItem
    = new CamlQuery();
    camlQueryForItem.ViewXml = string.Format(@"<View 
    Scope='RecursiveAll'>
    <Query>
                          <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                            </Eq>
    </Where>
    </Query>
    </View>", @"/sites/test/hcl/"
    + InputFolderName);
    Microsoft.SharePoint.Client.ListItemCollection listItems
    = list.GetItems(camlQueryForItem);
    context.Load(listItems);
    context.ExecuteQuery();
                if (listItems.Count
    > 0)
    retStatus = true.ToString();
                else
    retStatus = false.ToString();
            catch (Exception ex)
    retStatus = "X02";
            return retStatus;
    thanks
    Sundhar 

  • How to Upload and Download Files

    Dear Friends
    I want to write code for Upload and Download file ( Group of Files). Please Guide me the right way I have a few java files and i have compiled that but i donot know how to run that file and i am stranger to java also.
    Please send me reply and sugessest me.
    my email id is [email protected]
    Amogh

    I have write a upload code, but the code can deal with txt onle, it can not deal with bmp or doc, what the matter?
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Upload extends HttpServlet {
         String rootPath;
         static final int MAX_SIZE = 102400;
         public void init(ServletConfig config) throws ServletException
              super.init(config);
         public void doGet(HttpServletRequest request,HttpServletResponse response)
         throws ServletException,IOException
              response.setContentType("text/html");
              PrintWriter out = new PrintWriter (response.getOutputStream());
              out.println("<html>");
              out.println("<head><title>Servlet1</title></head>");
              out.println("<body><form ENCTYPE=\'multipart/form-data\' method=post action=''><input type=file enctype=\'multipart/form-data\' name=filedata>");
              out.println("<input type=submit></form>");
              out.println("</body></html>");
              out.close();
         public void doPost(HttpServletRequest request,HttpServletResponse response)
              ServletOutputStream out=null;
              DataInputStream in=null;
              FileOutputStream fileOut=null;
              rootPath = "C:\\upload\\tmp\\";          //The directory to save the target file.
              try
                   response.setContentType("text/plain");
                   out = response.getOutputStream();
              catch (IOException e)
                   System.out.println("Error getting output stream.");
                   System.out.println("Error description: " + e);
                   return;
         try
              String contentType = request.getContentType();
              if(contentType != null && contentType.indexOf("multipart/form-data") != -1)
                   in = new DataInputStream(request.getInputStream());
                   int formDataLength = request.getContentLength();
                   byte dataBytes[] = new byte[formDataLength];
                   int bytesRead = 0;
                   int totalBytesRead = 0;
                   int sizeCheck = 0;
                   String sourceFileName = "";
                   String targetFileName = "";
                   while (totalBytesRead < formDataLength)
                        sizeCheck = totalBytesRead + in.available();
                        if (sizeCheck > MAX_SIZE)
                             out.println("Sorry, file is too large to upload.");
                             return;
                        bytesRead = in.read(dataBytes, totalBytesRead, formDataLength);
                        totalBytesRead += bytesRead;
                   String file = new String(dataBytes);
                   dataBytes = null;
                   int lastIndex = contentType.lastIndexOf("=");
                   String boundary = contentType.substring(lastIndex+1, contentType.length());
                   //File Content
                   //out.println("File content: " + file);
                   if (file.indexOf("name=") > 0)
                        int fileNameStart = 0;
                        int fileNameEnd = 0;
                        fileNameStart = file.indexOf("filename=\"");
                        fileNameEnd = file.indexOf("Content-Type:");
                        sourceFileName = file.substring(fileNameStart + 10, fileNameEnd - 3);
                        //Source File
                        out.println("Source file: " + sourceFileName);
                   String successPage="";
                   if (file.indexOf("name=\"SuccessPage\"") > 0)
                        successPage = file.substring(file.indexOf("name=\"SuccessPage\""));
                        successPage = successPage.substring(successPage.indexOf("\n")+1);
                        successPage = successPage.substring(successPage.indexOf("\n")+1);
                        successPage = successPage.substring(0,successPage.indexOf("\n")-1);}
                        String overWrite;
                        if (file.indexOf("name=\"OverWrite\"") > 0)
                             overWrite = file.substring(file.indexOf("name=\"OverWrite\""));
                             overWrite = overWrite.substring(
                             overWrite.indexOf("\n")+1);
                             overWrite = overWrite.substring(overWrite.indexOf("\n")+1);
                             overWrite = overWrite.substring(0,overWrite.indexOf("\n")-1);
                        else
                             overWrite = "false";
                        String overWritePage="";
                        if (file.indexOf("name=\"OverWritePage\"") > 0)
                             overWritePage = file.substring(file.indexOf("name=\"OverWritePage\""));
                             overWritePage = overWritePage.substring(overWritePage.indexOf("\n")+1);
                             overWritePage = overWritePage.substring(overWritePage.indexOf("\n")+1);
                             overWritePage = overWritePage.substring(0,overWritePage.indexOf("\n")-1);
                        targetFileName = sourceFileName.substring(sourceFileName.lastIndexOf("\\") + 1);
                        targetFileName = rootPath + targetFileName;
                        //Target File:
                        out.println("Target file: " + targetFileName);
                        int pos; //position in upload file
                        pos = file.indexOf("filename=");
                        pos = file.indexOf("\n",pos)+1;
                        pos = file.indexOf("\n",pos)+1;
                        pos = file.indexOf("\n",pos)+1;
                        int boundaryLocation = file.indexOf(boundary,pos)-4;
                        file = file.substring(pos,boundaryLocation);
                        File checkFile = new File(targetFileName);
                        if (checkFile.exists())
                             if (!overWrite.toLowerCase().equals("true"))
                                  if (overWritePage.equals(""))
                                       out.println("Sorry, file already exists.");
                                  else
                                       //redirect client to OverWrite HTML page
                                       response.sendRedirect(overWritePage);
                                  return;
                        File fileDir = new File(rootPath);
                        if (!fileDir.exists())
                             fileDir.mkdirs();
                        fileOut = new FileOutputStream(targetFileName);
                        fileOut.write(file.getBytes(),0,file.length());
                        if (successPage.equals(""))
                             out.println("File written to: " + targetFileName);
                        else
                             response.sendRedirect(successPage);
                        else //request is not multipart/form-data
                             out.println("Request not multipart/form-data.");
                   catch(Exception e)
                        try
                             System.out.println("Error in doPost: " + e);
                             out.println("An unexpected error has occurred.");
                             out.println("Error description: " + e);
                        catch (Exception f) {}
                   finally
                   try
                        fileOut.close(); //close file output stream
                   catch (Exception f) {}
                   try
                        in.close(); //close input stream from client
                   catch (Exception f) {}
                   try
                        out.close(); //close output stream to client
                   catch (Exception f) {}
    }

  • How to upload and download in BLOB?

    I tried webutil but is not working properly according to my needs is there any other way to upload and download files in BLOB?
    If any body knows solution please tell me.
    Regards,

    Dear Colleague,
    In my Forms application, I use the WEBUTIL to load files into a BLOB column. However, prior to getting WEBUTIL to work, I loaded files into the BLOB column using the following PL/SQL code.
    Note, that the example assumes that the row already exists in the table and you are updating it by loading the file into the BLOB. You will also be required to first create a Database Directory object (in my case, it was called "RKMS_DOC_DIR")
    I do not have an example for downloading, as I use the WEBUTIL functionality for this.
    Good luck!
    Randy
    PL/SQL (DBMS_LOB Package): Loading an Internal Persistent BLOB
    with BFILE Data
    The following example illustrates:
    How to use LOADBLOBFROMFILE to load the entire file without getting its length first.
    How to use the return value of the offsets to calculate the actual amount loaded.
    DECLARE
    src_loc BFILE := bfilename('RKMS_DOC_DIR','ROPE_Offerte_v2.pdf') ;
    v_author VARCHAR2(10) := 'RKMS_MGR' ;
    dst_loc BLOB;
    src_offset NUMBER := 1;
    dst_offset NUMBER := 1;
    src_osin NUMBER;
    dst_osin NUMBER;
    bytes_rd NUMBER;
    bytes_wt NUMBER;
    BEGIN
    -- SELECT ad_composite INTO dst_loc FROM Print_media
    -- WHERE product_id=3106 and ad_id=13001 FOR UPDATE;
    SELECT doc INTO dst_loc FROM docs
    WHERE USER_AUTHOR_ID = v_author FOR UPDATE;
    /* Opening the source BFILE is mandatory */
    dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
    /* Opening the LOB is optional */
    dbms_lob.OPEN(dst_loc, dbms_lob.lob_readwrite);
    /* Save the input source/destination offsets */
    src_osin := src_offset;
    dst_osin := dst_offset;
    /* Use LOBMAXSIZE to indicate loading the entire BFILE */
    dbms_lob.LOADBLOBFROMFILE(dst_loc, src_loc, dbms_lob.lobmaxsize, src_offset, dst_offset) ;
    /* Closing the LOB is mandatory if you have opened it */
    dbms_lob.close(dst_loc);
    dbms_lob.filecloseall();
    COMMIT;
    /* Use the src_offset returned to calculate the actual amount read from the BFILE */
    bytes_rd := src_offset - src_osin;
    dbms_output.put_line(' Number of bytes read from the BFILE ' || bytes_rd ) ;
    /* Use the dst_offset returned to calculate the actual amount written to the BLOB */
    bytes_wt := dst_offset - dst_osin;
    dbms_output.put_line(' Number of bytes written to the BLOB ' || bytes_wt ) ;
    /* If there is no exception the number of bytes read should equal to the number of bytes written */
    END ;
    /

  • How to upload and download image?

    hi,
    can anyone send me links  how to to upload and download image to and from sever
    Here i am using amfphp,mysql,php
    i have an button and textfield.when i clicked on the button the path will be stored into database and image will be
    stored into server folder.Similarly for edit i want to display that image to end user.How to do that?

    hi,
    you need to first bring the image into your sap system.
    that you can achieve by right clicking you application and then clicking on create mime object.
    check out this link too:
    Re: how to upload an image file(or any file) in mime using file upload ui eleme
    then you have to insert an image ui element in your view.
    check out the link:
    http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
    according to you req i think you need to upload and download the image file in your system using a button. so for this you can follow the below link:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    hope this will surely help you!!!
    thanks & regards,
    punit raval.
    Edited by: punit raval on Jun 24, 2009 9:56 AM

  • To upload and download any file to the server

    Hi,
    I want to upload and download files into and from the server; as we do it in yahoo attachments. Give the location of the file, click upload, it must upload the file to the web server and click on the uploaded file, it should get downloaded. i want to do this in Application server.
    Can anyone help me on this please......
    Thanks in advance,,
    Bala

    hi bala ,
    for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
    bye
    vamshi

  • Problems with How-to upload and download

    I downloaded and followed the instruction listed on the ‘Oracle HTML DB How To Documents’ site titled - Build a file upload and download application
    I completed the exercise and am having the following problems:
    1) The one download link that is working gives me a popup to download a file named XXXX from www.XXX-YYY.net. The actual file I am trying to download is called stinger.exe. Www.XXX-YYY.net is the name of the site where the HTMLDB is loaded. XXXX is the name of the customer. I don't know where it is pulling the customer name from when I do the download. The correct file name is displayed in the file list. However, XXXX is the file named in the dowload pupup and an unrecognized file type call XXXX is downloaded.
    (Actual names are not being used.)
    2) There are two other files in the list but when I click down load for them I get ‘The Page Cannot Be Found Error’.
    Priscilla

    Thanks for responding. Lol! Seriously found this old post and decided to attempt a little bit of humor with the more recent post. Sorry did not mean to create any negative energy. Smile!!
    Do you happen to know anything about APEX in the cloud. Is it out yet?

  • Write to excel file (into AL11 directory)

    Hi,
    I am able to loop an internal table and write to csv file in AL11 directory.
    But how to write to excel file instead of csv file. And how to format the excel file (for example, column B should be format to numeric and column E should format to date format), and are we able to put like red color on column C for example?
    Thanks in advance.

    Hi,
    You need to add the tab inbetween all the fields of internal table and upload to application server using
    OPEN DATASET
    TRANSFER
    CLOSE DATASET.
    to add the tab inbetween the fields..you can use this code....
    concatenete itb-field1 itab-field2......... into string seperated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    one exception whicle uploading data to the Application server you need to convert dec or currency field to char type otherwise it will give you short dump.

Maybe you are looking for

  • JDeveloper 10.1.3 - Application Server Connection Error

    Hi When I use the connection wizard to create an 10.1.3 AS connection, I get the following error : "No OC4J process up for AS instance identified by domain: opmn-home+oc4j-<<hostname>>-<<port#>-default" OC4J - home instance is up and running fine. Tr

  • How to view the SQL statement generated during execution of the BW Query?

    Dear Experts, I am trying to retrieve data in a SAP BW Query from a Non-SAP system. I think if I am able to see the complete SQL statement that was generated when I executed the BW Query, I may be able to use it to retrieve the data. Do you know how

  • How to use SPI to read from a 12bit external Analog to Digital Converter

    Does anyone know where these docs and vis are for this project?? http://decibel.ni.com/content/docs/DOC-6233 ARM SPI Write Read.vi ARM SPI  Create Configuration Reference.vi etc..etc..

  • Using my UK iPad 2 in Australia

    Hey guys I have ordered a uk 3G iPad 2 and am hoping to use it in Australia. Does anyone know if Sydney, Melbourne and Cairns are pretty good at providing free wifi whilst I will be on the go? If I buy 30 days worth of data from O2 over here for the

  • Recording System Audio in Bootcamped MacBook Air

    I am trying to record system audio on my MBA under windows. However, there seems to be only Digital Microphone input. On my other windows, I can record input from Stereo Mix. This is for recording System Output like web radios.