Wednesday, 18 September 2013

How to Avoid Internal Commit or Implicit Commit in Standard BAPI

Below is the reply from SAP to avoid internal/implicit commit in standard Bapis : BAPIs BAPI_BATCH_CREATE, BAPI_BATCH_CHANGE, and
BAPI_BATCH_SAVE_REPLICA

Not sure whether this works for other standard Bapi's or not . We can try the below method given by SAP




BAPIs BAPI_BATCH_CREATE, BAPI_BATCH_CHANGE, and
BAPI_BATCH_SAVE_REPLICA can be used for maintaining batch data.
The three BAPIs mentioned above implicitly carry out a separate COMMIT
WORK.
If a COMMIT WORK AND WAIT is required, or if batch maintenance is to
be included om a transaction, the implicit COMMIT of the BAPIs has to
be suppressed.
This is done by calling function module 'TRANSACTION_BEGIN' before
calling the individual BAPI. Thus the calling program takes over
transaction control. The transaction is terminated by calling function
18.09.2013 Page 3 of 4
SAP Note 619913 - FAQ: Basic functions of batch
management
module 'TRANSACTION_END' or 'BAPI_TRANSACTION_COMMIT'.
BAPI_BATCH_CREATE
This BAPI exclusively serves for creating new batches or expanding
existing batches by plant or storage location segments.
BAPI_BATCH_CHANGE
This BAPI exclusively serves for changing existing batches.
BAPI_BATCH_SAVE_REPLICA
This BAPI creates batches or changes existing batches. It combines the
functions of the above-mentioned BAPIs.

No comments:

Post a Comment