Skip to Content
Author's profile photo DJ Adams

Hacking the SAP service portal to make OSS notes better

Ahh,OSS notes – a topicImproving the OSS note experienceFOSDEM, and small OSS Notes Browser Hackmy heart.

The OSS Notes Experience

The other day I decided to stop going on about how painful using OSS notes on the web was, and do something about it. So I hacked up aGreasemonkey script,OssNoteFix, that addresses the three main issues I have:

  • Not having the OSS note number in the title of the page makes it hard to manage more than a couple of notes at once
  • Not being able to click on a reference to a further OSS note to go straight to it
  • Having my basic browsing experience messed up by the use of frames

Enter Greasemonkey

Greasemonkey, to quote Mark Pilgrim in his very usefulDive Into Greasemonkey online book, “is a Firefox extension that allows you to write scripts that alter the web pages you visit. You can use it to make a web site more readable or more usable. You can fix rendering bugs that the site owner can’t be bothered to fix themselves.“. The extension doesn’t do anything to web pages by itself, it’s the scripts that manipulate the pages once they’re loaded into the browser. (And yes, it’s for Firefox, a modern, standards-compliant browser. If you’re still using Internet Explorer, shame on you.)

Laying The Groundwork

But before we get to the script, let’s lay a bit of groundwork that will help smooth things along. Visit Dagfinn’s weblog postEasily access SAP notes from Firefox and follow his instructions to set up SSO access to service.sap.com, and to create a bookmark with a custom keyword so you can access OSS notes very simply. The SSO access avoids all those tiresome HTTP authentication popups your browser throws at you each time the front-end machine serving your request changes due to load balancing. The custom keyword bookmark allows you to request OSS notes directly by typing something like this into your address bar:

note 19466

(You can see this in action in the screencast linked below.)

Installing Greasemonkey and the OssNoteFix Script

Once you’ve got these set up, it’s time to install Greasemonkey. Visit the Greasemonkey homepageand follow the link to install it (you might have to add the Greasemonkey site to the list of sites allowed to install software). You’ll have to restart Firefox to have this extension take effect.

Now it’s time to install the Greasemonkey script that I wrote, “OssNoteFix”. Go tohttp://www.pipetree.com/~dj/2005/05/OssNoteFix/ossnotefix.user.js. Because of the ending (.user.js), Greasemonkey recognises it and gives you the option of installing it: Tools->Install User Script (see thescreenshot.)

Once you’ve got it installed, visit an OSS note page:

note 19466

and notice that, once it’s loaded:

  • the OSS note number is in the title
  • the numbers of the further notes referenced are clickable
  • there are no frames

Hurrah!

Watch the Screencast

I put together ascreencastwhich demonstrates the creation of the OSS note bookmark, a visit to an OSS note page before OssNoteFix, the installation of the OssNoteFix user script, and the visit to an OSS note page after the installation. I’d already set up the SSO before I started recording, as that would have taken too long (and would be too boring to watch!) (Top tip: the screencast is at 800×600, so hit F11 to get fullscreen mode in your browser. Also, it’s a 3 Meg file, so please be patient while it comes down the pipe!).

Caveat Emptor

Of course, the usual caveats apply – it’s a beta, SAP’s service portal pages are horribly complex and any change may break the script, and your own mileage may vary, blah blah blah. Also, the script sometimes matches 5 or 6 digit numbers that aren’t OSS notes. But it works for me. It was especially useful this week as I was installing a CRM 4.0 system.

This script is free and open source software, use it as you see fit, and if you’re not happy, you can get your money back 🙂

