You are on page 1of 5

• •

• • • • • • • • • •

Currently within SAP NetWeaver 2004s SPS08 and SPS09 there is no existing functionality that enables you to migrate query variants to and from the SAP NetWeaver 2004s runtime and the SAP BW 3.x runtime in SAP NetWeaver 2004s. In order to fully understand how BEx query variants work you need to understand the different places that variants can live within SAP NetWeaver 2004s. Upon execution of a complete upgrade to SAP NetWeaver 2004s BI from SAP NetWeaver 2004 (SAP BW 3.5) your query variants are still technically stored as ABAP variants and therefore reside within the VARI table. A program was delivered by SAP NetWeaver 2004s that enables you to migrate these variants into a separate data store, RSR_VARIANT_XPRA. This separate data store is technically the RSRVARIANT table. This newer SAP BW 3.x query variant data store exists only within the SAP NetWeaver 2004s BI environment and is where query variants for the SAP BW 3.x runtime are stored. Within the new SAP BEx toolset delivered with SAP NetWeaver 2004s the capability to create query variants within the BEx Analyzer exists and with SPS09 this is a possibility within the web as well. The query variants that are created within this new runtime are stored technically in the RSRPARAMETRIZA table as personalization settings. So to recap there are three different data stores available in SAP NetWeaver 2004s BI: 1/ SAP BW 3.x Runtime VARI 2/ SAP BW 3.x Runtime within the SAP NetWeaver 2004s System RSRVARIANT 3/ SAP NetWeaver 2004s BI Runtime RSRPARAMETRIZA In order to migrate variants from data store 1/ to data store 2/ you can utilize the ABAP program RSR_VARIANT_XPRA. In order to migrate query variants from data store 2/ to data store 3/ or vice versa you will utilize the migration program that I will outline in the rest of this how-to document. The Step By Step Solution You need to initially import the transport delivered with this how-to paper in order for the system to be updated with the migration program. Make sure you review the appendix so that you do not write over existing programs within your sandbox system. This program exists within the customer Z namespace and therefore it is possible that there exists objects with the same name within your system. Once done navigate to transaction se38 or sa38 and run the program Z_MIGRATE_VARIANTS. Overview of User Entry Screen 1 The first screen that you will see is what can be seen on the right here. From this screen you can see the multiple options that need to be populated in order to function appropriately. 2 On the selection screen you have two main options that you need to populate. The first option is to choose a direction that you wish to migrate to. 2.1 You can migrate either from SAP BW 3.x Query Variants to SAP NetWeaver 2004s BI Query Variants 2.2 Or, you can migrate from SAP NetWeaver 2004s BI Query Variants to SAP BW 3.x Query Variants 3

5 The second mode Migrate All Variants for Query only has two user entry values to be populated: 5. 6 The third mode (currently not enabled) only has a single user entry value to be populated.2 SAP BW 3.3 BICS Variant Flag 5.1. By default this flag is set to convert to the BICS schema (see Appendix). By default the global flag is selected.5 BICS Variant Flag 4.1 If the direction specified is SAP NetWeaver 2004s Var.2 BICS Variant Flag .3.1 Query for Single Conversion 4. By default this flag is set to convert to the BICS schema (see Appendix).5. 5.1 Migrate a single query variant 3.1 If the direction specified is SAP NetWeaver 2004s Var.3 SAP NetWeaver 2004s Variant 4.3.1 Global Variant Flag 6. 6. 4.1 Query for Mass Conversion 5.• • • • • • • • • • • • • • • • • • • • • • • • The next option you need to choose to perform a migration is what type of migration / conversion you are going to execute there are three possible options for each migration irrelevant of the direction that you are migrating to.1.4.2 Global Variant Flag 5. 5. this input field needs to be populated 4.1 This is the query whose variants you will migrate in the direction chosen.2. By default the global flag is selected.2.1 If the direction specified is SAP NetWeaver 2004s Var. Each option is referred to as a mode. 6.1 This value represents the query associated with the variant you wish to migrate. you can create either a global variant or one that is specific to your user. the ABAP Schema or the BICS schema.X Variant this input field needs to be populated 4.3 Migrate all query variants (at this time do not use this mode) 4 Each of the individual modes has certain entry values that need to be populated in order for the migration to work the first mode has four fields for user input. You have the choice of converting this variant to 2 different XML Schema structures.X Variant 4.1 If the direction specified is SAP NetWeaver 2004s Var. you can create either a global variant or one that is specific to your user.4 Global Variant Flag 4. By default the global flag is selected.2 Migrate all query variants for a single query 3. 4.1 If the direction specified is SAP BW 3.1 If the direction specified is SAP NetWeaver 2004s Var. You have the choice of converting this variant to 2 different XML Schema structures. 3. 4. you can create either a global variant or one that is specific to your user. the ABAP Schema or the BICS schema.1 If the direction specified is SAP NetWeaver 2004s Var.1.

