Skip to Content
Author's profile photo Nicolas Busson

Tip n°6: how to add hyperlink inside message long text


When creating messages via transaction code SE91, sometimes it is not enough to just fill-in the long text with an explanation… in fact you may want to add a link to some documents available on your website or internal knowledge base in order to provide your end-users with the ability to navigate to the relevant article whenever they need it:


In the screenshot above, a click on the “SOLUTION!” hyperlink would open a new browser window and navigate to scn website. This is also very convenient if you want to link a customer defined error message to the corresponding documentation available in your Intranet with every details about why the system was implemented this way… For this to happen, you will have to use the following syntax in the sapscript editor:


To get more information

Many hours of intensive debug… as I couldn’t find anything in the SAP online help about it. So if you know where this kind of trick is mentioned, go ahead and post a comment with the corresponding link: I’d be very pleased to add it in this section. Thanks!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Luís Pérez Grau
      Luís Pérez Grau

      Hi Nick,

      Thanks for the trick, I didn't know this one and I got curious about it, I Just found a workaround 🙂   inside the text editor  (Word style) Include->Link there you can choose document class URL Link via matchode (the field is disabled but you can modify it anyway). The problem I see in both approaches, because the one I described uses the same tags as the one you described is overcome the 60 characters limit, if you go to the sapscript editor you will see if the line is not colsed by > it doesn't work, I tried with = but no success, did you use long URLs like

      http:-//  ?

      Remove the - after: http:, I didn't want to get the nice format links added by the scn...



      Author's profile photo Nicolas Busson
      Nicolas Busson
      Blog Post Author

      Hahaaa.. this is actually a nice one because I tried this button "insert link" but as the field "class document" was read only in the popup I didn't even try to change it... again a very nice example of SAP user-friendlyness 🙁 that made me waste some hours of debugging.

      And indeed your URL must be < that 60 caracters long: this is hardcoded in function module URLA_OBJECT_SHOW.

      Another mysterious limitation...



      Author's profile photo Felix Hoefer
      Felix Hoefer

      Hi Nick,

      I managed to integrate URLs > 60 chars by

      1. creating an ABAP report, e.g. ZCALLMYURL with a single call of FM 'CALL_BROWSER' exporting the URL I want to be executed.

      2. In the SAPScript Editor of the long text insert a command, which call this Report:

      <DS:REPO.ZCALLMYURL>link to URL</>

      Check this standard docu for more commands:

      Inserting Hypertext Links in Long Text - Test Workbench (BC-CAT-PLN) - SAP Library



      Author's profile photo Michael Biermann
      Michael Biermann

      Hi Nick,

      Thanks a lot for posting about this "hidden" feature.

      You might have figured out, the longtext link does not work when using Web Dynpro Message Area. You get a "Display Help" hyperlink to show the longtext but only a few features of SE91 longtext are implemented.

      To get that working, WDR_DOCU_HELPER , CL_WDR_DOCU_HELPER_ASSIST->GET_DOCU, cl_wd_formatted_text=>create_from_sapscript need some minor extensions. I got that working for the tables where we show messages. In our check tools we show an icon with a linkToAction, calling WDR_DOCU_HELPER.

      I use the hyperlinks to open specific SAP FAQ notes in a new window.

      Your hint helped me a lot, many thanks.


      May be we will see that as part of SAP Standard in the future, I will try my best.



      Author's profile photo Naimesh Patel
      Naimesh Patel

      You can create your own HTML event handler and write the logic to navigate to the URL.

      Inherit a custom class say ZCL_EPSS_SAPEVENT_HANDLE from CL_EPSS_SAPEVENT

      Maintain the entry in the table EPSSA2  to use this custom event handler.

      By having this in the long text, the callback event handler would trigger and in turn would trigger the URL.

      <DS:ZURL.>Call Website</>

      Read more at:

      ABAP Overcome Long Text Links Handling using Custom Class

      Naimesh Patel