Audit: To determine the net result of the audit configuration
No session is available that displays the net result of the
configuration when you convert the configuration to run time. To view the net
result for a specific table or field, you can use the Where Used Audit Tables (ttaud3521m000) and Where Used Audit Table Fields (ttaud3526m000) sessions, although these
sessions do not specify for which companies the tables and fields are audited.
However, you can also view the net result of the configuration as stored in the audit_cols
file, which you can find in the $BSE\lib
directory. The information in this file has this format:
{audit_cols} ::= {line}*
{line} ::= {tables}:{companies}:{audit_type}
{tables} ::= '*'|{package}[{module}[{table}]]
{companies} ::= '*'|{company}[,{company}]*
{company} ::= (0-9)+(0-9)+(0-9)
{audit_type} ::= 'C'|'A':[{field_name}[{field_name}]*]
The code must be read as follows:
The audit_cols
file exists of one or more lines. Each line specifies one or more
tables, one or more companies, and the audit type.
The tables are specified as '*' or as a package code (mandatory), a module code (optional), and a table number (optional). If you specified '*', all tables are selected. If you only specify a package code, all tables in all modules are selected. If you also specify a module code, but no table number, all tables in the module are selected. The company must be specified by a '*', which specifies all companies, or by one or more company numbers.
The audit type is either C or A. Audit type C only logs transactions if a field is changed. Audit type A logs transactions always, that is, if any field in the table is changed. Optionally, you can specify one or more fields. If fields are specified, the audit type only applies to those fields. If no fields are specified, the audit type applies to all fields in the table. Note that fields can only be specified if the line did specify only one table.
Example
tdsls:*:C
tdsls400:500:A:col1,col2
tdsls:*:C
, specifies that these tables must be audited.
- To audit a field means that the old and the new value of the table cell are logged.
- Key fields are always audited, unless they are not specified. You can only choose not to specify key fields if you define the audit type for each field. If you define the audit type for an entire table, key fields are always audited, and you cannot change this setting.
Because the relation between audit type (A or C) and field specification can be confusing, the following tables display the meaning of each combination. Each combination is illustrated by a table with two examples. The abbreviations used are:
- C: Column (not specified)
- K: Keyfield (either mandatory, or optionally specified or not specified)
- R: Record
- A: Audited
- (A): Audited if specified (key field)
- T: Transaction
Possible combinations of audit type and field specification | ||
---|---|---|
Audit Type | All Fields | Specified Fields |
A | 1 | 2 |
C | 3 | 4 |
Example 1: Every table cell in the relevant record is audited if any transaction in the table occurs. |
||||||
---|---|---|---|---|---|---|
Audit Type A, All Fields | K | C | C | C | C | C |
R | A | A T | A | A | A | A |
R | A T | A | A | A | A | A |
Example 2: Only the table cells in the record concerned in the specified columns are audited if any transaction in the table occurs |
||||||
---|---|---|---|---|---|---|
Audit Type A, Specified Fields | K | C | C | S | C | S |
R | (A) | T | A | A | ||
R | (A) | A | A T |
Example 3: Every table cell in every column in the table can be audited, but only the table cell in which a transaction occurs is actually audited. |
||||||
---|---|---|---|---|---|---|
Audit Type C, All Fields | K | C | C | C | C | C |
R | A | A T | ||||
R | A | A T |
Example 4: Only table cells in the specified column can be audited. A table cell is audited if a transaction occurs in a specified column. |
||||||
---|---|---|---|---|---|---|
Audit Type C, Specified Fields | K | C | C | S | C | S |
R | (A) | T | ||||
R | (A) | A T |