on 04-17-2008 7:07 AM
Please help me to fetch parameter in runtime from the URL in web dynpro allication. Like
MyApplication?SAPtestId=Arun?SAPtestId=Kumar?Test2=Jaiswal;
I want to fetch the value of the SAPtestId, Test1 and Test2 in the web Dynpro Application.
Please help me on this asap. thanks
Hi Arun,
You can use the following code to get parameters from an URL
IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String paramValue1 = request.getParameter("SAPtestId");
String paramValue2 = request.getParameter("Test1");
String paramValue3 = request.getParameter("Test2");
And refer to the following link for more information.
http://help.sap.com/saphelp_nw2004s/helpdata/en/44/be65751c743959e10000000a1553f6/content.htm
Thanks n Regards,
Jhansi Miryala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
I am still stuck on the same issue, I can see the option like
> Do not forward these parameters to Web Dynpro
>Property ID
>Inheritance Locked in Target ObjectsCan be Edited in Target Objects
>Property Description
Could you please let which option need to change?
thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks to all of you!!!!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks A lot Amit!
Ayyapparaj, Jhansi, snehal and Amit thanks a lot for all of you. I have awarded to you for good points.
Thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
You must be using some iview which is liinked to your application.When you will open the same iview,you will see properties of the iview.At the top you will see a dropdown .Select "Show all" from the dropdown...
Scroll down throug the properties and there is one property "Frward properties to WebDynpro."Set this propety to *.
Regards,
Amit Bagati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Where can i need to make property " Parameters Forwarded to Web Dynpro" in iview to *(set this value there).
Could you please guided me step-by-step.
I will very thankful to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To resolve the problem of all paramters not getting paased to your application, you need to make one property " Parameters Forwarded to Web Dynpro" of your iview to *(set this value there).Hope this will resolve your problem of parameters not getting passed.
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am still facing problem in the getting the url parameter..
?SapTest=4&Test1=Arun&Test2=#Jaiswal..
I am not able to fetch the Test2 value
Please help me asap...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its because # has special meaning try to create url using the urlencode and urldecode methods
http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLEncoder.html
Regards
Ayyapparaj
Hi Jhansi,
I got the clue of your earliar meassage link. I have tried the using & in place of ?. Is working for me now.
One more thing i would like to know.
Is it possibe ot get the default instance of the mail server without authentication.
I have coded like
Properties props = System.getProperties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.auth", "true");
Authenticator auth = new Auth(); <----Class user for authenticate
Session session = Session.getInstance(props, auth);
But i want to use without authentication: ---
-
Properties props = System.getProperties();
props.put("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props);
Please let me know asap if it is possibe ot get the deafult instace of the mail serer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Snehal,
Actually my requirement is different. I wanted to fetch the sub string parameter from the URl, this url will have to set in sap system. it will call the web dynpro application for sending the mail to sap system. But problem is i am not able to fetch those multiple parameter from the URL. Pease help!!!!!!!!1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ayyapparaj and jhansi,
Thanks for the quick response!!
I am trying the same way as you have told but still i am not able to fetch the parameter. I am getting the null vaule for Test1 and Test2 and SAPtestId is blank.
Please advice for the other options!
Thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
Passing parameter to a wen dynpro application is done throught default inbound plug, which exist in interface viewcontroller
and you can access those parameter in implementaion of default inbound plug
To pass parameter
If MainWin is your main window of application then
1.in MainWininterfaceview controller add parameters in default inbound plug.
To access these parameter
1. In implementaion of MainWininterface view right a code to access these parameter
2.Store these parameters in controller context, so you will be access it from any screen
as
public void onPlugDefault(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String SAPtestId )
{
//@@begin onPlugDefault(ServerEvent)
set your controler context with SAPtestId
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use
Ex:MyApplication?SAPtestId=Arun?SAPtestId=Kumar?Test2=Jaiswal;
WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("Key");
//:SAPtestId=Arun
String value = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("SAPtestId");
//Above code will return you Arun do the same for others too.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.