2006 Dec 20 3:56 PM
data:lc_container1 type ref to cl_gui_custom_container,
lc_containert type ref to cl_gui_custom_container,
lc_containerb type ref to cl_gui_custom_container,
lc_PICTURE type ref to CL_GUI_PICTURE,
url type CNDP_URL.
create object lc_container1
exporting
CONTAINER_NAME = 'CONTAINER1'.
create object lc_picture
exporting
parent = lc_container1.
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
objid = 'HTMLCNTL_TESTHTM2_SAP_AG'
lifetime = 'T'
IMPORTING
url = url
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
CALL METHOD lc_picture->load_picture_from_url_async
EXPORTING
url = url.
ENDIF.
i am writing this..it is giving me a picture also. but i dont want the standard picture i want a picture of my choice
experts help. i am using CL_GUI_PICTURE
santhosh
Message was edited by:
Kaluvala Santhosh
2006 Dec 20 4:02 PM
Use transaction SMW0 to upload the picture.
Regards,
Rich Heilman
2006 Dec 20 4:02 PM
2006 Dec 20 4:24 PM
Thanks,
I uploaded it and trying to use the same FM but it doesnt work any more inputs.
thanks.
santhosh
2006 Dec 20 5:13 PM
Hi Santhosh,
Here is a simple example....I suppose you are using Screens for displaying the picture... Here the container name is <b>CONT</b>
data: container type ref to CL_GUI_CUSTOM_CONTAINER,
pic type ref to CL_GUI_PICTURE.
<u>In PBO</u>,
If cont is initial.
CREATE OBJECT container
EXPORTING
PARENT =
container_name = 'CONT'.
CREATE OBJECT pic
EXPORTING
LIFETIME =
SHELLSTYLE =
parent = container.
CALL METHOD pic->set_display_mode
EXPORTING
display_mode = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER
EXCEPTIONS
ERROR = 1
others = 2
.
CALL METHOD pic->load_picture_from_url
EXPORTING
url = 'file://D:\SP\cb.jpg'
IMPORTING
RESULT =
EXCEPTIONS
ERROR = 1
others = 2
.
endif.
This should work. You can add pics from your system and try it out.
<b>Award points if found useful.</b>
Regards,
SP.
2006 Dec 21 4:32 AM
Hi Santhosh,
U need to upload those pictures from presentation to web repository first using the transaction SMW0.
In that transaction,
1) select Binary data for web RFC applications, enter and then F8
2) select create button
3) a pop up will come, there u need to enter ur object name and description say like 'ZSAMPLE.GIF' as object name and then select import button
4) then it will ask u which picture needs to be uploaded, select the appropriate picture and then save it.
After this procedure, u can check the table WWWPARAMS whether that object has been created or not. If that entry is there, then only u can view that pic on ur screen.
Then normal call to those methods,
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
OBJID = 'ZSAMPLE.GIF'
LIFETIME = cndp_lifetime_transaction
IMPORTING
URL = url
EXCEPTIONS
OTHERS = 1.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
exporting url = url.
-Satya Priya
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |