In the past few years, I was involved in several projects which required moving an existing ABAP application to a new namespace. There might be several reasons for that, but in most of the cases an application that has been formerly written in Z*-Namespace needed to be moved to an SAP partner or customer namespace which starts with “/”.
As of 7.02, SAP provides no automatic solution to do a namespace refactoring, however, with the right tools and some experience you will be able to convert at least the most important development objects in a semi-automatic way.
This blog post deals with the conversion of
For a namespace refactoring you need the following tools:
Before you start, figure out, which packages are involved in the application you would like to convert.
Get a complete list of all development objects that need to be converted either by selecting the objects from TADIR table (provide attribute DEVCLASS as the package name) or by choosing the option “Add Objects from a Package” in SAPLINK.
Having a complete object list will be the first step towards a renaming matrix. Copy all objects to an excel sheet. Do not forget to also manually include function modules since they do not appear in TADIR or SAPLINK’s package overview.
Namespace refactorings are not successful of you try to replace only the prefix of all your development objects in the object list.
If you have a complete objects list which is the outcome of the previous step, start to manually rename the objects in an Excel sheet in a separate column.
Pay attention on:
Do Not:
The result should look like this.
Extract your renaming matrix to a CSV file as this would be the requirement for a batch replacement.
SAPLINK helps you to extract all development objects you want to convert. Just use the option “Add Objects from a Package” and extract each package to its own nugget file – this helps you in having a good overview of what has already been extracted and what has not yet been extracted.
Do Not:
Copy all the nugget files to another workspace folder.
Start Advanced Find and Replace or a similar batch replacing tool. Include *.nugg files to your file mask, upload the CSV-Renaming matrix and set the workspace folder which contains the copies of your nugget files.
Execute the replacing loop.
Take a look at the new nugget files using Notepad++ and search for prefixes in the old namespace. If you found some, restore the nugget files in the workspace folder from the extracted version, update your renaming matrix and restart the replacing loop. Execute this step as often as needed, until you find no more prefixes in the old namespace.
SAPLINK helps you to import your new nugget files to your system. Pay attention on error messages that may arise because of length violations or naming conventions. Usually, SAPLINK restores your objects to the $TMP package or asks for a target package.
Rebuild the objects list of the local object’s package and the target packages, to see all the created development objects.
Assign the objects, that are assigned to the $TMP package, to the target package.
Finally, activate them. Start with DDIC-Objects, then function modules or classes and end with UI components such as webdynpro components or reports that contain dynpros.
Postprocessing will always be needed. If you followed this approach, you will probably need to
To give you a feeling of how fast or slow such a namespace refactoring could be done, I figure out what the experience of past refactorings was:
As you can see, the effort does not really proportionally increase with the amount of the development objects. This is because the initial effort, which is needed to get an overview of all the development objects depends more the number of packages, than on the number of development objects.
Building the renaming matrix may correlate with the number of development objects but this is usually not the main issue. Usually the most of the time is needed in the batch replacing procedure which is repeated iteratively until no old namespace object is found in the converted nugget files. The SAPLINK import procedure usually also takes some time as the development objects might have names that are too long for a specific object type. In this case you would also have to update your renaming matrix, and redo the batch replacing procedure.
However, if you finalize the process, chances are high that you fetched all the objects and converted them consistently without gaps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 |