on 11-15-2005 2:44 PM
Hi all,
I have an web dynpro application which will be called by two different links on the portal ( I have created one web dynpro Iview and two links to it).
This application will internally call an RFC and needs to pass a differnt parameter based on the link which has called this application. For example, if link1 calls the web dynpro app, then the parameter to be passed to the RFC is '1' and if link2 calls the RFC, then the parameter to be passed is '2'.
So is there any way of finding out, clicking on which link on the portal is our web dynpro application getting triggered?? If we know that then based on the that i can pass the corresponding paremeter to the RFC.
Any info on this would be of great help.
Regards,
Narahari
Hi Sunil,
Make sure you are checking for the same values as the ones being passed through the url. If you pass 'cust' as the url parameter('param=cust'), you have to check if the value is 'cust', not 'customer'. i.e
if(param =="cust")
{
.
.
Other than this the code looks fine.
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Seems like some kind of confusion in the code. You said you are having 2 App parameters in the single WebDynpro iView. param="cust" & param="sup"
Now if it is declared like the above, meaning you have hardcoded the parameters.
in that case when the code to get the parameter executes which value will it return as you have 2 App parameters with the same name "param".
What you should have is param1="cust" & param2="sup"
now if that is the case then it is not going to serve your purpose as you need to have a single parameter which takes in the value of cust or sup based on the link clicked.
Now when you say you click on the link1 (i dont understand this).. does it mean you have 2 pages containing the same WebDynpro iView.
If you can clarify on this then we can see what problem you are facing.
Note : if you declare a App parameter say param1="cust" and then use webcontext adapter to retrieve, it will retrieve. (Also portal and Webdynpro runtime should be same just in case..
Hope that helps.
regards
Ravi
Hi Nibu,
Here we have used the "Application paramters" option in the iview properties to pass the parameters, as the link for our iview is not exactly a hyper link to pass the values like you mentioned.
Please let us know if the API you mentioned is the right API for accessing the parameters passed when passing parameters from the "Application parameters" option.
Regards,
Narahari
Hi Narahari,
Let your first link have the target as :-
http://....../<project_name>/<application name>?param=first
and your second url be
http://....../<project_name>/<application name>?param=second
Inside you view, you can read the url parameter like :
WDWebContextAdapter.getWebContextAdapter().getRequestParameter("param");
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nibu,
I am working with Narahari on this.
I tried putting 2 Application parameters in the 2 iviews that I have created on the portal : param=cust & param=sup respectrively.
Now, in my Web Dynpro project I have inserted this piece of code in the component contoller:
String param =WDWebContextAdapter.getWebContextAdapter().getRequestParameter("param");
if(param =="customer")
{
inputpr.setPo_User_Type("01");
}
else if(param =="supplier")
{
inputpr.setPo_User_Type("02");
}
I need to send 01/02 to the backend depending on which iview is accessed on the portal. But this is not working and data is not being retrieved. Can U kindly help me out.
Thanks.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.