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.
Developing
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
Screen element list
Screen flow logic
The screen flow logic is:
PBO modules logic
PAI module logic
Include MZWDA_HTMLF01 logic
Finish
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.jung/blog - Updated!: 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.