Skip to Content
avatar image
Former Member

Passing Parameters via Post

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Jun 20, 2008 at 02:03 PM

    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-application-navigation%20in%20web%20dynpro.pdf

    Thnaks & Regards,

    Lokesh.

    Reward points if usefull

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 20, 2008 at 01:52 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 20, 2008 at 02:25 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Jun 20, 2008 at 02:02 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 21, 2008 at 12:20 PM

    Hi,

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

    http-post

    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%2Flocal%2FWDSuspendResume%2FWDSuspendResumeApp%3Fsap-wd-cltwndid%3D9eb7fc62911911dcb64c003005a19301%26sap-wd-appwndid%3D9eb7fc63911911dc80fb003005a19301%26sap-wd-resume%3Dtrue

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

    Regards, Bertram

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded