Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling a mail trigerring a function module inside a BADI

radhushankar
Participant
0 Likes
875

Hi All,

Can any one let me know whether we can call a mail triggering function module inside a BADI??

whether it is possible or not?? i tried it and my system return sy-subrc value is zero but i am unable to c the mails in sost transaction?

Any suggestions plz?

Thanks

4 REPLIES 4
Read only

radhushankar
Participant
0 Likes
762

Can any one take this ??

Read only

Former Member
0 Likes
762

Hi Radhu,

Go to SOST ..in the options tab... "tick " both the checkox and similarly in "send status" tab select all checkbox..the mail will be in your queue but will give a message

"A message was sent from the application. The current status of the message is 'Waiting'. However, no entry exist (yet) in the queue."

For these cases please see the comments below....

(a) The mail trigger function module will give sy-subrc as long as all input values are correct but will send content to SOST only if commit work is carried out......and i dont think calling in a commit work in a badi is a good idea...but you can try and see

(b) Another option is to check for a badi which triggers on commit work or which gets triggered on actions like "SAVE"..they will do an internal commit work solving your problem of explicitly calling a commit work

Please check and revert

Hope it helps

Regards

Byju

Read only

0 Likes
762

put the send_mail logic in a separate REPORT program & SUBMIT that report from the BAdI. This would isolate the work processes & the associated COMMIT_WORK conflict.

~Suresh

Read only

0 Likes
762

Hi Suresh,

Even i tried too and that thing is working fine..but any how its a work around process and more to that it will add a another z object in to my system ..

Now i am pretty clear that i can call a mail triggering functionality inside a BADI.

Lemme check with the commit work idea and get back to you !

Thanks to every one for their valuable suggestions and your some more suggestions are most welcome.

Thanks once again,

@run.