Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
LauraNevin
Product and Topic Expert
Product and Topic Expert
456
For those of you out there who contribute your knowledge and opinions about SAP HANA's inner workings to newsgroups and blogs, you might want to get to know the URL structure for SAP Help Portal topics.

Help Portal has some URL behaviors and conventions that allow you to add meaningful links that will last over time.

Help Portal URL Structure


I mentioned in my post on Improving search engine results when searching for SAP HANA docs that the Help Portal URL structure contains some predictable and informative bits. If you already know about them, you can skip to the next section. If you don't, here you go:

Here's an example and a breakdown of the structure:

https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/20d5252d7519101493f5e662a6...

  • https://help.sap.com/viewer - 'viewer' sets the framework around the topic. Help Portal does not allow you to view a topic as plain HTML for printing purposes like some help websites do. It does something better.. it gives you a Print button that does what you want.

  • 4fe29514fd584807ac9f2a04f6754767 - the (unique) ID of the book you are looking at. No other book in the universe has this ID and it is not likely to ever change before the end of time. And in this case, it's the "SAP HANA SQL and System View Reference Guide".

  • 2.0.02 - the version of the software. In this case, 2.0.02. means "SAP HANA 2.0 SPS 02".

  • en-US - the language/locale. Who knows.. one day you might be able to toggle the URL to another language like ja-JP to see the Japanese version of the topic....

  • 20d5252d7519101493f5e662a6cda4d4 - This is the (unique) ID of the topic itself. No other topic in the universe has this ID. And in this case, the topic is the "CREATE STATISTICS statement".


OK, now that you've met URL...

 

Linking to content within a topic


Yes, you CAN link to sections within a topic.. but only reliably to certain kinds of elements, and only if there is already an ID on the spot you want to point to. For example..

WORKS: Pointing to sections
For example, you can link to the Description section of the CREATE STATISTICS Statement. To do this, you add the bookmark for the section to the end of the URL, with a pound sign to separate it. Here's an example:

https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/20d5252d7519101493f5e662a6...#loio20d5252d7519101493f5e662a6cda4d4__sql_create_statistics_1sql_create_statistics_description

DOESN'T ALWAYS WORK: Pointing to a bullet in a list (even tho there is an ID on the bullet)
When I tried to point to the <data_statistics_properties_group> bullet on the same page as above, it sometimes worked and sometimes didn't (this is the ID for the bullet: loio20d5252d7519101493f5e662a6cda4d4__create_statistics_data_statistics_properties).

This is the URL - what does it do in your case?

This is likely a browser thing, though. I say this because once I landed on the page, if it didn't scroll me automatically to the bookmark, a simple hit of the Refresh button scrolled me down. Odd.

How do I know if there is an ID to point to?


Look at the HTML source for the page in whatever source inspection feature your browser offers. Some tips provided at the bottom in the Comments scroll.

Content IDs look like this in the source - and note that everything between the quotes is what you're going to put after after the pound sign:

<a name="loio20d5252d7519101493f5e662a6cda4d4__property_descriptions"></a>

or like this if URL encoding of special characters is in use:
... src="https://sap.demdex.net/dest5.html?d_nsid=0#https%3A%2F%2Fhelp.sap.com%2Fviewer%2F4fe29514fd584807ac9f2a04f6754767%2F2.0.02%2Fen-US%2F20d5252d7519101493f5e662a6cda4d4.html%23loio20d5252d7519101493f5e662a6cda4d4__property_descriptions"

Assuming there is an ID, how do I know which elements work well for pointing to?


*Shrug* But as you find out, post your findings as comments below and I will update this list (-:

Findings from users:...


Links to sections - Yes

Links to bullets - Meh

...

Linking to a specific version of the software documentation


So from getting to know URL, you probably guessed you can fiddle with the version number (e.g., 2.0.02) to set it to what you want. However, be sure you try the link afterwards. Occasionally a topic goes away entirely because we reorganized things.

What if my link points to a version that is no longer on the Help Portal?


Good news.. if your link points to a version that is no longer on Help Portal, Help Portal redirects User to the latest version of the topic instead. From there, User can use the Version drop-down if needed.

If the link is truly broken though (404 error), it's because the combination of book ID and topic ID are no longer valid for the latest version of the documentation. This is likely because the content was reorganized somehow. Rare but possible.

If this happens, User will intuitively figure out how to find the product page for the product on Help Portal, then figure out which book they should look in, and then use the Help Portal search tool to search the book.

(OK realistically, they'll hit up a search engine..)

Linking like you just don't care which version


If you don't want to link to a specific version, and you really don't care about version at all, you can pull it from the URL entirely.

For example if you visit the following link (notice it has no version), you'll arrive on the latest version of the topic, and the URL changes to indicate the version you are looking at (which coincidentally matches the value showing in the Version dropdown on the page):

https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/en-US/20d5252d7519101493f5e662a6cda4d4....

You can also point the latest version by replacing the version number with the word 'latest':

https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/latest/en-US/20d5252d7519101493f5e662a6cda4d4.html

Can I add anchors to a topic somehow and then link to them from my post?


No is the short answer. (Noooooooooo is the long one.)

 

Thank you!


Now seems like a good time to say thanks to those who tirelessly blog and post about SAP products. Your thankless commitment is helping the larger user community--one post at a time.

Oh, I guess no longer thankless!
3 Comments