
I thought the email processing would be committed automatically when DB commits its work. But actually, it'll not happen. Instead, I get the email status with SO672 (Still no entry in the queue). It has been discussed many times like this one, hope this article will not hurt anyone facing the same issue. Some useful notes:
Solution
We recommend that you do not call the send interface at the time of the PERFORM-ON-COMMIT but during the update.
If this is not possible, enclose the call of the send interface in a function module that is called with RFC. The 'NONE' destination is sufficient. A COMMIT WORK must be executed in the function module after the send interface was called.
Instead of calling its own function module with RFC, the application can also call the SO_DOCUMENT_SEND_API1 function module which is part of the send interface. In this case, you must set the COMMIT_WORK import parameter to 'X'.
It's mandatory to each application explicitly call COMMIT WORK, after the sending application has been called.
Do not execute COMMIT WORK command during an update process. Additional instructions will be found under SAP Note 717265:
"If this is not possible, enclose the call of the send interface in a function module that is called with RFC. The 'NONE' destination is sufficient"
Also, there are some circumstances when a COMMIT WORK is suppressed in the coding.
COMMIT during:
- CALL DIALOG/SUBMIT
- Perform On Commit
- Update task
- End Transaction event
Check if "sy-oncom" is on one of the above states when it reaches COMMIT WORK. If yes, then include a new COMMIT WORK outside of the process. For example, if code is within a 'Call Dialog', initiate a new COMMIT WORK when it leaves the "Call Dialog".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
8 | |
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |