When migrating to SAP NetWeaver 2004s, your users may want to access both the new and legacy versions of BEx Analyzer until they get used to the new program. However, users accessing BEx Analyzer via single-sign on with transaction RRMX cannot choose which version of BEx Analyzer to launch. Use ABAP code to add a selection screen so users can choose their version of BEx Analyzer.
Key Concept
BEx Analyzer in SAP NetWeaver 2004s has changed substantially. It is now more integrated into Microsoft Excel. Some new features include the direct use of Excel formulas and formatting and the ability to build applications with the new Design Toolbar. Therefore, you cannot open workbooks saved in the new BEx Analyzer release in the older legacy version (commonly called 3.x), and you must migrate workbooks created in 3.x to use them in SAP NetWeaver 2004s.
To ease the upgrade and migration process to SAP NetWeaver 2004s, SAP provides and supports both versions of BEx Analyzer. Most users choose to use both versions to adjust to the new version and wait for the technical team to migrate existing 3.x query objects to SAP NetWeaver 2004s. Also, many SAP implementations support multiple BI clients, involving a combination of BW 3.x and SAP NetWeaver 2004s.
The SAP NetWeaver 2004s SAPGUI front end provides two versions of BEx Analyzer: the 3.x legacy version and the SAP NetWeaver 2004s version. Users may run queries created under either version with either tool, although they can only edit queries with the version in which they were created.
While users grow accustomed to the new version of BEx Analyzer, they probably want to access both versions of the program. However, in SAP NetWeaver 2004s, the only way to specify which version of BEx Analyzer starts with transaction RRMX is by a global setting on the SAP NetWeaver 2004s version (Figure 1). You can access this setting only after you launch BEx Analyzer in SAP NetWeaver 2004s.

Figure 1
Global Settings for SAP NetWeaver 2004s BEx Analyzer
The default setting is to launch the SAP NetWeaver 2004s version, an inconvenient configuration for anyone wanting to use both versions of BEx Analyzer with transaction RRMX. Consequently, I developed custom ABAP code to allow users to specify the version. This makes supporting both versions of BEx Analyzer much easier, especially in single sign-on (SSO) environments. Many SAP users do not launch and sign on to BEx Analyzer directly from the start menu of their PC. Rather, they launch BEx Analyzer via transaction RRMX from the back end, which uses SSO.
Note
You cannot use BEx Analyzer in SAP NetWeaver 2004s to edit queries as you can in the 3.x version. You must edit using BEx Query Designer in SAP NetWeaver 2004s. You cannot edit queries created using the new version of BEx Query Designer with the 3.x version of BEx Analyzer, although you can display or embed older queries in workbooks. Likewise, you can display or embed 3.x queries in workbooks in SAP NetWeaver 2004s BEx Analyzer.
BEx Analyzer Global Setting
Figure 1 illustrates the Launch legacy version from RRMX flag in the Global Settings screen from BEx Analyzer in SAP NetWeaver 2004s. When running RRMX from a BW 3.x client, the 3.x version of BEx Analyzer always launches (as of SAP NetWeaver 2004s front-end patch 7). Therefore, BW 3.x systems ignore this setting.
SAP NetWeaver 2004s provides the capability to use a special Windows registry entry on the client PC to externally control the global setting. SAP does not create this registry entry automatically; users must create and populate it. This registry entry is: HKEY_CURRENT_USER>Software>SAP>BEx>Analyzer>LAUNCH_VERSION (Figure 2). If you’re not familiar with the Windows registry, don’t worry about what this entry means or how to create it. The programs I’ll provide will create and update this entry automatically.

