<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/onlinemanual/aud_net_result" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Audit: To determine the net result of the audit configuration</Title>
		<Keyword ContextSensitive="No"><Level1>Audit configuration management</Level1>
			<Level2>to determine the net result of the audit configuration</Level2>
		</Keyword>
	</Header>
	<AimSection><Paragraph class="Default">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 <Link href="/baanerp/tt/aud/ttaud3521m000" role="session">Where Used Audit Tables (ttaud3521m000)</Link> and <Link href="/baanerp/tt/aud/ttaud3526m000" role="session">Where Used Audit Table Fields (ttaud3526m000)</Link> 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 <Code>$BSE\lib</Code> directory. This file is easy to read. The information in this file has the following format:</Paragraph>
		<CodeBlock space-and-orientation="indented-estimated">{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}]*]
</CodeBlock>
		<Paragraph class="Default">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.</Paragraph>
	</AimSection>
	<ExampleSection><SectionTitle>
                              Example
                           </SectionTitle>
		<List><ListItemHead><Code>tdsls:*:C</Code>
			</ListItemHead>
			<ListItem>For all tables in this module (tdsls) in all companies (*), all fields are audited (no fields specified), but only if the field is changed (C). Note however, that the fields of the primary key are by default always audited.</ListItem>
			<ListItemHead><Code>tdsls400:500:A:col1,col2</Code>
			</ListItemHead>
			<ListItem>For table tdsls400 in company 500, only col1 and col2 are audited, and they are audited always, that is, for any transaction in this table. The other fields of this table are not audited, unless another line, for example, <Code>tdsls:*:C</Code>, specifies that these tables must be audited.</ListItem>
		</List>
	</ExampleSection>
	<Note><SectionTitle>Notes</SectionTitle>
		<List><ListItem>To audit a field means that the old and the new value of the table cell are logged.</ListItem>
			<ListItem>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.</ListItem>
		</List>
	</Note>
	<GeneralSection><List><ListIntro>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 as follows:</ListIntro>
			<ListItem>C: Column (not specified)</ListItem>
			<ListItem>K: Keyfield (either mandatory, or optionally specified or not specified)</ListItem>
			<ListItem>R: Record</ListItem>
			<ListItem>A: Audited</ListItem>
			<ListItem>(A): Audited if specified (key field)</ListItem>
			<ListItem>T: Transaction</ListItem>
		</List>
		<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><TBODY><TR><TH colspan="3" rowspan="1">Possible combinations of audit type and field specification</TH>
				</TR>
				<TR><TH rowspan="1" colspan="1">Audit Type</TH>
					<TH rowspan="1" colspan="1">All Fields</TH>
					<TH rowspan="1" colspan="1">Specified Fields</TH>
				</TR>
				<TR><TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">1</TD>
					<TD rowspan="1" colspan="1">2</TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">C</TD>
					<TD rowspan="1" colspan="1">3</TD>
					<TD rowspan="1" colspan="1">4</TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><TBODY><TR><TH colspan="7" height="57" rowspan="1">
						<Paragraph class="Default">Example 1: Every table cell in the relevant</Paragraph> <Paragraph class="Default">record is audited if any transaction</Paragraph> <Paragraph class="Default">in the table occurs.</Paragraph>
					</TH>
				</TR>
				<TR><TH rowspan="1" colspan="1">Audit Type A, All Fields</TH>
					<TH rowspan="1" colspan="1">K</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A T</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">A T</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1">A</TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><TBODY><TR><TH colspan="7" rowspan="1">
						<Paragraph class="Default">Example 2: Only the table cells in the record</Paragraph> <Paragraph class="Default">concerned in the specified columns are</Paragraph> <Paragraph class="Default">audited if any transaction in the table occurs</Paragraph>
					</TH>
				</TR>
				<TR><TH rowspan="1" colspan="1">Audit Type A, Specified Fields</TH>
					<TH rowspan="1" colspan="1">K</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">S</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">S</TH>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">(A)</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">T</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">A</TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">(A)</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">A T</TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><TBODY><TR><TH colspan="7" rowspan="1">
						<Paragraph class="Default">Example 3: Every table cell in every column</Paragraph> <Paragraph class="Default">in the table can be audited, but only the table cell</Paragraph> <Paragraph class="Default">in which a transaction occurs is actually audited.</Paragraph>
					</TH>
				</TR>
				<TR><TH rowspan="1" colspan="1">Audit Type C, All Fields</TH>
					<TH rowspan="1" colspan="1">K</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">A T</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">A</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">A T</TD>
					<TD rowspan="1" colspan="1"></TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><TBODY><TR><TH colspan="7" rowspan="1">
						<Paragraph class="Default">Example 4: Only table cells in the specified</Paragraph> <Paragraph class="Default">column can be audited. A table cell is audited</Paragraph> <Paragraph class="Default">if a transaction occurs in a specified column.</Paragraph>
					</TH>
				</TR>
				<TR><TH rowspan="1" colspan="1">Audit Type C, Specified Fields</TH>
					<TH rowspan="1" colspan="1">K</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">S</TH>
					<TH rowspan="1" colspan="1">C</TH>
					<TH rowspan="1" colspan="1">S</TH>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">(A)</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">T</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
				</TR>
				<TR><TD rowspan="1" colspan="1">R</TD>
					<TD rowspan="1" colspan="1">(A)</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1">A T</TD>
					<TD rowspan="1" colspan="1"></TD>
					<TD rowspan="1" colspan="1"></TD>
				</TR>
			</TBODY>
		</TABLE>
	</GeneralSection>
</ManualTopic>
