Setting Tags for a Web Dynpro Application

Use

Tags enable access to the values of Web Dynpro context attributes. A tag relates to a context attribute. Tags are always set in the original node. This means that if a context attribute exists in a view through mapping, the tag is stored in the original controller and the path of the original controller, and not in the view controller and the path of the view.

Procedure

Setting Tags in the Program Code

To set tags in the program code, use interface IF_WD_TAGGING_SERVICE.

Use the following code:

          
DATA lo_tagging_service TYPE REF TO if_wd_tagging_service. lo_tagging_service = cl_wd_tagging_manager=>get_service_by_component( component = wd_this->wd_get_api( )->get_component( ) ).
            

Setting Tags in the Configuration Editor

You have the following options:
  • Setting Tags for Web Dynpro Components

    You can declare a tag for a UI element using the configuration editor too. Here the UI element must also have a primary property and this must be bound to a context attribute. The tag is then set for this context attribute.

    Follow the procedure below:
    1. Open the configuration editor for your Web Dynpro ABAP component.
    2. In panel Web Dynpro Built-In in the UI element tree, navigate to the view and then to the UI element for which you want to create tags.
    3. Select the required UI element.
    4. Choose the Manage Tags link.
    5. Open the input help for the Tag input field and select the required tag.
    6. Choose Add.
    7. Save your configuration.
  • Setting Tags for FPM GUIBBs

Declaring Tags at Runtime

Administrators can declare a tag for a UI element. The prerequisite for this is that the UI element has a primary property and that this is bound to a context attribute. The tag is then set for this context attribute.

  1. Start the Web Dynpro application in the customizing mode, as described in Customizing Web Dynpro Applications.

  2. Call the context menu of the required UI element, and choose Start of the navigation pathTags Next navigation step Manage Tags...End of the navigation path. A dialog box appears displaying the available tags.

  3. Create the required tag and confirm with OK.

  4. Select the relevant transport request.