File Upload in Web Dynpro

Hi all,
I need to upload file from user local computer into Web Dynpro context, but standard FileUpload component doesn't look very "attractive" to me. There are 3 main reasons:
1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....
2. don't know how to specify custom file types in showed FileChooser  (predefined are AllFiles, Pictures, HTML)
3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )
How can I eliminate these minuses, or is here alternative solution for file uploading file in WD? My customer environment is NW 2004.
Regards,
Juraj

Dynpro UI elements has limitations. But we can use them the way we want within these limitations.
1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....
If there is a fixed place to hold the documents, we can prefix the path upto the filename.
2. don't know how to specify custom file types in showed FileChooser (predefined are AllFiles, Pictures, HTML)
we can get the MIME type from the resource. And further processing can be restricted.
3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )
I Agree that we can't change "Browse", but still we can have the orientation, if your browser is Arabic, it got aligned at right hand side.
thread:
nikhil
Edited by: Nikhil ßos on Jul 3, 2008 1:07 PM

Similar Messages

  • File Upload in Web Dynpro ABAP not using File Upload UI element

    Hi all ,
    I have searching for a way to upload a file using the file open dialog ( or even by manually specifying the path/file name) without using the file upload UI Element in ABAP web Dynpro . The  File Upload UI element works for smaller files however with large file sizes 64 MB , the system seems to be running of memory (SYSTEM_NO_ROLL) . This is due to a known fact that the UI element makes a duplicate copy of the whole copy while it does the upload.
    I have been looking at the ACFUPDOWNLOAD as a way to solve this problem but cannot seem to figure out how it works , even the sample program  provided  by SAP does not work. I am working with a regular abap server and not kpro( knowledge mananagement provider)  or portal .
    Any help would be greatly appreciated.
    thanks,
    Ali.

    If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands.  ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver.  Here is an eLearning on the topic:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    and source code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
    If you want an eLearning on the FlashIslands approach, you can find it here as well:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
    and Source Code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
    However in both of these approaches you still have to be careful with how you handle large files.  The problem is that they are processed often a single binary string.  This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded.  In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files.  This feature doesn't come until later this year, but if you are interested you can learn about it here:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8

  • F4 help popup to browse file path in web dynpro

    I need F4 help popup to browse file path in Web dynpro (for example C:\dir\file.xls). Popup should come like FM "F4_FILENAME" in report programming.
    Am i need to create another window or is there any other standard functionality there for this help.
    Please give your view to achieve this.
    Thanks
    Gokul

    Hello Arun & Abhi,
    File upload UI element has showing File browse pop up. But i want to download file from an internal table to Excel. User need to give file path so that the directory selection needs to be done. And also the user will select the directory and type the file name (File so far not exist) for download.
    If i add UI element 'File Download' I am getting a link and i cant browse directory and give file.
    Give your suggesions.
    Thanks
    Gokul

  • Excel Upload in Web Dynpro

    Hi all
    I have got a requirement wherein i need to upload excel in Web Dynpro.
    Currently we are trying to upload an excel file in our WDC. However it gives an error (Error occurred during character conversion) and dumps while converting the data to xstring format.
    It converts csv files successfully, but we must have excel file conversion.
    If anyone before has worked on this kind of requirement or if has got any ideas then please share the same.
    Thanks,
    Shantanu

    Hi Shantanu,
    Firstly , convert the uploaded  data in XSTRING format into STRING format using FM u2018HR_KR_XSTRING_TO_STRINGu2019 .
    Then using the utilities cl_abap_char_utilities , convert string into horizontal tabs and bind the data accordingly.
    I hope this helps.
    With Regards,
    Vipin.

  • Display file content in Web Dynpro ABAP

    Hello,
    we would like to be able to display any file after having uploaded files using FileUpload ui  element in a web dynpro abap application.
    for microsoft word excel files, the OfficeControl ui element can be used and for  pdf documents the InteractiveForm ui element can be used.
    for other formats  such as '.tif', '.jpg', '.txt'..... we did not find out how to be able to display the file contents
    Does anybody know if and how this could be achieved?
    Cheers
    Ana

    Chris,
    You may be right. Also it requires some configuration in SAP KPro ( document class etc).
    Please see SAP [Help |http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf]on Business Document Services.
    At page 64 of this document under topic 'Display Documents' 'Feature it says. "If it is not possible to display the document in place, an appropriate viewer that is available on the
    PC is started and the document is displayed u201Cout placeu201C

  • Excel Upload via Web dynpro ABAP

    Hi All,
    Could any one please explain how to upload MS Excel file in Web Dynpro ABAP?
    Regards,
    Surya

    Hi Surya,
    Ya Excel upload is not supported some times.
    You can save your excel sheet as "Tab Limited" file. Then you can easily upload the file contents to your WebDynpro.
    Thanks.

  • JSP : latest  JSTL, File Upload from web form Client to Server Question!

    I understand that within a JSP, It is possible to read a file from the Client by opening a Stream somehow.
    How do I code, within jsp/servlet (non tag) java code inside <% %>
    blocks, WITHOUT openening a new connection to the URL, an InputStream from a client web browser form, from a file upload coded using
    <input type="file" name="file1"/> ?
    I have previously achieved this quite simply with a FileInputStream
    with the previous version of JSTL.
    How may I do this with the latest version of JSTL, with this index.jsp?
    -with a simple text file.
    -with a Binary file (with DataInputStream)?
    <%--
    Document : index
    Created on : 27/01/2009, 3:08:32 PM
    Author : Zachary Mitchell
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1 align="center">Hello World!</h1>
    <form name="form1" method ="POST" >
    <table align="center">
    <tr>
    <td>
    <input name="file1" type="file" align="center"></input>
    </td>
    </tr>
    <tr>
    <td>
    <input type="submit" value="submit" action="index.jsp" ></input>
    </td>
    </tr>
    </table>
    </form>
    <!--*********************************************************************** -->
    <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <%@page import = "java.io.*" %>
    <c:if test="${pageContext.request.method=='POST'}">
    <%
    File fileName = new File(request.getParameter("file1"));
    out.println(fileName.toString());
    FileInputStream stream = new FileInputStream(fileName);
    out.println(stream.toString());
    %>
    </c:if>
    <!--*********************************************************************** -->
    </body>
    </html>

    If I have:
    <!-- ***********************************************************************************-->
    <form name="form1" method="POST" enctype="multipart/form-data">
    <input name="file1" type="file"/>
    <input name="submit1" type="submit" value="Submit" action="index.jsp"/>
    </form>
    <!-- ***********************************************************************************-->
    and run this in an index.jsp, use browse to select my text file, and click SUBMIT.
    I can use:
    InputStreamReader reader = new InputStreamReader(new DataInputStream(request.getInputStream()))
    BufferedReader bufferedReader = new BufferedReader(reader);
    bufferedReader.readLine();...
    However, these is some HTML/POST related content around what multiple readLine();
    calls return.
    Is there an easy way, like using "${param.file1}",
    aside from [http://commons.apache.org/fileupload/|http://commons.apache.org/fileupload/],
    maybe using servlet style code, to get the File contents from a remote Client,
    to the remote Server servlet engine, AVOIDING ANY SUPERFLUOUS CONTENT,
    using version 1.12 of the JSTL, JSP 2.0,Tomcat 6?
    Just politely, yes, no, and how?
    Edited by: Zac1234 on Jan 29, 2009 3:27 AM
    Edited by: Zac1234 on Feb 1, 2009 8:29 PM

  • Mass upload through Web Dynpro application possible?

    We want to develop a custom aplication with Web Dynpro ABAP for master data maintenance. About 90 % will be done manually but we also want to have the possibility to do mass uploads (comparable with LSMW's in SAP R3 for win gui transactions: users send us a spreadsheet and we load it for them using a LSMW). I found one option by building Adobe Interactive form offline scenario using xml messages but I don't want to be forced to use Adobe only to enable mass uploads that will only happen in 10 % of the cases.
    I am loking forward to your suggestions!
    kind regards
    Angelique Heutinck

    I got a very useful answer from Thomas Jung (SAP) via a site he did setup with a couple of other SAP experts, also see http://enterprisegeeks.com/blog/2009/03/31/abap-freak-show-april-1st-acf-updownload-in-web-dynpro-abap/comment-page-1/
    My question:
    I think this new UI element ACFUpDownload cannot be used to do mass uploads/updates of data that need to be stored in SAP tables?
    Answer Thomas:
    This UI element is just about the transfer of data from the client machine to the server. It has nothing to do with how the data is used or processed after upload. Think of it as the equal to the CL_GUI_FRONTEND_SERVICES class and methods GUI_UPLOAD and GUI_DOWNLOAD.
    My question:
    Is there a tool like LSMW, CATT, eCATT that we can use for recording webenabled transactions (applications developed in Web Dynpro ABAP)?
    Answer Thomas:
    You shouldnu2019t need a tool like LSMW, CATT, eCATT that is tied to the user interface. With WDA you should be using MVC to design your application. This is part of the reason for MVC so that you have a clear separation of the model - business logic. You should always have a reusable class that can be called to input and create data with the same validations without going through the user interface. This is the process that SAP is following as we create new WDA screens. We use the enterprise services and their implementation classes as the Model for the WD Components. This ensures that you always have a clear API to use to mass import data.
    Although we wouldnu2019t recommend doing any kind of mass data load via the user interface any longer - eCATT will be supported for automated testing of Web Dynpro ABAP applications as of NetWeaver 7.0 Enhancement Package 2.

  • Why doesn't Search across files work in web dynpro perspective?

    Hello,
    I rely on the Files Tab of the Search popup a lot to search for occurence of text in files.
    So far, I've been doing all J2EE development and the Search functionality works great in the J2EE perspective. What I do is select the Development Component (DC) in Package explorer view and then bring up the search box. On there I select File tab and the "selected resource" radio button. I leave the File Name patterns as "*" so it'll search all files.
    However, when I try that in the Web Dynpro perspective it doesn't find any hits. I know I can do a search across the whole workspace but that'll return too many hits in other DCs.
    Anyone have an idea how to do this in Web Dynpro perspective?

    I remember that I once opened an OSS message on this issue. What version has your IDE?
    Armin

  • Download/Upload of Web Dynpro Components

    Hi everyone,
    Does anybody know if there is a way to dowload the web dynpro components from a SAP system and upload into a diferent one, like smartforms and dynpro screens do?
    Thanks in advance,
    Raphael Xavier

    Hi Raphael,
    This feature is not currently in the standard system. However there is a beta version of a plugin for exporting and importing Web Dynpro ABAP components.You would have to use the SAPLink program (ZSAPLINK) to export and import objects. Please go through this link to download the necessary stuff.
    [http://code.google.com/p/saplink/|http://code.google.com/p/saplink/]
    For any problems while uploading these nuggets into SAP you can post your queries [here|www.saplink.org].  Also refer to Thomas Jung's comments in [here|How to install the SAPlink plugins;.
    Regards,
    Uday

  • File upload to web server

    I need a little help with the file upload process in flex..
    I am trying to upload a file.. i had it where i would get a cgi-script url passing as the following
    filename="filename"&filedata="data of the file"
    then my cgi script "written in C" would read from standard in.. and write the info to a file...
    now i get the following..
    ------------KM7Ef1gL6Ij5cH2ae0ei4Ij5GI3Ef1
    Content-Disposition: form-data; name="Filename"
    Botanical Garden 239.JPG
    ------------KM7Ef1gL6Ij5cH2ae0ei4Ij5GI3Ef1
    Content-Disposition: form-data; name="Filedata"; filename="Botanical Garden 239.JPG"
    Content-Type: application/octet-stream
    in the file i am trying to write.... Can anyone help me fix this problem? I am clueless at this point on what to do..
    sample code below is what i got from trying to work this...
    Thanks in advanced for anyones help..
    <code>  
    const FILE_UPLOAD_URL:String = "http://172.16.1.6:1111/cgi-bin/login.cgi"; 
    private function init():void {fileRef =
    new FileReference();fileRef.addEventListener(Event.SELECT, fileRef_select);
    fileRef.addEventListener(ProgressEvent.PROGRESS, fileRef_progress);
    fileRef.addEventListener(Event.COMPLETE, fileRef_complete);
    private function browseAndUpload():void {fileRef.browse();
    message.text =
    private function fileRef_select(evt:Event):void { 
    try {message.text =
    "size (bytes): " + numberFormatter.format(fileRef.size);fileRef.upload(
    new URLRequest(FILE_UPLOAD_URL) ); 
    trace("going to print file data in a sec... ready?"); 
    trace(fileRef.data); 
    trace(fileRef.name );}
    catch (err:Error) {message.text =
    "ERROR: zero-byte file";}
    private function fileRef_progress(evt:ProgressEvent):void {progressBar.visible =
    true;}
    private function fileRef_complete(evt:Event):void {message.text +=
    " (complete)";progressBar.visible =
    false;}
    </code>

    Here are some code....
    Forms
    <%@ page language="java" session="true" %>
    <html>
    <head>
    <script>
    </script>
    </head>
    <body>
    <form name="myform" method="post" action="fileproc.jsp" enctype="multipart/form-data">
    <input type="file" name="myfile">
    <input type="submit" value="submit">
    </form>
    </body>
    </html>Process
    <%@ page language="java" session="true" import="com.oreilly.servlet.*"%>
    <html>
    <head>
    </head>
    <body>
    <% String s = request.getParameter("myfile"); %>
    <%=s%>
    <br>
    <%
       MultipartRequest multi = new MultipartRequest(request, "C:/multipart/", 10*1024*1024); // 10MB
       Enumeration params = multi.getParameterNames();
       while (params.hasMoreElements()) {
         String name = (String)params.nextElement();
         String value = multi.getParameter(name);
         out.println(name + " = " + value);
       out.println();
       Enumeration e = multi.getFileNames();
       while(e.hasMoreElements()){
           String fname = (String)e.nextElement();
           out.println("<h1>"+fname+"</h1>");
           File fl = multi.getFile(fname);
           FileReader fr = new FileReader(fl);
           BufferedReader buf = new BufferedReader(fr);
           while(buf.ready()){
               out.println(buf.readLine());
           out.println();
           buf.close();
           fl.delete();
    %>
    </body>
    </html>Hope this helps....

  • How to run sql scripts using batch file for a web dynpro data dictionary

    Hi,
    I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
    I further require to make the scripts independent of the database name,so that it can be run at any client environment.
    Your help will be appreciated and rewarded.

    See shoblock's answer
    call sql script from unix
    masterfile.sql:
    @file1 &1
    @file2 &2
    @file3 &3
    @file4 &4
    then just call the master script:
    sqlplus userid/password @masterfile <p1> <p2> <p3> <p4>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • CSV file display in web dynpro abap

    Hi,
    Can any one tell me , it is possible to display data in CSV format in web dynpro abap & if yes please tell the steps of doing this.
    thanks,
    amishra

    >
    A.MISHRA wrote:
    > Hi,
    >
    > Can any one tell me , it is possible to display data in CSV format in web dynpro abap & if yes please tell the steps of doing this.
    >
    > thanks,
    > amishra
    Hallo Mishra,
    Do You want to show data in excel ? or you want to show data in Table UI or ALV
    If it is excel then you can use Office Control UI and bind XSTRING for the dataSource property.
    if you have to choose between Table UI and ALV then i would choose ALV.

  • Hey how to upload ABAP web dynpro's in the EP server?

    Hi Folks,
    please let me know how to deploy the created ABAP Web Dynpro's into the Enterprise Portal.
    thanks ,
    NKumar

    Hi NKumar,
    You can put your web dynpro application on portal.
    We can publish web dynpro application on portal through "iviews".
    Portal eventing is necessary during a scenario where u have to communicate to another portal iview.say in portal u have your WDA app in one iview and another WDA or BSP app in another iview
    But for WDA app,navigation inside its views you would not need portal eventing.
    This Will help you,
    /people/sap.user72/blog/2006/01/05/creating-wd-abap-iview-and-the-wd-namespace
    Kindly check for following links also,
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/9f0396e1062883e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/1d/e4a34273f60b31e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/0e/a1e94205045604e10000000a155106/frameset.htm
    Hope I have answered your question.
    Cheers,
    Darshna.

  • Default directory for file-upload in web.xml

    Hi,
    Does any one know how to specify a relative path for the temporary directory in the web.xml file.
    In the web.xml file under the jato_MultipartFormFilter filter I tried to change the name of the directory so that it reflects a relative path but it did not work. The deployment process gives the following exception:
    Failure creating test file in directory "tmpDir"; disabling temp file for uploads
    java.io.IOException: No such file or directory
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    When I tried to keep the default setting, i.e. keeping the tag empty. The server gives a permission denied since I am not accessing as the root user as shown next:
    Root cause:
    java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.checkAndCreate(File.java:1314)
    at java.io.File.createTempFile(File.java:1402)
    The only thing I can do is specifying an absulte path from the root directoy '/' in my machine, not the root directory of the application.
    <init-param>
         <param-name>tempFileDirectory</param-name>
         <param-value>/home/Basil/myTemp</param-value>
    </init-param>
    Any help is greatly appreciated,
    Regards,
    Basil mahdi

    Todd and I discussed this last night. We did not seem to have included support for automatic detection of a relative path entry. We have issued an RFE for this. There is little that we can do if the file location cannot be opened due to permission problem. If the java.io.File temp file feature does not work for your web application then I suspect this is an issue in the application server; perhaps a misconfiguration or security policy issue. If you would like to indicate a path relative to context root then we have a workaround for you. Please use the call <ServletContext>.getRealPath("/"); and then append you relative path. This is essentially what we will end up doing when we implement the RFE. regards -matt-

Maybe you are looking for

  • DDE: Problem Key 'ORA 600 [qcsprfro_tree:jrs present]' was flood controlled

    Hi All, I have oracle 11gR2 installed on OVM. From last few days I am getting below error ORA-600 in my alert.log file Errors in file /u02/app/oracle/diag/rdbms/......./SID_ora_30314.trc (incident=169998): ORA-00600: internal error code, arguments: [

  • Numeric conversion error

    Hello everybody, Good Day to all. I have a very strange problem in my UDF. I have a Matrix whitch is bound to a Table data source like this:         Table = oForm.DataSources.DataTables.Add("Lines")         Table.Columns.Add("ID", SAPbouiCOM.BoFields

  • How to add config changes in Transport Request

    Hi Experts, We did some config changes in Logistics - General=>Material Master=>Configuring the Material Master=>Define structure of Data screen for screen sequence / Assign Secondary sequence / Maintain Order of Main and Additional Screens. But whil

  • CommandLink ,in action use dynamic variable

    <h:commandLink action="#{appmsg.commandAction1}" value="#{appmsg.commandValue1}"> </h:commandLink> appmsg is backingBean,"commandAction1" is a setCommandAction1 getCommandAction1 variable,not a method, I put a value like "#{app1.method1}" string to c

  • Sequence compressor settings XDCAM EX 720p in final cut = render issues

    sequence compressor settings set to XDCAM EX 720p in final cut renders a clip and gives an unwanted speedup of clip. I am using XDCAM EX 720p footage. Anyone know what I'm doing wrong?