Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Picture in selection screen

Hi. I'd like to ask how to put a picture into the SELECTION-SCREEN, not in the SCREEN. Could You give me a tip? Greetings. P.

Former Member
Former Member replied

Hi

check this one

REPORT y_pic_show .

DATA:

docking TYPE REF TO cl_gui_docking_container,

picture_control_1 TYPE REF TO cl_gui_picture,

url(256) TYPE c .

PARAMETERS: p_dummy TYPE c .

AT SELECTION-SCREEN OUTPUT.

PERFORM show_pic.

START-OF-SELECTION.

&----


*& Form show_pic

&----


FORM show_pic.

DATA: repid LIKE sy-repid.

DATA: file_name LIKE sapb-sapfiles,

file_type LIKE bdn_con-mimetype.

repid = sy-repid.

IF docking IS INITIAL .

CREATE OBJECT docking

EXPORTING

repid = repid

dynnr = sy-dynnr

side = cl_gui_docking_container=>dock_at_right

extension = '200'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5.

CREATE OBJECT picture_control_1 EXPORTING parent = docking.

CHECK sy-subrc = 0.

CALL METHOD picture_control_1->set_3d_border

EXPORTING

border = 0.

CALL FUNCTION 'DP_PUBLISH_WWW_URL'

EXPORTING

objid = 'HTMLCNTL_TESTHTM2_SAP_AG'

lifetime = 'T'

IMPORTING

url = url

EXCEPTIONS

OTHERS = 1.

  • Load the picture by using the url generated by the data provider.

IF sy-subrc = 0.

CALL METHOD picture_control_1->load_picture_from_url_async

EXPORTING

url = url.

ENDIF.

ENDIF .

ENDFORM. "show_pic

More on controls demo at transaction DWDM

reward points to all helpful answers

kiran.M

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question