117001232 query variant

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

Upload: venkat-chowdary-yamparala

Post on 13-Apr-2015

62 views

Category:

Documents


0 download

DESCRIPTION

Query Variaant

TRANSCRIPT

Page 1: 117001232 Query Variant

• 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

Page 2: 117001232 Query Variant

• 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.

• Each option is referred to as a mode. • 3.1 Migrate a single query variant • 3.2 Migrate all query variants for a single query• 3.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. 4.1 Query for Single Conversion

• 4.1.1 This value represents the query associated with the variant you wish to migrate.

• 4.2 SAP BW 3.X Variant • 4.2.1 If the direction specified is SAP NetWeaver 2004s Var. this input field�

needs to be populated • 4.3 SAP NetWeaver 2004s Variant • 4.3.1 If the direction specified is SAP BW 3.X Variant this input field needs to be

populated 4.4 Global Variant Flag • 4.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. By default the global flag is selected. 4.5 BICS Variant Flag

• 4.5.1 If the direction specified is SAP NetWeaver 2004s Var. You have the� choice of converting this variant to 2 different XML Schema structures, the ABAP Schema or the BICS schema. By default this flag is set to convert to the BICS schema (see Appendix).

• 5 The second mode Migrate All Variants for Query only has two user entry values to be populated: 5.1 Query for Mass Conversion

• 5.1.1 This is the query whose variants you will migrate in the direction chosen. • 5.2 Global Variant Flag• 5.2.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. By default the global flag is selected.

• 5.3 BICS Variant Flag • 5.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, the ABAP Schema or the BICS schema.

• By default this flag is set to convert to the BICS schema (see Appendix). • 6 The third mode (currently not enabled) only has a single user entry value to be

populated. • 6.1 Global Variant Flag 6.1.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. By

default the global flag is selected. • 6.2 BICS Variant Flag

Page 3: 117001232 Query Variant

• 6.2.1 If the direction specified is SAP NetWeaver 2004s Var. • You have the choice of converting this variant to 2 different XML Schema

structures, the ABAP Schema or the BICS schema. By default this flag is set to convert to the BICS schema (see Appendix).

• Migrating SAP BW 3.x Query Variants to the SAP NetWeaver 2004s Runtime 1. Navigate to transaction RSRT and choose a query that has variants you wish to migrate. Identify the variant(s) to migrate. 1.1.

• We identify and decide to migrate the FAX variant. • 2. Navigate to transaction se38 and run the program Z_MIGRATE_VARIANTS. • 2.1. Choose the correct direction SAP NetWeaver 2004s Var. • 2.2. Choose the Single Query Variant migration mode • 2.3. Choose the query and variant that you selected in the previous step. Drop-

down helps are available to help through this process.• 3. Execute the program! • 3.1. View the program results on the status bar to verify the program was run

successfully. NOTE: The naming convention for variants migrated to the SAP NetWeaver 2004s runtime is the following. •

• 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.x Query Variant with all special characters removed.

• For Variants migrated with the BICS Variant option de-selected the naming convention is identical to that

• 4. Open up the BEx Query Designer and launch the query selected in the migration.

• 5. Once you have launched the Web Analyzer, you can now see the variant list contains the newly migrated Variant!!!

• 6. If we delete this newly migrated variant and navigate back to the migration program in se38 we can test the second mode, migration of all variants for a single query. Remember from step 1 there are three query variants for our query FAX, INTERNET, & PHONE.

• 6.1. Use the dropdown list available in the second mode to choose the same query we chose in the first step.

• 7. Execute the query!! • 7.1. Verify from the message on the status bar that the variants were successfully

migrated. • 8. Let’s log back in to the BEx Analyzer and verify the the new SAP NetWeaver

2004s variants are available.• 8.1. We can see that the BEx Query has all of the just migrated query variants

available for use. Migrate SAP NetWeaver 2004s Query Variants to the SAP BW 3.x Runtime 1.

• The next step is to migrate query variants from the newer SAP NetWeaver 2004s runtime to the SAP BW 3.x runtime. 1.1.

• First step is to choose a query and a variant to migrate.

Page 4: 117001232 Query Variant

• 1.2. Login to the BEx Query Designer and identify a query and a query variant to migrate.

• 1.3. As in the last section we will choose the Fax variant to start off.• 2. Navigate back to the transaction se38 and run the migration program. • 2.1. Populate the direction SAP BW 3.x Variant• 2.2. Select the first mode migration of a single query variant • 2.3. Use the dropdown help to choose the query identified in the previous step. • 2.4. Use the dropdown help to choose the SAP NetWeaver 2004s Query Variant

to migrate • 3. Execute the migration program. • 3.1. Verify the migration was successful by the message on the status bar. NOTE:

The naming convention for query variants migrated to the SAP BW 3.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. 4. Navigate to transaction RSRT and verify that the query variant migrated successfully!

• 5. Delete this variant that we just created and navigate back to se38 and the migration program.

• 6. Populate the selection screen settings appropriately.• 6.1. Choose the direction SAP BW 3.x Variant�• 6.2. Choose the mode Convert All Variants 4 Query • 6.3. Choose the query you wish to leverage for the variant migration. Drop down

help is available. • 7. Execute the Program! • 7.1. Verify from the message on the status bar that the migration was successful.

8. Navigate to transaction RSRT and verify that the variants were migrated successfully. 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. 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. Appendix ( Coding, Schemas) CODING See the following pages and the attached transport file for the coding involved in this solution. 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. 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. 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. Below is an example of what a variant in this particular format might look like. This particular format works for both the BEx Analyzer as well as

Page 5: 117001232 Query Variant

within BEx Web. 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. Below is an example of the same variant displayed above except shown within the BICS format. 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.