After MASTER_IDOC_DISTRIBUTE is called, a COMMIT WORK must be executed - the standard database commit at the end of the transaction is not sufficient. The COMMIT WORK does not have to directly follow the call; it can be specified at higher call levels or after multiple calls of MASTER_IDOC_DISTRIBUTE.
Note that the IDocs created remain locked until the called transaction has been completed. If you want to unlock them earlier, you can call one of the following function modules:
DEQUEUE_ALL
releases all locked objects
EDI_DOCUMENT_DEQUEUE_LATER
releases IDocs passed as parameters
If the application document is created via the update program, the call to MASTER_IDOC_DISTRIBUTE must also be performed in the update task (if an update call has not already been performed at a higher level).