Skip to Content
avatar image
Former Member

Report Program that reads Excel File does not work in Webdynpro

Hi,
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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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).

  • 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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?