cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic image integration via URL

Former Member
0 Kudos

Dear colleagues

Im working on a interactive form that is invoked by a Web Danpro ABAP. The WD provides the URL of an photograph as a character string in a context field. The form should use this URL to access the image and render it.

First of all is it possible for the form to access an image file via a URL?

If yes, is it sufficient to bind the image field on the form to the context node containing the URL string or do I have to create a script the moves it to some other location?

Thank you for attention.

René Morel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rene,

There are several different ways to acheive this.

all the options are listed with screen shots in the below link have a read..

[url] http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/lc_dynamic_images.pdf [url]

Happy Coding.

Regards,

Sai

Former Member
0 Kudos

Hi Sai

Thank you very much. The solution seems to be quite simple. I'm going to try it out and report the result asap.

Regards

René

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all

Just to keep you informed. We were able to render a logo which is stored in the MIME repository using the stream method. The MIME type is JPEG. However, we weren't successful to incorporate a JPEG photograph which was stored elsewhere and which could be accessed via URL. We tried the following variants:

a) Data stream aquired from URL

We use a customer specific FM which delivers the JPEG binary stream as a table (type table of TBL1024). We then convert it into a XSTRING by means of FM SCMS_BINARY_TO_XSTRING and assign it to a GRAPHIC node in the Form Builder. The node is of type content and has the MIME type 'image/jpeg'. Within the form the node is bound to a image field. However nothing is rendered at run time although the XSTRING was filled.

b) Direct URL mapping

The URL is provided as a character string of type SAEURI the Form Builder and bound to the image field in the form. In the form we use the following FormCalc script:

URL_Foto.value.#image.href = URL_Foto.rawValue

At runtime a scripting error is reported (something like property mismatch?!). We then harcoded the URL like this:

URL_Foto.value.#image.href = "http://servtr1......."

No scripting resulted in this case but the image was not rendered.

Finally we assigned the above URL to the image field statically in the ALD. There the image was immediately displayed but neither in the Prview tab nor on the form at runtime anything was displayed.

In the next step we will move the photograph to the MIME repository and render it as byte stream as we did it with the logo.

Any further comments or other suggestions to the above concepts will be appreciated.

Regards

René

Former Member
0 Kudos

Hi

Unfortunately the customer was not able to provide access to the image via URL due to security reasons. Therefore I had to switch to the "Data stream" approach as proposed in the blog of Bhawanidutt Dabral "How to ... Integrate ADOBE form on WebdynPro for ABAP and Deploy it on portal.". In this approach the XSTRING containing the binary image data is mapped 1:1 to the image field on the form without indicating a MIME type. The target image format requested in this example was BMP.

In my form I need to access a log in TIFF format and a picture in JPEG format. Mapping the XSTRING as said above was not successful. I suppose that in Form Builder I have to create grafic nodes, bind them to the XSTRINGs and assign themt the corresponding MIME type.

Have you experienced similar effects and can you eventually confirm the solution above? Thanks for your feedback.

Regards

René

OttoGold
Active Contributor
0 Kudos

make sure you use imagie FIELD not only image component.

check which picture types/ extensions are supported in LCD, not all are. Create an image and try to assign a static picture, in the dialog you will see the list of extensions supported.

Otto

OttoGold
Active Contributor
0 Kudos

There is always the possibility to use your backend to retrieve the images via the URLs and send them to the form as "data streams". I am awaiting your feedback, could teach me something new.

Have a nice day, Otto