Skip to Content

In my Web Dynpro: Running Web Dynpro Applications over SAPGUI I showed how to access Web Dynpro Applications via SAPGUI using the function WDY_EXECUTE_IN_PLACE.

In this I will do the same application but using the the class CL_GUI_HTML_VIEWER.


Creating the program

Go to the Object Navigator (SE80) and create a new program.

Include programs

Now in the created program, add the following include programs:

GUI status and title

Create a GUI status like follows:

And a GUI title:

Global declarations and variables

Add the following code to the MZWDA_HTMLTOP include:

Creating the screen

Now create a screen:

Screen attributes

Screen layout

Screen elements attributes

  • Text Field:


  • Input Output Field:

  • Button:

  • Custom Control:

Screen element list

Screen flow logic

The screen flow logic is:

PBO modules logic

PAI module logic

Include MZWDA_HTMLF01 logic


Now it’s necessary to activate all objects and create a transaction like follows:

The result


This blog was based on the SAP program RSDEMO_HTML_VIEWER and I got some references in the blog from Thomas JungUpdated!: Calling a BSP application from a SAPGui Transaction.

And you can get more information about the class CL_GUI_HTML_VIEWER in the SAP Help Documentation.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

    1. Former Member Post author
      Hello Raja!

      Thank you to show me the blog from Thomas Jung. I updated the blog including this like a reference.
      I just write this new blog based on my last one because some people got problems when trying to use it in later versions of SAP, so, I decided to show another way to get the same result.
      Thank you so much for read this.


  1. Alejandro Bindi
    Useful blog! Just one comment: instead of hardcoding the application URL, you can just call static method cl_wd_utilities=>construct_wd_url to get it.



Leave a Reply