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

IF Statement with a date condition

0 Likes
827

Hi all,

So basically I am wanting to check to see if a table or report is empty and if it is, send a notification email.

Therefore, my current code is IF tablename is initial

                                                  CALL FUNCTION 'Z SEND EMAIL'

My question is I want this to check once a day if this report or table is empty. So if the report is empty for the day, send the email.

How do I go about adding the check by date part?

Thanks

Hi all,

So basically I am wanting to check to see if a table or report is empty and if it is, send a notification email.

Therefore, my current code is IF tablename is initial

                                                  CALL FUNCTION 'Z SEND EMAIL'

My question is I want this to check once a day if this report or table is empty. So if the report is empty for the day, send the email.

How do I go about adding the check by date part?

Thanks

2 REPLIES 2
Read only

PeterJonker
Active Contributor
0 Likes
714

schedule your program as a daily job

Read only

Patrick_vN
Active Contributor
0 Likes
714

Either plan a job only once per day.

Or there is the option of creating a parameter (in TVARVC for instance) where you keep track of the last time the report has ran (or mail has been send). Don't forget to to update the parameter when each time a mail has been send of course.