cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout - redirection

Former Member
0 Kudos

Hi,

how can I display specified web page (defined by url) instead of standard sap web dynpro timeout page?

Many thanks for reply

View Entire Topic
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There isn't a simple solution to this requirement. You can change the error page of Web Dynpro via SICF configuration but this catches all application errors.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/69efc9e8a607d6e10000000a42189c/frameset.htm

I have used a solution before to calculate the timeout and fire a timedTrigger just before the timeout occurs. From within this TimedTrigger event (which technically resets the timeout) you can fire an exit plug to redirect to any page you want. Here is the logic I used to calculate the timeout:

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.

Former Member
0 Kudos

Thomas,

How do you define a "TimedTrigger" event in WDA ?

Former Member
0 Kudos

I found this [posting|] and gave me an idea.

Linking it just in case someone ran into this posting.

Former Member
0 Kudos

Hello Thomas,

very nice idea. I tried to use the exit plug of my window and it worked fine, but only outside of SAP portal. This exit command with redirect URL only works without portal integration. Do you have any idea how to do the same with applications integrated in portal environment?

Thanks and regards

Marc

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This is really a portal question. The limitations of the close window parameter in scope of the portal are documented here:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9b/65e04ea1ae4d9d8cfd329afa43e869/frameset.htm

Former Member
0 Kudos

Thanks for your quick reply. You're right, it's a portal thing. We have another problem in our portal environment. The exit plug with redirect works fine, but the TimedTrigger ui element doesn't work in our portal framework. Thanks a lot for your help!

Former Member
0 Kudos

Hello Thomas,

the timeout solution works really fine for simple application. Now I have a more complex WebDynpro application with a few component reuses. I recognized that an exit plug of a reused window doesn't work. Is this right? Do i have to implement the TimedTrigger on each single view and application window? Do you have a good idea?

Thanks and regards

Marc

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

It really depends upon the structure of this more complex app. If you do like SAP does with the FPM framework and always have one parent/frame component and all of your innner usages fall within it - you can have just one instance of the timeout component as well. However if you are navigating between difference components, then you will need the timeout usage in each.

Former Member
0 Kudos

You're right, I included the timeout in each relevant view and window and it works fine. Thanks a lot, Marc