Application Development 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: 

Image in Custom Control

Former Member
0 Kudos

Dear All ,

I want to Display and Image on Custom Control in Module Pool screen. Can you please guid eme as how to do it ?

Regards,

Nikhil

Edited by: Nikhil Joshi on Jul 31, 2009 6:52 PM

2 REPLIES 2

Former Member
0 Kudos

Hello,

Check program DEMO_ABAP_OBJECTS_CONTROLS, DEMO_ABAP_OBJECTS_SPLIT_SCREEN.C

You can find more samples on tcode ABAPDOCU.

Bye

Gabriel p.-

MarcinPciak
Active Contributor
0 Kudos

Hi,

- You can have it as mime object -> for this refer [this|;.

- You can also use Dynamic Documents for this refer below snippet


REPORT  z_dd_picture.

TYPE-POOLS sdydo.    "dd type pools

DATA: o_dd_document TYPE REF TO cl_dd_document.   "dynamic document ref.variable

CALL SCREEN 100.

MODULE pbo_100 OUTPUT.

  "create dd document
  CREATE OBJECT o_dd_document
    EXPORTING
       no_margins = 'X'.

  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       = 'ENJOYSAP_LOGO'
      width            = '350'
      alternative_text = pic_txt.

  CALL METHOD o_dd_document->display_document
    EXPORTING
      container = 'CUSTOM_CONTAINER'. "display in your custom container

ENDMODULE.

- Third way would be using class cl_gui_picture

Regards

Marcin

For the last one refer program RSDEMO_CUSTOM_CONTROL

Edited by: Marcin Pciak on Jul 31, 2009 3:45 PM