on 08-04-2006 9:56 AM
Hi
i have created a web dynpro project that create a PDF file by use 3 RFC.
In the end I have this file on my desktop.
I need to write this file in a specific server location.
THis location will use by me to attach the file on my view that containing the Ifrane object.
Plese hel me
Hi,
Use file upload ui element.
Create an attribute upload.
Click the browse button and give the path of the PDF file
Write this code in any action event handler
IWDAttributeInfo attInfo =
wdContext.getNodeInfo().getAttribute(" upload");
IWDModifiableBinaryType binaryType =
(IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
filename = binaryType.getFileName();
byte b[] = wdContext.currentContextElement().getUpload();
File path =new File("
<serverpath>"+filename );
try {
FileOutputStream out = new FileOutputStream(path);
out.write(b);
out.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Regards,
Vijayakhanna Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.