cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Parameters via Post

Former Member
0 Kudos

Hello Experts

I need to pass some parameters to another web dynpro application, but i can´t pass them via url, i tried to pass via exit plug but the application is not receiving, can anybody help me in this issue?

Thanks

Kleber

Accepted Solutions (1)

Accepted Solutions (1)

lokesh_kamana
Active Contributor
0 Kudos

Hi,

Please refer the below link if you had any problem plz let me know so that i can help you.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/inter...

Thnaks & Regards,

Lokesh.

Reward points if usefull

Former Member

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Refer this thread from Bertram Ganz which mention how to do this.

this is possible, allthough it is some kind of "not-so-obvious" Web Dynpro features, I admit.

Sending POST parameters with Web Dynpro Suspend Plugs

1) Define a an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.

2) In your controller code create a HashMap instance and put some key/value-pairs in it:

Map postParams = new HashMap();

postParams.put("Key1", "Value 1");

postParams.put("Key2", "Value2");

postParams.put("Key3", "Value 3");

wdThis.wdGetWDSuspendResumeWindowController().wdFirePlugTestSupend("http://www.sap.com", postParams);

3) RESULT: The Web Dynpro Java Runtime will then pass these parameters via a POST request to the Suspen/Resume target application like the following HTTPWatch-Log demonstrates:

00:00:02.817 0.253 1812 POST 405 text/html http://www.sap.com/?sap-wd-resumeurl=http%3A%2F%2Fwdfd00181849a%3A57000%2Fwebdynpro%2Fdispatcher%2Fl...

and the following three POST-Parameters Key3=Value3&Key1=Value1&Key2=Value2

Regards, Bertram

Regards

Ayyapparaj

Former Member
0 Kudos

Thanks Ayyapparaj.

I will reward all with points

Thanks

Kleber

Former Member
0 Kudos

Thanks for the fast reply people

In the tutorial the parameter is passed via url, but i need to pass it via post, like when we build a html page and there is a form with an action = "POST".

This kind of action is possible between two web dynpro applications?

Thanks

Kleber

Former Member
0 Kudos

I don't there is any option to pass url parameters using "POST"(where url parameters will be hidden unlike in GET) in Web Dynpro. You want to explore other options like storing those values in Database and passing the handle to second application as url parameter. Second application can fetch those parameters based on that handle.

Cheers,

~kranthi

Former Member
0 Kudos

Thanks for the fast reply Manivannan.

But I need to pass a parameter via POST, for example i need to pass a parameter named keypernr, i tried to pass via exit plug with two parameters(the url of the application and the parameter keypernr)like i saw in another forum but i got an error. Can you help me?

Kleber

Former Member
0 Kudos

Hi Kleber,

You can pass the parameter via url by following code


String target =		WDWebContextAdapter.getWebContextAdapter().getRequestParameter("pass"); 

take the parameter "pass" you can do that..

Regards,

P.Manivannan