<?xml version="1.0" encoding="utf-8"?>
<Session ID="/baanerp/tt/adv/ttadv7111m000" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Tables (ttadv7111m000)</Title>
	</Header>
	<HelpTopic xml:lang="en"><AimSection><Paragraph class="Default">
                                 Use this session to define which <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">tables</Link> are related to a <Link href="/baanerp/tt/glossary/glossary#100032" role="glossary">business object</Link> or to a business object component.</Paragraph>
			<Paragraph class="Default">Only use this session for business objects/components that are <GUIRef href="/baanerp/tt/adv/ttadv7117s000#ttadv717.zb_dafs" role="manual">Based on</GUIRef> "DAL 2/Table". Do <Emphasis>not</Emphasis> define tables for business objects/components that are based on "FS/Session".</Paragraph>
		</AimSection>
		<GeneralSection><List><ListIntro>The tables you define serve several purposes.</ListIntro>
				<ListItem>The root table contains the primary key of the business object or component.</ListItem>
				<ListItem>The reference table stores references from an external application to the current business object. A business object instance for which references exist cannot be deleted.</ListItem>
				<ListItem>The other tables are tables that store data of the business object and refer to the root table.</ListItem>
			</List>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<List><ListItem>If a business object contains components, the tables must be defined in the components.</ListItem>
					<ListItem>You can select tables that do not occur in the package and module of the business object.</ListItem>
					<ListItem>You must define one root table per business object or component.</ListItem>
					<ListItem>You can define only one reference table per business object or component.</ListItem>
					<ListItem>If you do not define a reference table, it will not be possible to generate standard methods to update or delete external references.</ListItem>
					<ListItem>For a reference table, you can enter a table definition code that does not yet exist. The table definition for reference tables is fully standardized. Therefore, you can generate this table definition when you convert the <Link href="/baanerp/tt/glossary/glossary#100204" role="glossary">BOR</Link> model to run time through the <GUIRef href="/baanerp/tl/bct/tlbct1210m000" role="session">Convert BOR to Runtime (tlbct1210m000)</GUIRef> session.</ListItem>
					<ListItem>It is not allowed to change the table definition for reference tables manually.</ListItem>
				</List>
			</Note>
		</GeneralSection>
		<GeneralSection><SectionTitle>Reference Tables</SectionTitle>
			<Paragraph class="Default">Several protected attributes are required to operate on reference tables.</Paragraph>
			<List><ListIntro>To operate on reference tables, the following conditions must be met:</ListIntro>
				<ListItem>The following standard methods must exist: <List><ListItem>CreateRef</ListItem>
						<ListItem>DeleteRef</ListItem>
					</List>
				</ListItem>
				<ListItem>These methods require the following attributes: <List><ListItem>The identifying attributes of the business object or business object component.</ListItem>
					</List>
				</ListItem>
				<ListItem>These methods and attributes must exist both in the public and the protected layer of the business object or business object component.</ListItem>
			</List>
		</GeneralSection>
		<GeneralSection><SectionTitle>Reference Tables</SectionTitle>
			<Paragraph class="Default">To operate on reference tables, the following standard methods exist. ERP LN can generate these methods, or else you can define them with the specified properties.</Paragraph>
			<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><CAPTION>Properties of standard methods that operate on reference tables</CAPTION>
				<THEAD><TR><TD rowspan="1" colspan="1">Method</TD>
						<TD rowspan="1" colspan="1">Required Arguments</TD>
						<TD rowspan="1" colspan="1">Input/Output</TD>
						<TD rowspan="1" colspan="1">Mandatory</TD>
					</TR>
				</THEAD>
				<TBODY><TR><TD rowspan="1" colspan="1">CreateRef</TD>
						<TD rowspan="1" colspan="1">
							<List><ListItem>All arguments that are mapped to the identifying attributes of the business object or component.</ListItem>
							</List>
						</TD>
						<TD rowspan="1" colspan="1">Input</TD>
						<TD rowspan="1" colspan="1">All arguments are mandatory.</TD>
					</TR>
					<TR><TD rowspan="1" colspan="1">DeleteRef</TD>
						<TD rowspan="1" colspan="1">
							<List><ListItem>All arguments that are mapped to the identifying attributes of the business object or component.</ListItem>
							</List>
						</TD>
						<TD rowspan="1" colspan="1">Input</TD>
						<TD rowspan="1" colspan="1">All arguments are mandatory.</TD>
					</TR>
				</TBODY>
			</TABLE>
		</GeneralSection>
		<RelatedTopics><SectionTitle>
                                 Related topics
                              </SectionTitle>
			<RelTopic><Link href="/baanerp/tt/onlinemanual/100107" role="manual">To Model a Business Object</Link>
			</RelTopic>
		</RelatedTopics>
	</HelpTopic>
	<Fields><FieldHelp ID="ttadv711.tmai"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Root Table</Title>
			</Header>
			<FuncDesc>
                                 If this check box is selected, the table is a root <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">table</Link>.</FuncDesc>
			<SimpleSection><Paragraph class="Default">It is mandatory to define a root table for each <Link href="/baanerp/tt/glossary/glossary#100032" role="glossary">business object</Link> or component.</Paragraph>
				<List><ListIntro>The root table has the following characteristics:</ListIntro>
					<ListItem>It contains the primary key of the business object.</ListItem>
					<ListItem>The other tables contain references to this table.</ListItem>
				</List>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv711.tref"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Ref. Table</Title>
			</Header>
			<FuncDesc>
                                 If this check box is selected, the <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">table</Link> is a reference table.</FuncDesc>
			<SimpleSection><Paragraph class="Default">The reference table stores references to business objects instances. A business object instance for which references exist cannot be deleted.</Paragraph>
				<Paragraph class="Default">You can define only one reference table per business object or component. If you do not define a reference table, it will not be possible to generate standard methods to update or delete external references.</Paragraph>
				<Paragraph class="Default">For a reference table, you can enter a table definition code that does not yet exist. The table definition for reference tables is fully standardized. Therefore, you can generate this table definition when you convert the <Link href="/baanerp/tt/glossary/glossary#100204" role="glossary">BOR</Link> model to run time through the <GUIRef href="/baanerp/tl/bct/tlbct1210m000" role="session">Convert BOR to Runtime (tlbct1210m000)</GUIRef> session. It is not allowed to change the table definition for reference tables manually.</Paragraph>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="ttadv711.tpac"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Table</Title>
			</Header>
			<FuncDesc>The <Link href="/baanerp/tt/glossary/glossary#000000000000008" role="glossary">package</Link> code of the <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">table</Link>.</FuncDesc>
		</FieldHelp>
		<FieldHelp ID="ttadv711.tmod"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Table</Title>
			</Header>
			<FuncDesc>The <Link href="/baanerp/tt/glossary/glossary#100004" role="glossary">module</Link> code of the <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">table</Link>.</FuncDesc>
		</FieldHelp>
		<FieldHelp ID="ttadv711.flno"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Table</Title>
			</Header>
			<FuncDesc>The three-digit code of the <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">table</Link>.</FuncDesc>
		</FieldHelp>
		<FieldHelp ID="flno.desc"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Description</Title>
			</Header>
			<FuncDesc>The description of the <Link href="/baanerp/tt/glossary/glossary#table.tt" role="glossary">table</Link>.</FuncDesc>
		</FieldHelp>
	</Fields>
	<FormCommands><CommandHelp ID="generate.protected.attr"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Generate Protected Attributes</Title>
			</Header>
			<FuncDesc>This command automatically generates all possible protected attributes, based on the table definitions for the business object/component in the current session. Per table field, a corresponding protected attribute is generated. The <Link href="/baanerp/tt/domains/adv.mope" role="domain">Map Operator for protected attributes</Link> for these protected attributes is <GUIRef href="" role="manual">Table Field</GUIRef>.</FuncDesc>
			<SimpleSection><Paragraph class="Default">After the attributes are generated, you can delete the attributes that are not required. You can also manually add extra attributes, whose Map Operator is <GUIRef href="" role="manual">Calculate</GUIRef> or <GUIRef href="" role="manual">Not Applicable</GUIRef>, that are not directly related to table fields.</Paragraph>
				<Paragraph class="Default">Note that the generated attributes may require manual correction, for example with respect to their names.</Paragraph>
			</SimpleSection>
		</CommandHelp>
		<CommandHelp ID="gen.public.attributes"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Generate Public Attributes</Title>
			</Header>
			<FuncDesc>This command automatically generates all possible public attributes, based on the protected attributes of the business object/component in the current session. For each protected attribute, a corresponding public attribute is generated. The <Link href="/baanerp/tt/domains/adv.moap" role="domain">Map operator for public attributes</Link> for these public attributes is <GUIRef href="" role="manual">Protected Attribute</GUIRef>.</FuncDesc>
			<SimpleSection><Paragraph class="Default">After the attributes are generated, you can delete the attributes that are not required. You can also manually add extra public attributes, whose Map operator is <GUIRef href="" role="manual">Calculate</GUIRef> or <GUIRef href="" role="manual">Not Applicable</GUIRef>, that are not mapped to protected attributes.</Paragraph>
				<Paragraph class="Default">Note that the generated attributes may require manual correction, for example with respect to their names.</Paragraph>
			</SimpleSection>
		</CommandHelp>
		<CommandHelp ID="ttadv7134m000"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Business Object Component Table Relations</Title>
			</Header>
			<FuncDesc>Click this command to zoom to the <Link href="/baanerp/tt/adv/ttadv7134m000" role="session">Business Object Component Table Relations (ttadv7134m000)</Link> session, where you can specify restrictions to the link between a root table and the <Link href="/baanerp/tt/glossary/glossary#100032" role="glossary">business object</Link> or component.</FuncDesc>
		</CommandHelp>
	</FormCommands>
</Session>
