Thursday, October 9, 2008

SAP Resume Plugs and Portal Navigation Web Dynpro ABAP Portal Integration

For every interface view, you can flag exactly one inbound plug as a resume plug. When navigating in the portal, the existence of a resume plug results in the following behavior: If the Portal Navigation recognizes such a plug in the running application, the latter is not exited when navigating away but is instead transferred to a suspend mode. The session ID and contents of the context are retained and a new application is started. If a user then goes back to the original application via the navigation menu of the portal, it can be processed in exactly the same state in which it was left. Note the following:

If an application features a resume plug, the corresponding session is retained when navigating away in the portal. However, in many cases it may be sensible or even absolutely necessary to close the application completely. In such cases, you must not implement a resume plug for the interface view.

Method WDDOAPPLICATIONSTATECHANGE

The method WDDOAPPLICATIONSTATECHANGE is a method of the component controller. It is processed whenever the status of an application changes – that is, precisely when the application is transferred from running to suspend mode and when it is subsequently restarted via the resume plug. This method thus replaces the WDDOEXIT method in the phase model.

Application development can – but does not have to – add code to the method WDDOAPPLICATIONSTATECHANGE. However it can be useful, for example, to delete database locks in this method that are not be in place during the resume state.

While your applications are running within a portal, the portal navigation takes care of the suspend step without you having to implement it at design time. The mere existence of a resume plug ensures that an application is only interrupted and not exited in the case of a portal navigation. However, this does not take place if the application is not running in the portal and can thus not make use of the portal navigation mechanism.

Resume and Suspend Plugs Outside the Portal

If you want to interrupt an application and retain the session in the context of a pure Web Dynpro navigation, you must create a suspend plug for the interface view of the relevant window and fire it at an appropriate time. Every interface view can have several outbound plugs flagged as suspend plugs. Firing a suspend outbound plug also results in the method WDDOAPPLICATIONSTATECHANGE being called instead of WDDOEXIT. The URL of the suspended application is automatically passed to the subsequent application, so that it is possible to navigate back to the original application.

If an outbound plug is flagged as a suspend flag in a Web Dynpro ABAP application, this can lead to errors when the application is executed in the portal. If you are not completely sure that your application is executed solely outside a portal, you should avoid the use of suspend plugs.

No comments:

Archive