Skip to Content

Report Program that reads Excel File does not work in Webdynpro

Jul 25, 2017 at 07:56 AM


avatar image

I have a report program that will open the excel file and execute the macro in it. This is working upon running in SAP GUI. However, when running in Webdynpro this is not working. This program is being called via transaction code and configured in PFCG(role based). Can someone help me out how to perform the requirement. Is this even possible?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mike Pokraka Jul 25, 2017 at 10:07 AM

Raymond is exactly right. When you write "open the excel file and execute the macro in it", this can only be done via OLE, which requires a SAPGUI installation on Windows.

Since WebDynpro apps are independent of a SapGUI, and can be run on Linux, OSX, Android, or whatever, this won't be possible using standard functionality. The best you could do is launch Excel (possibly using a download link?) and let the user execute the macro. It will be a bit unpredictable what happens if the user is running different browsers on different platforms, so generally not recommended.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Yes Mike, I agree that this can only be done via OLE. I am thinking of a possible solution that instead of the report program I would rather create a Dynpro application and utilize the SAP Office integration. Do you think based on my requirement, could this be possible? I am planning to upload the excel file first in the MIME repository and perform the execution of macro. But is this a good approach for this requirement? I have read different forums on this and still didn't come up with a solid solution. I hope you can help me out on this. Thank you!


Yes, going via MIME repository is an option, this is the type of setup I had in mind with my earlier suggestion of launching Excel.

I haven't used it, but perhaps it may be possible to open Excel inline within the browser window. In plain HTML this is achieved with the Content-Disposition tag, not sure if there is such a thing in the WDA download link components (no time to check).

Raymond Giuseppi
Jul 25, 2017 at 09:54 AM

You report seems to use some GUI functions that are not available in a WebDynpro (some CL_GUI* classes?) adapt your report to use other methods when executed without GUI session.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Raymond! I agree with you. Still going to look for other solution. Also, it would be greate if you could share some suggestions what classes and methods can I use for this requirement?