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.

Data structure illustration: non-Lawson data import file structure

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

fieldContext

Zero or one.

view

One or more.

fieldContext

Allows overriding values in the file or setting values not present.

A single fieldContext element is allowed.

N/A dataViewSet

One or more of either the following is required:

field

compoundField

fields Required for fieldContext. Container for field elements. N/A

fieldContext

view

One or more of either the following is required:

field

compoundField

field Identifies a data field to import.

id

className

Optional, and valid only for a field within a fieldContext section.

compoundField

fields

N/A
compoundField Identifies an import field built from other fields and/or compound fields. id

compoundField

fields

One or more of either the following is required:

field

compoundField

view

Identifies the start of a business class.

Multiple views are allowed to represent multiple business classes.

action

Optional.

dataViewSet

views

views

One, optional.

One or more of either the following is required:

field

compoundField

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

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 fieldContext element is allowed.

Attributes N/A
Superior element(s) dataViewSet
Subordinant element(s) field

Zero or one allowed.

If no compoundField elements are specified, then one field element is required.

compoundField

Zero or one allowed.

If no field elements are specified, then one compoundField element is required.

Element: fields

Description

Container for field elements.

Required for fieldContext.

Attributes

id

className

Optional, and valid only for a field within a fieldContext section.

Superior element(s) fieldContext
view
Subordinant element(s) field

Zero or one allowed.

If no compoundField elements are specified, then one field element is required.

compoundField

Zero or one allowed.

If no field elements are specified, then one compoundField element is required.

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 elements are specified, then one field element is required.

compoundField

Zero or one allowed.

If no field elements are specified, then one compoundField element is required.

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 elements are specified, then one field element is required.

compoundField

Zero or one allowed.

If no field elements are specified, then one compoundField element is required.

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>
			. . .