Programming Cancel() BAPIs 

Use

The Cancel() BAPI cancels one instance of a business object.

Unlike the BAPI Delete(), which deletes an object instance from the database, with the BAPI Cancel():

The Cancel() BAPI is used to cancel business processes such as goods movements or invoice receipts.

The Cancel() BAPI is an instance method.

Features

BAPI Interface

Import Parameters

You should keep the following points in mind when defining the import parameters:

For the associated method definition in the BOR, the key fields must not also be specified as parameters. For this reason, the BOR/BAPI Wizard does not include the function module parameters for the key fields in the method definition, when it creates a BAPI.

For more information, see Test Run Parameters.

Export Parameters

You should keep the following points in mind when defining the export parameters:

You should keep the following points in mind:

If the complete key exceeds the maximum capacity of MESSAGE_V2 (that is, 50 characters), it is divided up between the fields MESSAGE_V2 and MESSAGE_V3. The first 50 characters are stored in MESSAGE_V2 and the remaining characters in MESSAGE_V3.

Apart from the fact that the field MESSAGE_V4 is not filled, the meaning of the other fields is the same as for successful execution.

For more information about this parameter, see Return Parameters (Error Handling).

See also:

Example of a Cancel() BAPI