This blog contains experience gained over the years of implementing (and de-implementing) large scale IT applications/software.

Easy SAP Note Opening

In a previous post about one of the great time-saving features of my free Power Notes Searcher browser extension for Chromium based browsers, I showed how to auto-save a SAP note to PDF with the note title and version as the PDF file name.

In this post, I’m going to show you another great set of features related to opening SAP notes.

The Power Note Searcher has a massive 6 methods to open a SAP note, depending on how the note number(s) is/are input. Let’s go through each of them. I think you’re going to like this.

1. Enter a Note Number in the Popup

The first method is the simplest. You just enter the note number directly into the extension popup by clicking the extension icon in the browser toolbar, enter the note number and ticking “Open note number(s)“:

Notice that we specifically have text that says “number(s)”. This is because in the input box you can enter upto 10 note numbers separated by spaces, and Power Notes Searcher will open all 10 in new tabs:

A great tip, is that you can just paste text into this note number input box, and the extension will parse upto 10 note numbers directly out of the text. Any text, copied from anywhere!

2. Open Notes by Typing in the Omnibox

In Google Chrome, the Omnibox is the search text input, the URL display, the command entry box. It’s the all-in-one text entry area where a web page URL is usually displayed.

The Power Notes Searcher lets you open multiple note numbers from this omnibox using the keyword “note” followed by a space or tab.

Enter “note”:

Enter a tab or a space and the Power Notes Searcher extension is activated and ready to receive the space separated list of upto 10 note numbers:

3. Double Clicking Highlighted Note Numbers

When you have the Power Notes Searcher “Highlight Note Numbers” option turned on, then note numbers (or what are perceived as note numbers) on the SAP note pages and also in the note search results pages, are highlighted in Yellow (unread), and Green (read and in the history list):

Even though these are not hyperlinks, the Power Notes Searcher allows you to double click on them to open them in a new tab. How cool is that!

4. Highlighting Numbers and Opening

Another method to open multiple notes, is to highlight any note numbers on any page (any web page on the internet), then with the numbers highlighted, right click to open the Power Notes Searcher context menu, and select “Open note:”:

A great tip on this feature, you can just highlight the whole text including the note number and the extension will parse upto 10 note numbers.

You will also notice the “Parse note numbers to clipboard” menu item. This allows you to highlight any text on any web page and extract upto 10 note numbers directly out of the text and places them into the clipboard:

5. Open Notes from History

You will notice the SAP notes that you have opened, are recorded in the Power Notes Searcher history list, sorted in descending accessed date/time order:

Clicking the note number will open the link. Clicking the PDF icon will open the PDF version of the note.

Hint: There are a number of other hidden features on the popup, which I will run through on another post.

6. Open Notes from History Export

The final method of opening SAP notes in the Power Notes Searcher, is from the history export.

With the popup open, click the “Export…” link in the bottom left:

The export page opens. The export page has been designed so that you can highlight the whole list and copy to clipboard for pasting directly into Excel:

This concludes our journey around some of the features of the Power Notes Searcher. There are a few more features (as if that lot wasn’t enough) which I will run through on another blog post.

As a parting reminder, if you find the tool useful, please leave a review on the Google Extensions page and share the usefulness with your SAP colleagues.

As a reminder, here’s the link: https://chrome.google.com/webstore/detail/power-notes-searcher/djddlngbcgphkahmilapbfppblobpkfm

Enjoy!

Chrome 72 “bug” workaround for Power Notes Searcher

A recent Chrome experimental feature delivered in Chrome 72 is affecting the functionality of Chrome Extensions where the extension utilises some of the Chrome APIs to trigger actions depending on web requests.
This is noted as bug 931588 on the Chromium project issues list.

For users of my free Power Notes Searcher – Google Chrome Extension for SAP professionals, you could be affected.

What versions of Chrome are affected:

The main stable version of Chrome 72 is affected.

What are the symptoms:

On a SAP note page, if when you right click the page and select -> “Power Notes Searcher -> Auto-save Note as PDF”, my extension’s handy SAP note PDF re-name feature, does not seem to work.

Instead of the downloaded PDF being downloaded and saved as “<note-number>_<note-title>_v<version>.pdf”, the default filename is given.