Figure 2
Registry key for BEx Analyzer LAUNCH_VERSION set to LEGACY
When this registry entry is populated with a value of LEGACY, your PC automatically turns on the Launch legacy version from RRMX flag in Figure 1 that enables the legacy version of BEx Analyzer. It also grays out this setting so you cannot edit it.
When the registry entry is populated by any other non-blank value (such as 04S), then your PC automatically removes the check in the Launch legacy version from RRMX flag and locks you from editing it. If this registry key entry has a blank value or if you have not created the registry entry, then the Launch legacy version from RRMX flag works as originally installed and is open for editing. Note that the registry entry value is not case sensitive. Next, I’ll describe how I used this undocumented feature to solve my problem.
You can manipulate the registry entry in several ways. The most direct way is with the standard Windows program regedit.exe. However, this solution is difficult and most companies restrict use of that program since you can potentially damage your PC’s configuration. In my sidebar “Use Method RegWrite,” I’ll explain another method of updating the registry.
This method uses a Microsoft Visual Basic Scripting Edition (VBScript) program on the PC that you can run from an ABAP program before users launch transaction RRMX. However, I decided against this method because it requires a separate file on the user’s PC, which someone could delete accidentally.
The best method for my solution uses a standard ABAP class within BW called CL_GUI_FRONTEND_SERVICES. This class provides a number of methods to perform PC functions with ABAP, such as displaying and deleting files or uploading and downloading files. One of the methods in this class is REGISTRY_SET_VALUE, which allows you to manipulate the PC registry with ABAP. You can find additional documentation about this class in Class Builder, transaction SE24.
Using Class CL_GUI_FRONTEND_SERVICES, I wrote two ABAP programs called ZRRMXOLD and ZRRMXNEW using ABAP Editor, transaction SE38. ZRRMXOLD sets the LAUNCH_VERSION registry entry to LEGACY and then calls the program that launches BEx Analyzer. This launches the 3.x version of BEx Analyzer. Program ZRRMXNEW sets the LAUNCH_VERSION registry entry to 04S, and then launches BEx Analyzer, which brings up the SAP NetWeaver 2004s version. Then, I assigned each of these programs to transaction codes in SE93, which I named ZRRMXOLD and ZRRMXNEW. Now, instead of using transaction RRMX, a user can enter either transaction ZRRMXOLD or ZRRMXNEW to control which version of BEx Analyzer to launch.
Program ZRRMXOLD
Figure 3 shows program ZRRMXOLD. It sets the LAUNCH_VERSION registry entry to LEGACY and then submits (calls) the program that launches BEx Analyzer. This launches the 3.x version of BEx Analyzer. Create this and all programs in ABAP Editor, transaction SE38.
*&————————————&mdas h;———————————————— —————-* *& Report ZRRMXOLD *& *&———————————————— ————————————————&m dash;—-* *& *& *&———————————————— ————————————————&m dash;—-* REPORT ZRRMXOLD. data key type string value 'SoftwareSAPBExAnalyzer'. data root type i value CL_GUI_FRONTEND_ SERVICES=>HKEY_CURRENT_USER. "=1 data returncode type i. data reg_value type string. CALL METHOD cl_gui_frontend_services=> registry_set_value EXPORTING ROOT = root KEY = key VALUE_NAME = 'LAUNCH_VERSION' VALUE = 'LEGACY' IMPORTING RC = returncode EXCEPTIONS REGISTRY_ERROR = 1 CNTL_ERROR = 2 ERROR_NO_GUI = 3 NOT_SUPPORTED_BY_GUI = 4. CALL METHOD CL_GUI_CFW=>UPDATE_VIEW * EXPORTING * CALLED_BY_SYSTEM = EXCEPTIONS CNTL_SYSTEM_ERROR = 1 CNTL_ERROR = 2 others = 3. submit RRMX_START_EXCEL.
|
Figure 3 |
Program ZRRMXOLD sets the registry entry to LEGACY and launches BEx Analyzer |
After you create ZRRMXOLD, enter transaction SE93 to assign program ZRRMXOLD to transaction code ZRRMXOLD. In Figure 4, the initial screen for SE93, enter ZRRMXOLD in the Transaction Code field and click on the Create button. This takes you to the screen in Figure 5.

Figure 4
Enter ZRRMXOLD in the Maintain Transaction initial screen

Figure 5
Choose the Program and selection screen (report transaction) option
Enter the Short text and choose the Program and selection screen (report transaction) option. Clicking on the enter icon takes you to Figure 6. Enter ZRRMXOLD in the Program field and choose the Classification and GUI support options shown. If you’re entering this in a development environment, when you save the entry the system prompts you for a package and a transport request. Enter these in accordance with your company’s policies.

Figure 6
Maintain the Classification and GUI Support options
Program ZRRMXNEW
The code for program ZRRMXNEW is included in the download material. The only difference from the code for program ZRRMXOLD is on the line VALUE = 'LEGACY'. Instead, program ZRRMXNEW contains the line VALUE = '04S'. Likewise, the steps to assign program ZRRMXNEW to transaction code ZRRMXNEW in SE93 are not illustrated here, but you can use Figures 4-6 as a reference.
Program ZRRMX_CHOOSE
Once I had a workable solution, my two programs and transaction codes, I thought I would develop an alternative technique with a slightly different ABAP program. This presents users with a selection screen in which they can indicate the version of BEx Analyzer to launch, and then launches it (Figure 7). I named this program ZRRMX_CHOOSE, and I assigned this to transaction code ZRRMX using transaction SE93 (as illustrated in Figures 4-6). Some users might prefer this solution because it only involves one ABAP program and one transaction code.

Figure 7
Selection screen for program ZRRMX_CHOOSE, transaction ZRRMX
Use Method RegWrite
One way to set registry entries on the PC is with a VBScript program that calls method RegWrite of the WScript.Shell Windows object (a standard Windows object contained in file wscript.exe, usually found in c:windowssystem32). Figure 1 shows a simple VBScript program to update the registry. (If you search the Internet for “wscript.shell regwrite,” you’ll find other examples.) You can execute this VBScript program directly on the PC or from an ABAP program within BW using Method EXECUTE of Class CL_GUI_FRONTEND_SERVICES (as described in the article).

Figure 1
VBScript program to update LAUNCH_VERSION registry
Bryan Koetting
Bryan Koetting is a SAP-certified BI consultant and knowledge leader for Teklink International. He has more than eight years of experience working with SAP products, and has been working with SAP BW since 2000. His expertise is in data warehousing with SAP BI, including SAP NetWeaver 2004s. He has consulting experience with the SAP R/3 Finance and Controlling modules as well. Bryan is a former platinum consultant with SAP America, and is a CPA. He also holds an MBA and a master’s degree in management information systems.
You may contact the author at bryan.koetting@tli-usa.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.