How to migrate Queries – problem solved!

SAP provides a nice program to migrate queries: you can download the query elements (Usergroup, Infoset and the Query) in a text file, and upload in another SAP system.

However, not all SAP systems are 100% compatible with others SAP versions. Tables can be different, table fields also and specially ABAP versions. The migration program compares this objects and gives you warning or error messages.

Regardless all the benefits SAP provides us in this migration program, I found a bug when I was trying to migrate queries from SAP 4.6C to 6.0. And the solution! Which I present to you now:

 

===> all migration work will be done in transaction SQ02 + Transports (Ctrl-F3 or 2015-04-07 10_48_08-InfoSet_ Initial Screen):

2015-04-07 10_49_10-InfoSet_ Initial Screen

2015-04-07 10_50_05-RSAQR3TR

(Download and Upload options)

 

1) Migrate the USERGROUPS:

  • this must be the first step.
  • download the Usergroups from the old system to a text file
  • upload this file into the new system.

2015-04-07 11_14_45-RSAQR3TR

 

2015-04-07 12_50_58-Export Log

(in the destination system, you don´t need to write the Usergroup names):

2015-04-07 12_59_11-SAP Query_ Transport tool

2015-04-07 12_54_31-Import log

 

2) Migrate the INFOSETS:

Download the Infoset normally:

2015-04-07 13_18_41-RSAQR3TR

(save as .txt):

2015-04-07 13_19_48-

2015-04-07 13_21_08-Export Log

Now, the solution. SAP uses a markup language, but there is something missing in the Version 4.6C when you compare to newer versions:

2015-04-07 13_38_57-Infoset.txt - Editor

2015-04-07 13_41_41-Infoset

In order to change in mass, open the file in MS-Word:

2015-04-07 13_44_04-temp

Press <Ctrl-H> to “Find and Replace”, fill in with the following text and replace all the occurrences:

Search: *SGTEXT

Replace with: *SGTEXT^pTDBDP^p*DBDP

2015-04-07 13_47_13-Infoset.txt - Microsoft Word

 

repeat this step with:

Search: CL_TEXT_IDENTIFIER

Replace with: CL_TEXT_IDENTIFIER^pVTABLE_ACCESS_AUTHORITY        CL_QUERY_TAB_ACCESS_AUTHORITY

 

Save the file without changing the file format (save as text). This file is ready to be uploaded in the new system:

2015-04-07 14_01_45-SAP Query_ Transport tool

 

2015-04-07 14_24_28-Import log

 

3) Migrate the QUERIES:

The same method used to migrate Infosets can be used to migrate the Queries. The difference is in the markup language.

Download the queries:

2015-04-07 14_48_03-RSAQR3TR

 

Please remember to put the Query names and also the Usergroup (it´s possible to have queries with the same name in different Usergroups).

2015-04-07 15_11_48-Export Log

 

and the solution: that´s the missing part!

2015-04-07 15_13_34-Query.txt - Editor

So, again open the text file with MS Word:

2015-04-07 15_36_23-temp

Press <Ctrl-H> to “Find and Replace”, fill in with the following text and replace all the occurrences:

Search: *DBLC

Replace with: *DBLC^pTDBLD^p*DBLD

2015-04-07 15_47_07-Add New Post ‹ super SAP user — WordPress

Save the file. It´s ready to upload it into the new system:

2015-04-07 12_59_11-SAP Query_ Transport tool

2015-04-07 16_11_07-Import log

And there it is:

2015-04-07 16_14_10-Query from User Group MY_USERGROUP_ Initial Screen


 

PS. You may find interesting to adjust que Infoset after the migration:

2015-04-07 16_15_24-Program Manager

2015-04-07 16_15_51-

and the queries:

2015-04-07 16_16_25-Query from User Group MY_USERGROUP_ Initial Screen

 

Important!

  • This method solves a bug, but it will not ensure that all the Infosets/Queries are migrated. There may happen big differences in tables/tables fields that forbid the migration. Pay attention on warning/error messages.
  • You can migrate Queries and Infosets at the same time.

 

 

This entry was posted in Query and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s