cancel
Showing results for 
Search instead for 
Did you mean: 

Session times out or Broken connection?

former_member194142
Participant
0 Kudos

Hello,

We have developed a webdynpro ABAP application (in that adobe interactive form is a UI elements along with the other UI elemnets like buttons, a small table) and we are launching this WDA thru SAP portal to the users.

But, users are confusing for not having a message for either session time out or broken connection.

For example, User_1 has logged into the SAP portal’s WDA application, started working by entering the data, but in the middle User_1 got a telephone call of about 60 min. and now User_1 again back to the work-in-progress WDA sessionof SAP portal, obviously session times out, at this point we need to throw an error message saying that ‘Session time out’, same case with broken connection

Pls. let me know how can i achieve this requirement? I have contacted our SAP Portal team but the answer is that they can not address this requirement.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This should be achieved through Portal only.

Have a look into this thread for reference.

http://scn.sap.com/people/santhosh.lingaraju/blog/2008/11/05/portal-user-idle-timeout-using-dialog-w...

former_member194142
Participant
0 Kudos

Thank you.

But, is there anyway to address this requirement from ABAP WebDynPro?

I saw the below link by Thomas Jung, but i as i am a beginner in WDA, i did not understood it, what is timedTrigger here?

http://scn.sap.com/message/7376072#7376072

Pls. eloborate and provide me what piece of code goes to wht event (i guess, Thomas provided code goes to WDDOINIT and he said some thing about WDMODIFY, in this event wht i should write), pls. eloborate differentiate EVENT perspective

Thank yu

Former Member
0 Kudos

Hi Raju,

The solution that Thomas gave was excellent and it would serve your purpose through ABAP WD itself.

Suppose you are working with the main window,so in the intit you need to catch the portal timeout.

So in the context on the component controller or the view controller add a new attribute,say timeout.

Now u need to set this field with the value that was received from the system parameters call in the WDOINIT.

Use the below code :

  data: name type pfeparname.
  data: value type pfepvalue.
  data: l_timeout type icftime.
  data: timeout type int4,
        trigger_timeout type int4.
  clear: timeout, trigger_timeout.

****Get the App Server Timeout
  name = 'rdisp/plugin_auto_logout'.
  call 'C_SAPGPARAM' id 'NAME'  field name
                     id 'VALUE' field value.



****Is there a specific Timeout set
  if wdr_task=>server is bound.
    if wdr_task=>server->session_timeout is initial.
      timeout = value.
    else.
****We got a specific timeout - now convert it to a number of seconds.
      data: minutes type i.
      l_timeout =  wdr_task=>server->session_timeout.
      minutes = l_timeout+0(2) * 60.
      minutes = minutes + l_timeout+2(2).
      timeout = ( minutes * 60 ) + l_timeout+4(2).
****If a specified timeout is larger than the default, it is ignored.
****Use the default instead.
      if timeout > value.
        timeout = value.
      endif.
    endif.
  else.
    timeout = value.
  endif.


  DATA lo_el_context TYPE REF TO if_wd_context_element.
  DATA ls_context TYPE wd_this->element_context.
  DATA lv_timeout TYPE wd_this->element_context-timeout.

* get element via lead selection
  lo_el_context = wd_context->get_element( ).

* @TODO handle not set lead selection
  IF lo_el_context IS INITIAL.
  ENDIF.

* @TODO fill attribute
lv_timeout = timeout.

* set single attribute
  lo_el_context->set_attribute(
    name =  `TIMEOUT`
    value = lv_timeout ).

Step 2:

Add a new field in the view layout . THe type should be Timedtrigger.

Below in the properties,create the action.

Also there is a field called delay,set it to say 5 secs.

Now in the method, set a breakpoint.

you will find out that every 5 secs, the method is going to debug mode automatically.

What you can then do is add a new add call this in new window with the message of whatever u want to convey to the user.

I hope you get the catch what needs to be done henceforth.

Hope this helps!

former_member194142
Participant
0 Kudos

Thank you, all is working, but BIG problem is i am throwing this time out mesage as popup info message, so, when user clicks OK, then my timedtrigger is not working nay more,

I opened a thread pls. respond, then i will close this

http://scn.sap.com/thread/3211813

Thomas Jung said some thing abt WDDOMODIFY in the below (to what value i have to RESTET context attribute in WDDOMOFIFYVIEW method? in our system we have 1800 seconds)

http://scn.sap.com/message/7376072#7376072

but, i did not understood, pls eloborate

Thank you

Thank you

former_member194142
Participant
0 Kudos

Any help pls?

Thank you    

Answers (0)