on 06-24-2011 4:54 AM
Hi All,
Please help me find a solution for the following requirement:
We have a requirement for a SAP PI interface where we receive an XML file from Unix system once a day. PI picks the file from Unix FTP server and makes a proxy call to SAP ECC. This script will run before PI channel polls the directory. The script should check if there are any files in the specified location. If there is, it does nothing. If there are no files, It should send an E-mail notification stating that SAP has not received any files on that particular day. The script required is in shell script format.
Thanks in Advance,
Sreedhar
Hi Sreedhar
Run this from cron once a day to check the directory set in the varable DIR and set the <emailaddress> too
#!/bin/bash
DIR="/usr/sap/trans"
if [ "$(ls -A $DIR)" ]; then
# there are files, so do nothing
else
echo "SAP has not received any files on " `date` |mailx -s "FTP file check" <emailaddress>
fi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.