Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

test phase bapi

Former Member
0 Kudos

what is the test phase in the bapi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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:

The tests do not update the database because a COMMIT WORK cannot be executed.

The tests cannot be automated.

The test data is not transported into other systems and is lost if the function module is changed. So, for example, no regression tests can be carried out.

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:

The tests do change the database because a COMMIT WORK is automatically executed.

The tests can be automated.

The test data is transported with the test module and is therefore available in other systems and releases for regression tests.

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 CATT: Using Function Module Tests.

Testing the BAPI call in an external application

To use a BAPI in an external application, the following conditions must be fulfilled:

The syntax of the BAPI is correct.

This should be tested by the BAPI developer using the BAPI Explorer.

The communication functions without errors.

This should be checked using appropriate tests from the Middleware departments.

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.

3 REPLIES 3

former_member156446
Active Contributor
0 Kudos

in BAPI u will find one import parameter which is called stimulate

if u put an X there it will just stimulate.. wont update or post any documents in to SAP.

>Award points if useful

Former Member
0 Kudos

Most of times when you run the bapi by SE37 only, you test the function without actually insert/change the data. Only after function "BAPI_TRANSACTION_COMMIT" is executed the data is actually inserted/changed.

This is the way you test BAPIs.

Former Member
0 Kudos

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:

The tests do not update the database because a COMMIT WORK cannot be executed.

The tests cannot be automated.

The test data is not transported into other systems and is lost if the function module is changed. So, for example, no regression tests can be carried out.

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:

The tests do change the database because a COMMIT WORK is automatically executed.

The tests can be automated.

The test data is transported with the test module and is therefore available in other systems and releases for regression tests.

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 CATT: Using Function Module Tests.

Testing the BAPI call in an external application

To use a BAPI in an external application, the following conditions must be fulfilled:

The syntax of the BAPI is correct.

This should be tested by the BAPI developer using the BAPI Explorer.

The communication functions without errors.

This should be checked using appropriate tests from the Middleware departments.

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.