Testing an ABAP handler

To test an ABAP handler, you must first generate a business object input file. You may need to modify the file to contain attribute values and the appropriate application-specific information. Once you are ready, all you need to do is execute the test program by pointing to your test file as input.

Creating a test file

To create a test file:

  1. Go to IBM CrossWorlds Station (transaction /n/CWLD/HOME), and then click the Tools tab.
  2. Click the Create Test File button under Test Tools.
  3. Enter the name of your business object and the verb you plan to test.
  4. Select the source definition on which to base your input file. See Table 17 for a description of the test file options.
  5. Enter the additional data required for the source.
  6. Click the Generate button.

    A dialog box appear asking if you want to modify the test file. This is your opportunity to edit the test file in SAP's editor. If you do not wish to edit at this time, click no; otherwise, click Yes, and then click the Back arrow (F3)when finished.

  7. Enter a filename and location to save your test file. It is recommended that you use the naming convention Object_verb.in.
  8. Once you have saved your generated test file, you must open the file in a test editor and do the following:

Using the test file

Once you have created the test file, you are now ready to use it to test the business object. To use the test file:

  1. Go to IBM CrossWorlds Station (transaction /n/CWLD/HOME), and then click the Tools tab.
  2. Click the Test Program button under Test Tools.
  3. In the input file field, enter the location and filename of your input file.
  4. If you want to generate output data, enter a filename and location for the output data. The filename can be the same as the input filename, however, it will overwrite the input data. This step is optional.
  5. Click the Execute button.

When finished, the program displays the last message that was raised during processing. In addition, the processed data is displayed on the screen for verification. This is the same information that is generated in the output file of step 4.

You can look in the adapter's ABAP Log for additional details.

Copyright IBM Corp. 1997, 2004