2009 Aug 18 5:29 PM
Is it possible to display an animation in a dynpro for example:
I want to display two computers with a transfer bar between them when I run the program.
Is it possible to display an animation in a dynpro for example:
I want to display two computers with a transfer bar between them when I run the program.
2009 Aug 18 6:57 PM
You may try to create a .GIF image with the progress indicators and computers; and than use the HTML viewer to display the image. Picture Control (CL_GUI_PICTURE) is not able to show the animated GIF. It can only show the still image.
HTML Control (CL_GUI_HTML_VIEWER) would be able to show the animated GIF.
Try like this:
CREATE OBJECT w_html_pic
EXPORTING
parent = w_pic_cont.
CLEAR raw_html.
APPEND '<HTML><BODY>' TO raw_html.
APPEND '< img width="60" src="C:\TEMP\1.GIF" height="80" / >' TO raw_html.
" Angle brackets without space
APPEND '</BODY></HTML>' TO raw_html.
CLEAR url.
*...Loading data to HTML
CALL METHOD w_html_pic->load_data
EXPORTING
url = url
IMPORTING
assigned_url = url
CHANGING
data_table = raw_html.
*...Showing data of HTML
CALL METHOD w_html_pic->show_data
EXPORTING
url = url.
Regards,
Naimesh Patel
Edited by: Naimesh Patel on Aug 18, 2009 1:13 PM - Added the Code to render the Image in HTML control
2009 Aug 19 8:05 AM
when I create the gif where is the image stored? in my local computer? I have to load the gif from the system as the user don't have this gif.
2009 Aug 19 2:35 PM
You can use the SAP Web Repository to store your GIF file in SAP.
Use transaction code SMW0
Select the Binary data for WebRFC applications and run
Enter the Development class and run
Here you can find the button to create a new entry
Give the object name / description in the popup and import
Now, once you have saved the GIF file in the SAP WR, you can use the FM WWW_GET_MIME_OBJECT to get the Picture data in binary. You can use the GUI_DOWNLOAD to download this file on the PC temporarily and use this file in your HTML viewer.
Another option would be to add the Image as the MIME object in the MIME repository. Use SE80 to upload this image.
You can use the public folder to save this file. E.g. /sap/bc/fp/graphics/PUBLIC/GRAPHICS/
Once you save this file as MIME object, you can use the same IMG HTML command to refer to that image.
Make sure you give proper client
< img alt="[image ENJOY]" id="ENJOY" src="/sap/bc/fp/graphics/PUBLIC/GRAPHICS//BMAP/BCOL/ENJOY.bmp?sap-client=000" / >
Regards,
Naimesh Patel
2009 Aug 19 2:46 PM
2009 Aug 19 2:51 PM
2009 Aug 19 5:58 AM
Hi,
There is a sample in SDN wiki About CL_GUI_HTML_VIEWER
You can take a look at SAP HTML Viewer (BC-CI)
You can also take a look at;
- load_html_document or load_data
- show_url
with regards,
Mamta Kumari
Edited by: Mamta Kumari on Aug 19, 2009 7:03 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |