cancel
Showing results for 
Search instead for 
Did you mean: 

SAP portal - snippet code

former_member388753
Discoverer
0 Kudos

Hi

i have requirement to add JavaScript code to the top head tag in sap portal , the script should display in all pages for specific roles , It's possible?? and What's the best scenario to implements?

<html><head><script>) ... </script>

thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

nickrankin
Contributor
0 Kudos

Hi Yasser,

You could create a Document Hook for this purpose:

https://blogs.sap.com/2014/11/03/adding-html-to-all-portal-iviews-responses-portal-document-hooks/

Please also review the associated notice:

*Important note – Hooks affect every request to the portal, and are designed for special situations. Because hooks can have wide-ranging and dangerous side-effects that could harm performance or entire portal functionality, it is not recommended for wide usage and only for special conditions that suits.

Best regards,

Nick