Skip to Content

Description

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:

/wp-content/uploads/2014/05/message_with_hyperlink_463050.png

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:

<DS:URLA.http://www.scn.sap.com>SOLUTION!</>

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!

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. 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:-//scn.sap.com/people/nicolas.busson/blog/2014/05/29/tip-n-6-how-to-add-hyperlink-inside-message-long-text  ?

    Remove the – after: http:, I didn’t want to get the nice format links added by the scn…

    Cheers!

    Luis

    (0) 
    1. Nicolas Busson 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…

      Cheers,

      Nick.

      (0) 
  2. 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.


        <DS:URLA.https://service.sap.com/sap/support/notes/1874091>1874091</>


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

    Best

    Michael

    (0) 
  3. 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.http://www.zevolving.com>Call Website</>

    Read more at:

    ABAP Overcome Long Text Links Handling using Custom Class

    Thanks,
    Naimesh Patel

    (0) 

Leave a Reply