Skip to Content
Author's profile photo Thomas Alexander Ritter

How ADT links change the way you work

Imagine a world without hyperlinks, without having the ability to navigate the web via links. Impossible? True! The ability to pull information together via links changed the way we share information, collaborate, etc.

Before the Eclipse based ABAP tools links were never fully embraced and implemented in the toolchain. This completely changed with the introduction of the new toolset. Now, you have the possibility to easily link to any repository object and once you become aware of it you can’t go back. (Kathy Sierra recommends giving your users Super Powers and in my opinion this feature is one 🙂 )

Let me give you some inspirations on what you can do with them.

1) Quickly point out the source of a problem

You might occasionally write emails similar like this:

“Hey, in class xy in method m1 in line 23 the wrong function module is used. Could you please have a look, thanks”

With ADT links everything gets easier. Now, you just select the source in the editor you want the colleague to look at, right-click, select “Share Link for Selection…” and paste the link:

“Hey, at this position the wrong function module is used. Could you please have a look,  thanks: adt://DST/sap/bc/adt/oo/classes/cl_gui_alv_grid/source/main#start=18369,0;end=18377,10

As you can see the link even features the editor selection which means when your colleagues click on the link their editors will feature the same selection. Really useful.

/wp-content/uploads/2013/05/share_link_code_490005.png

No more line number counting, no more emails back asking for better instructions because the colleagues can’t find the method.

This also works for not natively integrated objects e.g. transactions. Via the project explorer you can get the link: adt://DST/sap/bc/adt/vit/wb/object_type/trant/object_name/SE16

/wp-content/uploads/2013/05/share_link_pe_490061.png

2) Link to a development object from a wiki page or a word document

How often did you write a design document and wished you could offer a link so that the reader of the document could easily jump to the objects which you are describing? This is possible, now. Here is an example of a link in a word document which points to a data dictionary table:

/wp-content/uploads/2013/05/word_example_214324.png

3) Send links via instant messengers

In our team we use instant messaging a lot. The main problem with some messengers is that they do not recognize adt: as a protocol and do not render the link as a link which means you can’t click on it.

01-02-2013 13-23-08.png

In this case just copy the link and open it via the Eclipse menu entry: Navigate -> Open ADT Link…

/wp-content/uploads/2013/05/share_link_navigate_menu_490062.png

4) Do not be shy. Link-hacking allowed

You might receive a link for the wrong system. For example, you work in the system DST and receive the following link e.g. adt://IST/sap/bc/adt/oo/classes/cl_oo_adt_rc_class/source/main#start=1419,63

By looking at the first segment you can see that the link is meant for the system IST so just change that segment: adt://DST/sap/bc/adt/oo/classes/cl_oo_adt_rc_class/source/main#start=1419,63

Obviously, if the source code is not identical in both systems the link might point at a different location. But from experience this does not happen very often.

5) Improve log files, …

Another interesting use case can be found in the runtime errors feed. It provides the same functionality as the runtime error view in ST22 and uses ADT links to let you navigate to the position where the dumps happened and also for the stack navigation:

01-02-2013 13-43-34.png

Enable ADT Links for your IDE installation

You have to enable the ADT links for your IDE installation. Otherwise clicking on an ADT link will not automatically open the link target in your IDE. Enable it via the Eclipse menu entry: Windows -> Preferences -> ABAP Development

/wp-content/uploads/2013/05/share_link_pref_490063.png

Please be aware that currently there is the limitation that the IDE already has to be open before clicking on a link.

Conclusion

I am sure there are lots and lots more use cases which can be simplified with ADT links. Be aware that they exist, use them so you get a feel for how powerful they are and then experience how they will make your life easier 🙂

Do you have ideas for other use cases? Tell us!

