cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading and Downloading files

Former Member
0 Kudos

HI,

Could someone send me a doc or link which gives me an idea of how to upload and download files in Webdynpro.

Thanks,

Abilash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abilash,

Please find the link to a blog which describes how to upload and download files in webdynpro.

/people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70

Thanks,

Suvarna

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Abilash,

For download use this code

Create a context attribute and set calculated as true then u will get a getter method,In that u write code like this

IWDInputStream stream = null;

try {

stream = WDResourceFactory.createInputStream(new FileInputStream(new File(<give the location of a file u want to download>));

}

catch (Exception e)

{

e.printStackTrace();

}

return stream;

for open file u set "resource"as Resource type context attribute

Former Member
0 Kudos

Hi Abilash,

For uploading use this code

try{

String Upload=wdContext.currentContextElement().getResource().getResourceName();

FileOutputStream fout=new FileOutputStream(new File(upload));

}

catch(Exception e)

{

e.getStackTrace();

}

Former Member
0 Kudos

Hi

Refer these links they maybe helpful to you

<i><u><b>Uploading and Downloading Files In Web Dynpro Java</b></u></i>

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081...

http://help.sap.com/saphelp_nw04/helpdata/en/43/85b27dc9af2679e10000000a1553f7/content.htm

<u><i><b>Uploading and Downloading Files In Web Dynpro Tables</b></i></u>

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982c...

<i><b>Some more links regarding Uploading and DownLoading Files</b></i>

Regards

SURYA

Former Member
0 Kudos
Former Member
0 Kudos

Hi Abilash,

Check the following links which uses the file upload ui element

http://help.sap.com/saphelp_nw04/helpdata/en/43/85b27dc9af2679e10000000a1553f7/content.htm

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/developi...

https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982c...

See these two blogs to know about how to implement this.

/people/rohit.radhakrishnan/blog/2005/05/27/uploading-files-to-km-repository-using-webdynpro-apis

/people/rekha.malavathu2/blog/2006/12/12/handling-fileupload-and-filedownload-in-netweaver-developer-studionwds-2004s

regards

Anil

reward points if useful