Show TOC

Linking to Selected Parts of ABAP Source CodesLocate this document in the navigation structure

Context

In a source code-based development object, you can initiate the creation of a hyperlink that refers to a specific element or statement. The receiver can then open the referenced message directly in ABAP Development Tools (ADT) in the corresponding ABAP project or in a Web browser.

For this purpose, you can generate an email where the hyperlink path is added or paste it from the clipboard manually into any document.

Procedure

  1. In the ABAP source code editor, open the development object.
  2. Select the element or statement that you want to refer to.
  3. In the context menu, select the Share Link for Selection... entry.

    The Share Link for Selection dialog is opened.

  4. Select ADT Link or HTTP Link for the hyperlink type you want to share.
  5. Choose Email link to generate an email from your default email client.

    An email is opened that contains a generated header and the hyperlink.

  6. [Optional:] Choose the Copy link to clipboard button and paste the link into any document.

    The hyperlink path is then saved in temporary storage. If you paste it in your document or editor, the path is added as text.

Results

Example

The following example displays an ADT hyperlink that includes the position details from the selection within a specific ABAP class:

adt://[ABAP system name]/sap/bc/adt/oo/classes/cl_demo_test_save/source/main#start=3,4;end=7,53
Note

In order to make a hyperlink click-sensitive, the receiver needs to define the application that is launched when opening a hyperlink.

To enable ADT links, you need to define ADT as the installation to be opened. Note that for an MS Windows operating system, you can set the handler path on the preferences page: Start of the navigation path Window Next navigation step Preferences Next navigation step ABAP Development End of the navigation path and activate the ADT Link Handling option. Alternatively, you can select Start of the navigation path Navigate Next navigation step Open ADT Link End of the navigation path from the menu bar. This functionality enables you to enter the copied URL and open the referenced development object directly.

To enable http links, you may need to edit the hyperlink preferences of your operating system.