SAP Program RSDBLOGCONV40 - Conversion of the database log table from 3.X to 4.0

Description
The program RSDBLOGCONV40 converts the database log table in theR/3 System from Release 3.X to Release 4.0A. In this table, with therelevant system settings (see profile parameter rec/client inprofile parameter maintenance), all changes tocustomizing objects are logged on the basis of table changes. Theprecondition for this is that the flag 'Log data changes' is set in thetechnical settings of the tables used as a basis for the customizingobjects.
Before Release 4.0A the log entries were written to the tableDBTABPRT. As of Release 4.0A this table is replaced by the tableDBTABLOG.
The transaction SCU3 (Documentation)is available for accessing the log entries. As of Release 4.0A it isalso based on the new log table.
As of Release 4.0A there is the archiving object BC_DBLOGS viawhich the archiving of the new log table can be triggered inArchive Management (transactionSARA).
Automatic conversion of the contents of the old log table into the newis not intended for the Release upgrade. If required, you can executethe program RSDBLOGCONV40 to make the conversion. The conversionis necessary if access to the contents of the old log table is required,or if the contents of the old log table are to be archived with the newarchiving object BC_DBLOGS for Release 4.0A.

Notes for users
A complete conversion for a large log table can take several hours.Therefore the program should only be executed as a batch operation.During tests in a heavily loaded development system around 250000 logentries may be converted in an hour.
The program has two modes: Conversion of all log entries in the old logtable ("Complete conversion" mode) and conversion of log entriesmade during a certain period of time ("Period conversion" mode).
You can switch between the modes on the program's selection screen. Ifrelevant, the period of time to be converted is also requested.
The processing is done in blocks. This means that a certain number oflog records are converted in every processing step. The block size isdefined on the selection screen. The default value for the block size isset at 1000 log records. Memory problems during the program run may becaused by this value being set too high for the existing systemconfiguration and utilization. In this case the program should berestarted with a lower block size.

Technical notes
Period conversion has the advantage that one section of the log entriescan be converted relatively quickly. Also, one section of the entries inthe old log table can be provided for archiving in the new log table.This step-by-step conversion and archiving can keep the load on the newlog table at a low level. Carrying out the complete conversion in one goshould usually present no problems.
Procedure: Each time the program reads a certain number of logrecords (default block size: 1000, see above) from the old log table,inserts them in the new log table and deletes them from the old. Thisprocedure prevents loss of data in the case of an error.
The default block size results in the following resourcerequirements: A maximum of 1000 entries are held in both log tablesat one time during the program run. A maximum data record size of around0.7 KB in the old log table results in an additional memory requirementin the database of, at most, 700 KB during the running of the program.
After conversion has ended each log entry in the new log table takes uparound 0.1 KB more memory space than in the old log table.
To execute the program you require authorization for the object'S_ADMI_FCD' with value 'CONV'.
Note the following points when converting a table entry:
RESET N1
Field name has changed (Fields: as4date, as4time, vkey, as4user,abapname). In these cases the field contents of an entry in the oldtable can simply be assigned to the relevant field in the new table.
Field type has changed (Field: vdata): This field was a character typein the old table and a raw type in the new table. Make sure that thedata is interpreted correctly when assigning.
Table key was changed (Field: counter): In the old table the uniquenessof log records in the log table was ensured via the field 'counter'. Thefield contains a simple count value. In the new field there is the field'logid' instead of the field 'counter'. This ensures the uniqueness ofthe table key. It is structured as follows:
Millisecond in which the entry was written (6 bytes)
Machine name (8 bytes)
Internal SAP System number (2 bytes)
Work process number (2 bytes)
In total the field is 18 bytes long. During conversion the first sixbytes are used as counters to ensure the uniqueness of a table entry.the other 12 bytes contain the string 'CONV40A SAP '.

Output
The program converts all log entries in the old log table (either all orthose in a certain period of time) into the new log table. All convertedentries are removed from the old table. Therefore, after a completeconversion the old log table is empty at the end of the program.
A report with a summary of all executed actions is also generated. Itinforms you whether a complete or period conversion was made, and aboutthe number of read, converted and deleted log entries. If the processwas problem free then these three values should match. Any differencesare caused by problems when accessing the database. If this is the casecontact your database administrator.