cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Adapter requirement

Former Member
0 Kudos

Hi Experts

The current requirement in my Interface development is to use the MAIL ADAPTER to send mails based on the below requirements

Kindly let me know if it is possible and how to achieve it :

1) The scenarios is File to Proxy and the requirement is to send an email as soon as SAP XI posts the data into SAP ERP's Proxy , that the data has reached ABAP , its only after the receipt of this mail that the , team wil manualy run the control program to carry out the process.

2) If the File is missing in the Soruce folder an email has to be sent to a generic mailbox.

3) Finally, the scenario is that of an outbound proxy where SAP XI reads the data for this outbound interface and creates some 15 files in some destination folder , There is a requirement for an email to be sent toa generic mailbox as soon as the files have been created and dispatched to the destination folder !!

Kindly let me know if :

a) In which of the cases above should the mail be triggered from SAP XI and in which it should be from ABAP

b) which of the following above is possible and how to achieve the same , i am looking mainly at the way the mail adapter should be triggered for each of the above three case ..i hope it can be configured without complex coding ??

thanks

Dev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

2) If the File is missing in the Soruce folder an email has to be sent to a generic mailbox.

The interface will not execute if there is no source file.

So u can use OS Command to create a dummy file of size 0 the CC will now run with a file of size 0.

In mapping get the size of file...

If size 0,then send the email the generic mail box u want.

Please note:U should use multi mapping here with the Mail interface will have occurence(0..1).

This Mail interface is created only if the file size is 0.

3) Finally, the scenario is that of an outbound proxy where SAP XI reads the data for this outbound interface and creates some 15 files in some destination folder , There is a requirement for an email to be sent toa generic mailbox as soon as the files have been created and dispatched to the destination folder !!

In mapping u can get to know whether u r creating 15 files are not from 1 client proxy...

Use the multimapping here also.

If the 15 files are created then only the a Mail interface will be created else not.(Occurence 0..1).

In case further clarifiaction please post again with the specific issue.

Thanks & Regards,

Babu.

Answers (3)

Answers (3)

former_member200962
Active Contributor
0 Kudos
1) The scenarios is File to Proxy and the requirement is to send an email as soon as SAP XI posts the data into SAP ERP's 
Proxy , that the data has reached ABAP , its only after the receipt of this mail that the , team wil manualy run the control program 
to carry out the process.

Better to trigger the mail from SAP itself (if possible)

If not possible from SAP, then you need to have a BPM in XI.

Please note that configuring multiple receivers in Receiver Determination wont serve the purpose as you need to check if the file has been posted successfully or not.....so you need some kind of confirmation...can take help of Transport Acknowledgement concept if proxy cannot send back a +ve response....this can be achieved using a BPM.

2) If the File is missing in the Soruce folder an email has to be sent to a generic mailbox. 

If file is missing or no file found then the File channel itself will throw the error.....this is even mentioned in help section of Sender File channel....now configure an alert for this....and send the email to the generic mailbox....need to maintain a user in SU01 whoc will represent the mailbox....it will be a dummy user.

If you need help on how to send alert mail then look into: /people/pravesh.sharma/blog/2009/07/02/configuration-for-forwarding-alerts-as-emails

Regards,

Abhishek.

Former Member
0 Kudos

Thanks for your reply Abhishek

1) we are not sending the email from SAP XI > but will send it from the Proxy code in ABAP , However if you cansend me some pointers or links for

transport acknowledgement concept or elucidate a bit on hw to build it , It will be great for me to try it out incase of future need .

2) if the file is missing in the source folder an alert will be generated and however i think the requirement is of an email to be sent as well , so i will try with the link that u sent

3) for this case i am using multi mapping , so from one source xml i am creating 15 files , but how to configure an email upon file creation ,

i need some help on this .. kindly help me on this particular case , on how to configure mail adapter ( receiver i presume) in multi mapping ..

Rest all my doubts have been answered , i shall close the post after the response to the above

thanks

Dev

Former Member
0 Kudos

Hi Experts

Can any one throw some light on this ?

Thanks

Dev

former_member200962
Active Contributor
0 Kudos

Regarding transport Ack: /people/michal.krawczyk2/blog/2006/06/22/xi-playing-with-the-file-adapters-acknowledgments

on how to configure mail adapter ( receiver i presume) in multi mapping 

Mail adapter supports MultiMapping....just that the occurence of Mail.xsd cannot be changed...it needs to be 1..1.......if the occurence is changed you may get some error in the receiver channel....you can make use of DataType when you want to send multiple emails....rest of the procedure is the same as it is in any multimapping scenario.

In my earlier reply h is missing from the link given for the blog

Regards,

Abhishek.

abhay_rajhans2
Contributor
0 Kudos

Hi Sd,

a) In which of the cases above should the mail be triggered from SAP XI and in which it should be from ABAP

1) For this case you can trigger a mail through ABAP in the last step of Proxy execution.

3) In this case through message mapping you can call RFC in ABAP which will send a email or otherwise mail adapter.

For 2nd case need to check

Former Member
0 Kudos

Thanks

Can anyone please help me with the answers .. i need some more help on the below mentioned on how should it be done ?

can these be accomplished using mail adpaters or should it be done in ABAP

Kindly let me know how to achieve these

thanks

Dev

Former Member
0 Kudos

Hi

Can some one please help me out with the following mail adapter requirements ?

thanks

Dev