I had came across a situation where i need to restore the back up version of the migrated BEx query. In my blog I’m trying to provide steps for Migration of a BEx query and restoring the back up version procedure as well.
- – If a BEx Query in BW 7.x is using only the features which are also available in BW3.x, then it is in general possible that the Query definition can be opened with Query designer of BW3.x as well.
- – The case is different if the query is designed with BW 7.x features, BW7.x offer additional features which are not available in BW3.x version of query designer.
- – If a query definition of 3.x version is opened and saved using BW 7.x version query designer, it means the 7.x version query is not editable or compatible with the version BW 3.x.
- – If an attempt made to open a BEx query of version BW7.x in BW3.x query designer we will get the below error message.
This component was edited with a more recent version of the Editor. You also have to use the more recent version to edit further. Further processing not possible. Update your front end’.
In order to overcome the potential problems in case of undesired or occasional migration of queries or reusable query components from version 3.x to version 7.x, SAP has come up with an automatic procedure to revert back the migrated change.
First we will check the migration steps to migrate the BEx query which is build on 3.x.
- Before migration of a BEx query check the table RSZCOMPDIR ( ) to verify the” version of reporting component”.
Pass the Query Technical name as input field in COMPID – Execute.
Check the output attached below.
Here you can see 3 version of a BEX query A- active, M-modified and B – back up versions.
If the version of the reporting component is less than 100, it means the query is not migrated. If version of the reporting component is greater than 100, then the query is migrated.
- If you see the screen shot the query is not migrated as the versions of reporting component is 13.
If a BEx query is opened in a new tool NW04s BEx query designer and saved the query will be automatically gets migrated to BW 7.x version query.
— Open the 3.x query in 7.x query designer. We will get the below message:
— Save the query. Query is migrated to new version.
You can check if the query is migrated from 3.x to 7.x in the RSZCOMPDIR table. The “version of reporting component” will be changed to greater than 100.
Check the screen shot attached below
If you see the above screen shot A-active and M-Modified versions are changed from 13 to 110.B-Backup version will be there as it is.
Note: Queries or query components that are freshly created using the NW04s BEx tool (ie., BW7.x query designer) will not have Backup version. Such queries can’t be reverted back to 3.x version.
Procedure to revert back the migrated query:
Inorder to revert back the migrated change back to 3.x we need back up version of the query or query component.
SAP has provided a standard program COMPONENT_RESTORE to migrate the changes back to original 3.x version.
The report COMPONENT_RESTORE overwrites the existing active version using backup version as a source and allows editing the query with BW 3.x Query Designer.
Steps to be performed:
- TX Se38 – Enter the program “COMPONENT_RESTORE”.
- Enter the Info provider and Component type
Here in our case we are trying to restore the backup version of the report, so I’m considering the component type as REP.
Other component Types:
4) This will display all the underlying queries which are build on that particular info provider. Select the Query which you want to restore and click on “transfer Selection”
5) Click “Yes”
Now the query or query components are restored back to 3.x version.
Check the table RSZCOMPDIR entry for active and Modified versions will be restored back to 13.
That’s it the backup version of BEx query is restored.
Refer the below Note for Stop automatic backup procedure and Delete the back up procedure…
1097674 – NW2004s: Administration of backup object version
How to stop automatic backup?
If creation of a backup version is not required anymore, for example, only BI Query Designer 2004s is used by the end users, it can be switched
off using the following procedure:
l Implement attached coding correction;
l Using report SAP_RSADMIN_MAINTAIN define a new parameted ‘QDEF_NO_3X_BACKUP’ and set the value to ‘X’ (true).
As the result of this procedure, a corresponding backup version will be not created anymore during query load and existing version will be not
updated during query save.
How to delete backup version?
Deletion of query components in backup version can be performed using transaction RSZDELETE after implementation of the attached coding
correction for the function RSZ_DB_ELT_DELETE. Code correction ensures that no references to a query will be deleted from Roles/Favorites
during deletion of backup version. For deletion using RSZDELETE the objects version ‘B’ (backup) must be used on the selection screen.
It is recommended to apply also the coding correction from the SAP Note 1099415 in order to optimize the performance of transaction RSZDELETE
during mass deletion of queries.
Feel free to add if I miss any point in my blog….
Thanks for Reading