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:- Open the configuration editor for your Web Dynpro ABAP component.
- 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.
- Select the required UI element.
- Choose the Manage Tags link.
- Open the input help for the Tag input field and select the required tag.
- Choose Add.
- 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.
-
Start the Web Dynpro application in the customizing mode, as described in Customizing Web Dynpro Applications.
-
Call the context menu of the required UI element, and choose . A dialog box appears displaying the available tags.
-
Create the required tag and confirm with OK.
-
Select the relevant transport request.

