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

Schedule job

anub
Participant
0 Likes
729

H all,

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'

else.

*& If the exchange rate is maintained the user shud get the mail showing the exchange rate maintained.

endif.

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.

Pls guide.

Regards,

Anu.

H all,

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'

else.

*& If the exchange rate is maintained the user shud get the mail showing the exchange rate maintained.

endif.

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.

Pls guide.

Regards,

Anu.

4 REPLIES 4
Read only

Former Member
0 Likes
663

I think You will have to maintain another table for this.

regards,

Advait

Edited by: Advait Gode on Oct 20, 2008 12:13 PM

Read only

Former Member
0 Likes
663

One way is to check date / time when exchange rate was maintained, if that is less than last Job run date / time, you may assume that mail for exchange rate for that particular record would have been send in last job.

Regards,

Mohaiyuddin

Read only

anub
Participant
0 Likes
663

Thanks for you reply, but the exchange rate is maintained in TCURR where no field captures the time or date when the exchange rate is getting updated...so is this possible?

Thanks and Regards,

Anu.

Read only

Former Member
0 Likes
663

If Log Change is active in your system (you can check with sys administrator / basis ) and TCURR has "Log data changes" ticked in your technical setting, there is chance to get date / time of each updated / inserted record from Change Log tables. [Tcode - SCU3]...

Otherwise, you will need to create custom table for the same.

Regards,

Mohaiyuddin