<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/da/onlinemanual/000001" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Introduction to the Exchange module</Title>
		<Keyword ContextSensitive="No"><Level1>Exchange</Level1>
		</Keyword>
	</Header>
	<GeneralSection><List><ListIntro>The <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module is used to import and export data to and from ERP LN. the <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module is mainly used for:</ListIntro>
			<ListItem>Repetitive data replication for multisite environment</ListItem>
			<ListItem>Repetitive data replication for linking ERP LN software to other software applications</ListItem>
			<ListItem>Data conversions from one version of ERP LN to another</ListItem>
			<ListItem>Data conversions from other software to ERP LN software the <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module controls the data export from ERP LN tables to <Link href="/baanerp/da/glossary/glossary#000001" role="glossary">ASCII files</Link> and vice versa. You can also use the <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module to perform a data export. The changes in the database during the export process read from the audit files and are written to ASCII files. These changes are replayed at the target database during the import process.</ListItem>
		</List>
		<Figure space-and-orientation="indented-estimated"><HTML:IMG height="222" width="463" SRC="../images/tr_graph_000001a.gif" path="/enterpriseserver/add-ons/da/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_000001a.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/add-ons/da/images/tr_graph_000001a.gif" ID="IDAZYV5B" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<List><ListIntro>The <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module has facilities to:</ListIntro>
			<ListItem>Convert data</ListItem>
			<ListItem>Conditionally insert update, and delete data</ListItem>
			<ListItem>Control and monitor the process using log files the <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module is asynchronous and batch-oriented. The data exchange is performed by a batch process, which can be started manually or run based on a schedule that uses ERP LN's job mechanism.</ListItem>
		</List>
		<List><ListIntro>The <GUIRef href="/baanerp/da/xch" role="module">Exchange</GUIRef> module is divided into two major areas:</ListIntro>
			<ListItem>Export of data</ListItem>
			<ListItem>Import of data</ListItem>
		</List>
		<Paragraph class="Default">The Export module is used to create a sequential <Link href="/baanerp/da/glossary/glossary#000001" role="glossary">ASCII files</Link> filled with data from the ERP LN database. The <Link href="/baanerp/da/glossary/glossary#000001" role="glossary">ASCII file</Link> can have its own format, which can be different from ERP LN tables. You can also create the corresponding <Link href="/baanerp/da/glossary/glossary#000007" role="glossary">definition file</Link>. This file can be used to load the data definitions during the <Link href="/baanerp/da/glossary/glossary#000015" role="glossary">import procedure</Link>.</Paragraph>
		<Paragraph class="Default">The Import module is used to read the sequential files created by the Export module or by any other data source. The data from these files is put into ERP LN tables.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><HTML:IMG height="94" width="520" SRC="../images/tr_graph_000001b.gif" path="/enterpriseserver/add-ons/da/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_000001b.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/add-ons/da/images/tr_graph_000001b.gif" ID="IDAKZV5B" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Paragraph class="Default">The principle of an exchange procedure.</Paragraph>
		<Paragraph class="Default">You can define <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange schemes</Link> in the Master Data. Each <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange scheme</Link> has a unique code.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><HTML:IMG height="335" width="584" SRC="../images/tr_graph_000001c.gif" path="/enterpriseserver/add-ons/da/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_000001c.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/add-ons/da/images/tr_graph_000001c.gif" ID="IDA1ZV5B" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<List><ListIntro>The <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange scheme</Link> has two major entities:</ListIntro>
			<ListItem>ASCII files (Data Dump)</ListItem>
			<ListItem>Batches for conversion</ListItem>
		</List>
		<GeneralSection><SectionTitle>ASCII Files</SectionTitle>
			<Paragraph class="Default">ASCII files and ASCII file fields form the first major part of an <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange scheme</Link>. They contain the records that will be exchanged. Every line in that file represents a record. A record can have a fixed field length or a length that is defined with a field separator.</Paragraph>
			<Paragraph class="Default"><Link href="/baanerp/da/glossary/glossary#000009" role="glossary">Conditions</Link> can be used to manipulate the values of the ASCII files fields in the exchange process. They can be specified per <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange scheme</Link>. A condition is maintained using ERP LN 3GL/4GL statements in the text editor. Various functions and variables are provided to simplify the condition text. After the condition is created, its syntax must be checked.</Paragraph>
		</GeneralSection>
		<GeneralSection><SectionTitle>Batches</SectionTitle>
			<Paragraph class="Default">Batches are the entities that contain relationships between ASCII files and ERP LN tables.</Paragraph>
			<Paragraph class="Default">The relationships between the ASCII files and the ERP LN tables are defined in table and field relationships. To import and export alike, you can specify these relationships per batch line.</Paragraph>
		</GeneralSection>
		<GeneralSection><SectionTitle>Import of Data</SectionTitle>
			<Paragraph class="Default">Batches consist of table and field relations. The <Link href="/baanerp/da/glossary/glossary#000032" role="glossary">table relations</Link> for import specify which data of the ASCII file(s) will be transferred to which ERP LN table. A one-to-many relation between ERP LN tables and ASCII files is possible. Each entry forms a line in a batch. Conditions can also be linked to a table relation.</Paragraph>
			<List><ListIntro>Four condition types can be defined:</ListIntro>
				<ListItem>Insert condition</ListItem>
				<ListItem>Overwrite condition</ListItem>
				<ListItem>Update condition</ListItem>
				<ListItem>Delete condition</ListItem>
			</List>
			<Paragraph class="Default">The corresponding action is only carried out if the return value of the conditions linked to the action is true.</Paragraph>
			<Paragraph class="Default">For each relation table you can maintain relations at field level. These relations state which field in the ASCII file must fill a field in the ERP LN table. A condition can also be linked at this level. The output of the condition is the value of the field.</Paragraph>
		</GeneralSection>
		<GeneralSection><SectionTitle>Export of Data</SectionTitle>
			<Paragraph class="Default">In case of an export of data the table relations indicate which data from the ERP LN tables must be transferred to which ASCII files. One ASCII file can import data from only one ERP LN table, but exceptions can be made by using conditions. In that case, you can put data of related tables in the same ASCII file. Each entry forms a table relation for export. Relations on field level can be maintained per table relation. These relations define how each field in the ASCII file must be filled.</Paragraph>
			<Paragraph class="Default">The standard bdbpre program can also be used to create ASCII files, but this can only be done if the structure of the <Link href="/baanerp/da/glossary/glossary#000001" role="glossary">ASCII file</Link> is identical to the data definition of the ERP LN table, and the export is not based on audit.</Paragraph>
		</GeneralSection>
		<GeneralSection><SectionTitle>the Exchange (XCH) module process</SectionTitle>
			<List><ListIntro>After the <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange scheme</Link> is created and the import or export program is generated, the exchange process can be carried out by starting one of the following sessions:</ListIntro>
				<ListItem><GUIRef href="/baanerp/da/xch/daxch0223m000" role="session">Import Data (Non-Regular) (daxch0223m000)</GUIRef>
				</ListItem>
				<ListItem><GUIRef href="/baanerp/da/xch/daxch0224m000" role="session">Import Data (on a Regular Basis) (daxch0224m000)</GUIRef>
				</ListItem>
				<ListItem><GUIRef href="/baanerp/da/xch/daxch0233m000" role="session">Export Data (Non-Regular) (daxch0233m000)</GUIRef>
				</ListItem>
				<ListItem><GUIRef href="/baanerp/da/xch/daxch0234m000" role="session">Export Data (on a Regular Basis) (daxch0234m000)</GUIRef>
				</ListItem>
			</List>
			<Paragraph class="Default">Every exchange scheme code represents a different scheme. For conversion of a standard package, for example an upgrade of ERP LN, one exchange scheme can be provided. A new exchange scheme can be created to customize the exchange to specific needs. It is possible to copy the exchange scheme from one code to another and to modify the other to suit the requirements. By providing the concept of a parent exchange scheme, copying data can be restricted to only those parts that differ from the exchange scheme.</Paragraph>
		</GeneralSection>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000002" role="manual">Introduction to the master data business object</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000003" role="manual">Introduction to the import module</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000004" role="manual">Introduction to the export module</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000005" role="manual">Introduction to multisite control</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000007" role="manual">Introduction to the miscellaneous business object</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000150" role="manual">Import using the Data Access Layer (DAL)</Link>
		</RelTopic>
		<RelTopic><DocRef>Exchange - User`s Guide (U8405 US)</DocRef>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
