Wednesday, September 28, 2011

Usage of SAP standard objects in custom development

Here’s typical situation on upgrade project: After you got upgraded e.g. development system you doing testing of applications running on SAP system. Of course you have some custom application e.g. at least reports or you extended standard functionalities through user exits, BAdIs or enhancements points. Within that kind of development you using SAP’s standard repository objects like function modules, classes, methods or DDIC objects. Suddenly you realize that that call of standard peace of software actually dumps since standard object was removed in new release of SAP software. Why’s that; you may wonder? Why someone at SAP had this strange idea of removing such an object? Hmm the thing is that SAP commits that some object will (maybe never) not be removed and some of them may be removed. How is that? How can I recognize what objects are belonging to witch category? 

In case of function modules you can observe this status in its Attribute tab: 


This field so called type of function module release can have 2 values of: 

External release: The function module is released within SAP and for customers. When making changes, you must be careful to ensure upward compatibility. A programmer who has used the function module must be able to rely on the fact that he will never in the future need to change the way he has called it. 

Internal release: The function module is released for internal usage. When making changes, you should be careful to ensure upward compatibility. If an incompatible change is unavoidable then all users of the function module must be informed promptly. 

What about other objects? I’m not aware that any other development objects having such a nice screen with its type of release. However there is a table having this information. It is a table RODIR. You can search for particular object type in its column called OBJECTTYPE (e.g. CLASS stands for classes, FUNC for function modules, etc.). By this way can get information about object release status. 

Therefore within the upgrade project be especially careful in case of you are using objects which are not released for external usage. Be aware that they may disappear within every upgrade. Basically those are the objects really dealing with the data on database level. You should find respective object which is encapsulating such a objects and which is released for usage.

For more information on this topic see SDN’s wiki page and SAP Note: 109533 - Use of SAP function modules. 

No comments: