Normally, BW reporting users open a workbook from a BW role and then save the workbook to their favorites. In certain situations, it is helpful if the development team could automatically add a workbook to a user's favorites. Learn a shortcut using a function module that adds a workbook to a user's favorites without the user's intervention. You can also add a power user's workbook to your own favorites.
Key Concept
In BW BEx reporting, users have the ability to add Excel workbooks to their list of favorites. The list of favorites is handy for users because it gives them quick access to the workbooks that they use most frequently.
Many BW reporting users pull published Microsoft Excel workbooks from the roles menu, set up the filters and navigation state that they require, and save the resulting workbooks to their BEx favorites. Once their favorites are set up, users rarely return to the roles menu to open BW workbooks.
The original workbook is still attached to the BW role and anyone with authorization to that role can still access it. However, by saving the modified workbook to their favorites, the user creates a new, separate workbook that only exists in the user's favorites. This method of saving workbooks to favorites presents some downfalls for developers.
The first problem is that developers can't access workbooks stored in a user's favorites because those workbooks aren't attached to a role. Workbooks attached to BW roles are generally easier to discuss because the developer and the user both have access to the same workbook. Secondly, developers often need to distribute a workbook to a single user for testing purposes. Short of emailing the workbook (which companies often discourage for security and data auditing purposes), there is no easy way to make a workbook visible to a single user other than my workaround.
You can avoid these problems by using my technique to automatically add a workbook to a user's favorites in BEx, as shown in Figure 1, and to add to a user's favorites list. To learn more about workbooks, see the sidebar, "BW Workbook Fundamentals." With a little knowledge of how BW stores favorites and of a system-supplied function module, you can have greater control of your users' favorites. This shortcut saves time because you don't have to publish the workbook to a role and it also makes the workbook accessible to super users and to the developer. See the section, "Add a User's Favorites to Your Favorites," to learn how to apply this method to your own favorites.

Figure 1
Workbooks in a user's Favorites
Note
Remember when using this tip that you and your users are both referencing the same physical workbook stored in BW. You have not created a separate copy of the workbook but have just added a reference of that workbook to the user's favorites. If users open the workbook from their favorites, change the workbook, and save it back to their favorites, then you see that change when you open the workbook from your favorites.
As you evolve from workbook-based reporting to Web-based reporting, you can take advantage of personalization of Web templates to replace the favorites functionality. Until then, this method helps you manage favorites in BW.
Tip!
Using the technique explained here, the developer could place a workbook that's in the development stage into a power user's favorites for quality checking. This method is also helpful if a power user is developing a workbook and has a question. You can also use this technique to add the power user's workbook to your favorites for analysis.
Add a Workbook to a User's Favorites
Step 1. Find the workbook's technical ID. Workbooks are stored in BW using a technical ID. This 25-character string is a system-generated, unique identifier of the BW workbook. The simplest way to locate this workbook ID is to open the workbook in BEx. Log in to the BW GUI and double-click on a workbook in your favorites (or launch BEx Analyzer from the Windows menu or with RRMX), choose Open>Workbooks, click on the Favorites button, and select the workbook to open. Right-click on the workbook, choose Properties, and click on the Information tab (Figure 2). The Workbook ID (server) field contains the workbook's technical ID.

Figure 2
Identify the workbook's technical ID
Step 2. Execute the FAVOS_EVENT_ADD_TO_USER_SHELF function module in transaction SE37. You can use the FAVOS_EVENT_ADD_TO_USER_SHELF function module to add a workbook to a user's favorites. You can open this function module with transaction SE37 and execute in test mode by pressing F8 or clicking on the execute icon, shown in Figure 3.

Figure 3
Execute function module FAVOS_EVENT_ADD_TO_USER_SHELF in test mode
Step 3. Enter parameters and execute. While in test mode, enter the following parameters in the FAVOS_EVENT_ADD_TO_USER_SHELF function module:
- Uppercase/Lowercase: Select this check box to allow the text description to contain lowercase letters. Otherwise, the text description of the workbook will be in all uppercase letters when added to the user's favorites.
- USER_NAME: Enter the user who wants the workbook added to his or her favorites
- REPORTTYPE: TR (for transaction)
- REPORT_NAME: RRMX (the transaction used to execute BEx queries and workbooks)
- SAP_GUID: The 25-character workbook ID from step 1
- TEXT: The text description to display in the user's favorites
Leave the other entry fields with their default values. Execute the function module by clicking on the execute icon or pressing F8 (Figure 4). The workbook is now listed in the user's favorites (Figure 1). The user can then open the workbook, refresh it, and validate that the workbook meets format and data requirements. Once the user has signed off on the workbook, you can publish it to the rest of the company by saving it to a BW role.

