I have developed a program which is scheduled to run every hour. The program is used to send mail to the user based on some conditions. ie
SELECT SINGLE ukurs INTO ukurs FROM tcurr WHERE kurst = 'M'
AND fcurr = 'USD'
AND tcurr = 'INR'
AND gdatu = sgdatu.
IF ukurs IS INITIAL.
*& logic to send mail to external user with the message
'Please Maintain Exchange Rate Table'
*& If the exchange rate is maintained the user shud get the mail showing the exchange rate maintained.
My problem is that since the job is scheduled through SM36/SM37, How can I control the mail once the exchange rate is maintained in the table? I want to show the exchange rate that is maintained and then after no mail should be sent.