cancel
Showing results for 
Search instead for 
Did you mean: 

Http image in Web Dynpro

Former Member
0 Kudos

Hi,

I want to integrate an image in my WDA which would take its source from an external url path. For example, my image source would be [http://www.google.ca/intl/en_ca/images/logo.gif] . I cannot use directly the path as source, I receive the error:

Absolute URLs are not supported. Use form $DESTINATION$/path (See transaction SM59)

I tryed to create a http connection, but I did not succeed. What should be the target host, Service No., Prefix...

Thanks for the help.

Davy

Accepted Solutions (1)

Accepted Solutions (1)

S-H
Active Participant
0 Kudos

Hi Davy,

Create a context attribute type string and bind this context attribute to image's source property.

Set the attribute value to url which you want (http://www.google.ca/intl/en_ca/images/logo.gif) in wddoinit() or someother method.

Regards,

Suresh

Former Member
0 Kudos

Hi Suresh,

thanks for the info. You are right, it works if my WDA fetches directly the image from web site when I set the url in the context instead of being in the layout. So I don't need to use SM59 to define RFC destination.

Best Regards,

Davy

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Given your example:

http://www.google.ca/intl/en_ca/images/logo.gif .

I would setup an RFC destination with target host of www.google.ca port 80 (since this is HTTP) and leave the path emtpy. You will supply the rest of the path (intl/en_ca/image/logo.gif) in the src property.

Former Member
0 Kudos

Hi Thomas,

thanks for the suggestion. However, it does not work, the test connection always give me the error: ICM_HTTP_CONNECTION_FAILED.

Any other suggestions?

Davy

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I would imagine the test connection in the destination would fail. You probably haven't configured the proxy settings on your ABAP application server. However you shouldn't need to establish a connection from the server. Setting up the HTTP Destination is just a way of securying the URL. It will be parsed together and passed to the client side where the browser will actually retrieve the content of the URL. Have you tried using the destination in your application?