Show TOC

Procedure documentationUsing Templates in Web Dynpro Locate this document in the navigation structure

 

You use this procedure to apply a template for a view or for a Web Dynpro component. A template is a standard feature that is commonly used while creating an application in Web Dynpro. It is used as a convenience to quickly insert with fewer steps instead of performing manual coding.

Prerequisites

You have created a Web Dynpro component, a window, and a view.

For more information, see Creating a Component

Procedure

  1. In the Web Dynpro Explorer, select the object for which you want to apply the template.

  2. Using the right mouse button choose Apply Template.

  3. To decide the type of template that you need to apply, use the information provided in the table below:

    If you want to…

    Apply a template of type…

    Apply a template on a Web Dynpro Object of type…

    Copy values from one context attribute to another context attribute within the same context or across different contexts

    Relate Context Attributes

    View

    Trigger a Web Dynpro application in the Netweaver portal

    Netweaver Portal Eventing

    View

    Create a button on the view with the necessary action, event, and outbound plug

    Action Button

    View

    Create a controller for the required component

    Service Controller

    View and Component

    Create a UI element such as a form or a table on a view using the request and response model classes

    Query and Response

    View

    Result:

    • For the request model class, Form UI element is created

    • For the response model class, Table UI element is created

    Create a form UI element on a view

    Form

    View

    Create a table UI element on a table

    Table

    View

    Create a callable object for a component, which can then be integrated in a Guided Procedure (GP) process

    Guided Procedure (GP) Callable Object

    Component

    Create a User Interface for ECM repository integration. Enterprise Content Management Knowledge Management (ECM KM) is SAP’s Content Management System, which is a central repository of all the documents.

    Note Note

    • The ECM template requires the component name and package as inputs where the document is to be stored/retrieved from. Additional properties such as date, author, size etc can also be provided.

    • The application of the ECM template results in the creation of a Web Dynpro component and two views:

      A main view which displays the document present in the AttachmentsFolder.

      A properties view and the requisite context mapping for the AttachmentsFolder is created which maps to the storage folder in the ECM system.

      User can upload/download document to/from AttachmentsFolder to the local file system.

      User can change the properties of the file using Edit option in main view which opens up properties view (popup).

    End of the note.

    Enterprise Content Management (ECM)

    Web Dynpro Components Node

    Result: The UI is created in the View that facilitates the user to upload and download documents from the ECM KM system.

    You can use a popup window to display charts, standard documents, reports and so on.

    Popup

    For more information, seeModeling a Popup Window in the Execution Modeler

    Window

  4. Select the required template and follow the instructions in Apply Template wizard.