cancel
Showing results for 
Search instead for 
Did you mean: 

Show image from binary data (XSTRING field)

Former Member
0 Kudos

Hi all,

I would like to show a dynamic image in my Interactive Adobe Form.

I have a XSTRING field in the form interface which has the binary data of the image.

In the form, I have created an image field and mapped with this field, but image is not showing...

What could I have done wrong?

My form is used inside a WDA.

Thanks in advance,

Nacho.

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello, did you set true "embed image data" tab Object - Field for your image field? Otto

Former Member
0 Kudos

Hi Otto and thanks for your quick answer.

Yes, I set this option in the image field. This image field is binded to the context attribute (type XSTRING) and the URL field is empty.

Best regards,

Nacho

Answers (5)

Answers (5)

OttoGold
Active Contributor
0 Kudos

Nevermind, welcome, Aaron:))

former_member186822
Participant
0 Kudos

Is it possible to list out images dynamicly in a table using this method ?

We want to create a PDF list, where one column exist of icons .

How can I send an "image" in a table field, as long as the Interface on the Adobe side has to be changed to "XSTRING" ?

0 Kudos

I have the same request. I need a table of images on my Adobe layout.
I was hoping that

I first tried making a table structure with a STRING field to store the Base64 encoded data, but when saving the structure i get the message 'STRING is not active'.

Therefore i tried creating a custom data type (using the STRING domain), which i used to declare my Base64 encoded data field in my table structure.

I could bind this field to my ImageField object on the layout but when saving my LiveCycle Designer dumps with runtime error MESSAGE_TYPE_X.

Any suggestions how to bind a table of images to an ImageField in a repeated subform ?

0 Kudos

I found the solution myself.

When creating a custom data type to store the Base64 encoded data in the table structure i used 'Predefined data type STRING' instead of 'Domain STRING'.

I could then succesfully bind this table field to an ImageField on a repeated subform.
Thanks to

OttoGold
Active Contributor
0 Kudos

Dear Aaron,

the next time create your own question thread with the reference to this one and do not hijack the others threads. It will help you as well, because you will be able to assign the poi-nts that will not make the people help you for free:)))))

Back to your question:

You can get info regarding this for WD forms here:

/people/bhawanidutt.dabral/blog/2007/11/15/how-to133-integrate-adobe-form-on-webdynpro-for-abap-and-deploy-it-on-portal

Or for Offline forms/ non-WD here:

and

Hope that helps, Otto

Former Member
0 Kudos

Thanks Otto,

I do not use the Forum very often and did not think about the proper protocol.

Aaron

OttoGold
Active Contributor
0 Kudos

I think (but have nothing to prove that) that the problem is with the variable value. To be able to display a picture in the image field, you need to have the data in the specified form. I guess that is some 64 encoding or something which is different from the WD one? This is just a fabulation:))

But you can test this. Upload this picture into sap repository into tx SE78 then use the proposed coding from the blog and test it. Debug out what is the value of the picture downloaded from SE78 and from your binary.

Or do you use the SE78 source already? That would be a problem:))

Regards, Otto

Former Member
0 Kudos

Thanks again for your help Otto.

I am not reading the image from SE78 but from archive. Anyway, I can show this image in a normal WebDynpro ABAP application therefore I think the binary source is OK.

I am afraid that it is not possible to show a dynamic image in an interactive form which has an XML interface or we have a problem in our system.

I read in some blogs (like [this|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1999] [original link is broken] [original link is broken] [original link is broken]😉 about creating a special GRAPHIC node in the form context. I cannot create this node in my XML-interfaced form.

Thank you,

Nacho.

Former Member

Hi all,

SAP finally provided us with a suitable solution.

If you would like to display an image within a form with XML generated interface:

- Create a STRING context attribute (i.e. IMAGE);

- Get the image contents from your system in binary format (XSTRING);

- Translate contents from XSTRING to BASE64 with function module: SSFC_BASE64_ENCODE, like this:


CALL FUNCTION 'SSFC_BASE64_ENCODE'
EXPORTING
bindata = image_xstring
IMPORTING
b64data = image_string.

- Leave image string contents into context attribute IMAGE.

- Map IMAGE context attribute into your form to an IMAGE FIELD and check "Embed image data".

That's all!

Best regards,

Nacho.

Former Member
0 Kudos

Hello,

Could you comment on the statement:

"Get the image contents from your system in binary format (XSTRING);"

I have had some success in retrieving the contents of the image using FM BDS_GOS_CONNECTIONS_GET and FM SO_DOCUMENT_READ_API1 but the results are not in XSTRING format.

Thanks in advance for any help,

Aaron

OttoGold
Active Contributor
0 Kudos

What type (like MIME or extension type, like TIF?) is your image? I guess it can be the wrong type, which the form cannot display. Or there can be a mistake in the content? Are you sure about the way you load the data? Is there a true type xstring not a string? Seems difficult to debug out:(( Otto

Former Member
0 Kudos

My image is a normal JPEG image which I can show in the WDA application (by using the same context attribute) but not in the Adobe Form.

My Adobe Form is interactive (I do not know if that's a problem) and it also uses an XML interface.

Thanks again for your help Otto.

OttoGold
Active Contributor
0 Kudos

Check with the following blog: /people/bhawanidutt.dabral/blog/2007/11/15/how-to133-integrate-adobe-form-on-webdynpro-for-abap-and-deploy-it-on-portal

Otto

Former Member
0 Kudos

Thanks for the link Otto.

I already have followed all those steps in my application.

Actually, I can see image data in Adobe Form if I use a text field instead of image field. But, when I use a image field, I only get an empty image field where I can click to upload an image.

Thanks again,

Nacho.