Transaction Launcher is a very useful tool which is used to launch both GUI transactions and URLs. It launches the application/websites in a frame. Now that becomes a limitation when we try to launch the websites that doesn’t allow their content to be displayed in a frame.
SAP CRM Web Client UI provides us with the easier option of creating Web Links. Now web links will only be displayed in the Home work center. We generally put the links created through transaction launcher under Direct Links in the navigation bar so that it can be easily accessible. So the limitation of web links its accessibility.
So the requirement turns out to launch a URL from a link in navigation bar and the URL is not supported to be displayed in a frame.
- Enhance the component CRMCMP_NAVBAR
- Enhance the view ShortCutLinks
- Create a public instance attribute GV_URL of type string.
- Update the method DO_HANDLE_EVENT of the view implementation class with the following code
5. Here Z_US_HEL and Z_UK_HELP are the logical link IDs of the TL. Set the variable GV_URL with the corresponding URL.
6. Add the following code at the end of ShortCutLinks.htm
IF controller->gv_url IS NOT INITIAL .
window.open (“<%= controller->gv_url %>”, “<%= sy-uzeit %>“, ” location=yes, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, width=1200, height=500″);
You might notice the addition “sy-uzeit” within the “window.open” statement. This is to make sure that the window we open is unique. Otherwise calling the same URL will not open a new window again.
location=yes : This will show the address bar.
Remaining parameters are self explanatory.
By following the above mentioned steps we can launch a URL from a link in navigation bar if the URL is not supported to be displayed in a frame.