cancel
Showing results for 
Search instead for 
Did you mean: 

Data base XSTRING image to BSP Application.

Former Member
0 Kudos

Hi Bsp Guru's

Please let me know, How to display the image in xstring in data base table to BSP page layout.

Correct answer is rewarded with points.

Regrds,

Raju

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to create a simple BSP/HTML page that will do something like <%= wv_xstring %>, and set the mime type of this page to image/jpeg (or whatever encoding is your image).

Then, in the page that is supposed to display the image, just do something like : < i m g s r c = "previous_bsp_here" / >

I think this should work.

Good luck and have fun.

Edited by: Thomas Villarubias on Sep 16, 2009 9:28 AM (hints to display HTML code...)

Answers (3)

Answers (3)

verreydthans
Participant
0 Kudos

Hi,

i've almost the same question...

I have a BSP application (CRM Webclient) where I need to set the customer picture.

I call a Web Service (with the clientnumber) and I get the picture back in an xstring.

Currently, I have:

WS:=> In Model

CALL FUNCTION 'Z_PICMAN_SERVICE'

EXPORTING

clientnumber = lv_clientnr

IMPORTING

resultstring = lv_photostring.

Img tag: (In BSP)

<htmlb:image src = "<%= model->lv_photostring %>"

height = "150"

width = "120" />

But the picture is not displayed at the screen.

Any idea's?

Former Member
0 Kudos

Hi Hans.

Please have a look at my previous post. You must create a BSP in which you'll write the content of your image (xstring) and set the content type as image/jpeg, or image/png, whatever is your image encoding.

Then, in your first BSP, the image tag has to call the "image BSP" in the src attribute.

Just try it and let us know if it works.

Have fun!

verreydthans
Participant
0 Kudos

Created mijn image tag:

<htmlb:image src = "photo.htm"

height = "150"

width = "120" />

and my new BSP page:

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<htmlb:content design="design2003" >

<htmlb:page title=" " >

<htmlb:form encodingType="image/jpeg" >

<%= lv_photostring %>

</htmlb:form>

</htmlb:page>

</htmlb:content>

+ mime type is set at properties => image/jpeg

With no result...

I'm doing something wrong?

verreydthans
Participant
0 Kudos

Someone another solution?

Former Member
0 Kudos

Hi,

I never use HTMLB, so I don't know how to use it. I see a HTMLB : FORM tab in your sample code, well, I don't if it's usefull.

Have you tested photo.htm alone? Does it display your image? And the source code (from the web browser) must be empty (no HTML code).

Try to put this on the page:

<%@page language="abap" %>

<%= lv_photostring %>

That should be enough if the page property sets the encoding to image/jpeg.

Good luck!

verreydthans
Participant
0 Kudos

I just succeeded to show the photo on the BSP.

I uploaded the content (XSTRING) to the Cache memory...

More info:

sreemsft
Contributor
0 Kudos

Hi,

This [LINK|;may help you!!

OR

[LINK2|;

Thanks,

Sreekanth

Edited by: Sreekanth on Sep 17, 2009 3:56 AM

athavanraja
Active Contributor
0 Kudos

Guys please read the question carefully before attempting answer.

Thomas Villarubias has given a perfect answer for the question.

Let us wait for the original poster to come back and share his experience.

Regards

Raja

Former Member
0 Kudos

Hello Raju,

In HTMLB there is

<HTMLB img src>

tag......

by this you can display..it in the layout..

or

once you upload a image into to Database it will generate the LINK...you need to pass the link to that source.....

Hope this will be helpfull..let me know if you have any more concerns

Thanks

kalyan.