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

Problem in display image on selection screen.

Former Member
0 Likes
712

Hi Experts,

My Requriment is display Image On Selection Screen. For That I Followed Below Steps.

1. CREATE A PACKAGE & GIVE OWN REQUEST NO WITH DESCRIPTION [ SE80 ]

2. CREATE A OBJECT & INCLUDE IN THE CREATED PACKAGE [ SMW0 ]

3. ASSIGN THAT CREATED PACKAGE TO THE FIELD START_IMAGE OF TABLE SSM_CUST [ SM30 ]

i stucked at step 2. system gives run time error i.e

The current ABAP program "SAPLSTRD" had to be terminated because one

of the statements could not be executed at runtime.

give me Suggistions and any procedure to Display Image On Selection Screen.

Thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
584

Hi,

Please refer below,

[ Insert Picture in selection screen|;

[Insert Picture 2|]

[Insert Picture 3|]

[Wiki Solution|http://wiki.sdn.sap.com/wiki/display/Snippets/Displayimagesontheselection-screen]

Edited by: Arunsri on Oct 27, 2009 9:00 AM

Read only

0 Likes
584

Hi,

Try this sample code.

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.

Here are few more links to insert images: [Link1|http://wiki.sdn.sap.com/wiki/display/Snippets/HowtoGetEmployeePictureinSelectionScreen], [Link2|http://wiki.sdn.sap.com/wiki/display/Snippets/Displayimagesonthe+selection-screen]

Hope this helps.

Thanks,

Harini

Read only

Former Member
0 Likes
584

ok