Non-Lawson data import file structure
Description
The dataimport
utility accepts a non-Lawson
XML data input file and loads it into the Lawson database. The data
structure of the input file is shown in the following illustration.
Naming conventions and file locations
The file location and name can be anything that you specify.
XML elements
The following table describes each element, its attributes, the element(s) it can belong to (superior element(s)) and the element(s) that can belong to it (subordinate element(s)).
Element | Description | Attributes | Superior element(s) | Subordinate element(s) |
---|---|---|---|---|
dataViewSet
|
dataViewSet is only required
if multiple top level records are present or if a fieldContext element is needed.
|
N/A | N/A |
Zero or one.
One or more. |
fieldContext
|
Allows overriding values in the file or setting values not present. A single |
N/A |
dataViewSet
|
One or more of either the following is required:
|
fields
|
Required for fieldContext . Container for field elements.
|
N/A |
|
One or more of either the following is required:
|
field
|
Identifies a data field to import. |
Optional, and valid only for a field within a |
|
N/A |
compoundField
|
Identifies an import field built from other fields and/or compound fields. |
id
|
|
One or more of either the following is required:
|
view
|
Identifies the start of a business class. Multiple views are allowed to represent multiple business classes. |
Optional. |
|
One, optional. One or more of either the following is required:
|
views
|
Optional. A container for nested business classes are present. There is no limit on the number of nested levels. Keys for the child views will be pulled from the parent and need not be present in the file. |
N/A |
view
|
At least one required; multiple allowed. |
Element: dataViewSet
Description |
dataViewSet is only required if multiple top level records are present or if
a fieldContext element is needed.
|
|
Attributes | N/A | |
Superior element(s) | N/A | |
Subordinant element(s) |
fieldContext
|
Zero or one allowed. |
view
|
One or more allowed. |
Element: fieldContext
Description |
Allows overriding values in the file or setting values not present. A single |
|
Attributes | N/A | |
Superior element(s) |
dataViewSet
|
|
Subordinant element(s) |
field
|
Zero or one allowed. If no |
compoundField
|
Zero or one allowed. If no |
Element: fields
Description |
Container for field elements. Required for |
|
Attributes |
Optional, and
valid only for a field within a |
|
Superior element(s) |
fieldContext
|
|
view
|
||
Subordinant element(s) |
field
|
Zero or one allowed. If no |
compoundField
|
Zero or one allowed. If no |
Element: field
Description | Identifies a data field to import. | |
Attributes |
id
|
|
className
|
Optional, and valid only for a field within
a fieldContext section.
|
|
Superior element(s) |
compoundField
|
|
fields
|
||
Subordinant element(s) | N/A |
Element: compoundField
Description | Identifies an import field built from other fields and/or compound fields. | |
Attributes |
id
|
|
Superior element(s) |
compoundField
|
|
fields
|
||
Subordinant element(s) |
field
|
Zero or one allowed. If no |
compoundField
|
Zero or one allowed. If no |
Element: view
Description |
Identifies the start of a business class. Multiple views are allowed to represent multiple business classes. |
|
Attributes |
action
|
Optional. |
Superior element(s) |
dataViewSet
|
|
views
|
||
Subordinant element(s) |
views
|
One, optional. |
field
|
Zero or one allowed. If no |
|
compoundField
|
Zero or one allowed. If no |
Element: views
Description |
Optional. A container for nested business classes are present. There is no limit on the number of nested levels. Keys for the child views will be pulled from the parent and need not be present in the file. |
|
Attributes | N/A | |
Superior element(s) |
view
|
|
Subordinant element(s) |
view
|
At least one required; multiple allowed. |
Example Import File: <fields> Element for Strategic Sourcing
<fields>
<field id="Company"><![CDATA[1010]]></field>
<field id="SourcingEvent"><![CDATA[79]]></field>
<field id="SourcingEvent_DeleteFlag"><![CDATA[false]]></field>
<field id="Name"><![CDATA[Event 24]]></field>
. . .
<compoundField id="AssetInformation">
<field id="AssetInformation.Asset"><![CDATA[0]]></field>
<field id="AssetInformation.AssetTemplate"><![CDATA[]]></field>
</compoundField>
</fields>
Example Import File: <fields> Element for Contract Management
<fields>
<field id="Company"><![CDATA[1010]]></field>
<field id="Contract"><![CDATA[79]]></field>
<field id="Contract_DeleteFlag"><![CDATA[false]]></field>
<field id="Name"><![CDATA[Contract 1000]]></field>
. . .
<compoundField id="AssetInformation">
<field id="AssetInformation.Asset"><![CDATA[0]]></field>
<field id="AssetInformation.AssetTemplate"><![CDATA[]]></field>
</compoundField>
</fields>
Example Import File: <fieldContext> Element for Strategic Sourcing
<fieldContext>
<!--fieldContext allows overriding values in the file or setting
values not present -->
<fields>
<!--Required if field context. Contains field elements-->
<field id="Company"><![CDATA[1010]]></field>
<!-- This override pertains to all business classes containing
a field with this name -->
<field id="Description" className="com.lawson.apps.ss.
SourcingEventLine">
<![CDATA[Event Line Description]]></field>
<!-- Only for specified business class -->
<field id="SourcingEvent_DeleteFlag"><![CDATA[false]]></field>
<field id="Name"><![CDATA[Event 24]]></field>
. . .
<compoundField id="AssetInformation">
<field id="AssetInformation.Asset"><![CDATA[0]]></field>
<field id="AssetInformation.AssetTemplate"><![CDATA[]]></field>
</compoundField>
</fields>
</fieldContext>
Example Import File: <fieldContext> Element for Contract Management
<fieldContext>
<!--fieldContext allows overriding values in the file or setting
values not present -->
<fields>
<!--Required if field context. Contains field elements-->
<field id="Company"><![CDATA[1010]]></field>
<!-- This override pertains to all business classes containing
a field with this name -->
<field id="Description" className="com.lawson.apps.cm.
ContractLine">
<![CDATA[Contract Line Description]]></field>
<!-- Only for specified business class -->
<field id="Contract_DeleteFlag"><![CDATA[false]]></field>
<field id="Name"><![CDATA[Contract 1000]]></field>
. . .
<compoundField id="AssetInformation">
<field id="AssetInformation.Asset"><![CDATA[0]]></field>
<field id="AssetInformation.AssetTemplate"><![CDATA[]]></field>
</compoundField>
</fields>
</fieldContext>
Example Import File: Nested <view> Elements for Strategic Sourcing
<view className="com.lawson.apps.ss.SourcingEvent" action="CreateDraft">
<!--Start of a business class. Attribute className is required. Attribute action is
optional. See external documentation for more info. -->
<fields>
<field id="Company"><![CDATA[1010]]></field>
<field id="SourcingEvent"><![CDATA[79]]></field>
. . .
</fields>
<views>
<!-- Only needed if nested business classes are present. Note that keys
for the child will be pulled from the parent automatically and need not
be present in the file-->
<view className="com.lawson.apps.ss.SourcingEventLine">
<fields>
<field id="SourcingEventLine_DeleteFlag"><![CDATA[false]]></field>
<field id="Description"><![CDATA[Event Line 1]]></field>
. . .
</fields>
<views> <!-- Nested within nested. Can go infinitely deep -->
<view className="com.lawson.apps.ss.SourcingEventLineDistribution">
<fields>
<field id="DistCompany"><![CDATA[1010]]></field>
<field id="AcctUnit"><![CDATA[111]]></field>
. . .
</fields>
</view>
</views>
</view>
<view className="com.lawson.apps.ss.SourcingEventLine">
<fields>
<field id="SourcingEventLine_DeleteFlag"><![CDATA[false]]></field>
<field id="Description"><![CDATA[Event Line 2]]></field>
. . .
Example Import File: Nested <view> Elements for Contract Management
<view className="com.lawson.apps.cm.Contract" action="CreateDraft">
<!--Start of a business class. Attribute className is required. Attribute action is
optional. See external documentation for more info. -->
<fields>
<field id="Company"><![CDATA[1010]]></field>
<field id="Contract"><![CDATA[79]]></field>
. . .
</fields>
<views>
<!-- Only needed if nested business classes are present. Note that keys
for the child will be pulled from the parent automatically and need not
be present in the file-->
<view className="com.lawson.apps.cm.ContractLine">
<fields>
<field id="ContractLine_DeleteFlag"><![CDATA[false]]></field>
<field id="Description"><![CDATA[Contract Line 1]]></field>
. . .
</fields>
<views> <!-- Nested within nested. Can go infinitely deep -->
<view className="com.lawson.apps.cm.ContractLineDistribution">
<fields>
<field id="DistCompany"><![CDATA[1010]]></field>
<field id="AcctUnit"><![CDATA[111]]></field>
. . .
</fields>
</view>
</views>
</view>
<view className="com.lawson.apps.cm.ContractLine">
<fields>
<field id="ContractLine_DeleteFlag"><![CDATA[false]]></field>
<field id="Description"><![CDATA[Contract Line 2]]></field>
. . .