2009 May 18 7:15 AM
Dear gurus
I have to Picture Container in my Screen
and i want to display pictures on them.
Im facing a problem on that
when i execute the program i get the same picture on the other container.
how to resolve it?
Dear gurus
I have to Picture Container in my Screen
and i want to display pictures on them.
Im facing a problem on that
when i execute the program i get the same picture on the other container.
how to resolve it?
2009 May 18 7:17 AM
please check the container names and the assignment you have given so taht it is not repeated..
2009 May 18 7:19 AM
Container name are different..
CALL METHOD cl_gui_cfw=>flush. "First Container Coding.
CREATE OBJECT:
container EXPORTING container_name = 'PICTURE_CONTAINER',
picture EXPORTING parent = container.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = 'Snak TpF Logo'
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = l_graphic_xstr
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
others = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
graphic_size = XSTRLEN( l_graphic_xstr ).
l_graphic_conv = graphic_size.
l_graphic_offs = 0.
WHILE l_graphic_conv > 255.
graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
APPEND graphic_table.
l_graphic_offs = l_graphic_offs + 255.
l_graphic_conv = l_graphic_conv - 255.
ENDWHILE.
graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
APPEND graphic_table.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'X-UNKNOWN'
size = graphic_size
lifetime = 'T'
TABLES
data = graphic_table
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.
2009 May 18 7:21 AM
2009 May 18 7:20 AM
CALL METHOD cl_gui_cfw=>flush. "Second Container Coding
CREATE OBJECT:
container EXPORTING container_name = 'PICTURE_CONTAINER2',
picture EXPORTING parent = container.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = 'SNAK LOGO'
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = l_graphic_xstr
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
others = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
graphic_size = XSTRLEN( l_graphic_xstr ).
l_graphic_conv = graphic_size.
l_graphic_offs = 0.
WHILE l_graphic_conv > 255.
graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
APPEND graphic_table.
l_graphic_offs = l_graphic_offs + 255.
l_graphic_conv = l_graphic_conv - 255.
ENDWHILE.
graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
APPEND graphic_table.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'X-UNKNOWN'
size = graphic_size
lifetime = 'T'
TABLES
data = graphic_table
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |