2007 Nov 23 5:59 AM
Hi,
i want to write a program such tht it executes only a limited times a day
plz help me regarding this
2007 Nov 23 6:01 AM
Hi,
suresh try this code it may solve u r problem..
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'.
2007 Nov 23 6:01 AM
Hi,
suresh try this code it may solve u r problem..
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'.
2007 Nov 23 6:01 AM
Hi,
try this code
REPORT YCL118_RESTICT_EXECUTION.
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'.
<b><removed_by_moderator></b>