‎2007 Sep 28 10:11 AM
Dear all,
I need to show some infos in a popup to all users (SAP GUI & WEB GUI) after their logon to the system. I am using the user exit function EXIT_SAPLSUSF_001 and tryed several FMs like TH_POPUP, Z_POPUP_TO_INFORM or Z_POPUP_TO_CONFIRM_STEP, but it seems to me that they don't work for the WEB GUI.
Can anyone help me with the procedure to create a pop-up window for the WEB GUI called in the user exit function EXIT_SAPLSUSF_001 or should it be called in another user exit?
‎2007 Sep 28 10:19 AM
hi ..
u try this code..
i hope it will help for u,..
DATA: html_control TYPE REF TO cl_gui_html_viewer,
my_container TYPE REF TO cl_gui_custom_container,
edurl(2048).
EDURL = 'WWW.SDN.SAP.COM'.
SET SCREEN 9000.
&----
*& Module STATUS_9000 OUTPUT
&----
text
----
MODULE status_9000 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
IF my_container IS INITIAL.
CREATE OBJECT my_container
EXPORTING
container_name = 'CONTAINER_HTML'
EXCEPTIONS
OTHERS = 1.
ENDIF.
IF html_control IS INITIAL.
CREATE OBJECT html_control
EXPORTING
parent = my_container.
PERFORM load_home_page.
ENDIF.
ENDMODULE. " STATUS_9000 OUTPUT
&----
*& Module USER_COMMAND_9000 INPUT
&----
text
----
MODULE user_command_9000 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
&----
*& Form load_home_page
&----
text
----
--> p1 text
<-- p2 text
----
FORM load_home_page .
DATA: doc_url(80).
CALL METHOD html_control->load_html_document
EXPORTING
document_id = 'HTMLCNTL_CNHTTST1_START'
IMPORTING
assigned_url = doc_url
EXCEPTIONS
OTHERS = 1.
*
IF sy-subrc EQ 0.
CALL METHOD html_control->show_url
EXPORTING
url = doc_url.
ENDIF.
CALL METHOD html_control->show_url
EXPORTING
url = edurl
EXCEPTIONS
cnht_error_parameter = 1
OTHERS = 2.
IF sy-subrc GE 2.
RAISE cntl_error.
ENDIF.
ENDFORM. " load_home_page
regards,
baskaran.
‎2007 Sep 28 10:19 AM
hi ..
u try this code..
i hope it will help for u,..
DATA: html_control TYPE REF TO cl_gui_html_viewer,
my_container TYPE REF TO cl_gui_custom_container,
edurl(2048).
EDURL = 'WWW.SDN.SAP.COM'.
SET SCREEN 9000.
&----
*& Module STATUS_9000 OUTPUT
&----
text
----
MODULE status_9000 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
IF my_container IS INITIAL.
CREATE OBJECT my_container
EXPORTING
container_name = 'CONTAINER_HTML'
EXCEPTIONS
OTHERS = 1.
ENDIF.
IF html_control IS INITIAL.
CREATE OBJECT html_control
EXPORTING
parent = my_container.
PERFORM load_home_page.
ENDIF.
ENDMODULE. " STATUS_9000 OUTPUT
&----
*& Module USER_COMMAND_9000 INPUT
&----
text
----
MODULE user_command_9000 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
&----
*& Form load_home_page
&----
text
----
--> p1 text
<-- p2 text
----
FORM load_home_page .
DATA: doc_url(80).
CALL METHOD html_control->load_html_document
EXPORTING
document_id = 'HTMLCNTL_CNHTTST1_START'
IMPORTING
assigned_url = doc_url
EXCEPTIONS
OTHERS = 1.
*
IF sy-subrc EQ 0.
CALL METHOD html_control->show_url
EXPORTING
url = doc_url.
ENDIF.
CALL METHOD html_control->show_url
EXPORTING
url = edurl
EXCEPTIONS
cnht_error_parameter = 1
OTHERS = 2.
IF sy-subrc GE 2.
RAISE cntl_error.
ENDIF.
ENDFORM. " load_home_page
regards,
baskaran.