Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Module poolu0085.logo insert in the screen

Former Member
0 Likes
1,642

Hi,

I have a simple requirement, but It seems complex to me as I don’t 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,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,540

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

the logo should be added in web repository.

The tcode is smw0.

then the picture should be in gif format.

thanks n regards

shinu

11 REPLIES 11
Read only

Former Member
0 Likes
1,540

Hi Antony,

refer the following link:

http://www.sapdevelopment.co.uk/graphics/add_image.htm

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,540

hi,

see RSDEMO_CUSTOM_CONTROL program once.

regard,

ananth.

Read only

Former Member
0 Likes
1,540

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

Read only

Former Member
0 Likes
1,540

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?

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,540

Hi

Check the Program:

RSDEMO_CUSTOM_CONTROL

once.

Regards,

kumar

Read only

Former Member
0 Likes
1,540

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

Read only

Former Member
0 Likes
1,540

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

Read only

Former Member
0 Likes
1,540

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

Read only

Former Member
0 Likes
1,541

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

Read only

Former Member
0 Likes
1,540

I have added steps in my last post. Please see them

Read only

Former Member
0 Likes
1,540

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