I tried to determine the method to know what standard SAP functions, classes, and other objects may be used by customers, and it is not so easy. This topic is important because we, developers, may call forbidden objects that do not ensure integrity, like calling a low-level database update function, which doesn't check the validity of parameters we pass to it.
There are multiple tools offered by sap to find the enabled objects, because with every release there is a new tool, and previous tools are preserved for ascendant compatibility.
I found the following sources of information :
- reuse library (SE83 transaction) : this should be the official repository of all functions and classes that can be used. It contains also demo programs.
- sap official documentation : sap library, abap online documentation.
- some function modules are said "released" (address_into_printform), "marked for release" (bp_event_raise) or "internally released" (address_show_printform), since a given date in SE37. I could find the following text in sap library for "internally released" (but nothing for "marked for release") : "SAP internal: If the BAPI is only to be used internally, and therefore not for release to customers, the status of the function module must be set to Released internally".
- I found that table RODIR contains a list of "released" classes and more (this table is normally used for function modules only).
- some function modules are flagged obsolete in SE37
- sap Notes : some notes explain how the developer may call a given function to achieve a given goal. For example, report SNIF in note 729358.
- "Batch input" programming : we may call any transaction, by using CALL TRANSACTION ... USING ... (also function modules BDC_OPEN_JOB, etc.)
- BOR - Business Object Repository (SWO1 transaction) : Sap library says "The Business Object Repository (BOR) is the central access point for the SAP business object types and their BAPIs"
- BAPI explorer (BAPI transaction)
- ABAP controls examples (DWDM transaction) : the objects called in these demo programs can be used by the customer.
I thought that the "reuse library" was the current tool, but I wanted to make sure by creating a little program (on minisap 7.0 SP 12) to check that the reuse library is coherent with the other informations.
I found the following :
- reuse library contains objects that are not assigned to products (so they can't be found!! I discovered these objects in table RLB_DB_TRR) for example CL_GUI_FRONTEND_SERVICES, BAL_LOG_CREATE, ...
- reuse library contains 2 function modules defined in products, that are flagged obsolete (POPUP_TO_CONFIRM_WITH_MESSAGE and POPUP_TO_DECIDE)
- reuse library contains function modules that are in equal proportions flagged either "released" or "internally released" in SE37, and very few are "marked for release" (bp_event..., job_open, job_close), and some others are obsolete.
- reuse library does not contain BAPIs except in rare cases. So we should rely on BAPI explorer (but see below about bapi explorer)
- in BAPI explorer, only BAPIs interfaced with the BOR are listed. So, should we consider that all function modules prefixed with /namespace/BAPI_ can be used ? (since BAPI function module names are standardized this way)
- sap library mention that we can use function module BALW_RANGES_CHECK, BAPI_CURRENCY_CONV_TO_EXTERNAL, etc., which are not defined in the reuse library, but are defined in SE37 as "internally released". What can we conclude : sap library wins over "internally released" function modules, and on all other things delivered with sap system.
- sap library : same for other object types, like class CL_ABAP_LIST_UTILITIES which is not listed in reuse library
- sap library contains class CL_ABAP_CHAR_UTILITIES, which is defined "released" in table RODIR, but it is not in the reuse library
- sap library contains class cl_batch_event which is neither in table RODIR, nor in reuse library. Sap library does not mention anymore function module bp_event_raise (which was to be used in previous releases), but it is not even classified as obsolete.
- Some function modules flagged "released" in SE37 are not in the reuse library, like BAPI_USER_CREATE1, GUI_DOWNLOAD, etc.
- SAP is not very coherent, I hope that in the next releases, they will create a unique list of objects customers can use, and that they will spend time on it so that it'll be of the best quality!
- When not sure if an object is standard or not, and if you use it very often or if you are sure it is not best practice to call it, it would be more secure to add a layer between custom programs and standard objects (functions, classes), in case they are changed by SAP (so that you just have to adapt at one place)
- Because of the uncompleteness of the "reuse library", we can assume that sap will not dare changing doubtful objects and keep ascending compatiblity for them in future releases.
Below is the program I used to analyze reuse library, released function modules, etc.: