cancel
Showing results for 
Search instead for 
Did you mean: 

500 Internal server error on Export to Excel

former_member188632
Active Contributor
0 Kudos

Hello All,

I have implemented Export to Excel using this tutorial:

http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproJava-ExportingTableDataUsingOn-DemandStreams-SAPNW+7.0

However, after deploying the application, it simply throws 500 internal server error. I have followed each step carefully but I guess something is missing or I am doing it wrongly. How should I go about resovling this issue? I have been trying to fix this since yesterday and yet no success.

As it is failing right after the deployment that means doInit() method of my view is not able to execute the method mentioned below:

wdThis.wdGetExportExcelCompInterface().initialize(wdContext.nodeVn_OutputTable(), getColumnInfos());

I have defined getColumnInfos() method in the view but not sure why it is failing? Any thoughts on this? Has anyone implemented this? If not, please direct me to some simple export to excel code snippet or document. I have been struggling to implement simple Export to Excel on table. (I am not using RFC. The data is coming from KM APIs)

Ameya

Accepted Solutions (1)

Accepted Solutions (1)

p330068
Active Contributor
0 Kudos

Dear Ameya,

You can check the log file get the clue of the issue. May be there is some issue while getting data from KM.

Refer to webdynpro log:

Login to SAP Portal URL with admin right and then replace /irj/portal to /irj/servlet/prt/portal/prtroot/com.sap.portal.runtime.admin.logviewer.default

Hope you will find more information about issue in logs.

Best Regards

Arun Jaiswal

former_member188632
Active Contributor
0 Kudos

Dear Arun,

I did not find ant log file for my application. Did you notice the update I posted in the earlier reply related to required controllers?

Ameya

p330068
Active Contributor
0 Kudos

Dear Ameya,

Just now I have seen above updates.

That is correct, you need to use the ExelExportComp as Used Webdynpro Components if you are using in Other DC. Even it is used in Used Webdynpro Components in Diagram view in wiki.

So now you should look into the download link issue.

Best Regards

Arun Jaiswal

former_member188632
Active Contributor
0 Kudos

Thanks for the information. But when I am maintaining ExportExcelComp as a reference, I get Internal Server Error. Any other inputs?

Ameya

p330068
Active Contributor
0 Kudos

Dear Ameya,

For Comunication between DC's, you should use the other DC's as Used Webdypro Component. If you are using with different scenario with webdynpro reference, then please have a look at below document might help to resolve your issue.

http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/content.htm

Best Regards

Arun Jaiswal

former_member188632
Active Contributor
0 Kudos

Dear Arun,

Unfortunately, my client do not have NWDI instance. Hence all are local projects no point of used DCs. 😐

Ameya

p330068
Active Contributor
0 Kudos

Dear Ameya,

Then you should use the webdynpro reference as mentioned above help.sap.com link.

I would recommend to use the NWDI to have version control of the webdynpro projects and other NWDI benifits. I think you should advice client for the same. Because you only need to deploy the NWDI(DTR, CBS, CMS) components in the server. I think it will not required separate NWDI servers if there is not many tracks.

You might want to refer to http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs) to use in the same webdynpro project for export to excel functionality.

Hope it will helps

Best Regards

Arun Jaiswal

former_member188632
Active Contributor
0 Kudos

Dear Arun,

Thanks for patiently responding my posts. Appreciate it.

I have already proposed NWDI to my client and they are in process of acquiring the servers. Hopefully it will be available in about a month's time. But as for now, I have no choice but create local projects. By the way, the link you provided is broken.

Ameya

p330068
Active Contributor
0 Kudos

Dear Ameya,

Thanks. You are welcome.

Please try now [http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs)|http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs)]

Best Regards,

Arun Jaiswal

Answers (3)

Answers (3)

former_member188632
Active Contributor
0 Kudos

Resolved of my own

junwu
Active Contributor
0 Kudos

i would recommend to go with some basic downloading if your portal consultant is not that capable of that.

former_member188632
Active Contributor
0 Kudos

Dear John,

In that case, can you point me to some basic export to excel tutorial?

Ameya

p330068
Active Contributor
0 Kudos

Dear Mr. John,

***Please do not comment like this in the SAP forums. We should only think about providing the solution if we can other than using harsh words.

Best Regards,

Arun Jaiswal

junwu
Active Contributor
0 Kudos

why? you have to face the reality

it seems they have no understanding of the "component usage" and "component controller" when adding required controller.

how can you expect they will handle this kind of advanced topic used the on demand export?

sometimes basic downloading is enough.

i think on demand downloading only useful to specific case, like you have a lot file in one page to be downloaded

former_member188632
Active Contributor
0 Kudos

Dear John,

Thanks for the encouraging words. I spent last entire evening & half of this day reading through every small concept & finally implemented the On-demand excel export successfully just a while ago. It is not that I was not aware of component usage and controller, but my application was throwing dump and I was cluless of the cause. That's why I asked for second opinion from all of you who are expert in WDJ. I am not an expert in WDJ as I majorly worked on Portal Admin & other related areas.

However, your reply pushed me to go into every minute concept and that helped me get over this issue.

Closing the thread thanks. Arun & John.

Ameya

Edited by: Ameya Pimpalgaonkar on Mar 7, 2012 10:21 AM

junwu
Active Contributor
0 Kudos

good to know to that.

i hope my words didn't hurt you.

500 internal error is too general.

if you could have provided the dump, we may help you better.

former_member188632
Active Contributor
0 Kudos

Dear John,

No, your words did not hurt me but they made me think. Even after coming home from office, I kept on researching, reading and understanding the concepts involved. I even made a few quick notes for better understanding. Later this morning, I cleaned up my component first and then started the code once again but this time with better understanding and to my surprise, it worked immediately And personally, I learned so much that I can implement this functionality again, anytime any day

Thanks again.

Ameya

former_member188632
Active Contributor
0 Kudos

Just an update: I also tried commenting the mentioned line of code. However, still 500 internal server error. What am I missing?

Yet another update: The issue is not with doInit() code. It is with required components. In the first view where I have LinktoURL for downloading data to excel, I have defnied following components as required:

ExcelExportComp (Web Dynpro Component Interface Controller)

With this, I get 500 Internal server error.

However, instead if I use following as a required component, I can at least execute the application and dowalod link is grade out.

ExelExportComp (Web Dynpro Component Usage <ExportExcelComp - com.company >)

Ameya

Edited by: Ameya Pimpalgaonkar on Mar 6, 2012 6:31 AM