BAPI’s and Function Modules
BAPI stands for Business API (Application Program Interface). A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc.
SAP describes BAPIs (Business Application Programming Interfaces) as “business (not technical) interfaces of an SAP System, which do not require users to have a thorough knowledge of the SAP System or of the SAP development environment.”
One can simply test a function module with transaction SE37.
If the test you are using is a BAPI which requires a commit for example with “BAPI_SALESORDER_CREATEFROMDAT2″ one is able to test the function module in a sequence as follows:
- Go to transaction SE37.
- Go to menu Function Module->Test->Test Sequences
- Enter the BAPI names you wish to use in sequence for example:
- The select Execute
- The system will then open the test function module interface for you to enter the field values to use as import parameters (test data) for the header and item for Function Module “BAPI_SALESORDER_CREATEFROMDAT2″.
- TIP – Save the test data into your test data directory.
- Then select execute, wait for the doc to be created and note the return results which will have the not yet committed (created) sales document number and go back.
- The system will then open the test function module interface for the next Function Module in sequence “BAPI_TRANSACTION_COMMIT”.
- Select Execute.
Now you may go view your sales document.