If you want to do something with SAP standard data, then the first place to look for a function module should be the transaction BAPI
. It's a library of function modules sorted by application which are intended by SAP for use in customer applications. All these function modules are RFC-capable, well-documented and supported by SAP. And they also perform all the necessary permission checks and input validations to prevent users from doing things they are not supposed to do.
If you can not access the transaction code BAPI
, then you can also use the SE37 to look for BAPI function modules. Their names all begin with "BAPI_" so you can use the search-help to look for function modules matching the pattern BAPI_*
However, not every user action is covered by a corresponding BAPI function module. In that case my usual approach is to run the process in the debugger (enter the function code /h
into the command line before performing that action) and set a dynamic break-point on the ABAP instruction CALL FUNCTION
. That way the debugger will stop whenever a function module is called. Chances are that you find one that does what you want and has the input parameter you want to provide. However, keep in mind that most function modules you will find willv not be supported for use in customer code (which means the SAP reserves the right to change them in a future release), and even fewer will be RFC-capable.
Another option is to look for database usage. When you know that a certain database table must be read or written to during a user action, then you can open that table with transction SE11
and click on the "Where used list" button. It will show you any code that uses that table. If you are lucky, you find a use of that table in a function module or a method of a class which you can borrow. But the same caveats apply.