Example: BAPI Transaction Model (Without Commit) 

Use

The example below of an external program calling a BAPI to change data in an R/3 System, illustrates how the transaction model affects BAPI development. For example, this could involve a transaction implemented with Visual Basic. Only data from the R/3 System is to be changed.

The RFC connection is live the whole time the external program is logged on to the R/3 System to avoid having to connect and disconnect repeatedly. When the RFC connection is already established, an RFC call does not essentially take up any more CPU time than a direct call to the function module from within the R/3 System.

The process flow of the program consists of the following steps (see graphic below):

Log on

(Source code)

   Call BAPI

(Source code)

   Call BAPI

       (Source code)

Call BAPI BapiService.TransactionCommit()

       (Source code)

   Call BAPI

       (Source code)

   Call BAPI

       (Source code)

Call BAPI BapiService.TransactionCommit()

       (Source code)

Log off

BAPI Transaction Model Without Commit