Is there a workaround:
Yes, you need to disable the Chrome experimental feature “Network Service”.
Go to “chrome://flags” in a new Chrome tab, then find and set to “Disabled” the “Enable network service” item.

This will temporarily fix the issue until Google roll-out a fix to Chrome.
Another option is to switch to using “Chrome Beta” but this could give you other issues.

chrome://flags  to disable the “enable network service” feature.

Blogger Blog: List Posts By Label

If, like me, you have a blog which is hosted on the Google Blogger platform, you may have realised that there’s a lot of features missing, which you get on other platforms such as WordPress.
I specifically wanted to show a list of blog posts (no content, just the title) that have a specific label.
I wanted to have an index or list of links which a reader could click on and all the posts would be displayed that had that label/category.

Here is how I solved the problem.  You can see the results on the left-hand menu:

<—– HERE ON THE LEFT HAND MENU AREA UNDER “POSTS BY LABEL”

In my blog site I have the following setup:


I have the usual main (home) page which I’ve configured to show just one blog post in the “Blog Posts Gadget”, plus I have a “Feed Gadget” for showing the latest blog posts.  This gadget can only show posts ordered by date, and does not allow you to search by label.

On the left-hand side I have a “Link List” gadget which I have manually added links to a separate “Page”, which I created in the “Pages” area inside Blogger which contains just JavaScript:

The navigation works like so:


When a reader clicks on the links that I have manually setup in the Feed Gadget on the left-hand side, they are directed to the All-Blog-Posts.html page (the Page that I’ve created) which executes the JavaScript.
The JavaScript parses the query string (the text that follows the “?” in the URL) and determines the label.
The JavaScript uses the Google Blogger V3 API to retrieve the list of posts from my blog that match the label.

Apart from the need to create the “Page” (which I’ve called “All-Blog-Posts.html” and titled “All Posts”), you will also need to create an API key on the Google API platform, so that you can use the Google Blogger API to parse your blog posts.

You can try the Google Blogger API here: https://developers.google.com/blogger/docs/3.0/reference/posts/list

On the right-hand side of the API page, enter the following information:

BlogId – This is the number identifier of your blog and can be seen in your browser when you click on the “Posts” link in Blogger:

FetchBodies – False – we don’t want these.
FetchImages – False – we don’t want these.



Labels – This is a comma seperated list of the labels which are to be found in the posts (this is an ALL INCLUSIVE list and not and OR list) :

Show Standard Parameters – Click this to expand the list:

Fields – Enter “items(title,url)” to return only the URL and Title of matching blog post items:

Authentication – Select OAuth 2.0 and log in using your Google Account in order to test the API:

Click Execute:

The results will be displayed below the execute button in JSON format:


If you do not get a green “200” response, then you should check your entries again.

Before we can create a blog page that uses the API, we need to create an API Key.
Since it costs Google each time someone uses an API, they restrict the API usages with quotas which can be increased (if you want to pay).  For use by the average blog site, the quotas should be sufficient.

You obtain an API key by clicking the “Get A Key” button located on the developers.google.com site here: https://developers.google.com/blogger/docs/3.0/using#auth

Create a new project and click Next:

