Log archive feature

Log Archive Feature

The new Log Archive feature provides the user a way to manage the size of the log storage in SAP by giving the ability to archive logs to an offline file in a zip file format. A log deletion function is also provided. Users can select this option from the user REPORTS AND TOOLS menu or by scheduling the feature as a background job scheduled on a regular basis. Users can tell the program to delete or archive logs based on a set of selection criteria based on a designated number of days past. For example, running the report with 45 days would archive log files that are existing in the log table that were created greater than 45 days prior to the current system date. See copy of the selection screen below:
Transaction Code:
/N/IDT/LOG_ARCHIVE
Selection Option
Description
Days of log Records to Retain
The number of days you want to keep in the log, taking all other items in the log earlier than this count into consideration for the process option.
Date Created
The day the log was created. Can use the multi selection option to select a date range or set of ranges. Must select either date created or the number of days to keep but you cannot select both. An error message will occur if both fields are selected.
Document Number
The document number of the log entry.
User Name
User who created the transaction. It is the SAP logon username.
Transaction Code
The transaction code used to create the log (VA01, ME21N, etc.).
Company Code
Company code of the transaction.
Log Level
Ability to narrow down the log based on configured log levels (Debug/Error).
Delete Data
Check box. If checked the records selected will be deleted. If Test Run button is also checked then it will not delete and only display number of logs selected for deletion.
Export Data
Check box. If checked the records selected will be only exported to a zip file on the server selected. If the Test Run button is also selected the export file will not be created but will display the number of logs selected for the export. To delete AND export the log data at the same time, then both boxes must be checked together. The export data check box selected by itself, will not remove the logs from the log file.
Test Run
Test run check box will run the selection and tell you how many logs were selected based on the other criteria. However, it will block the delete and the export data box selections if they are checked.
Application Server Path
The file path on your application server that you want to store the export file.
Presentation Server Path
The file path on your presentation server that you want to store the export file. Use either the application server or the presentation server but you cannot choose both. Jobs run in background must use the application server path.
Package Size
The number of logs you want to bundle into one zip file for export.
The user has the option to delete the selected log records, export them to a zip file, or to export a zip file and delete the records at the same time. If exporting to zip, then the application/local server path becomes a required field. A user can also specify the option of package size desired for the export data to break the zipped file in to manageable parcels. If more records were selected than the package size the system will split the logs into several zip files that contain the number of logs requested in the package size. A second level zip file labeled DataFile-1, DataFile-2, etc. will be created as needed by the package size.
Make your selection criteria selections and run the report first in test mode. A report will come up in foreground mode showing you the number of logs that were selected for the delete or archive. You can then take the Test Run button off to then reprocess and update the file.
With this transaction code the process can be scheduled to be run in background as a regularly scheduled job. The test run button would not be used on this option and the job will immediately update the log files per the request.
Logs that are sent to a log archive server location will be saved in a zip file format. The zip file will contain the number of logs selected or the package size (whichever is less) and at the end of the zip will be an excel worksheet that can be used as a log list or index. It will show the log numbers that were stored on the zip and other information on the log data.
Example of multiple packages within the archive zip file.
Example of the zip data file including the logs plus the Excel format index.
Example of the Excel index of the logs that were archived.