Assigned tags

      30 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Truely well done!! Excellent simply Excellent!!!!!

      Very impressive DJ!

      Author's profile photo Former Member
      Former Member
      One of the Best Posts.
      Well done DJ.

      Vivek

      Author's profile photo Former Member
      Former Member
      Hi DJ,

      You got an amazing weblog out here. I love the screencast and the hack, and in that order. Thanks a million !!!

      Regards,
      Subramanian V.

      Author's profile photo Former Member
      Former Member
      Well done
      Author's profile photo Former Member
      Former Member
      I've just discover grasemonkey and this utility is really helpful.
      I'm only curious about the "screencast" how did you do it?
      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author
      Hallo Fidel

      I used vnc2swf - http://www.unixuser.org/~euske/vnc2swf/

      (and don't forget to 'frame' the flash movie in the same width/height dimensions (in HTML) as you used in the geometry settings for the vnc server (e.g. 800x600) otherwise you'll get nasty artifacts in the screencast).

      cheers
      dj

      Author's profile photo Former Member
      Former Member
      This tool saves me a lot of time of searching the oss notes.  Thanks a lot...
      Author's profile photo Siddhesh Ghag
      Siddhesh Ghag
      Combining the SSO capabilities and Greasemonkey and your script ... whola its an excellent weblog great work thanks a ton and long live mozilla.

      Author's profile photo Former Member
      Former Member
      During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
      Author's profile photo Former Member
      Former Member
      Ok, i know it's a beta version but my firefox settings allowed me to use it only for a day or two and now it's gone. I still have the monkey "smiling" and your code works inside the OSS Note, but firefox/google piece has been broken...
      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author
      Hi Greg

      I'm not sure what you mean by "now it's gone", especially when you then say "your code works inside the OSS note". And what's the "firefox/google piece"?

      Perhaps we can find out what's going on in your browser and fix it for you.

      OssNoteFix is still working for me here ...

      cheers
      dj

      Author's profile photo Former Member
      Former Member
      Ok, as i said your code works fine, i.e. notes are hypertexted inside the notes themselves, but for some reason my bookmark got wiped out and the redirect stopped working.

      I should actually direct this comment to the other blogger (Easily access SAP notes from Firefox), but i'm not sure about crossposting here. What i call firefox/google piece is quickly becoming the most cherished (expensive) piece of my PC real estate, by which i mean firefox's address bar which takes me to google's 'lucky' button area or how to get what you want by typing the least amount of keystrokes/mouse clicks.

      Your app is still a nice piece of coding, though.

      Author's profile photo Former Member
      Former Member
      OK, i forgot to hypertext the link myself...here u go...still a manual labor for me, hope it works... and watch your bookmarks!:

      Easily access SAP notes from Firefox

      Author's profile photo Former Member
      Former Member
      ok, i don't really need  tag here then...but i have two complaints this time to SAP:
      the link takes me a frame that 'shrinks' and my pageup and pagedown buttons don't work...since we are talking about usability here...
      Author's profile photo Former Member
      Former Member
      During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
      Author's profile photo Prasad Ulagappan
      Prasad Ulagappan
      Good one I have seen......good work
      Author's profile photo Former Member
      Former Member
      Hi DJ,

      Just hacked up one for the forums as we.
      Just changed the lines
      // @include       https://forums.sdn.sap.com/*
      var ossmatch = /[N,n]ote.\b(\d{5,6})\b/g;

      and removed alot of your checks for framename, etc.

      Works like a charm.

      Cheers
      Dagfinn

      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author
      Nice one Dagfinn.

      dj

      Author's profile photo Former Member
      Former Member
      Thanks for this contribution. However,...

      SSO works, the bookmark works, I upgraded to Firefox 1.5 and installed Greasemonkey 0.6.4 apparently successfully, installed your script apparently successfully, the "included sites" looks correct, and finally rebooted (WinXP).

      When I try something like "note 19466" the Note comes up, but the Greasemonkey script doesn't seem to run and don't get your customizations.  (Javascript is enabled).

      Am I missing something that allows the script to run?

      Author's profile photo Former Member
      Former Member
      It's apparently the 1.5 version of Firefox that broke the script. It works fine in 1.0.7. Any suggestions on updating the script?
      Author's profile photo Former Member
      Former Member
      If you download Greasemonkey now it requires Firefox 1.5 so the script won't work. Can anyone provide me with the exact changes required to make this work in Firefox 1.5?
      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author
      Chaps

      Sorry it took so long ... tuits, and everything.

      See OssNoteFix script updated for Greasemonkey 0.6.4 and Firefox 1.5 for explanation and updated version.

      cheers
      dj

      Author's profile photo Former Member
      Former Member
      Very nice DJ, one thing that bothers me is if FF is maximised, once the OSS note is loaded and changes the title it is no longer maximised (ie, you have to click on the "Maximise" icon to maximise FF again).

      Is this because the title is changed? Otherwise, great job. Works like a charm with the FF SAP search  plugins.

      Author's profile photo Former Member
      Former Member
      Hi,

      Since weeks ago I'm getting problems downloading the script, the link to www.pipetree.com is not working?
      Can I download it from another place?

      Regards.

      Author's profile photo Former Member
      Former Member
      Same for me, the link to the script seems to be broken.
      Is there any other place to download the script?
      Author's profile photo G. Awater
      G. Awater
      It would be great if the link could be fixed!
      Author's profile photo Former Member
      Former Member
      Link is not working, someone should update the link. i have also tried http://www.pipetree.com/ still the same
      Author's profile photo Durairaj Athavan Raja
      Durairaj Athavan Raja

      in the new BSP based oss system to access a OSS note you can use the following urlRaja

      Author's profile photo Former Member
      Former Member
      Follow the Greasemonkey link above
      http://greasemonkey.mozdev.org/
      And search the script with the "Find User Script" option. I found it there.
      Claudio
      Author's profile photo Former Member
      Former Member
      I found the script using the Wayback Machine (http://www.archive.org/web/web.php).  It is a useful tool for finding content that has disappeared from the 'tubes.  

      You can install the user script by pasting this URL into the address bar in Firefox:

      http://web.archive.org/web/20060313005908/http://www.pipetree.com/~dj/2005/05/OssNoteFix/ossnotefix.user.js