You’ll get an API key straight away (make a note of it), but you should secure the key against your specific blog domain name, to prevent abuse by others.
To do this, click the “API Console” link just below your provided key (opr go to https://console.developers.google.com/apis/credentials  and select your Key):

Select the option “HTTP referrers (websites)“, then add as many domain names as you need for your blog (where the API could potentially be called from):

Now you’re ready to create a new static page in your blog which will hold the required JavaScript to call the blogger API and display the blog posts matching the labels.

In your blogger admin site, create a new static page:

Click “New page“:

Give the page a title (e.g. All Posts by Label):

Paste in the JavaScript:

<html xmlns=”https://www.w3.org/1999/xhtml”>
<head>
<title>List All Posts</title>
<script src=”https://apis.google.com/js/api.js”></script>
<script type=”text/javascript”>
var myLabel = allposts_get_qs(“label”);
var myPage = allposts_get_qs(“page”);

document.write (‘<h3>For Label: ‘, myLabel, ‘</h3>’);

function escapeHtml(unsafe) {
return unsafe
.replace(/%2C/g, “,”)
.replace(/&/g, “&”)
.replace(/</g, “<“)
.replace(/>/g, “>”)
.replace(/”/g, “””)
.replace(/’/g, “‘”);
}

function allposts_get_qs(key) {
var myval=’NoValueSpecified’;
var regex = new RegExp(“[\?&]”+key+”=([^&#]*)”);
var qs = regex.exec(location.search);
if(qs != null) myval = qs[1];
return escapeHtml(myval);
}

function start() {
var apiKey=’YOUR API KEY‘;
gapi.client.init({‘apiKey’: apiKey,}).then(function() {
return gapi.client.request({‘path’: ‘https://www.googleapis.com/blogger/v3/blogs/byurl?url=’+location.origin+’&fields=id’,})
}).then(function(response) {
var theBlogID = JSON.parse(response.body).id;
gapi.client.init({‘apiKey’: apiKey,}).then(function() {
var nPage=”;
if (myPage != ‘NoValueSpecified’) { nPage=’&pageToken=’+myPage }
return gapi.client.request({
‘path’: ‘https://www.googleapis.com/blogger/v3/blogs/’+theBlogID+’/posts?labels=’+myLabel+nPage+’&fetchBodies=false&orderBy=updated&fields=nextPageToken%2Citems(title%2Curl)&prettyPrint=false&maxResults=99’,
})
}).then(function(response) {

var postJSON = JSON.parse(response.body);
var pageToken = postJSON.nextPageToken;

// Grab the container we will put the results into
var container = document.getElementById(“content”);
container.innerHTML = ”;

var html = ‘<ul>’;
var postCount=0;

if ( postJSON.items != null) {
postCount=postJSON.items.length;
for (var i = 0; i < postJSON.items.length; i++) {
var post = postJSON.items[i];
html += ‘<li><a href=”‘ + post.url + ‘” target=”_top”>’ + post.title + ‘</a></li>’;
}
}

html += ‘</ul><br/>’+postCount+’ matching posts displayed.’ ;

if (pageToken != null) {
html += ‘<br/><br/><a href=”‘ + location.origin + location.pathname + ‘?label=’+myLabel+’&page=’ + pageToken+ ‘”>Next Page >’;
}

container.innerHTML = html;

}, function(reason) { console.log(‘Error: ‘ + reason.result.error.message); });
}, function(reason) { console.log(‘Error: ‘ + reason.result.error.message); });
};

if ( allposts_get_qs() != null ) { gapi.load(‘client’, start) };

</script>
</head>
<body style=”border: 0 none; font-family: Arial;”>
<div id=”content” style=”width: 100%;”>Loading…</div>
</body>
</html>

You should replace: YOUR API KEY   with your new API key you generated earlier.

Publish your new static page on your blog (you will not see it, but you can reference it):

Now it’s visible to the internet, you can test your new static page by opening it in your web browser.
From within the Blogger admin console, click “View” for the new page:

Change the URL in your browser to add the parameter for the label you want to filter by:

Example:  https://yourblog.com/p/all-blog-posts.html   < Adding “?label=abc”
Gives the following URL: https://yourblog.com/p/all-blog-posts.html?label=abc

You should see:

If you put a valid label (one that you have used) then you should see those blog posts listed.
NOTE: The label filter is case sensitive.  This is an API feature.  You will need to ensure that all your posts have the correct/same case for the filter to show them.

TIP: To add spaces in a label you need to URL Encode the label using “%20” instead of the space.

That’s it!
You can now decide how you wish to present the filter.  E.g. in my case I’ve used the “Linked List” gadget and I manually add them.  But you could do something else if you wish.
Enjoy.

Power Notes Searcher Updated to v1.1

The Chromium project has recently (May 2014) fixed a bug in the Chrome web browser which means that users of my Power Notes Searcher Google Chrome extension may have seen an issue with the table ordering in the SAP Notes history table.

I have now made a slight correction to the extension and v1.1 is now available for update/install in the Google Chrome Extensions Web Store (or from the link on my initial blog post here).

If you haven’t already installed my extension, give it a go.  You don’t know what you’re missing!