Google Search - Blog...........

ABAP - Display LOGO On Selection Screen.

REPORT ztest .

DATA:docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .

DATA : begin of imakt occurs 0,
matnr like makt-matnr,
spras like makt-spras,
maktx like makt-maktx,
end of imakt.

DATA: itrepid LIKE sy-repid.

itrepid = sy-repid.

parameters:p_matnr like makt-matnr.

select matnr
spras
maktx
from makt
into table imakt
where matnr = p_matnr.

loop at imakt.
write:/ imakt-matnr,
imakt-spras,
imakt-maktx.
endloop.

AT SELECTION-SCREEN OUTPUT.
PERFORM show_pic.

*&---------------------------------------------------------------------
**& Form show_pic
*&---------------------------------------------------------------------
FORM show_pic.

CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.

CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 55
left = 750
top = 08
width = 350.

CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'C:\zpic.gif'.

*here you give the path where your pic is stored on the desktop

IF sy-subrc NE 0.
ENDIF.
ENDFORM.


ALSO READ:

- Selection Screen Listbox From Table Entries.

- TAB Strips In Selection Screen.

- F4 (Value On Request) For Date On Selection Screen.

- F4 (Value On Request) For Ztable On Selection Screen.

- F4 (Value On Request) For A Field Of Ztable On Selection Screen.

3 comments:

  1. hey i am not getting the output the program is running perfectly but the output is not coming it showing only an empty box can i know the reason

    ReplyDelete
  2. hey i am not getting the output it is showing just an empty box with an outline could you please tell me the reason

    ReplyDelete
  3. When specifying the file the url line should read ....

    url = 'file://C:\zpic.gif'.

    Instead of ....

    url = 'C:\zpic.gif'.

    ReplyDelete