Within a dynamic document you can set links using theadd_link method. This allows you to set three different kinds of link:
Linking to Bookmarks in the Document
To set a link to a bookmark in the document, you call theadd_link method and, in the destination_in_doc_set parameter, specify the name of the bookmark to which you want to jump.
To define the bookmark in your program, call theadd_link method at the appropriate point and, in the destination_in_doc_pos parameter, specify the name of the bookmark.
Linking to a URL
To set a link to a URL, call theadd_link method. Specify the text of the link in the Text parameter and the URL in the URL parameter.
Setting a Link That Triggers an Event
To set a link and make it trigger an event, first define an event handler method for theclicked event of cl_dd_link_element , in which you specify what should happen when the user clicks the link. Remember to import the special parameter sender , so that you know which link has been chosen.
Call theadd_link method and assign values to the name and text parameters. Make sure you receive the IMPORTING parameter link . This contains an object reference to the link.
Use theSET HANDLER statement to register the event handler you defined for the link you have just created.