cancel
Showing results for 
Search instead for 
Did you mean: 

Send a mail if no file in Sender File Adapter

Former Member
0 Kudos

Hello guys,

I have one doubt. I have a sender File adapter with FTP transfer protocol. I want to pull the file every 24 hours. If the file does not exist, there is any way to have an error and send a mail to the client?

Is a requierement to do one interface, they want that XI sends a mail if no file is encounteref in the server when XI goes to pull the file. Is this possible?

Many thanks in advance.

Regards,

Xavi.

Accepted Solutions (1)

Accepted Solutions (1)

sunil_singh13
Active Contributor
0 Kudos

Hi Xavi,

I think Prasad is right because if the file is not present on the given path adapter will not pick the file. And there is no question of processing the file.

But as you said File Has to be Picked after Every 24 hrs then you can develop your Module such that if after 24 hrs no file comes for processing trigger alert or you can send the mail direcly from there also.

Thanks

Sunil Singh.

Former Member
0 Kudos

Thank you very much for the answers!

I think the customer will not want to put a shell script but we will try this way.

Sunil do you know how to develop the module yo create an alert if file does not exist in the directory?

Thanks.

Regards,

Xavi.

prasad_ulagappan2
Contributor
0 Kudos

I got an idea to do this without script...We can do it with Java Proxy to check if any file exists in 24hrs, if not, then you can send a mail...Overall, it would be 2 interfaces for this req. One is File to ur target system...if any file exists it will take and do the process as usual...Second interface is the client Java Proxy to the mail recepient. This Java Proxy will check for any files in your folder, and if doesnt find any then it will send a mail to the req-ids...

Even we can do everything in a single go with Java Proxy provided the file format is simple, so that you can convert the file format through Java Proxy itslef....

sunil_singh13
Active Contributor
0 Kudos

Hi,

Refer to following link

This has good example of developing module. Only code is available. For further help you can look in Help.sap for crating module they also provide sample code.

No need to call alert from module . go upto 24 hars if no file is received set your own structure.

Give condition in receiver detrmination to send mail if file is not picked.

revert back for any clearity.

Thanks

Sunil Singh

prateek
Active Contributor
0 Kudos

This very well suits ur requirement

Then u may raise alert using this

Regards,

Prateej

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

You have a way to do this. But will be lengthy.

Create a shell script with ls-l file which lists files.

If you dont find a file then create a dummy file with some meaningful extension.

Create another cc which looks for this files, by this you would come to know there is no file present. so, with the CC following by some condition in receiver determination, you can send a mail to the required personnel.

Regards

Krish

prasad_ulagappan2
Contributor
0 Kudos

Krish is right...but make sure that you are expecting the file for every 24 hours...so that u can schedule the script...if the file comes (even after a minute) after the script starts executing...then it will be processed only in the next round...

Former Member
0 Kudos

Hi,

You have a way to do this. But will be lengthy.

Create a shell script with ls-l file which lists files.

If you dont find a file then create a dummy file with some meaningful extension.

Create another cc which looks for this files, by this you would come to know there is no file present. so, with the CC following by some condition in receiver determination, you can send a mail to the required personnel.

Regards

Krish

Former Member
0 Kudos

Not very sure if this helps.

But perhaps you can try using Deadline Monitoring in ccBPM

http://help.sap.com/saphelp_nw04/helpdata/en/c5/582541019fa52fe10000000a155106/content.htm

prasad_ulagappan2
Contributor
0 Kudos

It is not possible with File Adapter.

Former Member
0 Kudos

Hey,

use alerts

whenever there will be a system error alert will be triggered and a mail will be sent to respective address.

Former Member
0 Kudos

Hello,

how you create an alert when the adapter don't find the file? There is any way to create the alert with this requirement?

Many thanks.

Regards,

Xavi.

prasad_ulagappan2
Contributor
0 Kudos

No its not possible even with Alerts...