on 09-02-2011 9:46 PM
Can we have a web dynpro application that just returns an Excel file in the response with no open windows? Similar to a java servlet that is used to download a Excel file?
This basically means that I cannot use wdComponentAPI.getWindowManager().createNonModalExternalWindow()
Java Servlet Code
HttpSession session = request.getSession(); // get a handle on the session id
response.setContentType("application/download");
response.setHeader("Content-Disposition", "filename=RTIS_Report.xls");
PrintWriter out = null;
out = response.getWriter();
String report = request.getParameter("REPORT");
JCO.Table lines = download(request, session, report);
for (int i = 0; i < lines.getNumRows(); i++) {
lines.setRow(i);
String content = lines.getString("LINES") + "\n";
out.write(content);
out.flush();
}
out.flush();
out.close();
}
Hi Faraz,
then why not simply use a servlet?
Web Dynpro is SAP's MVC framework, and as such requires at least one View element, so I don't think your requirement is possible (i.e. to write directly to the output stream)
Best,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.