2007 Mar 14 6:01 AM
Hi,
I have a simple requirement, but It seems complex to me as I dont know how to do that .can some one help me in this?
I am creating a module pool program .where I need to insert my clients logo in the screen of the selection .how can I do this.. and to tell I am working in 4.6 C
Regards,
Antony,
2007 Mar 15 6:00 AM
hi
the logo should be added in web repository.
The tcode is smw0.
then the picture should be in gif format.
thanks n regards
shinu
Hi,
I have a simple requirement, but It seems complex to me as I dont know how to do that .can some one help me in this?
I am creating a module pool program .where I need to insert my clients logo in the screen of the selection .how can I do this.. and to tell I am working in 4.6 C
Regards,
Antony,
2007 Mar 14 6:28 AM
Hi Antony,
refer the following link:
http://www.sapdevelopment.co.uk/graphics/add_image.htm
Hope this helps.
Reward if helpful.
Regards,
Sipra
2007 Mar 14 6:33 AM
2007 Mar 14 6:33 AM
Hi
You can display logo(s) on your screen using the custom control function. A custom control is an area on the screen, created using the screen painter. Custom controls are used to embed controls. Container controls are instances of special global classes from the SAP Control Framework. The global class for custom controls is called CL_GUI_CUSTOM_CONTAINER. To link a custom control to a container control, pass the custom control name to the CONTAINER_NAME parameter of the container control constructor when you instantiate it. The following is a sample program to demonstrate the logo display using the custom control. This program was written in SAP4.6C. Design a screen with the custom control, by name PICTURE_CONTAINER. It has the following flow logic:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
The GUI status SCREEN100 has the functions BACK, EXIT, and CANCEL (all with type E).
<b>Code</b>
REPORT ZKAVITHA_TEST .
**********************************************************
* Author : Kavitha Koleti *
* Date : 27-Oct-2002 *
* Purpose : This program displays the logo on the screen *
**********************************************************
* 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.Regards
Sudheer
2007 Mar 14 1:18 PM
hi,
i tried with code....and it is working fine but with the sap logos...when i tried to use my clients logo...i am not able to do that...i have uploaded the logo using rstxldmc program. i even tried with the logo which i have uploaded to the system using se78...but with no improvement ...i stopped...i there any other way to upload the logo..or i am doing it correctly?
2007 Mar 14 1:26 PM
Hi
Check the Program:
RSDEMO_CUSTOM_CONTROL
once.
Regards,
kumar
2007 Mar 15 5:08 AM
I am attaching the code which I have used .
It is working fine when I am using the sap Logos but, I am not able to get with my client logo I have uploaded the logo using se78. is there any setting I need to do while uploading the logo. And can some one explain me why my code is not working for my client logo alone and working for sap logo..
&----
*& Module init_picture_control OUTPUT
&----
text
----
MODULE init_picture_control OUTPUT.
PERFORM init_picture_control.
ENDMODULE. " init_picture_control OUTPUT
&----
*& Form init_picture_control
&----
text
----
--> p1 text
<-- p2 text
----
FORM init_picture_control .
DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,
html_table LIKE w3html OCCURS 1,
return_code LIKE w3param-ret_code,
content_type LIKE w3param-cont_type,
content_length LIKE w3param-cont_len,
pic_data LIKE w3mime OCCURS 0,
pic_size TYPE i.
IF url IS INITIAL.
IF logo_container IS INITIAL.
CREATE OBJECT logo_container
EXPORTING container_name = 'LOGO_CONTAINER'
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDIF.
IF logo IS INITIAL.
CREATE OBJECT logo
EXPORTING parent = logo_container
EXCEPTIONS OTHERS = 1.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDIF.
REFRESH query_table.
query_table-name = '_OBJECT_ID'. "#EC NOTEXT
query_table-value = 'ENJOYSAP_LOGO'.
APPEND query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 2
OTHERS = 3.
IF sy-subrc = 0.
pic_size = content_length.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
EXCEPTIONS
OTHERS = 1.
CALL METHOD logo->load_picture_from_url
EXPORTING
url = url
EXCEPTIONS
OTHERS = 1.
ENDIF.
ENDFORM. " init_picture_control
null
2007 Mar 15 5:35 AM
The logo to be used has to be uploaded using Tcode OAOR . Logo uploaded in SE78 works only for SAPScript.
Use class name 'PICTURES' class type 'OT' and upload your logo here.
Steps are:
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window , expand it.
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo. (use gif file)
Message was edited by: Sudhir
Sudhir Bhate
2007 Mar 15 6:00 AM
hi Sudhir,
i tried to open T-code OAOR...but how to up lad the logo there...
i have also used the key words which u have mentioned and executed...i gave me a new screen, then how to Continue from there
2007 Mar 15 6:00 AM
hi
the logo should be added in web repository.
The tcode is smw0.
then the picture should be in gif format.
thanks n regards
shinu
2007 Mar 15 6:04 AM
2007 Mar 15 6:07 AM
hi
code:
DATA: container TYPE REF TO cl_gui_custom_container.
DATA: picture TYPE REF TO cl_gui_picture .
DATA: url(256) .
*Creating the custom container CUSTOM
CREATE OBJECT container
EXPORTING container_name = 'CUSTOM'.
create the picture control
CREATE OBJECT picture
EXPORTING parent = container.
*calling FM for URL-Login
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
objid = 'ZPHLOGIN' "This picture should be added in smw0 as gif format.
lifetime = cndp_lifetime_transaction
IMPORTING
url = url
EXCEPTIONS
OTHERS = 1.
loading picture
IF sy-subrc = 0.
CALL METHOD picture->load_picture_from_url
EXPORTING
url = url.
ENDIF.
hope this would help u.
regards
shinu
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |