cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing current OBN

Former Member
0 Kudos

Hello,

I have a situation where in the control navitgates from one DC to another. I need to access the URL at the target, look for a particular parameter and act accordingly.

I am trying to access the current URL or OBN in the target controller's wdDoInit(). Could somebody help me out with the API to access the current URL.

I tried Google it but could not find the right material.

Thanks in Advance,

Harisht

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Inside the Web Dynpro framework you can access the URL parameters using the following code:

WDWebContextAdapter.getWebContextAdapter().getRequestParameter("<param name>");

Or you can use

WDProtocolAdapter.getProtocolAdapter().getRequestParameter("<param name>");

Regards,

Satyajit.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the reply Satyajit and Ayyapparaj.

My URL is something like this.

http://ldciwdm.wdf.sap.corp:50000/irj/portal?

NavigationTarget=OBN%3A%2F%2F

BOTechnicalName%3D541D98274149D65CEF82E1CD43F159A2D5FBCBEF%2F

Operation%3DOpenFactsheet%2F

selectedRecordKey%3D001635C4F0401DECB2C9C2FA7DB15FC4

I am trying to access the parameter Operation using above suggested APIs. It returns as null. I see some special characters in the URL, could this be because of the characters.

Should I decode the url before accessing the parameters.

Please suggest.

Regards

Harish

Former Member
0 Kudos

Hi,

Well maybe you can try this:


String navTarget = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("NavigationTarget");

if(navTarget != null)
{
   //dirty code follows :)
   String oprParam = navTarget.split("Operation%3D")[1].split("%2F")[0];
}

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

If your url is like name=aaa

you can use

WDWebContextAdapter.getWebContextAdapter().getRequestParameter("name");

In latest

WDProtocolAdapter.getProtocolAdapter().getRequestParameter("name");

Regards

Ayyapparaj