Automated processing with minimal effort
Sooner or later, in most cases, new customer enhancements or processes occur, which make it necessary to update a mass of affected objects (e.g. business partners), e.g. As per to a more complex determination and/or a buffer table, or to synchronize them to a third-party system. If a report for background processing is implemented for such a project, which also has suitable “Select” options, an optimization can be made with simple steps during scheduling.
Let’s assume that there are a total of 15 background servers available in an SAP system, but only 5 of them may be used for updating so as not to interfere with ongoing operations.
With a large number of data records and depending on the nature of the system, it may take several days for all updates to be executed individually. In such a case, the selection of number ranges (e.g. based on business partner IDs) can be used to split up the update report and schedule it in tandem. However, it is not possible to determine exactly which range will take how long, and whether the number ranges may still be too large with the 5 servers available. Also, a processing operation per job chain and with smaller number ranges would not fully utilize the desired optimum, and there is also the risk that, in the event of termination, a new and adjusted job chain has to be scheduled manually.
But what can be done instead?
First of all, it is necessary to implement another report that is scheduled once in background processing, instead of the update report, and whose tasks mainly consist of the following components.
Division of the number areas using the number range (see Figure 2). Preferably, it should be possible to specify the size of the ranges as a parameter. It is also recommended to be able to specify a parameter for the start, in order to override the start from the number range, if a termination has occurred and some ranges have already been processed.
With an area size of 10,000, the distribution would then look like this:
- No. area 1: 9000000000 – 9000010000
- No. area 2: 9000010001 – 9000020000
- No. area 3: 9000020001 – 9000030000
- No. area n: …
– Automated job scheduling of the update report with the determined ranges as parameters and in compliance with the maximum permitted background servers, which is also well suited as a parameter. During scheduling, it is essential to apply a unique job name, as this is taken to determine the number of servers currently used in parallel from the TBTCO table (job status overview table). When selecting from the table, the status should also be queried in addition to the job name. In a While loop, the TBTCO is then queried until a further available server is free, in order to continue with the scheduling, if further unscheduled number ranges exist.
As with any implementation, however, the relative costs and benefits should always be considered. This form of optimization is only justified with a high number of objects that are to be updated in a mass run. The focus here is on automated processing, while other topics – such as handling errors, etc. – are not listed here, but should also be considered and implemented, in principle.