on 11-22-2004 5:39 PM
Hi,
I have a BSP application which has some page attributes. Now when my BSP application gets loaded i want to call another URL in the same window. The URL will have some dynamic parameters built from these page attributes.
Please do let me how i can build the URL dynamically and also open that URL in the same window.
I am new to this technology so please guide me with this.
Regards
Sidharth
You can build the URL using
data lv_url type string.
call method runtime->get_url_same_session
exporting
application_url = '/sap/bc/bsp/sap/<BSP>/main.do'
receiving
url = lv_url.
Concatenate the parameters to the url using the format
any_url?attribute1=value1&attribute2=value2
Navigate from the Server side using
navigation->goto_page( url = lv_url ).
Retrieve the parameters from the request object in the target page.
Hope this helps
-Suresh
Message was edited by: Suresh Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
I found out the classes are i believe CL_BSP_RUNTIME and CL_BSP_NAVIGATION.
I have written this piece of code in the layout of page with flow logic. Please do let me know where i am going wrong.
This is my first application so please help me out here.
Regards
Sidharth
<i><%@page language="abap"%>
<%
data: navigation type ref to cl_bsp_navigation.
data: runt type ref to cl_bsp_runtime.
call method cl_bsp_runtime=>get_runtime_instance
receiving runtime = runt.
create object navigation
exporting runtime = runt.
call method navigation->goto_page( url = 'http://www.google.com' ).
%></i>
Are the page attributes dynamic ? I hope not. To build a dynamic URL, you can just use concatenate and build up a URL. You can get the URL from CL_BSP_NAVIGATION(the current url):
a) Change the page name
b) Put a ?fieldname=value
You can also check CL_BSP_UTILITY and there is a method serialize, which might be helpful.
In fact, if page attributes are not dynamic, you can set the page attributes using <b>navigation->set_parameter</b> and to <b>get the URL</b> of the current page , you can use the method <b>page->get_page_url</b>
You might also want to refer to the many weblogs written in BSP
https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/weblogs/topic/24
Hope this helps.
Regards,
Subramanian V.
Message was edited by: Subramanian Venkateswaran
Hi Subramanian,
As you can see from the code written above i dont want to navigate to another page in the same BSP application. i want to navigate to another site when the BSP applications loads itself.
So in the when the default.htm page is loaded i just want that in the same window instead of the page google homepage should appear
Regards
Sidharth
User | Count |
---|---|
76 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.