on 04-19-2010 9:47 AM
Hi Friends,
I have one Query on WDJ. Here I have two requirements.
I have done click on u201CExport Excelu201D Button that data was download into Excel file Now my requirement is click on Save Button that file will save into (/exchange/CED) this path of R/3 System.
CED -
>is R/3 System ID
Under System id we can save this file.
Here EP Server and R/3 Servers in Diff Systems.
I was write codeing
InputStream text = null;
int temp = 0;
try
{
File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());
// String File = "abc.xls";
// String file = "anat" + ".xls";
wdComponentAPI.getMessageManager().reportSuccess("File::"+file);
FileOutputStream op = new FileOutputStream(file);
// FileOutputStream op = new FileOutputStream("D://usr//sap//BPE//"+file);
// FileOutputStream op = new FileOutputStream("D://KumarDev-BackUp//"+file);
wdComponentAPI.getMessageManager().reportSuccess("op::"+op);
if (wdContext.currentContextElement().getResource()!= null)
{
text = wdContext.currentContextElement().getResource().read(false);
while((temp=text.read())!= -1)
{
op.write(temp);
}
}
op.flush();
op.close();
// path = file.getAbsolutePath();
path = "/exchange/CED/"+file;
wdComponentAPI.getMessageManager().reportSuccess("path:"+path);
}
catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportSuccess("ex.printStackTrace()");
My Req is that file will saved in this path (path = "/exchange/CED/"+file; )
Regards
Vijay Kalluri
Edited by: KalluriVijay on Apr 20, 2010 11:01 AM
hi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Friends,
I have one Query on WDJ. Here I have two requirements.
I have done click on u201CExport Excelu201D Button that data was download into Excel file Now my requirement is click on Save Button that file will save into (/exchange/CED) this path of R/3 System.
CED -
>is R/3 System ID
Under System id we can save this file.
Here EP Server and R/3 Servers in Diff Systems.
I was write codeing
InputStream text = null;
int temp = 0;
try
{
File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());
// String File = "abc.xls";
// String file = "anat" + ".xls";
wdComponentAPI.getMessageManager().reportSuccess("File::"+file);
FileOutputStream op = new FileOutputStream(file);
// FileOutputStream op = new FileOutputStream("D://usr//sap//BPE//"+file);
// FileOutputStream op = new FileOutputStream("D://KumarDev-BackUp//"+file);
wdComponentAPI.getMessageManager().reportSuccess("op::"+op);
if (wdContext.currentContextElement().getResource()!= null)
{
text = wdContext.currentContextElement().getResource().read(false);
while((temp=text.read())!= -1)
{
op.write(temp);
}
}
op.flush();
op.close();
// path = file.getAbsolutePath();
path = "/exchange/CED/"+file;
wdComponentAPI.getMessageManager().reportSuccess("path:"+path);
}
catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportSuccess("ex.printStackTrace()");
My Req is that file will saved in this path (path = "/exchange/CED/"+file; )
Regards
Vijay Kalluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.