File Upload in CRM2007 web-ui

Hello All,
I have a requirement where I have to upload an XML from from my local machine to the CRM 2007 web-ui.
I have created a button in the front-end of the order screen and on clicking of the button, some process (which I need to know actually) will happen in the backend, which will upload the file from the path which will be specified in the program.
I have tried it out with normal SAP FMs like GUI_UPLOAD and other standard methods, but they do not work as they work specifically for SAP GUI and not for web-clients.
Please help me out in this problem.
Thanks,
Paul.

Hi,
In WEB UI , GUI_UPLOAD can not work( its for SAP GUI only hence the name GUI ).
In your program , if you have the file path with you , then you can use following function module :
RZL_READ_FILE as follows
CALL FUNCTION 'RZL_READ_FILE'
  EXPORTING
   DIRECTORY            = 'Directory path and not file path'
*   FROMLINE             = 0
    name                 = 'File Name'
*   NRLINES              = 50
*   SRVNAME              = ' '
  tables
    line_tbl             = lt_lines
* EXCEPTIONS
*   ARGUMENT_ERROR       = 1
*   NOT_FOUND            = 2
*   SEND_ERROR           = 3
*   SYSTEM_FAILURE       = 4
*   OTHERS               = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
in DIRECTORY parameter , give the path to directory and not file ,but path till the directory that contains file.
If the file is on client machine, it will me like say 'C:\My_data' . If the file is on server then path will be
'\\server name ( e.g. SAPCRD ) \Folder1\Folder2\Folder3'
etc.
In NAME parameter, just mention the file name as 'myfile.xml' etc.
In TABLE parameter, lt_lines, you will get all the lines from the file. Lt_lines will be type table of string.
Obviously, since you are reading XML file, lt_lines will have all XML tag wise content.
Now you will need to parse though these XML to get the values in internal table or so.
Since i dont know what you want to do with XML, i cant explain ahead. If you dont know how to parse XML file, the let me know, I can give you the code for that.
Hope this informations helps you to real your file on click of button.
Regards,
Suchita
P.S. Your can also call this FM in event handler of your button click.
Also i would suggest that initially execute this FM in se37 by supplying directoy and file name. you will immediately come to know the result or error . Once you got the result, then go ahead and implement it in you event handler or other WEB UI method.

