Skip to Content
author's profile photo Former Member
Former Member

Problem with the same content of an context in different sessions

So here is the problem.

I`ve got my web dynpro running on NetWeaver2004. In my application I`ve got an input field and a button. To this input field is bind context variable type string. Then i do just trim on this context, and call rfc function with this context as import parameter. The rfc sends me back correct export parameters. So this is ok. Then I write on the screen the import parameter and all export parameters.

But when I run two session of this application. There i get a problem. From the first session I call the rfc with for example parameter 123 all the things run ok. Then I call rfc function from the second web dynpro with for example parameter 456. This runs ok too. But when I call from first session onesmore rfc with parameter 123. It will get back from R3 data for 456 and the context import parameter is 456!!! But i put in inputfield 123 and this parameter i`m using only in my program as context variable. So the question is why the second session changed my context in the first session. And what i must do to avoid this happen.

Thanks for help

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 07:04 AM

    Hi Richard,

    Are you binding your input node and invalidating the output node in the action assigned to the button or somewhere else.

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I realy don`t get the point of this:

      //here it write the context 333
      wdComponentAPI.getMessageManager().reportSuccess(wdContext.currentContextElement().getSN());

      MdlQuestSN model = (MdlQuestSN)WDModelFactory.getModelInstance(MdlQuestSN.class);



      user = null;
      try
      {
      user = WDClientUser.getCurrentUser();
      }
      catch(Exception e)
      {
      wdComponentAPI.getMessageManager().raiseException("Chyba v zistovani usera "+e.toString(),false);
      }




      Zplm_Sernr_Info_Input sernrInfo = new Zplm_Sernr_Info_Input();
      //IPrivateRdInfDetailInfos.IZplm_Sernr_Info_InputElement sernrInfo1 = wdContext.nodeZplm_Sernr_Info_Input().createZplm_Sernr_Info_InputElement(sernrInfo);

      sernrInfo.setI_Sernr(wdContext.currentContextElement().getSN());

      sernrInfo.setI_Uname(user.getLastName());

      wdContext.nodeZplm_Sernr_Info_Input().invalidate();
      wdContext.nodeZplm_Sernr_Info_Input().bind(sernrInfo);

      int count=0;

      try
      {
      sernrInfo.execute();
      //wdContext.nodeZplm_Sernr_Info_Input().currentZplm_Sernr_Info_InputElement().modelObject().execute();
      wdThis.wdGetContext().nodeOutput().invalidate();
      count=sernrInfo.getOutput().getT_Seri().size();


      }
      catch(Exception e)
      {
      wdComponentAPI.getMessageManager().raiseException("Chyba vo volani Zplm_Sernr_Info_Input "+e.toString(),false);
      }
      if (count>1)
      {
      wdThis.wdFirePlugToRdInfGetMatnr();
      }
      else if (count==1)
      {

      try
      {material.setText("Material: " + wdContext.currentT_Seri_I_OutElement().getMatnr());}
      catch(Exception ex)
      {}
      try
      {nazovMaterialu.setText("Názov materiálu: " + wdContext.currentT_Seri_I_OutElement().getMaktx());}
      catch(Exception exc)
      {}
      try
      {zavod.setText("Závod: " + wdContext.currentT_Seri_I_OutElement().getWerks());}
      catch(Exception exc)
      {}

      //here it write SN 4444 - that is from the other session
      try
      {SN.setText("SN: " + wdThis.wdGetContext().currentContextElement().getSN());}
      catch(Exception exc)
      {}

      }

      catch(Exception s){

      }

      finally{

      model.disconnectIfAlive();

      }

      all of the export parameters are from the other session

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 09:11 AM

    hi richird....

    before executing print the value of binded variable to conform that what ever u r passing is write

    by using code

    wdComponentAPI.getMessageManager().reportSuccess(<ur binded variable>);

    in all three cases

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 11:06 AM

    hi richard........

    what ever u are binding or sending to bapi that i was telling

    before execution sentence type belove two sentence

    wdComponentAPI.getMessageManager().reportSuccess(wdcontext.nodeZplm_Sernr_Info_Input sernrInfo().currentZplm_Sernr_Info_Input sernrInfoelement().getI_Sernr);

    wdComponentAPI.getMessageManager().reportSuccess(wdcontext.nodeZplm_Sernr_Info_Input sernrInfo().currentZplm_Sernr_Info_Input sernrInfoelement().getI_uname);

    by the way me is jayesh

    u had written in responce to some one else....

    with regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.