on 05-07-2008 5:51 PM
Hi Experts,
I have created the Java class, calculating sum is working fine using TableUtility blog.
I am trying to export the table data to Excel, for that I have created context element(Excelfile) and LinkToURL(url).
If there is any mistake in following code, please correct it.
Do I need set any parameters in LinkToURl properties?.
public void wdDoInit()
{
//@@begin wdDoInit()
ArrayList al = new ArrayList();
al.add(IPrivateResults.ISalesOrdersElement.MATERIAL);
al.add(IPrivateResults.ISalesOrdersElement.REQ__QTY);
wdContext.currentContextElement().setExcelfile((String)wdContext.currentContextElement().getTableutility().DownloadToExcel(al).get("url"));
//@@end
}
I am getting follwoing error...
-
java.lang.NullPointerException
at .sd.salesorderslist.Results.wdDoInit(Results.java:106)
at .sd.salesorderslist.wdp.InternalResults.wdDoInit(InternalResults.java:171)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
-
Thanks in advance,
Hi Jai,
See this document
Regards,
Edson Thomaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ruchi,
I already did it(LInktoURL reference is pointed to Context element), is it correct?.
All the coding part for this functionality is in DoInit, Do I need to add anything?.
I have created only one context element and one UI(Link to URL) element for this, Do I need to create any other elements?.
Thank you,
Hi,
I did some debugging(Commented the complete functionality in Java Utility and tried, just to induct error is from java utility class or farm my program)...
I figured out that, when I call the method it is thorwing exception....
ArrayList al = new ArrayList();
al.add(IPrivateResult.ISalesOrdersElement.MATERIAL);
al.add(IPrivateResult.ISalesOrdersElement.REQ__QTY);
Map m = wdContext.currentContextElement().getTableutility().DownloadToExcel(al);
java.lang.NullPointerException
at .componenets.Result.wdDoInit(Result.java:111)
at .componenets.wdp.InternalResult.wdDoInit(InternalResult.java:124)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
Doing anything wrong in the Arrylist?...Please advice..this is bit urgent!!!.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.