Shortcuts: an easier way to access SAP BW – part 3 – variable values and more
In the previous two blog posts (here and here) I’ve introduced the basic concept of working with shortcuts and some applications of it in accessing SAP systems and BW applications. This time around I’ll show a few other applications in BW for both user and consultant, and in the end I’ll throw in some more shortcuts of use to any SAP consultant.
So, imagine there’s an issue in a BW query in production which you have to investigate. If you’re lucky, the user will give you some details, such as the technical name of the query and the variable values used. You would then drill down to find the cause of the issue, or maybe examine the query design. But once in a while the user has already deduced that the issue concerns a specific document, such as a billing document. With that kind of information you would either go to RSA1 and display the infoprovider’s data, or maybe investigate using a query or the infoprovider’s default query.
What would be really convenient here is a query that shows a large number of details for a single document that receives that document as a variable value. And if you access it occasionally you might keep a bookmark for it. But what if you could just run a shortcut with the document number as a parameter, immediately opening the query showing the document in question?
I’ve already shown you how to run Bex Web with a query as a parameter in the first post, but this time the query is constant, and the variable value is the argument. Additionally we’ll have to pass the name of the variable as a constant to the URL.
This is actually something that I’ve mentioned in a blog post a few years ago, when I explained how to launch Bex Web from SAP Dashboards while passing a variable value, and this example is not too different:
start “C:\Program Files\Internet Explorer\iexplore.exe” http://host:port/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=QUERY_NAME^&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE^&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING^&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=%1^&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=VARIABLE_NAME^&VARIABLE_SCREEN=
host and port should be those of your BW Web server.
- Launches the query QUERY_NAME
- Runs the Web Application Designer command SET_VARIABLES_STATE, telling it to use the variable VARIABLE_NAME, with the value given as a command line argument to the shortcut (%1)
- Forces the variable screen not to appear (that is, gives “VARIABLE_SCREEN” an empty value).
Other commands can also be triggered, you can have a look at the Dashboards post for more on that.
As explained in the first post in the series, you’ll have to put the command inside a batch file (.bat) and then create a shortcut to that batch file – let’s call it doc for our purposes – in the shortcuts library. Now, running doc 123456 will open the query QUERY_NAME with the value 123456 assigned to VARIABLE_NAME.
I’ll now quickly introduce two more interesting combinations of shortcuts and URL parameterization.
One feature that was introduced in BW 7.4 is maintenance of master data via a web interface. While the interface may be less convenient than the previous SAPGUI solution, it has the advantage of the ability to be launched separately from the BW session. This can be done with the following syntax:
start “C:\Program Files\Internet Explorer\iexplore.exe” http://host:port/sap/bc/webdynpro/sap/rsdmdm_md_maintenance_app?IOBJNM=%1^&sap-language=EN
The language parameter affects which texts appear first in the text table, so if you need to maintain localization you may want to play with that.
But what’s more interesting here is that you may be required to log in to the server. When accessing Master Data Maintenance from RSA1 authentication should be passed on to the browser, however when accessing from a command prompt that may not be the case. The solution here really depends on your architecture, but one way I’ve found around this is to first open a website that provides an SSO ticket for the Master Data application. So in our example the batch file would actually look like this:
Start “” “%ProgramFiles%\Internet Explorer\iexplore.exe” “http://host:port/irj/portal”
Timeout /T %SleepTime% /NoBreak>NUL
start “C:\Program Files\Internet Explorer\iexplore.exe” http://portalhost:portalport/sap/bc/webdynpro/sap/rsdmdm_md_maintenance_app?IOBJNM=%1^&sap-language=EN
What this does is launch the Enterprise Portal, which provides the SSO ticket for the session, waits two seconds, and then launches the Master Data screen.
This trick is also helpful in obtaining authentication and choosing an environment for the Bex Analyzer and Query Designer shortcuts mentioned in part 1, which together allows to open them with the system and the query already selected – an alternative to the method described in part 2.
Similarly useful for BW consultants is the Metadata Repository screen, which you may know from RSA1, however creating a shortcut allows a direct access to the required entity. Again, the screen could be friendlier to users, but sometimes it can save time in getting Where Used lists and getting localization details:
start “C:\Program Files\Internet Explorer\iexplore.exe” http://host:port/SAP/BC/WEBDYNPRO/SAP/RSO_METADATA_REPOSITORY?SAP-LANGUAGE=E^&objvers=A^&tlogo=IOBJ^&objnm=%1
Here we´re looking at the metadata for an Infoobject, as denoted by the parameter tlogo=iobj. notice the one-letter code in the Language parameter, which is different than the Master Data syntax. As before, you might need to handle authentication.
As in RSA1, the metadata repository is that it actually works with a variety of entities. Other than infoobject, the most useful one is the Query Element, for instance when we want to examine which queries use a particular variable. Notice that this uses the UID of the query element.
start “C:\Program Files\Internet Explorer\iexplore.exe” http://host:port/SAP/BC/WEBDYNPRO/SAP/RSO_METADATA_REPOSITORY?SAP-LANGUAGE=E^&objvers=A^&tlogo=ELEM^&objnm=%1
What’s also potentially great about the outside access to the metadata repository is that it is a relatively safe way to expose the inner workings of the BW system to power users without allowing them access to RSA1, saving the need inquiries regarding the relationship between query elements, multiproviders, infocubes, and so on.
I think that’s enough to show the extent of what can be done with shortcuts. Again, I’m using this for a whole lot of other uses, in practice replacing work with bookmarks and the start menu as a quick and unified way to access, well, everything.
One thing that could be useful for all SAP consultants that I haven’t mentioned yet is access to the SAP support launchpad. Of course you can use a shortcut to search the SAP KB:
start “C:\Program Files\Internet Explorer\iexplore.exe” https://launchpad.support.sap.com/#/solutions/notes/?q=%1
You can put several words in if you use %20 to separate your words when running the shortcut.
(authentication here is really up to you, but I can recommend that you apply for a passport)
Some more useful but non-parameterized URLs are the support Inbox URL: https://launchpad.support.sap.com/#incident/smp/status/5,N
And the new incident URL:
These of course might change, but once you’ve started working with shortcuts, maintaining the links would still be easier than finding your way in the launchpad.
That is all for the shortcuts series. My next blogs will be regarding using ABAP and User scripts to enable batch loading and massive change in BW entities. Stay tuned.