on 05-22-2008 11:10 AM
Hi all,
I need to extract the entire url of my application, I mean the external link of my bsp application.
For instance my url is
http://extranet.pippo.it:8010/sap(bD1pdCZjPTIwMA==)/bc/bsp/sap/zappl/page.htm
I have tried using RUNTIME attributes and methods such as
call method runtime->get_url
receiving url = url.
this allow me only to get the second part of the url =
sap(bD1pdCZjPTIwMA==)/bc/bsp/sap/zappl/page.htm
but I need also the first one
http://extranet.pippo.it:8010/
Is there a method, a function or something that can allow me to extract the enitre url?
Thanks in advance
Alessandro
Hi Alessandro,
Inside your IT00 BSP application you have an example, misc_echo.htm where you can find all HTTP headers. Maybe some of theses will be the one you need.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Al,
this information is stored in the HTTP headers.
Create a BSP page with this layout.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title=" " >
<htmlb:form>
<%
data: lt_fields type TIHTTPNVP.
request->get_header_fields( changing fields = lt_fields ).
%>
<htmlb:tableView id = "fields"
table = "<%= lt_fields %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
You will see the parameters ~server_name_expanded and ~server_port_expanded contain the extra information you need to determine the URL entered by the client.
Cheers
Graham Robbo
not relevant to the question asked.
Edited by: Durairaj Athavan Raja (Moderator) on May 28, 2008 3:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can also try the following:
data: l_url type string,
cl_runtime type ref to cl_bsp_runtime.
cl_runtime ?= runtime.
CALL METHOD cl_runtime->if_bsp_runtime~construct_bsp_url
EXPORTING
in_application = cl_runtime->if_bsp_runtime~application_name
in_page = cl_runtime->if_bsp_runtime~page_name
IMPORTING
out_abs_url = l_url.
Regards,
Tanguy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't know if there's a method or FM that gets the entire URL, but there are FMs HTTP_GET_URL2 and TH_GET_VIRT_HIST_DATA that may help you.
With those FM, you can get the protocol, host and port; that is the beginning of your BSP URL.
I hope this will help you.
Thomas.
Edited by: Thomas Villarubias on May 22, 2008 3:28 PM : orth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.