2009 Mar 09 12:05 PM
Hi GURU ,
Can anyone Please tell me , How Can I insert Logo into Modulepool Screen.
I have created Four Screen In One of my Modulepool Program , Client want to see Logo In Each Screen.
How Can I insert Logo .
Please tell me
2009 Mar 09 12:21 PM
Hi,
You can easily display your logo using CL_DD_DOCUMENT class like used in the snippet below:
CLASS cl_dd_viewer DEFINITION.
PUBLIC SECTION.
METHODS: constructor,
dd_refresh.
PRIVATE SECTION.
TYPE-POOLS sdydo. "dd type pools
DATA: o_dd_document TYPE REF TO cl_dd_document, "dynamic document ref.variable
o_docking_container TYPE REF TO cl_gui_docking_container,
o_html_viewer TYPE REF TO cl_gui_html_viewer,
o_custom_container TYPE REF TO cl_gui_custom_container.
METHODS: dd_add_picture,
dd_add_text,
dd_add_link,
dd_display_document.
ENDCLASS. "cl_dd_viewer DEFINITION
*----------------------------------------------------------------------*
* CLASS cl_dd_viewer IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_dd_viewer IMPLEMENTATION.
METHOD constructor.
"create dd document
CREATE OBJECT o_dd_document
EXPORTING
no_margins = 'X'.
"fill it in
me->dd_add_picture( ).
me->dd_add_text( ).
me->dd_add_link( ).
me->dd_display_document( ).
ENDMETHOD. "constructor
METHOD dd_add_picture.
DATA: pic_txt TYPE string VALUE 'Here should be logo displayed. If you can''t see it, please maintain t-code OAOR'.
CALL METHOD o_dd_document->add_picture
EXPORTING
picture_id = 'DEV_PICTURES' "name of the node in OAOR t-code, where you loaded your logo
width = '350'
alternative_text = pic_txt.
ENDMETHOD. "dd_add_picture
METHOD dd_add_text.
CALL METHOD o_dd_document->add_gap
EXPORTING
width = 55.
"Developed by
CALL METHOD o_dd_document->add_text
EXPORTING
text = text-ln1.
ENDMETHOD. "dd_add_text
METHOD dd_add_link.
DATA: tip_txt TYPE string VALUE 'Report disfunction'.
CALL METHOD o_dd_document->add_link
EXPORTING
url = "some mail address
tooltip = tip_txt
text = '"your name i.e. to be displayed as you are the one who developed it
ENDMETHOD. "dd_add_link
METHOD dd_display_document.
CALL METHOD o_dd_document->display_document
EXPORTING
container = 'DD_CONTAINER'. "you need to provide container name which logo is to be placed in (name of control in the screen)
CHECK sy-subrc = 0.
"get html viewer of DD to hide border of picture
o_html_viewer = o_dd_document->html_control.
CALL METHOD o_html_viewer->set_ui_flag
EXPORTING
uiflag = cl_gui_html_viewer=>uiflag_no3dborder.
ENDMETHOD. "dd_display_document
METHOD dd_refresh.
CALL METHOD o_dd_document->display_document
EXPORTING
reuse_control = 'X'
container = 'DD_CONTAINER'
* parent =
* EXCEPTIONS
* html_display_error = 1
* others = 2
.
ENDMETHOD. "dd_refresh
ENDCLASS. "cl_dd_viewer IMPLEMENTATION
DATA: o_dd_viewer TYPE REF TO cl_dd_viewer.
As you may noticed, this also display some text below your logo i.e. your mail as url link under your name
Regards
Marcin
Hi,
Maintain the logo at your desktop, then go to the Tcode OAER then upload the logo
in the module PBO event call the function module
Reuse_alv_commentary_write and pass the necessary parameters
You can search in SDN you will get lot of therds.
Regards
Ramakrishna Pathi
2009 Mar 09 12:10 PM
Hi,
Maintain the logo at your desktop, then go to the Tcode OAER then upload the logo
in the module PBO event call the function module
Reuse_alv_commentary_write and pass the necessary parameters
You can search in SDN you will get lot of therds.
Regards
Ramakrishna Pathi
2009 Mar 09 12:13 PM
REPORT ZSURESH_TEST .
Type declarations.....................
TYPES pict_line(256) TYPE c.
data declarations......................
DATA :init,
container TYPE REF TO cl_gui_custom_container,
editor TYPE REF TO cl_gui_textedit,
picture TYPE REF TO cl_gui_picture,
pict_tab TYPE TABLE OF pict_line,
url(255) TYPE c.
CALL SCREEN 100.
Dialog modules......................................
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN100'.
IF init is initial.
init = 'X'.
CREATE OBJECT:
container EXPORTING container_name = 'PICTURE_CONTAINER',
picture EXPORTING parent = container.
ENDIF.
IMPORT pict_tab = pict_tab FROM DATABASE abtree(pi) ID 'ENJOY'.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'GIF'
TABLES
data = pict_tab
CHANGING
url = url.
CALL METHOD picture->load_picture_from_url EXPORTING url = url.
CALL METHOD picture->set_display_mode
EXPORTING display_mode = picture->display_mode_fit_center.
ENDMODULE.
MODULE cancel INPUT.
LEAVE TO SCREEN 0.
ENDMODULE.
note : the container in ur screen is 'PICTURE_CONTAINER'
this helps
Regards
2009 Mar 09 12:15 PM
please search in the forum before posting ....
the same question is already there...
look at my search...
https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=logoinmodule+pool&adv=false&sortby=cm_rnd_rankvalue
2014 Jan 14 5:41 AM
Hi, The given link is not working.
Thanks & Regards
Priyesh Shah
2009 Mar 09 12:21 PM
Hi,
You can easily display your logo using CL_DD_DOCUMENT class like used in the snippet below:
CLASS cl_dd_viewer DEFINITION.
PUBLIC SECTION.
METHODS: constructor,
dd_refresh.
PRIVATE SECTION.
TYPE-POOLS sdydo. "dd type pools
DATA: o_dd_document TYPE REF TO cl_dd_document, "dynamic document ref.variable
o_docking_container TYPE REF TO cl_gui_docking_container,
o_html_viewer TYPE REF TO cl_gui_html_viewer,
o_custom_container TYPE REF TO cl_gui_custom_container.
METHODS: dd_add_picture,
dd_add_text,
dd_add_link,
dd_display_document.
ENDCLASS. "cl_dd_viewer DEFINITION
*----------------------------------------------------------------------*
* CLASS cl_dd_viewer IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_dd_viewer IMPLEMENTATION.
METHOD constructor.
"create dd document
CREATE OBJECT o_dd_document
EXPORTING
no_margins = 'X'.
"fill it in
me->dd_add_picture( ).
me->dd_add_text( ).
me->dd_add_link( ).
me->dd_display_document( ).
ENDMETHOD. "constructor
METHOD dd_add_picture.
DATA: pic_txt TYPE string VALUE 'Here should be logo displayed. If you can''t see it, please maintain t-code OAOR'.
CALL METHOD o_dd_document->add_picture
EXPORTING
picture_id = 'DEV_PICTURES' "name of the node in OAOR t-code, where you loaded your logo
width = '350'
alternative_text = pic_txt.
ENDMETHOD. "dd_add_picture
METHOD dd_add_text.
CALL METHOD o_dd_document->add_gap
EXPORTING
width = 55.
"Developed by
CALL METHOD o_dd_document->add_text
EXPORTING
text = text-ln1.
ENDMETHOD. "dd_add_text
METHOD dd_add_link.
DATA: tip_txt TYPE string VALUE 'Report disfunction'.
CALL METHOD o_dd_document->add_link
EXPORTING
url = "some mail address
tooltip = tip_txt
text = '"your name i.e. to be displayed as you are the one who developed it
ENDMETHOD. "dd_add_link
METHOD dd_display_document.
CALL METHOD o_dd_document->display_document
EXPORTING
container = 'DD_CONTAINER'. "you need to provide container name which logo is to be placed in (name of control in the screen)
CHECK sy-subrc = 0.
"get html viewer of DD to hide border of picture
o_html_viewer = o_dd_document->html_control.
CALL METHOD o_html_viewer->set_ui_flag
EXPORTING
uiflag = cl_gui_html_viewer=>uiflag_no3dborder.
ENDMETHOD. "dd_display_document
METHOD dd_refresh.
CALL METHOD o_dd_document->display_document
EXPORTING
reuse_control = 'X'
container = 'DD_CONTAINER'
* parent =
* EXCEPTIONS
* html_display_error = 1
* others = 2
.
ENDMETHOD. "dd_refresh
ENDCLASS. "cl_dd_viewer IMPLEMENTATION
DATA: o_dd_viewer TYPE REF TO cl_dd_viewer.
As you may noticed, this also display some text below your logo i.e. your mail as url link under your name
Regards
Marcin
2009 Mar 09 1:07 PM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |