cancel
Showing results for 
Search instead for 
Did you mean: 

submit a webdynpro IView from a non-Portal application

Former Member
0 Kudos

Hi,

i have create a WebDynpro application. This application shows in a table a list of '. This reports are IView for Bex Web Application in a SAP portal. For navigation to this BW IView the WebDynpro application must be also embedded in a WD iView.

The problem is:

This WD IView will be requested by a non-sap/portal application with dynamic parameters and also with the POST method.

In the WD application i have implemented the parameter request with following code:

int i = 1;

String name = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var_name_" + i);

If the non-portal application submit the WD application directly -> the parameters are available.

But when the non-portal application submit the WD IView, then the Parameters are 'null'.

Thank you for quick response

Anne

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

not I'm not sure that this are my parameters.

But where are my parameters?

How can i get the right?

Thank you for your help...

Anne

lajitha_menon
Contributor
0 Kudos

Hi Anne,

did you try using dynamic parameters like this?

&DynamicParameter=param%3Dvalue

LM

Former Member
0 Kudos

Map map =WDWebContextAdapter.getWebContextAdapter().getRequestParameterMap();

for (Iterator iter = map.keySet().iterator(); iter.hasNext();)

{

Object element = (Object)iter.next();

wdComponentAPI.getMessageManager().reportSuccess("pathram" +element);

}

try like this it might helps

Thanks,

Lohi.

Former Member
0 Kudos

Hi,

yes I'm use the statement to submit the iView:

<form action="http://server:50000/irj/servlet/prt/portal/prteventname/Navigate/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fdefaultDesktop!2fframeworkPages!2fframeworkpage!2fcom.sap.portal.innerpage!2fcom.sap.portal.contentarea?NavigationTarget=ROLES%3A%2F%2Fportal_content%2Fcom.kwl.kwl-01.KWL-01%2Fcom.kwl.kwl-01-iviews.KWL-01-Iviews%2Fcom.kwl.WEB_DP%2Fcom.kwl.IW_GISBW&DynamicParameter="

method="post">

var_name_1<input name="var_name_1" type="text" value="ZHAMFSB"><br>

var_value_ext_1<input name="var_value_ext_1" type="text" value="129191"><br>

var_name_2<input name="var_name_2" type="text" value="ZHAMFSB"><br>

var_value_ext_2<input name="var_value_ext_2" type="text" value="129761">

<input type="submit" value=" Senden ">

In this case the DynamicParameter will be send by GET.

But i want use the POST Method.

I get the parameters in both cases not in my WD application.

What is the problem?

Thank you

Anne

Former Member
0 Kudos

Hi Lohitha,

this case i have also tryed.

But the result was the same: there are only values like sap-rtl, sap-cssurl and so on....

Have you any other idea?

Thanks so much

Anne

lajitha_menon
Contributor
0 Kudos

Hi Anne,

I am not sure about the get and post methods, but you cannot use "=" in dynamic parameters. You have to use %3D for = and the subsequent parameters must be prefixed by %2D exactly like this

&DynamicParameter=param<b>%3D</b>value%26param2%3Dvalue2

<b></b>

Try passing your parameters in this syntax.

Regards,

LM

Message was edited by:

L Menon

Former Member
0 Kudos

Hi,

i think this is not the problem, because in the case the WD application runs out of the iView, than i get the parameters with out problems. See also my first description.

If i append the params to url + &DynamicParameter, is this the GET method.

IF i want the POST Method then must the java script command this:

method="post">

var_name_1<input name="var_name_1" type="text" value="ZHAMFSB"><br>

var_value_ext_1<input name="var_value_ext_1" type="text" value="129191"><br>

var_name_2<input name="var_name_2" type="text" value="ZHAMFSB"><br>

var_value_ext_2<input name="var_value_ext_2" type="text" value="129761">

The problem is in the passing params from iView to WD application, but where????

Thank you

Anne

Former Member
0 Kudos

Hi, thank you for your quickly response.

But the class of all is "pathjava.util.HashMap$Entry".

What can I do with this information?

Thank you for help...

Anne

Former Member
0 Kudos

Hi,

thank you for your response.

But it doesnt work.

I have tryed the following to get the parameter values in WD application:

Map map =

WDWebContextAdapter.getWebContextAdapter().getRequestParameterMap();

for (int j = 0; j < map.size(); j++)

{

manager.reportSuccess("test"+map.size());

Set set = map.entrySet();

for (Iterator iter = set.iterator(); iter.hasNext();)

{

Object element = (Object) iter.next();

manager.reportSuccess("path" + element);

}

There are 8 entry-set's (the non-sap application returns 8 dynamic values). But the key and values in these sets are very crypticaly.

example for one entry-set:

pathsap-cssurl=[Ljava.lang.String;@1c107ba

pathsap-accessibility=[Ljava.lang.String;@f39bb3

pathsap-locale=[Ljava.lang.String;@650955

pathsap-cssversion=[Ljava.lang.String;@15cf930

pathsap-ext-sid=[Ljava.lang.String;@5322e

pathsap-rtl=[Ljava.lang.String;@12275be

pathsap-ep-version=[Ljava.lang.String;@1174bb7

I think, this are informations about my parameter's.

How can i get the right values for the pointer?

Or what key/value of entry-set is the right for get values?

Thank you for your help

Anne

Former Member
0 Kudos

Hi Anne,

You need to type cast the "element" to the proper type, only then you can get the proper values. You can get the class of the elements as:

Object element = iter.next();

Class objClass = element.getClass();

Hope this helps you out.

Regards

Kapil

lajitha_menon
Contributor
0 Kudos

Hi Anne,

Try

manager.reportSuccess("path" + element.toString());

But, the parameters you are getting look like they are standard portal parameters like cssurl,locale, css version etc. They dont look like bespoke parameters. Are you sure these are the right parameters you need in your application?

Regards,

LM

lajitha_menon
Contributor
0 Kudos

Hi Anne,

See this thread

https://forums.sdn.sap.com/click.jspa?searchID=64770&messageID=1502012

I am quoting response from Roy Cohen below ...Try this

<i>It appears that you need to prefix the paramjeters with "&DynamicParameter" prefix, like this:

To pass dynamic parameters with an iView link, please try the following:<PortalServer>/irj/index.html?NavigationTarget=pcd:portal_content/<

iView>&DynamicParameter=param%3Dvalue

This should pass the parameter param=value to the iView. To pass more than one parameter, you need to URL encode the '&' and '=' characters

within the DynamicParameter string, e.g.

<PortalServer>/irj/index.html?NavigationTarget=pcd:portal_content/<

iView>&DynamicParameter=param%3Dvalue%26param2%3Dvalue2</i>