2009 Feb 20 2:17 AM
Hi,
I implemented the BADI MB_DOCUMENT_BADI - Method MB_DOCUMENT_BEFORE_UPDATE. Inside the method I called a custom Function Module which calls a BAPI (BAPI_BATCH_CHANGE). However, it was reported that users sometimes encounter an update termination when using MIGO.When I opened an OSS message, they told me that the BADI implementation caused it.
My question is, should the FM (which contains the call to the BAPI) be called in BACKGROUND TASK AS SEPARATE UNIT ? If it is going to be called in this mode, do I need to also add an explicit BAPI_COMMIT after the BAPI_BATCH_CHANGE is called ? In the current version of the method, the FM is called as a normal function module.
Thanks.
2009 Feb 23 5:46 AM
Hi,
this BADI is really weird. You have to be really careful what you put in it. There is even OSS note related to this problem - Note 1284654. I briefly checked BAPI BAPI_BATCH_CHANGE and I found the following code
* End of transaction - IDOC-creation or directly COMMIT WORK
IF sy-subrc IS INITIAL.
CALL FUNCTION 'TRANSACTION_END'
EXPORTING
transaction_id = f_transaction_id
EXCEPTIONS
OTHERS = 1.
So it calls COMMIT WORK automatically. Therefore you don't have to call BAPI_COMMIT.
Cheers
Hi,
I implemented the BADI MB_DOCUMENT_BADI - Method MB_DOCUMENT_BEFORE_UPDATE. Inside the method I called a custom Function Module which calls a BAPI (BAPI_BATCH_CHANGE). However, it was reported that users sometimes encounter an update termination when using MIGO.When I opened an OSS message, they told me that the BADI implementation caused it.
My question is, should the FM (which contains the call to the BAPI) be called in BACKGROUND TASK AS SEPARATE UNIT ? If it is going to be called in this mode, do I need to also add an explicit BAPI_COMMIT after the BAPI_BATCH_CHANGE is called ? In the current version of the method, the FM is called as a normal function module.
Thanks.
2009 Feb 23 5:46 AM
Hi,
this BADI is really weird. You have to be really careful what you put in it. There is even OSS note related to this problem - Note 1284654. I briefly checked BAPI BAPI_BATCH_CHANGE and I found the following code
* End of transaction - IDOC-creation or directly COMMIT WORK
IF sy-subrc IS INITIAL.
CALL FUNCTION 'TRANSACTION_END'
EXPORTING
transaction_id = f_transaction_id
EXCEPTIONS
OTHERS = 1.
So it calls COMMIT WORK automatically. Therefore you don't have to call BAPI_COMMIT.
Cheers
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |