Find out how to create a custom program and use it to transport multiple SAP NetWeaver BW query variants from one system to another. This process can also apply to transporting variants used with Analysis Process Designer.
Key Concept
If you use SAP NetWeaver BW for reporting, you save your most frequent filters/selections as query variants, in which you save the variable values. In addition, you also use variants when you create an analysis process with Analysis Process Designer in SAP NetWeaver BW. Say you use variants to execute a query in BEx Analyzer or SAP NetWeaver Portal. Or perhaps you create a variant in transaction RSRT for Analysis Process Designer (APD). Although the queries themselves are transportable, the variants used in them are not. No standard SAP process is available to transport the variants, so you have to create them manually in each destination system. This can be a source of system bottleneck, especially when you have a multiple analysis processes.
I will outline a method that helps you to transport your variants from one SAP NetWeaver BW system to another. This method involves finding the standard SAP tables updated while creating variants, downloading these tables from the source system to a local desktop file with the correct format, and uploading them to the target system. You can use this method with SAP BW 3.x and SAP NetWeaver BW 7.x. Users need standard authorization to execute programs as well as to upload and download files from the desktop.
Create the Custom Application
The first step is to create the application ZBW_QUERY_VARIANT_TRANSPORT in your SAP NetWeaver BW system. I provide the code for this program via this link. This a global program that you can use across all your SAP NetWeaver BW systems. If you have SAPLINK already installed in your SAP NetWeaver BW system, you can upload the Nugget file NUGG_ZBW_QUERY_VARIANT_TRANSPORT.nugg via this link to create the proposed application. After you have created the program, follow the process from step 4 to transport the program to all the destination systems and use it.
If you do not have SAPLINK, use transaction SE38 (ABAP editor) and follow steps 1 to 3 to create the executable program ZBW_QUERY_VARIANT_TRANSPORT in your SAP NetWeaver BW system. Then continue to step 4.
Step 1. Create the ABAP program in transaction SE38 with the attributes shown in Figure 1. Select Executable program for the Type. Then choose the status (in this example, I chose Test Program). Choose your Application (e.g., Basis). You want to use this program in all the SAP NetWeaver BW systems in your BI landscape, so use your transportable package (not $TMP as shown here).

Figure 1
Create the program ZBW_QUERY_VARIANT_TRANSPORT
Step 2. Upload the sample file. Download the text file ZBW_QUERY_VARIANT_ TRANSPORT. Then, in transaction SE38, follow menu path Utilities > More Utilities > Upload/Download > Upload. Upload the text file from your local desktop into the program ZBW_QUERY_VARIANT_TRANSPORT.
Step 3. Create the selection texts and text symbols for the program ZBW_QUERY_VARIANT_TRANSPORT. Follow menu path Goto > Text Elements > Selection texts (Figure 2). Enter the selection texts for the query variants.

Figure 2
Create selection texts
After you finish entering the selection texts, go to the Text symbols tab on the same screen (Figure 3). The application uses these text symbols for selection screen validation. After you finish this step, go back to the program and activate it by clicking the activation icon. Now your program is ready to use.

Figure 3
Create text symbols
Step 4. Transport the program. Now you are ready to use the created custom program to download and upload multiple variants of an SAP NetWeaver BW query from one system to another. Use transaction SE38 or SE80 (object navigator) — it doesn’t matter which one you choose. I am using transaction SE38 in my example (Figure 4). In the Select the Type of Variants section, choose one of the following:
- For variants defined in BEx or SAP NetWeaver Portal, select Global Variants in BEX or WEB
- For variants defined in RSRT, select Variants Created in RSRT

Figure 4
Program selection screen
Then select one of the following:
- Choose the Download Variants option to download variants to a local file from the source system. This exports the variants.
- Choose the Upload Variants option to upload variants from a local file to the destination system. This imports the variants.
For the query and its variants, you must set the same parameters for upload and download. Enter a valid SAP NetWeaver query technical name as defined in BEx Query Designer, such as ZG_GMEM1AL06_Q0001. Then enter a valid variant technical name for the SAP NetWeaver BW query. The tables that the system writes the variants to are RSRVARIANTDIR, RSRVARIANTTXT, RSRVARIANT, RSRPARAMETRIZA, and RSRPARAMETRIZAT. The application does not create a trace while updating these tables.
You can also use this program to transport variants of multiple queries. The variants that you have created in the source system are replicated with the same technical name in the destination system. Since the variants are language dependent, enter the code for the required language and then enter the upload/download file on your local workstation.
If a different variant with the same name already exists in the system to which the file is imported, the system overwrites the existing variants for the same query in the destination system. If a variant exists with the same name for a different query, the system does not overwrite it. The query to which the variant belongs must already be in the target system.
Step 5. Perform a final result check. If you are downloading existing variants from the source SAP NetWeaver BW system, then after maintaining the selection parameters for the program and executing it, you can see the file created in your desktop in the selected directory with all the variant details. Don’t change the file format. Otherwise, the system updates the tables with wrong data and the program does not give the desired results.
If you are uploading the variants from the file on your desktop to your destination SAP NetWeaver BW system, then after maintaining the selection parameters for the program and executing it, you can see the variants created in your destination SAP NetWeaver system. When everything looks good, you can execute your query in the destination system with the same variants as the source system.

Pranab Parhi
Pranab Parhi is a senior SAP NetWeaver BW and planning consultant who has been involved with multiple full-life cycle SAP NetWeaver BW reporting and planning implementations. He has 10 years of SAP consulting experience in various industries, including pharmaceutical, oil, public sector, aviation, consumer packaged goods, services, and retail in multinational environments. He is currently working as a senior associate for Bluefin Solutions. Pranab is an SAP-certified SAP NetWeaver BW 7.0 and SAP NetWeaver BW 3.5 consultant with six years of BI experience. In addition, he is an SAP-certified ABAP consultant with more than four years of ABAP experience. He also holds a bachelor’s degree in engineering (computer science).
If you have comments about this article or BI Expert, or would like to submit an article idea, please contact the BI Expert editor.
You may contact the author at pranab.parhi@yahoo.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.