We can see that the BEx Query has all of the just migrated query variants available for use.1.1. 1. Open up the BEx Query Designer and launch the query selected in the migration.• • • • • • • • • • • • • • • • • • • • • • 6. You have the choice of converting this variant to 2 different XML Schema structures. Choose the Single Query Variant migration mode 2.x Query Variants to the SAP NetWeaver 2004s Runtime 1. . NOTE: The naming convention for variants migrated to the SAP NetWeaver 2004s runtime is the following. you can now see the variant list contains the newly migrated Variant!!! 6. Choose the correct direction SAP NetWeaver 2004s Var. Remember from step 1 there are three query variants for our query FAX.2. 7. 8. • For Variants migrated with the option BICS Variant selected (default) the convention is: G70BNAMEOFVARIANT G representing Generated 70 the internal representation for SAP NetWeaver 2004s B representing that the schema is BICS NAMEOFVARIANT being the name of the SAP BW 3. Verify from the message on the status bar that the variants were successfully migrated. We identify and decide to migrate the FAX variant. First step is to choose a query and a variant to migrate. 2. Navigate to transaction RSRT and choose a query that has variants you wish to migrate.1. 5. 6.x Query Variant with all special characters removed.2. Identify the variant(s) to migrate.1. Execute the query!! 7. By default this flag is set to convert to the BICS schema (see Appendix). migration of all variants for a single query. 8. View the program results on the status bar to verify the program was run successfully.1. Migrating SAP BW 3.1. INTERNET. If we delete this newly migrated variant and navigate back to the migration program in se38 we can test the second mode. Execute the program! 3. Migrate SAP NetWeaver 2004s Query Variants to the SAP BW 3. Dropdown helps are available to help through this process. For Variants migrated with the BICS Variant option de-selected the naming convention is identical to that 4.x runtime.3. Use the dropdown list available in the second mode to choose the same query we chose in the first step. & PHONE. The next step is to migrate query variants from the newer SAP NetWeaver 2004s runtime to the SAP BW 3. 1. the ABAP Schema or the BICS schema. Let’s log back in to the BEx Analyzer and verify the the new SAP NetWeaver 2004s variants are available. Choose the query and variant that you selected in the previous step. 2. Navigate to transaction se38 and run the program Z_MIGRATE_VARIANTS. Once you have launched the Web Analyzer. 2.1 If the direction specified is SAP NetWeaver 2004s Var.1. 3.x Runtime 1.

1.2. Select the first mode migration of a single query variant 2.1.3. Delete this variant that we just created and navigate back to se38 and the migration program.1. Choose the mode Convert All Variants 4 Query 6. Execute the migration program.x Variant 6. 3. • Z_VARIANTS Package • Z_MIGRATE_QV Message Class • ZCL_MIGRATE_QUERY_VARIANTS ABAP OO Class • Z_MIGRATE_VARIANTS Program • Z_CONVERT_TO_BICS_FORMAT XSLT Transformation • Z_CONVERT_FROM_BICS_FORMAT XSLT Transformation XML SCHEMAS ABAP SCHEMA Within SAP NetWeaver 2004s as of SPS9 there are two different XML Schema structures that variants can be represented in. 4. Choose the query you wish to leverage for the variant migration. Navigate back to the transaction se38 and run the migration program.3. 7. Verify from the message on the status bar that the migration was successful. Appendix ( Coding. Below is an example of what a variant in this particular format might look like. Use the dropdown help to choose the query identified in the previous step.1. 6.4. If you are planning to import the associated transport into your system please be certain that the below object DO NOT currently exist within your system. 2. This particular format works for both the BEx Analyzer as well as . Choose the direction SAP BW 3. The first of which is the ABAP XML Schema that has been used since the new SAP NetWeaver 2004s variants were introduced with the BEx Analyzer. Verify the migration was successful by the message on the status bar.x runtime is the following: G3XNAMEOFVARIANT G representing Generated 3X representing the runtime the query variant was migrated to NAMEOFVARIANT representing the name of the SAP NetWeaver 2004s query variant.• • • • • • • • • • • • • • • • 1. Execute the Program! 7. 6.2. 2. Navigate to transaction RSRT and verify that the query variant migrated successfully! 5. 8. Login to the BEx Query Designer and identify a query and a query variant to migrate. 2.x Variant 2. Populate the direction SAP BW 3.2. If you receive this internal how-to and are planning to utilize this within your system you are accepting responsibility for this code and the actions that the code executes within your system. Use the dropdown help to choose the SAP NetWeaver 2004s Query Variant to migrate 3. Verify that the variants exist!! Guidance & Disclaimer Please remember when using this tool that this is not a supported SAP solution the official solution will be released no earlier than SPS11. As in the last section we will choose the Fax variant to start off. Drop down help is available.3.1. Schemas) CODING See the following pages and the attached transport file for the coding involved in this solution. Navigate to transaction RSRT and verify that the variants were migrated successfully. Populate the selection screen settings appropriately. NOTE: The naming convention for query variants migrated to the SAP BW 3.

. BICS SCHEMA The BICS. BI Consumer Services schema for variants was introduced with SPS9 and when a variant is created within the web this particular schema is used. When a variant is saved within this particular format it only works within the context of the web and cannot be used within the BEx Analyzer. Below is an example of the same variant displayed above except shown within the BICS format.within BEx Web.