Suspend and Resume Calls

Use

Suspend and resume calls in a Web Dynpro ABAP application are useful if you want to navigate to a second stand-alone application without closing the first one. To implement a call of this type, you can select any outbound or inbound plugs from the interface view of a Web Dynpro window to use as suspend or resume plugs. A suspend plug call is similar to an exit plug call because both plugs are used to exit an active Web Dynpro ABAP application. However, unlike an exit plug, a suspend plug enables you to return to the original application after you have used a second, stand-alone application. The original application is not closed, as it would be if an exit plug is called, it is simply suspended and reactivated by a resume plug.

You can define a suspend call in a Web Dynpro ABAP application to call the following targets:

  • Another Web Dynpro application

  • A Web application created with a different technology (e.g. BSP)

Suspend Call in a Web Dynpro ABAP Application

Setting up a suspend call is straightforward: First select an outbound plug as the suspend plug in the primary Web Dynpro ABAP application. Call the plug, and specify a string representing the URL of the target application as the value of the URL parameter (see source code example below).

method ONACTIONGO_SUSPENDING .
data: L_REF_MAIN_WINDOW type ref to IG_MAIN_WINDOW .
L_REF_MAIN_WINDOW =   WD_THIS->GET_MAIN_WINDOW_CTR( ).
  L_REF_MAIN_WINDOW->FIRE_GO_SUSPENDING_PLG(
    URL =   'http://…………/webdynpro/sap/my_secondary_wda'  ).

endmethod..

            

The URL of a Web Dynpro application is listed as one of its properties on the relevant tab of the application in Web Dynpro Explorer. You can copy it from here.

When an exit plug is fired in the secondary Web Dynpro ABAP application, this application is closed and the resume plug of the primary application is called automatically. In the Web Dynpro framework a reference to the active instance of the primary application is passed in the suspend call. The secondary application knows its status as the next application of a suspended primary application. When an exit plug is called, it returns to the resume plug of the primary application using the specified reference.

In this case no further programming steps are necessary.

Suspend Call to a Non-Web Dynpro ABAP Application

It is more complex to set up a suspend call to a non-Web Dynpro ABAP application since the secondary application needs to be modified. For example, in the secondary application you have to implement the mechanism to return to the primary application. As well as specifying the address of the secondary application in the mandatory URL parameter, you also have to specify the URL of your own application for the subsequent return step. This resume URL is also transferred as the URL parameter to the secondary application.

The resume URL must be read in the secondary application. A redirect to the resume URL is then opened in the browser window of the secondary application.

This URL calls and reactivates the primary application using its resume plug