Change of outside document in BADI

Problem: during a BADI call you have changed a document, different from one which called the BADI. You cannot use COMMIT WORK as this will destroy the BADI session. And you want to save the outside document with the one which called the BADI.

Solution: to solve this issue, you need to first change values in the outside document and then, add this document’s GUID to the list of documents to be saved. This can be done by using FM CRM_ACTION_PUT_DOC_SAVE_OB.

This way the outside document will be saved in one DB transaction with the document which called BADI (data will be saved in all-or-nothing manner). You will also maintain the BADI session which is required for the proper working of system.

Komentowanie jest zakończone.