Skip to Content
author's profile photo Former Member
Former Member

URL formatting in BSP page

In my bsp i show links like this:

<a href="<%= st_info-lfurl %>" target="_blank"><%= st_info-lfurl %></a>

If st_info-lfurl contains no protocol (like http://) the system tries to open the url with the sessionurl.

for example (no protocol):

http://server/de(bD1kZSZjPTAwOCZ3PTczODAwMDAr)/www.test.at

for example (with protocol):

http://www.test.at

Of course example 1 ends with an BSP Exception.

Sometimes st_info-lfurl contains a protocol sometimes not - so how can i solve this problem ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 21, 2005 at 12:59 PM

    If you are building a URL for a link to another BSP application you should really consider using the supplied methods to build it:

      cl_bsp_runtime=>construct_bsp_url(
        exporting
           in_application      = bsp_application
           in_page             = bsp_page
           in_parameters       = params
         importing
           out_local_url       = iframe_url ).

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 04:15 PM

    HI Martin,

    Welcome to SDN.

    You can try something like this:

    <%if st_info-lfurl  NS 'http://'.
    concatenate 'http://' st_info-lfurl into st_info-lfurl.
    endif.%>
    <a href="<%= st_info-lfurl %>" target="_blank"><%= st_info-lfurl %></a>
    

    Regards.

    Siddhartha Jain

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.