Retention Strategies
Jobs per Key
At least one Job Definition Parameter must be marked as Part Of Key in the Parameters tab. If you use this option, the system will keep track of how many Jobs have that key Parameter set to a particular value.
For example, assume you have a Job Definition with a Parameter named P_COMPANY_ID
set to Part of Key. Also assume that the Keep Clause for the Job Definition is set to one per key. If you execute this Job Definition twice with the value of P_COMPANY_ID
is set to 25
both times, the first Job will be deleted when the second finishes executing.
Tip: This strategy is useful for generic Job Definitions such as a copy of the SAP_AbapRun Job Definition. For example, you can specify the program to be run in a Parameter, so that each Parameter combination identifies a different Job.
Jobs per System
The oldest Job in the system will be deleted by the Keep Clause maintenance Job that is scheduled in the background once the Keep Clause has been exceeded.
Jobs per User
This strategy allows you to keep a number of Jobs per user. The oldest Job will be deleted by the Keep Clause maintenance Job once the Keep Clause has been reached.
Maximum Age of Jobs
This strategy allows you to keep Jobs for a period of time. The Keep Clause maintenance Job that is scheduled in the background will delete all Jobs for which the Keep Clause has expired.
If you set a maximum age for a Job, the system will add an expiration time stamp for the Job when it finishes. For example, if the Keep Clause is one day, and a Job finishes on 12 October at 11:02, then the expiration time stamp is set to 13 October at 11:02.
If you edit the Keep Clause on a Job Definition or Workflow Definition, the changes affect all Jobs created from that Definition almost immediately.
Keep Jobs in Status
The Keep Jobs In Status field in the Retention tab lets you keep Jobs that have reached certain statuses.