cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the URL address ?

Former Member
0 Kudos

I would like get the full URL address of my page with PARAM fields. Is a method exist to do it ?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member181879
Active Contributor
0 Kudos

For all the things you you want to "get" about an incoming request, it is best to ask the request itself. There are some custom/predefined header fields that are injected into the request on arrival, that contains many interesting answers. For example:

request->get_header_field( '~requet_uri' ).

But, the better way to write this is:

request->get_header_field( if_http_header_fields_sap=>request_uri ).

And if you are very fast in making connections, you would now already have SE80 open and be looking at these interesting interfaces if_http_header_fields and if_http_header_fields_sap.

For a good and simple example, look at BSP application IT00, page "misc_echo.htm". Run it with different URL parameters, and see what happens.

And then, define in ICF an external alias onto BSP application IT00, and run the page again via the alias.

++bcm

Former Member
0 Kudos

Great. Sometime I dont understand how it's so difficult to find a complete BSP reference on Internet.

I come from JAVA and .NET world. I have to say a strange thing : It's really faster and easier to develop a webapplication with BSP + ABAP than with JAVA. very Faster. On other good new : For a guy coming from IT world, begins with a ABAP 00 BSP developpement (language is very easy ) It's a best way to acquire SAP culture and overview.

Former Member
0 Kudos

Depending on your BSP application development context, you have the choice of using the methods ->

  • Application Object:

"get_application_url"

(Returns a server-specific URL that references the current BSP application)

  • BSP-MVC OODP Native:

"GET_PAGE_URL"

(Returns the URL of the page or the current controller)

Former Member
0 Kudos

use javascript

location.href = location.href + '#monAncre';