Figure 4
Execute the function module to list the workbook in the user's favorites
Add a User's Favorites to Your Favorites
The process for adding someone else's favorite to your favorites is very similar to the steps above. First, identify the 25-character workbook ID. You could ask the user whose favorites you want to add to open the workbook in BEx and perform step 1, or you could look up the workbook ID yourself. If you look in the SMEN_BUFFC table using Data Browser (transaction SE16), you can see all the workbooks that are associated with a user (Figure 5).

Figure 5
Open table SMEN_BUFFC using transaction SE16
Note
By specifying TR for the REPORTTYPE field and RRMX for the REPORT field, you limit the selection to only workbooks (Figure 6 ). If you don't add these restrictions, you see all the users' favorites, including those that are not workbooks.

Figure 6
Filter the SMEN_BUFFC table to only show the workbook favorites for a specific user
The SAP_GUID column holds the 25-character ID of the workbook (Figure 6 ). You can now use the FAVOS_EVENT_ADD_TO_USER_SHELF function module discussed in step 2 to add the workbook to your own favorites.

Figure 7
Locate the 25-character workbook ID in the SAP_GUID column of Data Browser and specify which user's favorites to list in your favorites
BW Workbook Fundamentals
BW workbooks make up the foundation of BEx reporting. They store query results together with fixed navigational states and filters. They can group together various queries from different InfoProviders to give a broad view of a company's activities.
Many tables are important in the storage and handling of workbooks in BW. For instance, RSRWBINDEX holds basic system information about the workbooks including:
- FILESIZE: The size of the file
- STATCHANGE: The number of times the workbook has been changed
- STATREADST: The number of times the workbook has been read
- TIMECREATE: When the workbook was created
- WBSTORE: Where the workbook is stored in BW
Some other relevant tables include:
- RSRWBINDEXT: Holds the text description of the workbook
- RSRWORKBOOK: Holds a cross-reference between the workbook and the queries that are contained in the workbook. This is very handy for locating all work books that hold a certain query. If you know the query ID (which you can get from the RSRREPDIR table), then you can find all workbooks in BW that contain that query.
You could also use the query where-used feature from BEx Query Designer. To open a query in BEx Query Designer, launch BEx Analyzer (either from a Windows Start menu or from BW with transaction RRMX) and choose Open>Queries. Select the query and click on the change icon. You could also open a workbook containing a query and click on the Change query (global definition) icon in the BEx toolbar (Figure 1).

Figure 1
Open a query in BEx Query Designer
If you open a query's definition and click on the where-used icon
, you see a list of workbooks that contain the query. The list includes the workbook's text description but provides no additional information, such as the technical name or the roles that contain the workbook. If you need more specific information (other than the workbook's name), you should use the RSRWORKBOOK table.
Workbooks are stored in BW in either the RSRWBSTORE table or Business Document Store.
- The RSRWBSTORE table stores customer-created workbooks. If the workbook entry in RSRWBINDEX has T in the WBSTORE field, this means that it is stored in RSRWBSTORE.
- Business Document Store contains standard content queries. Use transaction BDN1 to start Business Document Navigator and enter the following information to see the workbook information in Business Document Store (Figure 2):

Figure 2
View workbook information via transaction BDN1
– Class Name: BW_CATALOG
– Class Type: OT
– Object Key: A_ and BW workbook ID (e.g., A_3Q4SHG9O3H83YY1A4QKOKKQ3E).
– Document Type: BW_XLWB_XL
Click on the execute icon or press F8 to see the details shown in Figure 3.

Figure 3
Details of workbook stored in Business Document Store
David Eady
David Eady is the reporting team lead of the SI Corporation MIS team headquartered in Chattanooga, TN. The reporting team is responsible for all aspects of SAP information delivery. David has been with SI Corporation for six years and has been involved with BW for the last four years. He has a BS degree in industrial engineering from Mercer University and lives with his wife and two daughters in the foothills of northwest Georgia.
You may contact the author at eadydd@comcast.net.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.