Skip to Content
0
Former Member
May 07, 2008 at 04:51 PM

Exporting table to Excel

20 Views

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,