BSP: clear URL parameter
Hi,
in my BSP application I want to give a value from one controller to the following one. To do so, I set a parameter to the navigation object, and read it in the subsequent controller.
* Controller A, do_handle_event
navigation->set_parameter( name = 'key' value = model->guid ).
navigation->next_page( co_exit_show ).
* Controller B, do_request
guid = request->get_form_field( 'key' ).
This part works fine. The problem is that the parameter once set to the navigation object in controller A will be part of all subsequent requests to controller B. So, how do I get rid of the parameter, so that it is only part of the first request to controller B, similar to Java's request.setParameter()?
Thanks in advance,
Frank
Hi Christine,
in a way, yes, this is want I want to do. However, doing so seems to be quite complicated. I've already tried the following:
* Controller B
navigation->set_parameter( NAME = CO_PARAM_GUID value = space ).
request->set_form_field( NAME = CO_PARAM_GUID value = space ).
response->set_form_field( NAME = CO_PARAM_GUID value = space ).
None of them solved the problem. When the controller is called again, request->get_form_field( CO_PARAM_GUID ) contains the originally provided value.
Any ideas?
Best regards,
Frank
Similar Messages
-
I have a problem with BSP!
The Sender and brodcaster is in the same system...
An SAP-Application send to my BSP-Application an HTTP-Request. Normally the url is correct, but it is possible that the url have no parameter. Have no idea why? How is my Problem!
e.g.
original: url: /sap(xxx)/bc/bsp/xxx/bsp_al/index.do?onInputProcessing=al&pro=%3fdelete&docid=xxxxxx
request_uri : /sap(xx)/bc/bsp/xxx/bsp_al/index.do
Have anybody a idea?
SAP-System 640 Patch-Level: 327
Edited by: harryatworld on Nov 10, 2010 2:13 PM
Edited by: harryatworld on Nov 10, 2010 2:25 PMHello,
The url:
original: url: /sap(xxx)/bc/bsp/xxx/bsp_al/index.do?onInputProcessing=al&pro=%3fdelete&docid=xxxxxx
is generated / formulated by WAS engine when OnInputProcessing event is getting triggered for particular document...
So please check the event triger timing and supply of URL
Thanks -
URL parameter in a stateless BSP - 2004s
We are on 2004s release (SP6) and have a custom BSP stateless application using MVC approach. A URL parameter is passed to the BSP as follows:
http://<host.domain.com>:8000/sap/bc/bsp/sap/<BSP App>/start.htm?sap-client=151&sap-sessioncmd=open¶m=555
The Do_Init method of the main controller has the following code:
DATA: t_url_fields TYPE tihttpnvp.
CALL METHOD request->get_form_fields
CHANGING
fields = t_url_fields.
The internal table t_url_fields is not getting the parameter (It is empty).
I tried various other things and looked at previous SDN posts and could not find any other pointers. Everywhere the recommendation is to use the "get_form_fields" method. Also this used to work on the WAS 620 box earlier. Am I missing something fundamental here? This is a very old subject and I myself used it successfully earlier. Maybe the 2004s release wants something else? Checked OSS also.
Your help in this would be appreciated. Please let me know about how to troubleshoot this, because I tried everything from my side.
P.S: Points will be awarded..Hi,
Yes, I think Dispatch_input() has to be put in Do_request event.
There is another alternative to using Get_form_fields method. In Do_Handle_Data event you can read the table form_fields and get the value of the input on the page.
read table form_fields into <workarea> with key name = '<url inputfield name>'.
get the value.
Hope this helps.
Thanks,
Rashmi. -
How to open URL IView with dynamic url parameter (navigate_absolute)
Hi Experts,
i would like to open an URL-IView from the WebDynpro ABAP Application in the Enterprise Portal 7.0
and i want to set the URL parameter dynamically. Is this possible and how can i achieve this!!
Thx MarkusHi Markus,
You can take help of the following code snippet.
Here we are calling an Iview using absolute navigation and passing URL parameters as well
* Select the input value entered and then pass it to REM INQ application---------
DATA lv_inputbusobjid TYPE wd_this->Element_context-inputbusobjid.
DATA lv_path TYPE string.
DATA lv_tab_wd_param TYPE wdy_key_value_list.
DATA lv_str_wd_param TYPE wdy_key_value.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA api_component TYPE REF TO if_wd_component.
DATA window_manager TYPE REF TO if_wd_window_manager.
DATA window TYPE REF TO if_wd_window.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
* read the imput data first-------------
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `INPUTBUSOBJID`
IMPORTING
value = lv_inputbusobjid ).
** call remuneration inquiry window using absolute navigation
CLEAR lv_tab_wd_param.
* Adding parameters
lv_str_wd_param-key = 'sap-wd-configId'.
lv_str_wd_param-value = 'CACS_REMINQ_CONF'.
APPEND lv_str_wd_param TO lv_tab_wd_param.
lv_str_wd_param-key = 'BUSOBJ_ID'.
lv_str_wd_param-value = lv_inputbusobjid.
APPEND lv_str_wd_param TO lv_tab_wd_param.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).
if lo_portal_manager is BOUND.
* PCD
lv_path = 'ROLES://portal_content/com.sap.pct/specialist/com.sap.pct.erp.common.workset_reuse/com.sap.pct.erp.icmparticip.bp_folder/com.sap.pct.erp.icmparticip.15.bp_folder/com.sap.pct.erp.icmparticip.15.pages/com.sap.pct.erp.icmparticip.RemInquiry'.
lo_portal_manager->navigate_absolute(
navigation_target = lv_path
navigation_mode = if_wd_portal_integration=>co_show_external
window_features = 'toolbar=no,resizable=yes,scrollbars=yes'
business_parameters = lv_tab_wd_param
endif.
Hope this helps
Regards
Manas Dua -
Adding A URL PARAMETER TO AJAX
Please i'm wondering if anyone could help me embedding a url parameter to an ajax linkk. here's my code
$('#read').load('sources/news_read.asp?news_id=<%=news_id%>');
the problem is i can't create a recordset on html page and dats creating the problemAnd Spry version where the URL is myfile.html?file=employees
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="SpryAssets/xpath.js"></script>
<script src="SpryAssets/SpryData.js"></script>
<script src="SpryAssets/SpryURLUtils.js"></script>
<link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet">
<script type="text/javascript">
var params = Spry.Utils.getLocationParamsAsObject();
var ds1 = new Spry.Data.XMLDataSet(params.file+".xml", "employees/employee");
</script>
<body>
<div class="MasterDetail">
<div spry:region="ds1" class="MasterContainer">
<div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{firstname}<br />
{lastname}</div>
</div>
<div spry:detailregion="ds1" class="DetailContainer">
<div class="DetailColumn">{firstname}</div>
<div class="DetailColumn">{lastname}</div>
<div class="DetailColumn">{joinDate}</div>
</div>
<br style="clear:both" />
</div>
</body>
</html>
The URL parameters can be adjusted to suit.
Gramps -
Hi to all,
I'm not very familar with Business Server Pages but I have the requirement to provide a BSP with parameter from the SAP NetWeaver Enterprise Portal (like username, language, iView-Id....). I'm not allowed to use Application Parameter or URL-parameter to send the data to the BSP.
So my question is: How can I provide the BSP with parameter from the portal?
Can I use Customer Exits for 'ParameterProvider' and put there some values into the current component or http session but how can I then read the values in the BSP?
Or shall I use cookies? Other ideas?
Thanks for your help!
Best regards
KatharinaHi,
You can use below steps...
1. Application Parameters for BSP iview in portal like below
Application Parameters =
userid=<User.LogonUid>&fname=<User.firstname>&lname=<User.lastname>&email=<User.email>
And
<User.displayname>
<User.salutation>
<User.firstname>
<User.lastname>
<User.jobtitle>
<User.department>
<User.telephone>
<User.fax>
<User.streetaddress>
<User.zip>
<User.city>
<User.country>
<User.timezone>
<User.mobile>
2. BSP application in R/3
DATA: l_url_parameters TYPE tihttpnvp,
l_url_userparameter TYPE ihttpnvp.
READ TABLE l_url_parameters WITH KEY name = 'USERID'
INTO l_url_userparameter.
Thnx!
Suriya -
How to change the fields in a JSF form based on a URL parameter
I am trying to build a generic JSF form of parameters which I want to dynamically change (i.e.
change which field is visible, what the label text should be, etc) based on a URL parameter.
I can set the fields using logic in the backing bean as an action on a command button pressed.
But how do I do it based on the URL parameter ? I can retrieve the URL parameter but I
don't know where to put (or hook) the Java code to do this initialization prior to
the page being rendered for the first time.
The fields in the JSF is being configured dynamically using a database table.
BTW I am using Jdeveloper 10.1.3.5
Thanks
CKThanks. I decided to set a Session bean to store the value of the URL parameter (if it is set)
and then to use the session bean to initialize the attributes of the fields on the JSF Page.
There also seems to be some caching of the inputText fields (i.e. it reverts back to the first
initialized value) even though I tried to change it using the URL parameter in the requestScope
backing bean. So, setting the values into the Session bean and retrieving it back from there
seems to be more reliable. -
How can I pass URL parameter value to text field?
Dear Masters,
I have a text field. I want it to have a value based on the URL parameter, for example:
http://myapplication.net:7777/pls/apex/f?p=102:1:::::P1_RTNUM:9448,P1_EMAILADD:email.add.here
I want the value of the text field = P1_EMAILADD after the form was loaded. Also, please have it read-only.
Thanks a lot.
Edited by: user6368519 on Sep 16, 2009 11:39 PMThanks Saad,
Can I email you(I would need your email) for any concerns or just create a new thread for you to look?
This is ok now. I'm sorry but I just marked this one as an "answered" one last time.
Thanks for all the help again I appreciate it. ;)
Thanks,
Aaron
[email protected] -
How can I pass empty value in URL Parameter
Hi,
I am passing different URL parameters to one page, to filter
the recordset on that page. How can I pass an empty value in the
URL parameter so that the recordset in unfiltered?
The URL parameter is based on one field of the database:
ContentType. So, the link would be to
default.asp?ContentType=Event
and then all records that have the ContentType field in the
DB as Event are displayed. Is it possible to use this system to
pass an empty parameter so that all records are displayed?
Thanks
Ian?ContentType=All
<% if (ContentType == "All")
Build recordset w/o filtering
ASP is rusty, but those are the basics.
"iandobie" <[email protected]> wrote in
message
news:e8im80$q7m$[email protected]..
> Hi,
> I am passing different URL parameters to one page, to
filter the recordset
> on
> that page. How can I pass an empty value in the URL
parameter so that the
> recordset in unfiltered?
> The URL parameter is based on one field of the database:
ContentType. So,
> the
> link would be to
> default.asp?ContentType=Event
> and then all records that have the ContentType field in
the DB as Event
> are
> displayed. Is it possible to use this system to pass an
empty parameter so
> that
> all records are displayed?
> Thanks
> Ian
> -
How can I add a url parameter to choose the right database row to delete using php in Dreamweaver CC
Hi all,
I have just upgraded to Adobe Creative Cloup. Though I find it very good there was one flaw and that was the omision of the database section. I got this sorted but now I find that once I have set up the connection to the database and want to eithger delete or update records there is no 'url parameter' button to do so. Can someone advise we how to get round this.
Seasons Greatings from
David JThe link will look similar to
myPage.php?ID=myVariable -
How to catch URL parameter from Portal URL in Web Dynpro iView
Hi All,
I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
Your urgent help will be highly appreciated.
Warm Regards,
ShubhoHi Shubhadip
Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
I hope you find a solution.
Regards
kk -
How to pass mysql query id through url parameter to a detail page
Hi there,
I am a newbie to JSP and I am trying to pass a url parameter to a detail page so that it will query a mysql data query to show the details of that query. How can I write the query on the details page so that it will display the query results on the page. eg select * From data Where = "passed_url parameter_ value". Please i need urgent help on this please.<Acknowledged>
which should be strongly cautioned against even for "newbies".
</Acknowledged>
Right, but the code you posted will "work" in a very harmful wayNot always, I used normal Statements last year and I had no problems.
Even with pretty capible code brakers trying to cause $h!t with my application.
Just check for invalid datatypes, and for SQL Injections remove stuff like ' or replace with `
But yes PStat... are the better way. -
URL parameter to a detail page
Hello,
I a m having trouble with my url parameter which is not fetching the correct record. The code works - and returns a word title and description; but it returns only the top record no matter which link is used. Please help.
1. I have a master page with three url links which are sent to the detail page:
<p><a href="sprydetail.html?word=integrity">integrity</a></p>
<p><a href="sprydetail.html?word=voice">voice</a></p>
<p><a href="sprydetail.html?word=argument">argument</a></p>
The sprydetail.html page looks like this:
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script src="SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var ds1 = new Spry.Data.XMLDataSet("myxml.xml", "tagwords/tagword/word");
var ds2 = new Spry.Data.XMLDataSet("myxml.xml", "tagwords/tagword/description");
//-->
</script>
</head>
<body>
<div spry:region="ds1">
<h1>{word}</h1>
</div>
<div spry:region="ds2">
<p>{description}</p>
</div>
</body>
My xml file looks like this:
<tagwords>
<tagword>
<word>Integrity</word>
<description><![CDATA["in·teg·ri·ty [in-teg-ri-tee] Show IPA noun 1. adherence to moral and ethical principles; soundness of moral character; honesty. 2. the state of being whole, entire, or undiminished: to preserve the integrity of the empire. 3. a sound, unimpaired, or perfect condition: the integrity of a ship's hull."]]></description>
</tagword>
<tagword>
<word>Voice</word>
<description><![CDATA["voyss [voyss] Show IPA noun"]]></description>
</tagword>
<tagword>
<word>Argument</word>
<description><![CDATA["arg-u-ment[arg-u-ment] Show IPA noun"]]></description>
</tagword>
</tagwords>1. I have a master page with three url links which are sent to the detail page:
<p><a href="sprydetail.html?word=integrity">integrity</a></p>
<p><a href="sprydetail.html?word=voice">voice</a></p>
<p><a href="sprydetail.html?word=argument">argument</a></p>
Please remember that the URL variables are case sensitive, ie if the variable that you are looking for is Integrity then the variable cannot be integrity.
The sprydetail.html page looks like this:
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script src="SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var ds1 = new Spry.Data.XMLDataSet("myxml.xml", "tagwords/tagword/word");
var ds2 = new Spry.Data.XMLDataSet("myxml.xml", "tagwords/tagword/description");
//-->
</script>
</head>
<body>
<div spry:region="ds1">
<h1>{word}</h1>
</div>
<div spry:region="ds2">
<p>{description}</p>
</div>
</body>
Change the above to
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<div spry:region="ds1">
<h1>{word}</h1>
</div>
<div spry:detailregion="ds1">
<p>{description}</p>
</div>
<script src="SpryAssets/SpryData.js"></script>
<script src="SpryAssets/xpath.js"></script>
<script src="SpryAssets/SpryURLUtils.js"></script>
<script>
var params = Spry.Utils.getLocationParamsAsObject();
var ds1 = new Spry.Data.XMLDataSet("myxml.xml", "tagwords/tagword[word ='"+params.word+"']");
</script>
</body>
</html>
First of all I prefer having the JS at the bottom of the document, not absolutely required. Next I have gone for one dataset showing a region and a detailregion. I have also extracted the URL variable placing this into params, the individual value params.word has been used in the xPath definition.
Gramps -
How to get value of URL parameter
Hi,
If an ABAP Web Dynpro URL looks like this: http://<server>:<port>/sap/bc/webdynpro/sap/zny_test1?sap-client=100&sap-language=EN, how to get value of the URL parameter sap-client at runtime in the application?
Thanks,
NancyThe framework currently strips all the framework specific params.
Perhaps the will be made available in a future release. Thomas, any comments ?
However, I dont understand the requriement to know the sap-client URL value.
If your code is running, a user has successfully connected to system a therefore he has a session open and this session is associated with exactly 1 client at any point in time.
See SYSTEM VARAIBLE SY-MANDT.
this represents the client in which the users session is running and negates the need to see
sap-client URL value.
regards
Phil. -
HTTP Sender - how to read URL Parameter USER id into Mapping
Hi,
My scenario is HTTP - XI - ABAP Proxy.
I wanted to capture USER id of the person who posted(HTTP) into XI(Mapping). How to read/evaluate the value of sap-user from querystring of URL ?
http://HOST:8008/sap/xi/adapter_plain?namespace=http%3A//abc.com/sales_oa&interface=MI_sales_OA&service=DEV_D&party=&agency=&scheme=&QOS=EO&<b>sap-user=SM9999</b>&sap-password=xxxxx&sap-client=001&sap-language=EN
please help.Mallik,
Try URL Parameters in HTTP sender communication channel.
In the sender communication channel set Adapter Specific Message Attributes. Click on Apply URL Parameters. In Parameter1 put sap-user (U can query any URL parameter by giving its name as in the HTTP URL).
Now in SXMB_MONI, in inbound payload SOAP Header, under Dynamic configuration u can see the value of the user. Query the same in Mapping using Dynamic Configuration using keyName as UrlParamOne.
Regards,
Sudharshan N A
Message was edited by:
Sudharshan Aravamudan
Maybe you are looking for
-
HP Laserjet 1020 printer not printing at all
I have this HP Laserjet 1020 printer that I loaned to a friend when her computer died and since I got it back no matter what I do it won't print on my desktop (HP Pavilion Media Center a1324n Desktop PC) it prints without problem with my laptop and
-
Why won't logic read my guitar??
I have input 1 set to instrument. I've tried every combination of phase invert and phantom power (although i dont even know what those things are) and my guitar still won't read. Fresh batteries, volume turned up. I've tried all diff settings on m
-
Hello, We are facing a problem with spatial query performance on 10.2.0.5. Apologies for limited information, I am still gathering information, but thought of asking this upfront. What we have noticed is that queries involving SDO_ANYINTERACT runs sl
-
Mail 1.3.11 won't hold formatting when forwarding
My Mail 1.3.11 version won't hold newsletter formatting (html?) when I forward a message - only text shows up, photos or columns. How can I get Mail to keep format when forwarding?
-
Rollover images using web widget?
is it possible to to make roll over images liek for s nav bar and link the images with iweb using the web widget feature? or not? mitch