cancel
Showing results for 
Search instead for 
Did you mean: 

Display Image from URL

former_member696081
Participant
0 Kudos

Hi Experts,

I am new to BSP. I have a requirement like I need to display an image which is stored in a url. The URL will be changed depending on the document no.

Please suggest how can I display the image on BSP dynamically based on the document no? I will get the URL from a table.

Thanks in advance.

Regards,

Ranganadh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ranganadh,

You can use a variable to hold the URL type string.

Populate the url into the variable from table like


<%
data lv_url type string.

select URL from URL_TABLE into lv_url where document_no = 'xyz'.

%>

Same can be passed to the image source attribute

img src = "<%= lv_url %>"

Regards,

Ravi

former_member696081
Participant
0 Kudos

Hi Ravi,

Thanks for your reply. I tried the same but no luck. I have written the code in the layout. is it correct? its not displaying anything but like a checkbox with red cross mark. I saw the URL, when I click the URL its opening with a PDF invoice document in the web.

Can you please correct me if I am wrong.

Former Member
0 Kudos

Hi Ranganadh,

I foresee only one problem, does your URL contains http addition?

For example: the URL in the table contains http://www.google.com or www.google.com? Both works alike in browser but not in BSPs.

If the entry does not contain http:// in URL please add the same and check.

Regards,

Ravi

former_member696081
Participant
0 Kudos

Hi Ravi,

Now I got the issue. URL is having the http:// addition. Actually the image will be stored on content server. with the addtion of document no, comp.code and some other additions to the link I will get the image direcly in PDF. For say suppose when I enter the URL http://www.google.com it opens the site and in the body of the site it displays directly the pdf format of the image.

Can you please suggest, Can I display the image in content server in BSP?

I will get the object ID and all in the table TOA01.

Please suggest.

Regards,

Ranganadh.

former_member696081
Participant
0 Kudos

Hi Ravi,

My issue resolved. Thanks for your help. I used the tag <iframe> </iframe>. It directly displayed the page. I misunderstood the image concept.

Regards,

Ranganadh.

Answers (0)