Improving Performance
Use
In order to improve the performance of your BAPI, you should follow the standard ABAP programming guidelines:
See the internal SAPnet for further notes about effective programming in the R/3 environment.
Additional Guidelines for BAPI Programming
The function module on which a BAPI is based can be accessed by external programs using RFC. For this reason, you should follow these additional guidelines when programming BAPIs:
Mass data is treated differently in ABAP programs, which use the SAPgui (graphical user interface) as a front end, and in programs developed on external development platforms such as Visual Basic.
If large amounts of data are read in the R/3 System, for example a list containing many entries, the majority of the data remains on the application server. Only the data that is actually displayed is sent to the front end. In contrast, if you are programming with Visual Basic, all the data will be sent from the application server to the client system. This increases the load on the network and the amount of memory required in the client system.
You need to cover the situation when your BAPI has to read mass data. For example, you could specify a limit so that only the first n data records are read. Alternatively your BAPI could return a message to the calling program indicating that the amount of data has exceeded a certain limit and that a new selection should be made.