Similar Messages

  • HI Masters , I need information for file upload program in web dynpro java

    Hi masters,
           i need some inforamtion and documentation on file upload program in web dynpro java

    Hi surya,
    You can follow this procedure to upload the file
    i) Take One Context Attribute named as "D1" of Type "binary".
    ii) Take one FileUpload UI Element in the Layout Tab.
    iii) Bind FileUpload UI Element's data Property to the taken Context Attribute. Here it is "D1".
    iv) Take one Button UI Element in the Layout Tab named "Upload" and in the Action of that Button write the following Code.
    v) The following code Generates one Folder in the Server & inside that Folder given file is Uploaded.
    File ff=new File("FolderXYZ"); // Creates One Folder with the given Name ( Here Folder name is "FolderXYZ")
    ff.mkdir();
    try
    byte b[]=null;
    IWDAttributeInfo objAttinfo=null;
    IWDModifiableBinaryType binType=null;
    File f=null;
    FileOutputStream fos=null;
    if(wdContext.currentContextElement().getD1()!=null)
    b=wdContext.currentContextElement().getD1();
    objAttinfo=wdContext.getNodeInfo().getAttribute(IPrivateAttachView.IContextElement.D1);
    binType=(IWDModifiableBinaryType)objAttinfo.getModifiableSimpleType();
    f=new File(ff.getName()+"
    "+binType.getFileName());
    fos=new FileOutputStream(f);
    fos.write(b);
    fos.flush();
    fos.close();
    objMessageManager.reportSuccess("File uploaded to server");
    } catch (Exception e)
    objMessageManager.reportException("Unable to upload file to server, error is:"+e,false);
    return;
    The Uploaded file is stored in the folder & that folder is stored in the Server's following Path.
    <Your Server>\c$\usr\sap\J2E\JC00\j2ee\cluster\server0
    You can access your Uploaded file from the following Path
    <Your Server>\c$\usr\sap\J2E\JC00\j2ee\cluster\server0\FolderXYZ
    Regards
    Sagar Ingalwar

  • Possible to show file upload progress for web form submission?

    I just made a simple form as a test. There are 3 files being submitted here via a "web form".
    Files being uploaded in this case are of these sizes:
    110MB
    9MB
    24MB
    I'm testing functionality that will let a print shop's clients upload their files. For larger files they'll use FTP but this "order form" does a lot of business for them so we're trying to replicate in BC.
    My problem is that I am wondering if there is a way to show the "upload progress" as a total %. Such as a visual status bar, etc.
    As of now the only way it's showing is in the default browser status bar (chrome in this case):
    http://cl.ly/image/1d3U0S1h2521
    I read somewhere that the limit is 150MB for an upload. Wondering if that means 150MB TOTAL as in 3 files combined in my case. Or If I chose to allow 3 files to be attached would it allow for 450MB?
    Also, if you do a user submitted web app instead and allow people to attach files that way, does the same file limit apply?
    My second issue is that the upload speed seems to be SLOW. I know it's not my connection because on my non BC site as well as another with the same form, the files upload fairly fast. But on BC it just crawls and on a few tests I get this:
    http://cl.ly/image/2T2q160M1R1n
    Any help or suggestions with the file upload progress as well as file upload speed would be appreciated.
    Thanks!

    So if i have 3 files to be uploaded, the max allowed is 750MB correct? (just wondering if when uploading its 250mb total or per file).
    Guess i'll do something fake to make it appear its working with a loading graphic or something.
    My web browser (chrome in this case) shows the % uploaded. I wonder if all web browsers do the same. I havent tested yet.
    If only there were a way to have javascript or something grab that same #% from the web browser itself and just format it to appear where I want on the form along with the % uploading.
    Anyone know if that's possible?
    Here's where Chrome for mac shows it:
    http://cl.ly/image/1c3i3x25262j
    If I could grab that (uploading 19%) from the browser and format it into css/html i'd be gold.
    Then find if similar browsers do the same and write some js for each browser specifically to grab it.
    In a perfect world at least....

  • Implement IP File Upload to a web template (with queries) - HTML Coding?

    Dear experts,
    we have implemented integrated planning - file upload.
    now we want to create a web template , which should include some queries AND also the file upload in a separat tab in this template.
    following link (file upload) should be included in the web template:
    http:///sap/bc/webdynpro/sap/zrsplf_file_upload?planning_sequence=ZACOMK_01_PS1&sap-client=200&sap-language=DE
    I don´t have any html-knowledge.
    Is there a standard html-coding available, which I could use and implement in a container item?
    many thanks for your help!!
    best regards
    Roland

    Thanks so much, Rick! That post was exactly what I needed -- and now I have another resource to search for next time.
    There is one little caveat, for anyone else who needs to use this. I had to change the line that sets the Content-Type header to use a semicolon instead of a comma. After this change, the resulting HTTP request is identical to the one generated by WebKit for form submission.
    NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary];

  • 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

  • Unable to clear file upload fields in web pages.

    When visiting any site which has the option to upload a file, I am unable to clear the field if I change my mind about uploading a file.
    A website has a BROWSE or UPLOAD field and button. Pressing the button brings up the open file dialog. I select a file and select open in the dialog. If I then click on the field containing the path/file, I am presented with the open file dialog. I cannot clear or edit the field on the web page.
    I originally thought it was something with the web page I visited, but then found another page did the same thing.

    For instance if you go to this page again in Safari,
    http://www.apple.com/quicktime/qtv/mwsf06/
    and then select "View Source" from the View menu, then press command-f to "find" within the page and search for ".mov"
    You will find this, which shows the url of the movie itself.
    <param name="href" value="http://stream.qtv.apple.com/events/jan/mw2006/mmw_2006_650ref.mov">
    If you copy just this part:
    http://stream.qtv.apple.com/events/jan/mw2006/mmw_2006_650ref.mov
    And open QuickTime Player, go to the File menu, select "Open URL" the movie will play.
    If you try the same technique on the page at the link provided by your client, it will allow you to bypass the html code that may be doing an outdated compatibility check and the movie may play. Or it may tell you that you are missing components (codecs, compressors etc.) in which case, post here again.

  • VS2010 does not record file upload process for web test

    I'm trying to record the process of uploading a file to the system for web performance test.
    The problem is when a new browser opens for uploading a document, the visual studio is not recording the URL (....Attachement/Upload.aspx) or POST and related Form Post Parameters.
    Is there any settings to able to record when a new browser pops up?
    I'm using VS2010 ultimate and the system is on MS Dynamics CRM platform.

    Hi Michi,
    >>A new browser pops up.
    Could you share us a screen shot about it? Do you mean that it opened a new tab in the same window or a new window in your IE browser?
    Maybe you could use the Fiddler tool to record a web performance test, check the result.
    http://blogs.msdn.com/b/slumley/archive/2007/04/17/enhanced-web-test-support-in-fiddler.aspx
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • To get content of file upload element in web dynpro

    Hi . . .
    h1 : how can i get the string content   (i.e., path of file) store in variable in web dynpro abap . . . .

    Hi . . .
    h1 : how can i get the string content   (i.e., path of file) store in variable in web dynpro abap . . . .

  • VS2010 not recording file upload process for web test

    I'm trying to record the process of uploading a file to the system.
    The problem is when a new browser opens for uploading a document, the visual studio is not recording the URL (....Attachement/Upload.aspx) and related Form Post Parameters.
    Is there any settings to able to record when a new browser pops up?
    I'm using VS2010 ultimate and the system is on MS Dynamics CRM platform.

    Hi,
    this is the forum for Microsoft Office Visio.
    It seems from your question that you need assistance with Visual Studio.
    The Visual Studio forums are located in MSDN, not here in TechNet.
    Try here:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=visualstudiogeneral
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • NetUI file upload creates temporary files without cleanup

    When using the NetUI File Upload in my web application, I notice that it
    stores temporary files in the server config directory. The file names
    are netxxxxx.tmp and they are never deleted on server startup/shutdown,
    etc. I am uploading large files (about 500k) so these temporary files
    start to take up space very quickly and I have to manually delete them.
    Is there a way to disable this or what? I suppose I could edit a
    startup/shutdown script to delete them, but I'd rather not have to
    change the provided software.
    Thanks

    Bumping this up... any BEA reps read this NG?
    Steven Ostrowski wrote:
    When using the NetUI File Upload in my web application, I notice that it
    stores temporary files in the server config directory. The file names
    are netxxxxx.tmp and they are never deleted on server startup/shutdown,
    etc. I am uploading large files (about 500k) so these temporary files
    start to take up space very quickly and I have to manually delete them.
    Is there a way to disable this or what? I suppose I could edit a
    startup/shutdown script to delete them, but I'd rather not have to
    change the provided software.
    Thanks

  • WSRP and File Uploads

    Hello,
    I am using BEA 8.1 SP4.
    I am trying to find out the status of being able to do file uploads in portlets being displayed remotely. I have a JSR-168 portlet which simply does a file upload to the server. The JSP page that renders the content contains:
    <form name="ont_mainform" method="post" action="<%=portletURI%>" enctype="multipart/form-data">
    When I have the same portlet running remotely in another portal via WSRP, I get the error:
    java.lang.Exception: The request does not contain a multipart/form-data or multipart/mixed stream. Content type = null
    Does anyone know whether WSRP is not able to handle file uploads in the web service call just yet or is there something I need to do to get it to work? Or is this a container issue?
    Thanks for any thoughts - Peter Len

    Hi Peter,
    By default, the consumer reads the MIME message, sends it to the
    producer over SOAP, and the producer then recreates the stream for the
    portlet. So, the boundary strings and the headers may not be the same.
    WLP8.1SP4 also supports a mode wherein the uploaded data is transported
    as a MIME attachment. For this enable accepts-mime to "true" and
    transport="attachment" on the producer side in wsrp-producer-config.xml.
    Here is a sample snippet.
    <markup secure="false" rewrite-urls="true"
    transport="string" accepts-mime="false"/>
    Can you try this configuration and see if it works differently.
    Subbu
    Peter Len wrote:
    Subbu,
    This is a re-copy of my last reply as it looks like the line breaks did not take.
    Okay, I have run across something else which is another oddity. In the code that deals with the commons-fileupload.
    I have the following code:
    int boundaryIndex = contentType.indexOf("boundary="); byte[] boundary = contentType.substring(boundaryIndex +
    9).getBytes();
    InputStream input = req.getPortletInputStream(); MultipartStream multi = new MultipartStream(input,
    boundary);
    boolean nextPart = multi.skipPreamble();
    // some print statements
    When running the portlet locally I get:
    Boundary Index: 21
    Boundary Array: [B@1cccea2
    InputStream: weblogic.servlet.internal.ServletInputStreamImpl@111fae9 MultipartStream: boundary='[B@17002a1' bufSize=4096 skipPreamble?: true
    When running it remotely I get:
    Boundary Index: 21
    Boundary Array: [B@737d8a
    InputStream: com.bea.wsrp.producer.container.MultipartInputStream@3708e6 MultipartStream: boundary='[B@12952ec' bufSize=4096 skipPreamble?: false
    There seems to be a difference in what the InputStream object is. The key here is that the skipPreamble boolean is false for the remote portlet and that essentially keeps the code from downloading anything. Not sure if this is a commons-fileupload thing or not. Do you know of another fileupload API that you know works with remote portlets?
    Thanks - Peter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Upload Friendly (Multiple File Upload Applet)

    Title : Upload Friendly (Multiple File Upload Applet)
    Description : UploadFriendly is an easy to use Java Applet that will allow multiple file
    uploads on a web server in a web page. The control supports file filtering, limits and more.
    Samples available in the following languages: ASP, ASP.NET, PHP, Coldfusion and JSP
    Link: http://www.uploadfriendly.com/
    Type: Commercial (30 days Trial)

    Hi shiil,
    To move the documents between site collection, content organizer rules would be a recommended method, you can activate Content Organizer features to enable content organizer rules on the site, to root the document to another site collection.
    Also, for this issue, as Prasath suggested, you can check out the document in the ItemAdded event, then add ItemCheckedout event, in the ItemCheckedout event, delete the document. Or as content organizer rule does, you can create your own timer job to move
    the document.
    More information, Content Organizer Feature Overview for SharePoint Server 2010 Developers (ECM):
    http://msdn.microsoft.com/en-us/library/office/ee558288(v=office.14).aspx
    Thanks,
    Qiao Wei
    TechNet Community Support

  • QuickTime Movie File-Uploads on iWeb but no playback on the internet

    Hello, Forum Techies,
    Always trying to go beyond and want a movie clip on my website,  but I may have met my match
    I have the following QuickTime Movie file uploaded to the web page as noted below.
    The file extension is MVI_038-#3-13. The file size is 663.8 Mbs
    The website space is 1 GB using 10 Mbs upload speed.
    The movie clip does not play on the website.
    Question arising: I believe the space is sufficient on the website, but not sure if it this is a internet speed issue? I have other movies mounted successfully on another website, but their file size is not a huge and the webspace is not as much.
    Therefore, I am curious to know if it is an internet speed issue?
    Here is the URL for the page that I have included the movie clip:
    http://thebigbenmemorialtrail.ca/Backgrounder_Trail_Scouting.html
    It's a well visited site internationally and because it is a major project in our County, documenting the construction of a new trail is an interesting feature to include on this website.
    Hope there is a solution. And, YouTube is not an alternative because for some strange reason I cannot get signed on no matter what efforts have been made with Google and I am not able to find a channel that applies to this kind of a movie, which is not entertainment, musical, etc. It's an information-based movie.
    Thanks!

    This is the movie :
    http://thebigbenmemorialtrail.ca/Media/MVI_0368-%233-13.MOV
    It's not an extension, it's the filename. Sanatize it.
    Size = 632MB (Megabyte)
    663.8Mbs = Megabits per seconds = speed
    Videosize = 1280 x 720px
    Filesize after download = 10.3MB (download stops at this size)
    Nobody will wait for this.
    Resize you movie to something smaller ie. width x height = smaller filesize.
    Use common sense.

  • Java bean File Upload - Error-105101

    We were having earlier the same problem of 105100 error. As the solution, suggested earlier in the thread posted by Teguh Santoso, the classpath settings that was mentioned ealier was done, the certificate was imported in the client machine.
    At the web-browser-client machine, the "Select" button in the "fileupload" demo form is opening the FileDialog(that cleared the earlier problem). But on selecting a file in it, the error ORA-105101 is occuring for the WHEN-CUSTOM-ITEM-EVENT..... But both the progress bars, the one that is there for encoding of the seleced file, and the one that is there for the uploading gets displayed. On searching the "c:\temp" folder(folder where the file is intended to be uploaded to) of the application server, we see that the particular file has not been uploaded.
    The same thing is working alright when we do it in the 9iAS machine, when using the "Run on Web" option in the 6i-FormBuilder.
    What additional settings are to be done for using the file-upload utility through web-forms? Please help..
    Thank you
    Regards
    Ranjith.

    If you press KEY-LISTVAL in the Upload demo form it will message out the current classpath for you. If that fails as well it's because the basic Java Runtime classes cannot be found.
    The general things to have to watch in the setup (on the Application server) are:
    1) A Java 1.2.2+ runtime environment is available
    2) The /jre/bin/classic directory is in the O/S PATH for Windows, or the LD_LIBRARY_PATH for SOLARIS or the SHLIB_PATH for HP. This is so that Forms can locate the JVM.DLL (Windows) or libjvm.sl/so (UNIX)
    3) The CLASSPATH needs to contain the 1.2.2+ Java runtime jar file rt.jar. This is in the /jre/lib directory.
    4) The CLASSPATH should of course also contain the UploadServer.jar

  • Huge file uploads.

    Hello there!
    Does anyone know how to handle huge file uploads over the web? ie. we are talking about max 80megs or so.
    I am imagining that this cannot be done over HTTP and some java applet needs to be included to do it over FTP. Any thoughts? How exactly can we deal with this?
    Jay.

    Hello,
    In that case, I would probably just go for a database upgrade (i.e. upgrade your XE instance directly with the 11g) rather than a migration (unless you wanted to run the two simultaneously, which from your description it doesn't sound like it).
    Take a look at the XE upgrade guide -
    http://download.oracle.com/docs/cd/B25329_01/doc/server.102/b32391/toc.htm
    (It specifically talks about upgrading to 10.2.0.3, but of course later versions would be equally valid (but check metalink for any upgrade 'quirks' between versions).
    In addition to Tony's suggestion of a database link, I would also reach for Datapump which is absolutely superb for migrating schema's etc between instances.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Maybe you are looking for

  • Swing GUI isn't showing up properly without resizing window

    I am developing a Java GUI with Swing. I have not used any paintComponents or paint commands for anything - all Swing. Every time I run the code, I get the JFrame to come up, but all I can see is the background. Only after I resize the window (manual

  • How do I get idvd to work. It is now not supported on my Mac. OS 10.9.5

    I have not used my idvd for anything but, playing dvds. It's been a while for that too. I just tried to play a disc, already in the slot, and the msg comes up that idvd6  is no longer supported. I am running 10.9.5 Any ideas??

  • Why should i use Java in Web form

    I am making a web calculator. Its takes some inputs from the user and evaluates input to calculate the result. I dont want the user to see the interpretation of their result. I am new to java. Can anybody tell me if i can do that with ASP?

  • Are apps getting into my iPod with iCloud or my Apple account?

    So, I have two iPods. One 2ng gen, and one 4th gen. For my 2nd gen, I download apps from my computer to my iPod since wifi doesn't work on it. As soon as I add (or download, idk) an app on my computer to add to the 2nd gen, it gets added on my 4th ge

  • Heads up: Installation fails on PPC32 for jre & sdk V7

    This is a copy of http://www.ibm.com/developerworks/forums/thread.jspa?threadID=419865&tstart=0 and http://www.ibm.com/developerworks/forums/thread.jspa?threadID=419867&tstart=0 The first post has the attached file. System information: iMac G4 PowerP