Skip to Content
author's profile photo Former Member
Former Member

how to have a logo on a module pool screen?

hi i have a custom screen on this screen i need to embbed a image( company logo ). How to achieve this?

basically if we goto tcode SMARTFORMS on the first screen u can see a image .... i want to have very similar image on our custom screen.

any idea how to achieve the same.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2006 at 04:21 AM

    Hi,

    Here the sample code:

    Steps:
    
    Create a screen
    Place a custom container for the picture on the screen. 
    Name the container GO_PICTURE_CONTAINER.
     
    * Type pool for using SAP icons 
    TYPE-POOLS: icon.
    
    * Declarations
    DATA:
      go_picture                 TYPE REF TO cl_gui_picture,
      go_picture_container  TYPE REF TO cl_gui_custom_container.
    
    MODULE status_0100 OUTPUT.
      IF go_picture_container IS INITIAL.
    
    *   Create obejcts for picture and container and
    *   setup picture control
        CREATE OBJECT go_picture_container
          EXPORTING
            container_name = 'PICTURE_CONTAINER'.
    
        CREATE OBJECT go_picture
          EXPORTING
            parent = go_picture_container.
    
    *   Set display mode (Stretching, original size etc.)
        CALL METHOD go_picture->set_display_mode
          EXPORTING
            DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
            EXCEPTIONS      = 1.
    
    *   Load picture from SAP Icons. To oad a picture from an URL use method
    *   load_picture_from_url
        CALL METHOD go_picture->load_picture_from_sap_icons
          EXPORTING
             icon             = icon_delete
             EXCEPTIONS error = 1.
      ENDIF.
    
    ENDMODULE.  

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2006 at 04:27 AM

    Hi,

    You can use the class CL_GUI_PICTURE for achieving your result.

    Just create a custom container in the screen and you can load picture (from your desktop) or standard icons into the container.

    The code will be like this.

    Suppose the container name is PICTURE

    data: container type ref to cl_gui_custom_container,

    pic type ref to cl_gui_picture.

    START-OF-SELECTION.

    call screen 100.

    module STATUS_0100 output.

    CREATE OBJECT container

    EXPORTING

    • PARENT =

    container_name = 'PICTURE'.

    CREATE OBJECT pic

    EXPORTING

    • LIFETIME =

    • SHELLSTYLE =

    parent = container.

    CALL METHOD pic->set_display_mode

    EXPORTING

    display_mode = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER

    EXCEPTIONS

    ERROR = 1

    others = 2

    .

    CALL METHOD pic->load_picture_from_url

    EXPORTING

    url = 'file://D:\cb.jpg'

    • IMPORTING

    • RESULT =

    EXCEPTIONS

    ERROR = 1

    others = 2

    .

    endmodule. " STATUS_0100 OUTPUT

    This program will display a picture from the desktop.

    You can use ICONS type-pool to display standard icons ...

    Regards,

    SP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2006 at 04:00 AM

    hi,

    Yes it can be done, you need to have containers, and you need to use classes.

    data: DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.

    using this method you can set background picture.

    CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND

    EXPORTING

    PICTURE_ID = DL_BACKGROUND_ID.

    check the below link.

    http://www.sapgenie.com/abap/controls/picture.htm

    Award points if helpful.

    regards,

    Naveen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2006 at 04:01 AM

    You need to place one custom control and write some code to upload it. You find the custom control in the tool box (along with I/O fields) in SE51.

    Regards

    Mohammad.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.