Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Introduction

Web Dynpro applications comprise a powerful and user-interactive programming method. Of particular interest is the use of Adobe Interactive forms as the front-end in these applications.  Integrating the CRM Web UI with Adobe Interactive forms opens up a large number of possibilities to generate and subsequently make use of PDF documents.

  • Provide rich user-interface to enter data
  • Trigger workflows through the Adobe Interactive Form
  • Attach the PDFs generated to business transactions
  • Email the PDFs directly
  • Provide option to the user to view a document, change it or print it

The standard SAP CRM Web UI framework provides a tightly integrated way of embedding the dynpro applications within an assignment block. However, if that is not the requirement and if the user wishes to see the Web Dynpro launched in a separate window, it is much easier to place the URL in the BSP itself.

Launching Web Dynpro applications through SAP GUI

Each Web Dynpro application has a unique URL with which it can be accessed. Once the URL is known, it only needs to be opened in a browser window to access the application. SAP provides a standard utility class CL_GUI_FRONTEND_SERVICES which has various methods to carry out all the front-end services. This class is based on the control framework. It has a static method under public visibility titled ‘EXECUTE’. This method can be used to launch the applications through any report program or function module in SAP GUI. 

However, since the CRM Web UI technology does not fall fully under the standard SAP Control Framework, this method will fail to launch the application when triggered from the Web UI.

Launching Web Dynpro applications through CRM Web UI

Any Web Dynpro application can be opened if the hyperlink to the application is provided in the corresponding BSP of the Web UI. The importance here is in the design that will be followed for placing the link and under what conditions should the link be available to the user.

The business logic can be executed through an action processing, by invoking custom function modules, methods of classes etc. Depending on the result of this business logic, the link should appear on a specific area of the view in the Web UI. So once the right BSP component is identified, and the conditions are checked (either making use of simple flags or through BOL programming within the BSP code), the URL can be placed.

  • Use the method CONSTRUCT_WD_URL of the standard web dynpro utilities class CL_WD_UTILITIES in the following manner to generate the application URL including the parameters to be passed if any.

 CALL METHOD cl_wd_utilities=>construct_wd_url

  EXPORTING

   application_name  = APPLICATION_NAME
   namespace         = NAMESPACE
   in_parameters     = TAB_PARAMETERS
  IMPORTING

out_absolute_url  = lv_app_url.

 In the above code snippet, the APPLICATION_NAME refers to the Web Dynpro application and the NAMESPACE is ‘sap’. TAB_PARAMETERS contains any parameters that are needed to be passed to generate the URL.

  • Once the above mentioned method call generates the URL successfully, use the ‘A HREF’ html tag to place the hyperlink on the appropriate place in the UI. Sample code:

 <a href="<%= lv_app_url %>" target="_blank"> Sample URL to launch Web Dynpro Application</a>

The addition target = “_blank” ensures that the link opens up in a new browser window.

  • No labels