Details 

Call Bundling

Call bundling improves the performance of instance BAPIs by bundling the individual BAPI calls in the update task. Because the individual BAPI calls are not bundled until they reach the update task, the programming model for BAPIs remains the same, except for one change to the update logic in the update modules.

To achieve call bundling, you have to modify and/or generate the following three components:

  1. The BAPI

Each BAPI performs the necessary consistency checks and organizational operations, such as number assignment and lock management. If this application logic is passed free of errors, the update modules are called IN UPDATE TASK.

  1. The update module

The enhancement to the programming model involves the update modules – specifically, the database accesses are no longer triggered directly; instead, the pending options are buffered in the function group memory, and a form routine is then called indirectly, "ON COMMIT", which means that the operations are all performed at the end of the update task.

  1. The form routine

The form routine takes the set of flagged operations in the function group memory, and performs the update with only one database access, using techniques such as array insert.

The structure of the three components that are relevant for call bundling can be illustrated in pseudo-coding as follows:

  1. The BAPI:

function bapi_<object>_create.

{consistency checks and error handling}

call <object>_post in update task

exporting

{data}.

endfunction.

  1. The update module:

function <object>_post.

{Operations in buffer}

perform <buffersave> on commit.

endfunction.

  1. Form routine for the bundled update:

form <buffersave>.

{Update buffer data}

endform.

The call bundling concept offers the following advantages:

A major disadvantage of this concept, however, is that technical problems – such as a server failure – will result in the loss of all data.