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

animation in dynpro

Former Member
0 Likes
1,436

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.

6 REPLIES 6
Read only

naimesh_patel
Active Contributor
0 Likes
989

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

Read only

0 Likes
989

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.

Read only

0 Likes
989

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

Read only

0 Likes
989

can you show me a example how to create a animated gif ?

Read only

0 Likes
989

Better look at google for that (most professional tools related to grahics have this option) , you may easily find "free" and "free to use in a professional environment" animated gifs on the web.

Regards,

Raymond

Read only

Former Member
0 Likes
989

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