1: Create a container in your module pool screen with name "HTML_CONTROL".
2: Create object as below:Point this object to the module pool control using its name
data: html_control TYPE REF TO cl_gui_html_viewer,
my_container TYPE REF TO cl_gui_custom_container.
CREATE OBJECT my_container
EXPORTING
container_name = 'HTML_CONTROL'.
CREATE OBJECT html_control
EXPORTING
parent = my_container.
3: You can load image or text to module pool screen using this OBJECT reference only. An exaple for loading graphics is shown below:
CALL METHOD html_control->load_mime_object
EXPORTING
object_id = 'HTMLCNTL_TESTHTM2_SAPLOGO'
object_url = 'SAPLOGO.GIF'
EXCEPTIONS
OTHERS = 1.
****************
Example program: SAPHTML_EVENTS_DEMO
No comments:
Post a Comment