Skip to Content
0
Former Member
Nov 20, 2008 at 09:47 AM

ABAP Picture Control: LOAD_PICTURE_FROM_URL always returns RESULT = 0

2553 Views

Hi all,

I want to display a picture from the local file system of the WebAS (6.20). Therefore I create a custom container, add a Picture Control (CL_GUI_PICTURE) to it and use the method LOAD_PICTURE_FROM_URL to load the picture. However, the picture is never displayed and the control returns RESULT = 0 (error). I've tried the following combinations to load the file into the Picture Control:

  CALL METHOD p_pic->load_picture_from_url
    EXPORTING
      url    = '/tmp/test.jpg'

or:

      url    = 'file://tmp/test.jpg'

or:

      url    = 'file:///tmp/test.jpg'

I also tried to create a data provider, by loading the file into an internal table and using function module DP_CREATE_URL. I get a valid sapr3://... Url from the fm, but also in this case, the pic is not loaded.

So, any ideas? Any help is appreciated! Thanks in advance.