Delete Long Text Logs

Use

To remove undesired logged long text from the logging table DBTABLOG, you can set (or subsequently unset) a deletion flag in transaction S_AUT04. You can then delete the long texts that are flagged for deletion using transaction S_AUT05 or the report S_AUT_DEL.

Prerequisites

Correct indexing of database tables is a key prerequisite for good system performance during the deletion of long text logs. SAP recommends creating one or more indexes for the table DBTABLOG. See also: Note 531923

Procedure

Selection of Long Text Logs to Be Deleted

  1. In Customizing for SAP NetWeaver, choose Start of the navigation pathApplication Server Next navigation step Basis Services Next navigation step Audit Trail Next navigation step Configure Long Text LogsEnd of the navigation path, or invoke transaction S_AUT04 directly.

  2. Select the desired entries in the list and choose the Delete button.

    The system sets the deletion flag. The system writes the current date and time to the columns Date and Time. In this way, you configure the current client to delete from the logging table all long texts that are changed as of this time.

If you want to enter a different time as of which the system is to delete changed long texts from the logging table, proceed as follows:

  1. Choose the Set Time button and enter the desired time.

  2. If you want to define filters for long text logs, choose Adjust Filter.

  3. Choose Continue.

Start deletion

Start the Deletion of Long Texts transaction (S_AUT05).

A dialog box is appears, in which you can start the deletion operation according to one of two methods:

Start Immediately

Deletion starts immediately without any further prompts for information.

Start with Selection

Before deletion, you can make the following settings to improve performance:

  • Delete in the Period From

    If you specify a period for deletion, the program only deletes the long text logs within this period from the log table.

    If you do not enter a start date, the program selects the deletion date from the Customizing settings in S_AUT04 as the start date.

    If the deletion date you enter in transaction S_AUT04 is later than the start date you entered on the selection screen of transaction S_AUT05 or on the selection screen of the deletion report in transaction S_AUT04, the system uses the deletion date from transaction S_AUT04.

    If you do not enter an end date in transaction S_AUT05, the program deletes all long text logs up to the previous day.

    Exception: You have manually specified a start date but not an end date. In this case, the program only deletes the logs on the day specified.

  • Package Size

    In the Package Size parameter, you define the intervals (measured in number of data records) in which changes are permanently saved to the database. After each deleted package, the system displays a success message stating the total number of deleted data records. During background processing, these messages are written to a job log. If the package size is too large, the program may terminate. The optimum value depends on the configuration of your database system; the default value in the system is 1000.

  • Delete in Groups

    In this method, all deletion operations are grouped by text objects if the following conditions are met:

    • All long texts of a text object are to be deleted

    • Start date and time are identical for all the long texts to be deleted for a text object

    This optimization can only achieve its full potential if all the long texts of a text object are flagged for deletion in transaction S_AUT04 and the date and time are configured identically for all these long texts. If not all long texts of a text object are deleted, the date and time should at least be set identically for all the other long texts of a text object that are flagged for deletion.

    You get a restricted log only. With this deletion method, the number of deleted data records can only be displayed at text object level. If you want a detailed log with the number of deleted data records at long text level, you cannot use this deletion method. If the number of deleted data records is partly displayed at long text level with this method, this indicates that the start date and time for the deletion operation are not identical for all long texts of this text object. Check whether it is possible to configure the start date and start time uniformly for this text object in transaction S_AUT04.

  • Optimize Start Date

    If you set this indicator, prior to the deletion operation, the system searches for the oldest data record to be deleted. This date of the oldest data record is then relevant for the deletion of all long texts. Long texts are only deleted as of this date. The settings in transaction S_AUT04 are not changed by this. This optimization achieves its full potential if you carry out the deletion of long texts at regular intervals.

  • Partial Log

    You can use this indicator to request a partial log. If you set this indicator in connection with grouped deletion, you receive a partial log for each group. If you set this indicator in conjunction with ungrouped deletion, you get the partial logs at text ID level.

Background Processing

Long texts should generally be deleted as a background job with report S_AUT_DEL. Note that you use a variant here to indicate which deletion method should be used to improve performance (grouped and/or optimized start date).

SAP also recommends that you execute this background job during a period of low system load. Through regular scheduling of this report as a background job at short intervals, the performance of both the deletion operation and the audit trail evaluation function is considerably improved. It is not possible to give general information on how often this background job should be run. This interval depends on the following:

  • How many entries the system writes to log table DBTABLOG per time unit

  • How often you create and change long texts

Tracking Changes During Deletion of Long Text Logs

If you want to know which changes were made in transaction S_AUT04, use transaction S_AUT10 to carry out an evaluation of the table logs of table AUT_C_DELTTXID.

Reactivating Long Text Logging

To reinclude a long text in the logging table and thus log changes to it, you must reactivate long text logging after deletion of the long texts. Proceed as follows:

  1. In transaction S_AUT04, select the desired list entry and choose Log.

  2. Choose Continue.

    For more information, see Logging Long Texts