on 08-10-2004 11:57 AM
Hi,
We are in SAP EP5 SP5. Our requirement is to upload a document from the user's client browser into SAP.
Is there anyway we could do this.
We just have Portal Platform, no KM and Unification.
Is there any standard Iview from SAP EP which allows us to upload the document in to SAP.
Is there anyway we could upload a document from the client's browser into Portal which has to go into SAP R/3 as well.
Expecting your thoughts on the same.
Thanks
Senthil
Hi,
Both time when i tried using InputStream or DataInputStream, i got NullPointerException.
Now its working. Now i tested with PDK and read a file from my desktop and wrote it some other drive.
Now next task is i have write it to UNIX box and i will give a try and get back to you.
Thanks for the help.
Thanks
Senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the response. I have tried the ones what you said. I am able to read the contents in Character stream, if i try to get handler to file using DataInputStream or InputStream i am not able to read the contents.
I got the file name and i used FileReader it works fine. Actually we want to read it as byte stream so that it works fine in all OS.
Currently our aim is get the contents of the uploaded document and create the similar document in either in Windows Server or on a Unix box.
Thanks
Senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Senthil,
I don't really understand your problem. InputStreams are byte input streams (they are not Reader's!), and you can create a file on your filesystem and just write the content from the (File)InputStream into the corresponding (File)OutputStream.
There's no trick, no hack, nothing, pure straigh forward.
Hope it helps
Detlev
Hi Senthil,
as I have no idea how to pass a file to a R/3 system, I won't be able to help with this, but on the portal site, it's easy:
Take a "FileUpload" HTMLB component within a JSP (being part of a JSPDynPage component); have a look at the documentation for this.
On the JSPDynPage part, this code should help (within a method called for example "onClick" when you have added a HTMLB button beneath the FileUpload component with text="upload this stuff" or so and onClick="click"):
<i>IFileParam myFile = ((FileUpload) this.getComponentByName(FILE_UPLOAD_COMPONENT)).getFile();</i>
(where FILE_UPLOAD_COMPONENT is a string with the id of the HTMLB FileUpload component)
<i>InputStream myIS = new FileInputStream(fuFile.getFile()), fuFile.getContentType(), -1);</i>
With this InputStream, you can "do what you want", for example, save to disk (I don't like it, but you have no KM to store it), maybe pass it somehow to your R/3 or whatever you would like to
Hope this helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Senthilkumar,
also with a search on the keywords "upload AND file AND portal" in the Forums I found no solution. Only another unanswered Posting from rajesh kumar: . But what I found in our R/3 System is the RFC enabled Function module: BDS_BUSINESSDOCUMENT_CREATE_TAB. A Module to create a new document out of an submitted internal table. I hope that can be a starting point for you.
Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.