Assigned Tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Nigel James
      Nigel James

      Thomas, you have given us super powers.

      This is awesome.

      Thanks,

      Nigel

      Author's profile photo Matt Harding
      Matt Harding

      Nice - Note - Some pictures seem broken on my end but still all makes sense. Code can actually be documentation now (referencing it in a document)!

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Thanks for pointing out the broken pictures! They should work, now.

      Yes, you can reference development objects directly in a document/presentation/..., now. We also use it heavily for support tickets and similar use cases.

      cheers

      Thomas

      Author's profile photo Former Member
      Former Member

      Good blog to understand thomas.. Good work... !!

      Author's profile photo Former Member
      Former Member

      Hi Thomas,

      How to open a ADT link in a browser. Some links are not opening.

      Capture.JPG

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Hi,

      not every object type can be displayed in a web browser. You only get the "HTTP Link" if the object type supports it.

      Packages do not support the "HTTP Link" option, yet.

      cheers

      Thomas

      Author's profile photo Former Member
      Former Member

      Thanks for your quick reply.. My requirement is to call these individual ADT links in html. Is there any possibility to find the links and call from html.

      How to download all these packages,objects and ABAP docs from eclipse.

      Please respond.

      Regards,

      Rao

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Hi,

      currently, it is not possible to export the ABAP Doc documentation. However, this will be possible in a future release.

      cheers

      Thomas

      Author's profile photo Former Member
      Former Member

      Hi Thomas,

      Thanks for the reply. How to read "ABAP Element Info" of Eclipse which can be maintained for ABAP Docs in my SAP GUI.

      My requirement is that I need to display class method documentation which was maintained in eclipse environment in my SE38 program.

      Regards,

      Rao.

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Hi,

      there are currently no public APIs available which allow you to read the ABAP Doc of an ABAP class.

      Have a look at the class cl_cc_adt_res_code_elementinfo. It is used to generate the content for the element info.

      DISCLAIMER this is not a public API! It is not stable and might change in future releases. Use it at your own risk!

      cheers

      Thomas

      Author's profile photo Former Member
      Former Member

      Hi Thomas,

      Thanks for the clarity.

      I have gone through the class that you have given reference but I can not use this directly to get ABAP Docu.

      Is there any way to read ABAP Class source code including ABAP Docu Tags. So that I can read element info based on tags and fulfill my requirement.

      Regards,

      Rao

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Hi,

      I could see that you found it yourself:

      How to Read Source code of a class

      cheers

      Thomas

      Author's profile photo Former Member
      Former Member

      Hi Thomas,

      is there a class/FM to generate http-Links? We like to use it in one of our applications (UI5-Apps).

      Christian

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Hi Christian,

      the SAPLink plugin implementation shows you how to get the resource URL for a workbench object.

      -> https://subversion.assembla.com/svn/saplink-for-abap-in-eclipse/build/SAPlinkADT.nugg

      wb_object = cl_wb_object=>create_from_transport_key(

        p_object = |{ _objtype }|

        p_obj_name = |{ _objname }|

        ).

        objref = cl_adt_uri_mapper=>get_instance( )->if_adt_uri_mapper~map_wb_object_to_objref( wb_object ).

      Once you have the url you need to add the hostname of your server/web dispatcher.

      cheers

      Thomas

      Author's profile photo Steve Sandrio
      Steve Sandrio

      Hi Thomas, will it be possible to use ADT link in the ABAP Doc?

      Also, I did not find any information where you can put link in ABAP Doc.

      Why is this very useful? As developer we need to write ABAP Doc which can be linked to other classes (e.g. "see Class <a>ABC</a> for further details").

      Or maybe a special "@" tag which can referenced to other classname?

      Direct navigation is optional, at least the classname can be click and showed in ABAP element info (just like class parameters where you can click on the classname).


      ABAPDoc and ADT Link should work more closely in the future.

      Thank you and best regard, Steve

      Author's profile photo Thomas Alexander Ritter
      Thomas Alexander Ritter
      Blog Post Author

      Hi Steve,

      the ability to link to other development objects within ABAP Doc has been on our road map from the beginning. Hopefully we will find time to implement it soon.

      cheers

      Thomas

      Author's profile photo Steve Sandrio
      Steve Sandrio

      cool! looking forward for it.

      Best regards, Steve