January 21, 2010

SAP Spool number administration and common issues

SAP has a default spool request number of 32,000, and default clean up job SAP_REORG_SPOOL does not clean up output request by background job.

You can view the status of your SPOOL numbers through:

1. Transaction SNRO > Table SPO_NUM > Number Ranges (button) > Status
Note: Do not change anything unless you are sure or this is in sync with a parameter change limit.

2. RZ20 > SAP CCMS Monitor Template > Spool System > Spool wide > Spool > Spool number

I. Make sure that you have SAP_REORG_SPOOL job enabled.
This uses the SPOOL reorg program RSPO0041 that deletes old spool requests.
See link below for more details:

II. Configure a custom SPOOL purge.

It is highly recommend to create a new custom variant, e.g. ZDELETESPOOL60 with following parameters:

1. Client number: 000
2. Username: Any user who can create variant with SE38 and modify job in SM37
3. Variant name: ZDELETESPOOL60
4. Expiry Date - Requests past expiration date: Disable
5. Minimum age in days: 60
6. Completed req. with min. age: Disable
7. All requests with min. age: Enable
8. Do you want to log everything?: Disable
9. Log instead of dialog boxes?: Enable
10. Log only without deletion?: Disable
11. COMMIT all...Spool requests: 1,000 to 10,000

Step 1, 2, and 4 are important not to change.

To create a variant:

1. Go to SE38 and enter RSPO0041.
2. Choose Variants in radio button
3. Click Display
4. Enter the UNIQUE name of a new variant. example ZDELETESPOOL60
5. change other value according to your requirement.

To create a job:

Execute transaction code SM37.
2. Modify job SAP_REORG_SPOOL in any client number.
3. Modify the job and replace variant SAP&001 (default) with ZDELETESPOOL60.
4. Duplicate the this job, and execute it immediately.

In a typical spool size of 1 GB, it takes about 15 min to cleanup.

Use sm37, sp12 - TemSe data storage, and spad - print request overview - client to monitor the progress

III. Common errors:

If after cleanup and you encounter one of these errors:

B. spool overflow (assume you have not adjust max spool number before)
C. ...no more free spool request numbers...

SAP note 48284 mentioned that change:

1. In Client 000, execute transaction SNRO -Number Range button - Interval. Default numbering range is 100 - 32,000 (which can print up to 31,900 requests)
To do this:
Transaction SNRO > Table SPO_NUM > Number Ranges (button) > Modify > change the max limit to desired number.

2. Define profile parameter rspo/spool_id/max_number up to 2^31
3. Define rspo/spool_id/loopbreak to same value as above. This is optional.

We don't see a need to have more than 31,900. Well if this happens, do the things above.

Indirectly, database table size going to grow to few GB, and indirectly slowing down all print request, as well as unnecessary database size

If custom variant not defined in Client 000, then background job SAP_REORG_SPOOL will shown following error. Create the custom variant in Client 000 to fix it.

* Variant ZPURGE090DAYS does not exist