SAP MII Upload file Jsp

I got this error. How to solve this error?
Thanks

where u write the code to upload the file
to server end?

Similar Messages

  • SAP JV upload file template

    Hello,
      Can anyone send me a template of a JV upload file to post JV's in SAP . I am new to this interface .
    Any help will be appreciated .
    Thanks

    Raju,
    I would highly appreciate if you could send me JV upload document at my email address [email protected]
    I am in urgent need of advise how to do mass upload of JV transactions.
    Thanks,
    Sheila

  • Upload file jsp code doesn't work? How can I debug

    Hi Everyone,
    I have the following jsp code that simply adds a new product to the backend database when 'Continue' button is pressed.
    if( "Continue".equals(fp.getParameter("Submit")) ) {
         fp.setParameters(prodForm);
         prodForm.setCreateBy(currentUser.getUserID());
         prodForm.save();
         String filename = fp.getFilename("file");
              if( filename != null ) {
              // a file was uploaded
              // set the path to save it
              fp.setFilePath(PHYSICAL_PATH + "uploads\\");
              // we will change the filename to make sure it is unique
              // need to keep the file type
              String fileType = "";
              try { fileType = filename.substring( filename.lastIndexOf(".") ).toLowerCase(); }
              catch( Exception e ) { fileType = ""; }
              fp.saveFile("file", "POS_" + prodForm.getProductID() + fileType);
              prodForm.setSketch("POS_" + prodForm.getProductID() + fileType);
              prodForm.save();
         db.close();
         response.sendRedirect("index.jsp");
         return;
    }The code works fine but the upload doesn't work. This is the upload part of the above code:
    String filename = fp.getFilename("file");
              if( filename != null ) {
              // a file was uploaded
              // set the path to save it
              fp.setFilePath(PHYSICAL_PATH + "uploads\\");
              // we will change the filename to make sure it is unique
              // need to keep the file type
              String fileType = "";
              try { fileType = filename.substring( filename.lastIndexOf(".") ).toLowerCase(); }
              catch( Exception e ) { fileType = ""; }
              fp.saveFile("file", "POS_" + prodForm.getProductID() + fileType);
              prodForm.setSketch("POS_" + prodForm.getProductID() + fileType);
              prodForm.save();
         db.close();
         response.sendRedirect("index.jsp");So if the file browser, <input type="file" name="file">, has a file, then it saves the file in the upload folder and saves the filename in the database. But it doesn't work, it doesn't save the file in the upload folder nor it saves the filename in the database. I am new to java and jsp so could you tell me what error checking or deguging I can do in jsp to spot the problem.
    Thanks,
    Zub

    where u write the code to upload the file
    to server end?

  • Sap mii file upload

    how to upload file using irpt page and store the file in sap mii web folder?

    hi,
    I make it working,
    This code is to get the Select file information and post to
    the transaction as input .The information is written in sap mii using the  transaction with  Write action.
    regards
    vinod

  • Using ABAP Webdynpr How to Upload File and download file in SAP R/3

    Hi SAP GURUS ,
                             I wanted to save employee profile from ESS to SAP so i am creating ESS Application .
    For that I go with BDS Approach and create test program for this  I got success while uploading file in my folder
    which i have created with the help of class and content repository . but when i Using ABAP Webdynpro , i got error FM "BDS_BUSINESSDOCUMENT_CREATEF"  message " error_kpro " .
                           Also I wanted to use KM for storage of Documents and wanted to retrive with help of ABAP Webdynpro .
                           So pls tell me / mailed me the process , approach and if you have examples .
        Thanks in Advance ,
         Vishwassap at gmail

    Hi Vishwas,
    Check out the thread [Efficient way of saving documents uploaded|Re: Efficient way of saving documents uploaded by users; and check the blog by Raja Thangamani.
    Also check the thread [Export Images through Function Modules   |Export Images through Function Modules;.
    Hope it helps you.

  • Reading File from a Desktop/ShareFolder in SAP MII 14.0

    Dear Experts,
    I have a situation where I want to read a CSV file from a source different than SAP MII server. Basic intention is to read a file from a desktop or some shared folder.
    My first doubt is- Is it really possible in SAP MII 14.0 version?
    But still I tried doing the same. Used Get File Text Loader action and text loader and provided file path from desktop which gives me an error. Here's the syntax I tried with mask as .csv:
    C://Users/XXX/Desktop
    C:\Users\XXX\Desktop
    C:/Users/XXX/Desktop
    Error I get is as follows:
    [ERROR] [Get_File_List_0]GetFileList: Access to the file path /C://Users/XXX/Desktop is not allowed
    Please advise, if it is really possible in MII 14.0 . If yes, Am I missing any steps?
    Regards

    Hi Kirti
    To read/load a file from your desktop you will need to execute some form of client side program like HTML or JS or applets. MII Transactions run on the MII server and would point to the Server's C:/ if the server has such a folder. Usually users do not have access to C drive of servers. Hence you see the error.
    You will need to write some program that executes on your desktop and pulls the file from your system and then posts to the server.
    Regards
    Partha

  • How to list the uploaded files  in jsp

    hello every body .
    I wanted to request to plese let me know the method as to how get the uploaded files on the server to a jsp page . i am able to upload the files but not able to get those files listed on the web page . please help me ...........

    i tried this also and it didn't wok instead my page got filled with these lines
    The file named CSAJSP-Chapter12.pdf is successfully uploaded [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0
    . I am not able to make out any thing . plese  suggest me  some solution                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Display uploaded file on JSP page

    Hi All,
    I want to display uploaded file in JSP.
    Initially I am displaying File Name after saving the file & click on edit link.
    i.e on JSP Page I have File Upload component & save button.With that save button I am saving my file to databse.
    So when I click on edit link I am getting that file name from Databse then I am displaying it.
    But now I want to display uploaded file name on JSP page before saving to databse.i.e I will have browse & Upload button.When I click on browse button I will open window from where I will select file.
    This is working fine as,<x:inputFileUpload id="uploadfile" value="#{errorLotBean.file}" storage="file"></x:inputFileUpload>
    But when I click on upload button that uploaded file should be displyed there only.Can anyone please tell me how to do this ?
    Thanks
    Sandip

    Thanks a lot Siefert,
    I tried the way mentioned in URL.
    But what if I want to display all uploaded file on my screen.
    i.e. If user click on browse & select File A then click on upload button.
    (Here the File A will be displayed) with code
    <h:outputtext value="#{benaName.file.name}"
    But what if after displaying File A if user decide to upload another file File B.
    How to display that ?
    with <h:outputtext value="#{benaName.file.name}" its dispalying one file only.
    Thanks
    Sandip

  • Upload file form problem in JSP portlet !!!

    Hi!
    I use "OrdHttpUploadFile" class for upload file in JSP portlet to database!
    Problem is that this class must use FORM ENCTYPE="multipart/form-data" whis I suppose dont work in portlet!?
    Which FORM ENCTYPE should I use in portlet! Or there is some other solution for upload file in JSP portlet!?
    Thanks!
    Kristjan

    Thanks for u r reply Mr.Prasad.
    Sorry for the delay for reply.
    My scenario is in 2 phases
    Phase 1. I am taking input from the front end using jsp and writing the contents in to a file and then downloading that file on to my desktop.(Now let us say this one as file downloading)
    Phase 2. Now I had designed a page,which locates the downloaded file by using the following tag.
                        <td><input type ="file" name ="xmlFileName"></td>
        In the downloaded xml file I am having applicationid. I am checking whether the application id already xists in the database (or)not.
    If already exists in the database , the end user will get one confirmation msg,saying application already exists in the database.
    If the user clicks ok again the request has to go to the servlet.
    Now the actual problems are
    1. When I locate the file on the desktop let us say c:\desktop\krish and click on submit button, it is locating to the file that is present in the server(this is the case for the first time means before checking the application id in the database).
    2. when the end user clicks "ok" on the confirmation box , I am not getting the file name,that has to be submitted to the servlet.
    Can u plz help me how to resolve this issue.
    regards,
    Krish

  • Upload file in JSP with Oracle Database 10gR2

    How to upload file with oracle database 10gR2??
    i can't find how to upload..
    i've tried to create a procedure in oracle and execute in netbeans but the file save in directory and then from directory save to database.
    it means the file save in 2 location, in directory and database..
    does anybody know how to save file direct from the JSP file into database without save in directory?
    this is the procedure..
    create or replace PROCEDURE load_file (
    p_id number,
    p_photo_name in varchar2) IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename('DIR_TEMP', p_photo_name);
    -- insert a NULL record to lock
    INSERT INTO temp_photo
    *(id, photo_name, photo)*
    VALUES
    *(p_id , p_photo_name ,EMPTY_BLOB())*
    RETURNING photo INTO dst_file;
    -- lock record
    SELECT photo
    INTO dst_file
    FROM temp_photo
    WHERE id = p_id
    AND photo_name = p_photo_name
    FOR UPDATE;
    -- open the file
    dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
    -- determine length
    lgh_file := dbms_lob.getlength(src_file);
    -- read the file
    dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
    -- update the blob field
    UPDATE temp_photo
    SET photo = dst_file
    WHERE id = p_id
    AND photo_name = p_photo_name;
    -- close file
    dbms_lob.fileclose(src_file);
    END load_file;

    Well your Oracle procedure is designed to load a file, so that's what it does. If you want it to load from a data stream such as an upload, you need to rewrite it accordingly.
    So far this is not a Java question at all.

  • Need to send mail & upload files using JSP

    hi, got a lot of issues,.. just starting out as a developer.. so here goes.
    1st Need to send mail & upload files to server using JSP(tomcat).. an example to demo it would be nice.
    thanx in advance

    Look at this for email:
    http://forum.java.sun.com/thread.jspa?forumID=45&threadID=285950
    and go to:
    http://servlets.com/cos/
    for a package to upload files.

  • Question about upload file to sever in jsp.

    i found some articles about upload file in jsp, and most of suggested that the third party classes will be used.
    but i want to know the basic technology behind them, for example what kind of class needed ( using java.io.* as usual)
    and what the process for writing a file to sever.
    any document or url link useful will be very welcomed.
    best regards

    Uploading a file is similar to sending any other kind of data, except that it must be encoded differently than a standard HTML form... Typically you will set up your form like this:
    <form action="/upload" enctype="multipart/form-data" method="POST">
    <input type="file" name="myFile">
    </form>
    The enctype declaration is necessary -- your file won't arrive intact any other way. However, the JSP/Servlet specs don't provide any code to deal with forms which are encoded this way, so things like request.getParameter() don't work. You will either have to roll your own code, or use a third party library.
    For more information, see RFC 1867, File upload in HTTP:
    http://www.faqs.org/rfcs/rfc1867.html

  • Upload Files into SAP Office Folder in Background

    Hi All ,
    Has anyone tried uploading file(s) of any type say *.XLS , *.PDF to SAP office folder (Outbox) in the background . I am using the function module  'SO_DOCUMENT_REPOSITORY' with methods "SAVE" , "ATTCREATEFROMPC" and "SEND" . It works fine in foreground without any errors . But when tried to schedule in background , the job stops at the method call "ATTCREATEFROMPC" and gives a message  "Database error for <INSERT INTO KPRO> " . It looks like the uderlyiong function module checks for an active GUI and fails during background .
    Any thoughts or other solutions would be appreciated ....
    Thanks

    Hi,
    I think ATTCREATEFROMPC method is for loading the file from frontend PC. It is bound to fail if you run it in background since there is no SAPGUI running it and it can't know the location.
    You will need to use some other method to be able to read the files from the APP server, and have your documents on the APP server if you want to run your code in the background.
    cheers,
    Ajay

  • Upload file using jsp

    hi all i am trying a code that uploads file to the server using jsp the code goes like this
    <%@ page import = "java.io.*" %>
    <%
    String contentType = request.getContentType();
    String file = "";
    String saveFile = "";
    FileOutputStream fileOut = null;
    if((contentType!=null)&&(contentType.indexOf("multipart/form-data")>=0))
       DataInputStream in = new DataInputStream(request.getInputStream());
       int formDataLength = request.getContentLength();
       byte dataBytes[] = new byte[formDataLength];
       int byteRead = 0;
       int totalBytesRead = 0;
       while(totalBytesRead<formDataLength)
          byteRead = in.read(dataBytes,totalBytesRead,formDataLength);
          totalBytesRead +=byteRead;
       try
          file = new String(dataBytes);
          saveFile= file.substring(file.indexOf("filename=\"")+10);
          saveFile = saveFile.substring(0,saveFile.indexOf("\n"));
          saveFile =
          saveFile.substring(saveFile.lastIndexOf("/")+1,saveFile.indexOf("\""));
          int lastIndex = contentType.lastIndexOf("=");
          String boundary =
          contentType.substring(lastIndex+1,contentType.length());
          int pos;
          pos = file.indexOf("filename=/" +1);
          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;
          int startPos = ((file.substring(0,pos)).getBytes()).length;
          int endPos =
          ((file.substring(0,boundaryLocation)).getBytes()).length;
          String folder = "07ics01/jsp/"; //is this the folder where i intend to save the file?
          fileOut = new FileOutputStream(folder + saveFile);
          fileOut.write(dataBytes);
          fileOut.write(dataBytes,startPos,(endPos-startPos));
          fileOut.flush();
       catch(Exception e)
          out.println(e);
       finally
          try
             fileOut.close();
          catch(Exception err)
    %> i have been trying to use this code but i can't understand the code. is String folder = "07ics01/jsp" the folder where i intend to save the page on the server? because when i do that i get an exception like
    java.io.FileNotFoundException: 07ics01/jsp/C:\Documents and Settings\s9sharma\Desktop\tt\commons-digester-1.8\commons-digester-1.8.jar (No such file or directory) where C:\Documents and Settings\s9sharma\Desktop\tt\commons-digester-1.8\commons-digester-1.8.jar is the file i am trying to upload to the directory 07ics01/jsp which is a unix directory.
    Can anyone please help..

    So you've copypasted this code from somwhere and are expecting our support on the code, instead of the author's support? That's sad.
    I recommend you to look to the Apache Commons FileUpload API [1]. Then you don't need to write (or copypaste) a multipart parser yourself. Putting business logic in JSP files is also bad practice by the way. Use Java classes for it instead (Servlets, Filters, Beans, Utilityclasses, etc).
    [1] http://commons.apache.org/fileupload/
    To understand the actual code, it might help a lot to first read and understand the HTML spec about multipart request data and read the API documentations of the Java classes involved, e.g. the java.io API.

  • Universal Data Server or SAP MII UDS 4.0 installation files

    Hello Guru
    I am new to SAP MII and trying to install and configure MII 12.0.12 on Maxdb.Win2k3 ,NW7 ...Where do i download the Universal Data Server or SAP MII UDS 4.0 installation files?
    thanks

    managed to fid the download link on swdc

Maybe you are looking for