Background documentationProgramming Asynchronous Methods (BOR) Locate this document in the navigation structure

 

You program an asynchronous method in the implementation program between the macro instructions BEGIN_METHOD <Method> and END_METHOD.

The system generates an implementation from the specifications you made when defining the method. The unique ID of the object is available in the structure of the key fields under the variable OBJECT-KEY.

An asynchronous method can be implemented with a transaction. The transaction is called in the program with the ABAP command CALL TRANSACTION. The input fields in the first screen of the transaction are assigned values from the key fields of the object and possibly from the import parameters of the method via processing parameters ("SET/GET parameters"). This first screen is then skipped when the transaction is called (... AND SKIP FIRST SCREEN).

With asynchronous methods you cater for feedback to the method caller via terminating events.

This graphic is explained in the accompanying text.

Example

Implementing the method EditAsynchronous (Change quality notification asynchronously).

The method operates on an object of the type BUS2078 (quality notification). This object type has the key field Number (notification number). This method has no import parameters.

You implement this method by calling transaction QM02.

When called, the transaction requires the sales document that is available as key of the object from the variable OBJECT-KEY-NUMBER.

* Method Edit (simplified) ************************************************************ BEGIN_METHOD EditAsynchronous CHANGING CONTAINER. SET PARAMETER ID 'IQM' FIELD OBJECT-KEY-NUMBER. CALL TRANSACTION 'QM02' AND SKIP FIRST SCREEN. END_METHOD.

Note Note

The system automatically generates the method implementation described above from the specifications you made when defining the method.

End of the note.