‎2010 Aug 05 6:57 AM
Hi all experts,
I have to display some points in a part of a module pool screen. I dont have any idea on this, if anyone can give some example.
Thanks & Regards,
Rock.
‎2010 Aug 05 7:59 AM
It is possible to view html pages with class CL_GUI_HTML_VIEWER in a custom control of a module pool screen.
‎2010 Aug 05 7:59 AM
It is possible to view html pages with class CL_GUI_HTML_VIEWER in a custom control of a module pool screen.
‎2010 Aug 05 8:07 AM
Thanks for the reply Kerem Kayacan ,
I have created a custom container in my screen. I want to display some default data. How to achieve that using CL_GUI_HTML_VIEWER or any other class. Plz provide example code if possible.
Thanks & Regards,
Rock.
‎2010 Aug 05 8:34 AM
What default points you want to display? Is it dynamic points?
Gothrough some example program, if you want to display it in container
ITSQ_HTML_CONTROL
BCALV_DEMO_HTML
‎2010 Aug 05 8:41 AM
Thanks Tharani,
I have some STATIC data like "Welcome to SDN' for example, how to display that?
Thanks & Regards,
Rock.
‎2010 Aug 05 8:51 AM
Hi,
Kindly refer below link which display the footer data in HTML texts.
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-ALVFooterinHTML+Display
And use the methods as per your requirement.
Thanks,
K.Tharani.
‎2010 Aug 05 8:55 AM
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.
ags.
‎2010 Aug 05 9:07 AM
HI,
In ur screen place a custom control (say with name CONTAINER )....
Check the below code.....
DATA : container TYPE REF TO cl_gui_custom_container,
text_editor TYPE REF TO cl_gui_textedit,
lt_texttab TYPE soli_tab.
CALL SCREEN 100. " Assuming ur screen no is 100
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT. "PBO MODULE
SET PF-STATUS '001'.
IF sy-ucomm EQ 'BACK'.
LEAVE PROGRAM.
ENDIF.
CHECK container IS NOT BOUND.
CREATE OBJECT container EXPORTING container_name = 'CONTAINER'.
CREATE OBJECT text_editor EXPORTING parent = container
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder.
***to put some text in the text editor.
APPEND 'Welcome to SDN' TO lt_texttab.
CALL METHOD text_editor->set_text_as_r3table
EXPORTING
table = lt_texttab " Contents of this table is displayed in text editor
EXCEPTIONS
error_dp = 1
error_dp_create = 2
OTHERS = 3.
IF sy-subrc 0.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT. "PAI MODULE
CALL METHOD text_editor->get_text_as_r3table
IMPORTING
table = lt_texttab " Text tyed in editor gets collected in this table
EXCEPTIONS
error_dp = 1
error_dp_create = 2
OTHERS = 3.
IF sy-subrc 0.
ENDIF.
BREAK-POINT. " Check the table lt_texttab
ENDMODULE. " USER_COMMAND_0100 INPUTThis is a simple example of text editor.
You can also use it to display test in your screen.
May it helps you.
Regards.
DS.
Edited by: deepaks sharma on Aug 5, 2010 10:12 AM
‎2010 Aug 05 9:25 AM
I think below SAP program does all that you want to do in your program:
SAPHTML_EVENTS_DEMO
‎2010 Aug 05 10:33 AM
Thanks Deepaks sharma, for your help and all others who spent time to reply this thread.