After you have implemented the underlying function module of your BAPI, and you have defined the BAPI as a method of an SAP business object type in the Business Object Repository (BOR), you should test the BAPI.
Carry out the test together with the persons responsible for quality control in your development group.
Test Phase
The following steps are carried out in the test phase:
Testing the Documentation Check that the documentation for each business object type, each BAPI and for each interface parameter is available and that you understand it. As the BAPI documentation is critical for being able to use the BAPI, this test should be carried out thoroughly. | |
Testing the BAPI Syntax In the test phase you must check that the BAPI meets all the conventions described above, and that you have followed the guidelines for developing BAPIs. You can check that the syntax is correct using the BAPI Explorer and the BAPI ToDo. An implicit check is also carried out when the BAPI is appended in the BAPI/BOR Wizard and when it is released in the BOR. To test the BAPI syntax in the BAPI Explorer, position the cursor on the relevant BAPI in the left-hand frame. Select the tab page Tools in the right-hand frame and then the option BAPI Consistency Checks. | |
Testing the BAPI Semantics After you have checked that the syntax is correct, you have to check that the semantics of the BAPI are correct (testing the functions and integrity). You have the following options: Testing the underlying function module in the Function Builder You can test the parameters in your function module in one test. Enter the appropriate test values in the parameters to verify that the source code in the function module can run without errors. However, the test in the Function Builder has the following drawbacks:
Testing the function module with the Computer Aided Testing Tool (CATT) Function modules can be tested within the SAP standard test tool using the CATT test module type F. The CATT has the following advantages over testing in the Function Builder:
Tests with the CATT should be carried out in preference to tests in the Function Builder because the test runs are retained and can be optimally integrated into the SAP quality assurance process. For more information on using CATT for testing function modules, see | |
Testing the BAPI call in an external application To use a BAPI in an external application, the following conditions must be fulfilled:
| |
Testing the BAPI on different platforms The platform tests are carried out during the final assembly. The tests can only be carried out when the BAPI semantics have been tested with CATT, and when the CATT procedures created in the tests can be used again in the final assembly. |
If you find any errors in the BAPI implementation, correct them and repeat the tests until you and the quality control team in your group are fully satisfied with the BAPI implementation and with the documentation.