05-26-2006 2:35 PM
Hi,
i want to send email when an user modify informations in HR infotype so i put some code into PAI, i've created a module send_mail, and his this last i put a FM 'Z_HR_SEND_MAIL_PROCESS'.
The function 'Z_HR_SEND_MAIL_PROCESS' work fine, i receive my email correctly. Nice.
Now when FM 'Z_HR_SEND_MAIL_PROCESS' is call by my PAI, i don't receive email, debug is correct, no dump, no error, parameters are correct...
I don't undertand.
Thanks for help.
Regards.
Message was edited by: tafkap
Message was edited by: tafkap
05-26-2006 2:49 PM
Insert the code
<b> submit rsconn01 with mode = 'INT'
with output = 'X'
and return.</b>
after the call to the fm becomes succesful.
Regards,
Ravi
05-26-2006 2:38 PM
hi,
please see to it that u commit the work.
after sending mail write.
commit work.
Mark helpfull answers
Regards
05-26-2006 2:41 PM
Hi,
put an explicit commit work after function module and see.
rgds,
latheesh
05-26-2006 2:40 PM
Hi Tafkap,
How do you know that the fm 'Z_HR_SEND_MAIL_PROCESS' is working fine? Did you run it in se37?
May be your code is not populating all the required parameters to the FM.
INside the 'Z_HR_SEND_MAIL_PROCESS' function, it should be calling a standard sap fm.
May be it is failing at that stage and you are not able to capture the sy-subrc for such errors.
Regards,
Ravi
05-26-2006 2:45 PM
Hi,
check in <b>SCOT</b> transaction , there might be some pending mails in Queue. so Try to send it from there manually using <b>Start Send Process or CTRL+F7</b> .
Regards
vijay
05-26-2006 2:49 PM
Insert the code
<b> submit rsconn01 with mode = 'INT'
with output = 'X'
and return.</b>
after the call to the fm becomes succesful.
Regards,
Ravi
05-26-2006 5:05 PM
Thanks for answer.
In fact, i use FM send mail from /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
It's work fine and at the end of FM we can find :
Send document
CALL METHOD send_request->send( ).
COMMIT WORK.
Yes i test FM Z_HR_SEND_MAIL_PROCESS in SE37, it's work fine. Parameters are good.
When i test FM, email is not send immediately because :
send_request->set_send_immediately( 'X' ).
so email is in SCOT, i must Start Send Process.
Thanks
05-26-2006 5:10 PM
05-26-2006 5:18 PM
Hi tafkap,
Schedule report RSCONN01 to run regularly, it will take care of mail sending.
Br,
Hannu
05-26-2006 5:43 PM
05-26-2006 5:43 PM
05-26-2006 5:59 PM