‎2007 Nov 15 7:33 AM
Hi,
i want to write the program such that it executes maximum of five times a day next day it should execute maximum of five times more than tht it should not execute can any body help for me
‎2007 Nov 15 7:41 AM
Create a Z-table and in that maintain Last Date of Execution and Number of times of execution, Current Date Executions
In your program starting read that table and the count of Last Date execution + today's execution is less than last days execution5 then run the program and update the table with current date's execution = current date's execution1.
One thing is updating the table with proper data when u r executing the report for last time in a day.
Then u must change last day = today. last day execution = last day execution+5.
try this.. it will work.
‎2007 Nov 15 7:54 AM
HI,
u can do that.
try using this code.
DATA:count,date LIKE sy-datum.
GET PARAMETER ID 'MAX' field count.
GET PARAMETER ID 'DAT' FIELD date.
IF date is initial.
date = sy-datum.
ENDIF.
IF date = sy-datum.
count = count + 1.
else.
message e000(zmsgtab)."u con't execute it more than once in a day.
endif.
set PARAMETER ID 'MAX' field count.
IF count > 5.
count = 0.
set PARAMETER ID 'MAX' field count.
date = date + 1.
set PARAMETER ID 'DAT' field date.
message e000(zmsgtab)."u con't execute it more than once in a day.
ENDIF.
write:/ 'this is my program'.
rgds,
bharat.