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

INSERT PICTURE / LOGO

Former Member
0 Likes
463

sir,

how we insert picture or logo in abap programm with in module pool. by oops method

thankx in advance

2 REPLIES 2
Read only

Former Member
0 Likes
428

Check the following code:



REPORT  ZTEST12.


* 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.

Read only

Former Member
0 Likes
428

Hi,

Check the following link:

http://sapdev.co.uk/graphics/add_image.htm

Regards,

Bhaskar