Community Call: Obsolete Function Modules replacement MATRIX for ECC 6.0
During SAP upgrade projects, adjusting customer’s developments is often a huge activity, because a lot of programs and applications that worked correctly in the previous release, might contain syntax errors after the upgrade. The most common reasons for these errors are:
- Application changes
- Changes to ABAP statements
- Changes to syntax checks that in some cases become stronger
The only way to solve this situation is to adjust customer’s developments, to the new release of ABAP Workbench.
In order to support these activities, SAP provides 3 powerful standard tools which allow multiple types of checks including large sets of ABAP programs scans:
- 1. the SCI – Code Inspector
- 2. the UCCECK, a specific tool for Unicode conversion
- 3. the SAMT – ABAP Program Set Processing
In this blog I will not focus on how to solve syntax errors which is already widely discusses within the community, I will instead concentrate on another common pain point during upgrade as well as, with a lower impact, the enhancement packages: obsolete function module replacement.
This is what the SAP Mentor Rich Heilman answered in a published in the ABAP general SCN Forum few months ago:
<< Basically, it means that the function will not be used in further developments at SAP, and should be avoided in customer programs as well. Why? Because we reserve the right to remove it at some point in time. 🙂 Usually, when something is labeled as obsolete, there is a better FM or class/method which does something similar…>>
Replace or not replace?
Replacing an obsolete function module is not a simple task and it’s time consuming.
So taking this in mind, if the customer didn’t ask for the replacement, we might ignore warning messages if the following conditions are met:
the function module still exists and it’s unchanged in the new release
- no syntax errors found in the calling program
- no application changes occurs ( i.e application tables migration)
Thus the approach to be followed in this case could be: no replacement and wait for the testing results!
Free tickets for the Replacement Tour …
But what if your commitment is to replace obsolete objects?
The first thing to do is to identify which function modules are obsolete: table RODIR provides exactly this information in the general attributes (obsolete flag) of each function module.
Then it is necessary to identify alternatives for the obsolete ones, and here starts the long, hard and dirty job of the upgrade man.
In general it is not an easy task, there are several ways to do this and I summarized the most common and successful in the following checklist.
Step 1. Function Module source code
It is quite common that the obsolete function module is doing nothing else then calling the new one, so, the first thing to do is to check if, in the new release, the source code of the obsolete function module has been changed, and if so have a look at the code, a surprise might be there, waiting for you.
Step 2. Function Module Documentation
Check the documentation of the obsolete function module, sometimes SAP suggests alternatives functions there.
Step 3. BAPI Methods
If the obsolete function module is a BAPI method you can search for an alternative among the API methods of the related business object. The standard report BAPIMONI is very helpful for this kind of checks.
Step 4. SAP Notes
I found in the OSS a powerful friend for this kind of task, a quick search could be very helpful, it is important to specify:
Function module name
- Function Group Name
- Main program
- Additional keywords such as Upgrade/Obsolete/Function Module/s
Step 5. Release Notes
Release notes are grouped by application component which can be derived from the development class of the obsolete function module, there it is often possible to find details about obsolete objects replacement.
Step 6. SAP Help
Perform a quick search using the SAP Documentation Trex Search: specify a substring of the name of the obsolete function into the search field, then narrow the results using the info-class = FUNCTION
Step 7. Where Used List of Interface’s DDIC Structures
In the new release, perform a “where used list” of the DDIC structures used in the interface parameters of the obsolete function module. The replacement method often uses the same interface structures.
Step 8. Where Used List of the Function Module
Compare the where used lists of the function module between the old and the new release in order to find what SAP has used to replace the obsolete one.
Step 9. Repository Info System
Search for an alternative function module AND / OR Class Method is not so easy. I use the repository info system, by entering in the selection parameters various patterns such as similar words or substrings of the obsolete function module name
Step 10. New Custom Method implementation
Create your own custom method with the same logic taken from the obsolete function module; this should be done only if the obsolete function module does not use obsolete logics (access to old tables, function modules)
Step 11. Ignore it or open an OSS message
If an alternative method cannot be found and the obsolete function module continues to work strongly and SAP continues to use it, you can sleep peacefully and ignore the warning message of the syntax check
What’s the effort to replace the obsolete function module?
This is a question that cannot be answered easily for two reasons:
- The developer has to check in several places before he can discover the correct replacement method
- Each program is different from the others, for this reason the time needed to analyze and adjust it might be really different.
Prevention is better than cure!
During normal development activities keep in mind two useful tips in order to avoid last minute adjustments:
- If you are creating or editing an ABAP program, always use the extended syntax check or the code inspector
- In the ABAP editor use the “Pattern” function for insert the CALL FUNCTION statement
If you are requesting an obsolete function module thesystem immediately warns you that the function module is obsolete.
Community Call: Obsolete Function Module replacement MATRIX for ECC 6.0
SAP Marketplace provides tons of useful information under the Upgrade quick link such as the Release Notes, the Product Availability Matrix and the SAP Solution Browser but unfortunately, as developers, what we really need is missing.
I’m still dreaming about the idea of an official SAP document which collects the list of obsolete function modules in a single point making life of developers easier. But dreams do not come true by themselves so starting from the SDN wiki pages List of Obsolete Function Modules in ECC 6.0 and Replacement of Obsolete Function Modules for ECC 6, I collected all the information related to obsolete function modules and their possible alternative methods in the table of the following WIKI page:
For sure the table is incomplete and might contain some errors, but I think that with the support of the whole SDN community it could be possible to create a reference document that could really simplify the life of developers. Let’s work together to complete it!
I would like to thank my colleague @Techedge Sergio Cipolla for his support.