cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Reading DynamicParameters in Webdynpro

Former Member
0 Kudos

Hi All,

I am calling a Webdynpro application from JSP using EPCM.doNavigate

1)

Below is the code:


EPCM.doNavigate('ROLES://portal_content/xxxx/xxxx/xxxxx?DynamicParameter=param1%3Dvalue1%26param2%3Dvalue2 , 1);

It is navigate to the Webdynpro application properly, But not able to read the parameter values. Both I am getting null.

I am reading these values using below code in Webdynpro:


String param1 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param1");
String param2 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param2");

Below is the URL...which I see in the browser.

http://hostname:port/irj/portal?NavigationTarget=ROLES%3A//portal_content/xxxx/xxxx/xxxxx&DynamicPar...

If I navigate from other Webdynpro application using

2)


WDPortalNavigation.navigateAbsolute(
			"ROLES://portal_content/xxxx/xxxx/xxxxx",
			WDPortalNavigationMode.SHOW_INPLACE,
			"",
			"",
			WDPortalNavigationHistoryMode.NO_HISTORY,
			"",
			"",
			"param1=value1¶m2=value2");

It works fine.Below is the URL for that

http://hostname:port/irj/portal?standAlone=true&DynamicParameter=param1%3Dvalue1%26param2%3Dvalue2&H...

Please let me know where I am doing wrong for the first one.

Thanks

Joe

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Try to use DynamicParameter.

URL parameters can be included in a portal URL that calls a Web Dynpro page, and these parameters can be forwarded to the iViews on the page and read by the underlying Web Dynpro applications.

A Web Dynpro application can get URL parameters passed to the iView with the following code:

WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter

Page Parameters

You can send URL parameters to a Web Dynpro page in the following ways:

● Add to the URL a parameter called DynamicParameter, whose value is a set of key-value pairs to send to the page.

The following is the format for the DynamicParameter parameter:

DynamicParameter="param1=value1&param2=value2&"&

The value ("param1=value1&param2=value2&") must be URL encoded.

● Add to the URL parameters that start with sap-.

● Add parameters to the businessParameters parameter of the navigateAbsolute() or navigateRelative() method, as described in Absolute Navigation and Relative Navigation.

iView Parameters

The following are the URL parameters that get passed to each iView on the page, and then to the underlying Web Dynpro application:

· The static parameters defined in the Application Parameters property for each iView. The property value is a set of key-value pairs in the following format:

param1=value1&param2=value2&

· The parameters passed to the page (those defined in the DynamicParameterparameter as well as all parameters starting with sap-).

For isolated iViews in a Web Dynpro page, only the parameters specified in the Parameters to Pass from Page Request property for each iView are passed to that iView.

The property value is a list of parameter names, separated by commas, as follows:

param1,param2,param3

To specify all parameters, enter an asterisk (*).

Example:

http://help.sap.com/saphelp_nw2004s/helpdata/en/44/be65751c743959e10000000a1553f6/content.htm

Regards,

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks for your reply.....But I already know these things, I am using DynamicParameter only. I clearly mentioned the urls for to different calls. For the first call(From JSP) I am not getting values but for the second call I am getting values.

1)

http://hostname:port/irj/portal?NavigationTarget=ROLES%3A//portal_content/xxxx/xxxx/xxxxx&DynamicPar...

2)

http://hostname:port/irj/portal?standAlone=true&DynamicParameter=param1%3Dvalue1%26param2%3Dvalue2&H...

For the first one...WebDynpro not recognising the DynamicParameter.

Please let me know what might be the problem.

Thanks

Joe

Former Member
0 Kudos

Any help will be rewarded.......

Thanks

Joe

Former Member
0 Kudos

Hi,

have you tried this

String param1 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("DynamicParameter");

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Yes, I tried that but no luck.

If you see the URL generated that is what I think the problem.

http://hostname:port/irj/portal?NavigationTarget=ROLES%3A//portal_content/xxxx/xxxx/xxxxx&DynamicPar...

Its taking NavigationTarget to invoke Webdynpro application, but ignoring DynamicParameter.

Thanks

Joe