‎2012 Apr 18 8:12 AM
Hello gurus,
I am trying to write code at exit ZXCO1U01 for sending an email notification when an Process order is saved. The problem is that, i cannot write commit at this exit, because it raises an exception for perform on commit. The code i use for sending the email is below
CALL METHOD SEND_REQUEST->SEND(
EXPORTING
I_WITH_ERROR_SCREEN = CA_X
RECEIVING
RESULT = SENT_TO_ALL ).
COMMIT WORK.
I tried to create a function, and do this in update task, but the update terminated also.
Can anyone gine me a sample code to make this happend ?
Thanks in advance!
‎2012 Apr 18 8:15 AM
Just call the code in update task WITHOUT COMMIT.
The transction should be doing the commit for you.
‎2012 Apr 18 8:26 AM
thanks for answer, but without commit no update is happening..
‎2012 Apr 18 8:25 AM
Okay, dont put any commit in transaction customer-exits or BAdI as well as in update task. Try to execute in a FM in background task which will execute after update tasks (successful). There you are in another luw and are allowed to use any tools, like call transaction or commit-work. ( Also check via SM58 for error management as you use SM13 for update task errors)
Regards,
Raymond
‎2012 Apr 18 11:02 AM