Design and Structure of XML File

This document explains the design and structure of the XML file. Two different standards are available depending on the format selected in 'XML Structure. Open' (CMS006).

Common standards are used for all formats.

Data type Decimal

Data with Data type Decimal are included in the XML according to these rules:

Metadata for how a decimal field should be formatted is included in the section Localization.

<DecimalFormat>,</DecimalFormat>
<ThousandSeparator>.<ThousandSeparator>
<Locale>en-GB<Locale>

We recommend that you use the locale settings for formatting of decimals.

Debit/Credit code

Whether Debit/Credit code should be used is indicated in Element DebitCreditCodeUsed (true/false), section DocumentInformation.

<DocumentInformation>
<DebitCreditCodeUsed>true</DebitCreditCodeUsed>

Currency amount fields that should use Debit/Credit code has an additional attribute "D-C" including the Debit/Credit code sign.

<VFORTO D-C="D">68325.00</VFORTO>
<VFTOPY D-C="D">68325.00</VFTOPY>

Data type date

Data with data type date are included in this format: YYYY-MM-DD.

XML example without relation to time zone:

<UHIVDT>2016-03-21</UHIVDT>

XML example with relation to time zone:

If the date has a relation to a time zone is the offset from the UTC time added as positive or negative value behind the date. There is no need to use the UTC time offset when using the date on a document, it is only used if the date need to be converted to UTC time.

<UHIVDT>2016-03-21+5:00</UHIVDT>

Metadata for how a date field should be formatted is included in section localization:

<DateFormat>YYMMDD</DateFormat>
<DateEditing>/<DateEditing>
<Locale>en-GB<Locale>

We also recommend that you use the locale settings for formatting of dates.

Data type time

Data with data type time are included in the format hh:mm:ss

XML example without relation to time zone:

14:05:23
<UHTIID>14:05:23</UHTIID>

XML example with relation to time zone:

If the date has a relation to a time zone is the offset from the UTC time added as positive or negative value behind the time. There is no need to use the UTC time offset when using the time on a document, it is only used if the time need to be converted to UTC time.

<UHTIID>14:05:23+5:00</UHTIID>

Formatting

Formatting is a section with metadata to help an external output management application for layout design.

<Formatting>
<M3StandardFormatVersion>1</M3StandardFormatVersion>
<ReportLayout>M3_STD_03-01</ReportLayout>
<Structure>M3_STD_03-01</Structure>
<PaperSize>A4</PaperSize>
<Localization>
<DocumentDivision>AAA</DocumentDivision>
<CountryVersion>GB</CountryVersion>
<BaseCountry>GB</BaseCountry>
<FromToCountry>GB</FromToCountry>
<DocumentLanguage>GB</DocumentLanguage>
<Locale>en-GB</Locale>
<DateFormat>YYMMDD</DateFormat>
<DecimalFormat>,</DecimalFormat>
<ThousandSeparator>.</ThousandSeparator>
/Localization>
<DocumentInformation>
</Formatting

Format 1 – M3 standard document and 3 - Open

These are the most important standards for Format 1- M3 standard document:

For format 3 – Open, the sections Cover, Formatting or Media can be deactivated on (CMS025/E). Section Cover can be deactivated for both formats 1 and 2 on (CMS025/E).

DocumentHeader

DocumentHeader is information that is common for the Document. Within the Document is the Address section placed.

XML example with one address:

<DocumentHeader Label="Document header">
<UIIVNO Label="Invoice no">201401561</UIIVNO>
<OAORNO Label="CO no">1000025077</OAORNO>
<OAWHLO Label="Warehouse">110</OAWHLO>
<Address Label="Delivery Address Type="Delivery"> 
</DocumentHeader>

XML example with two addresses:

<DocumentHeader Label="Document header">
<UIIVNO Label="Invoice no">201401561</UIIVNO>
<OAORNO Label="CO no">1000025077</OAORNO>
<OAWHLO Label="Warehouse">110</OAWHLO>
<Address Label="Delivery Address Type="Delivery"> 
<Address Label="Payer Address Type="Payer">
</DocumentHeader>

Addresses are separated by types. The type is included as an attribute and can have these values:

Type Description
Delivery Delivery address
Customer Customer address
Payer Payer address
Invoice Invoice address
Supplier Supplier address
Payee Payee address
Company Company address
Location Location address
Quotation Quotation address
Bank Bank address

These elements are always included in an Address section:

XML example with one address:

<Address Label="Delivery Address Type="Delivery">
<VFCUNM>Infor company</ VFCUNM >
<VFADR1>Utterstreet</VFADR1>
<VFADR2>Number 4</VFADR2>
<VFADR3>187 Taby</VFADR3>
<VFADR4>Sweden</VFADR4>
</Address>

XML example with two addresses:

<Address Label="Delivery Address Type="Delivery">
<VFCUNM>Infor company</ VFCUNM>
<VFADR1>Utterstreet</VFADR1>
<VFADR2>Number 4</VFADR2>
<VFADR3>187 Taby</VFADR3>
<VFADR4>Sweden</VFADR4>
 </Address>
<Address Label="Payer Address Type="Payer">
<VFCUNM>Infor Sweden AB</ VFCUNM >
<VFADR1>Borgarfjordsgatan 9</VFADR1>
<VFADR2></VFADR2>
<VFADR3>164 40 Kista</VFADR3>
<VFADR4>Sweden</VFADR4>
 </Address

Text block is separated by types. The type is included as an attribute and can have these values:

Type Subtype
ExemptionText  
DocumentText PreText or PostText
CustomerText PreText or PostText
OrderText PreText or PostText
OrderLineText PreText or PostText
ItemText PreText or PostText
CoreTerms  
ConfigText  
AssignmentText PreText or PostText
AgreementText PreText or PostText
GeneralText  
AttributeText  
FinReasonText  

XML example with one text block:

<TextBlock Label="Document text" Type="DocumentText" SubType="PreText">
<BD-3>asldfjasljfalsjfaslfdj</BD-3>
<BD-3>hhdftdgsdfsfsfs</BD-3>
<BD-3>sdwe63gdfg34te</BD-3>
<BD-3>xxrwrwtey567</BD-3>
……
</TextBlock>

XML example with two text blocks:

<TextBlock Label="Document text" Type="DocumentText" SubType="PreText">
<BD-3>asldfjasljfalsjfaslfdj</BD-3>
<BD-3>hhdftdgsdfsfsfs</BD-3>
<BD-3>sdwe63gdfg34te</BD-3>
<BD-3>xxrwrwtey567</BD-3>
……
</TextBlock>
<TextBlock Label="Order text" Type="OrderText" SubType="PreText">
< BD-3>ddddfafj</BD-3>
< BD-3>dddddddddsss</BD-3>
< BD-3>4353333333</BD-3>
</TextBlock>

Line is repeating and grouped by lines.

Labels are only included once before any Line section.

In many cases, subtotal values (SublineValues) are included at the break of key fields and are used for sorting.

XML example with no subtotal values (Most simple example with only a list of one or many lines):

<Lines Label="Lines">
<UBPONR Label="Line"/>
<UBITNO Label="Item number"/>
<Line>
<UBPONR>1</UBPONR>
<UBITNO>MB_101</UBITNO>
</Line>
<Line>
<UBPONR>2</UBPONR>
<UBITNO>MB_202</UBITNO>
</Line>
<Line>
<UBPONR>3</UBPONR>
<UBITNO>MB_303</UBITNO>
</Line>
</Lines>

XML example with subtotal values (Example with subtotal values (SublineValues) included):

<Lines Label="Lines">
<UBPONR Label="Line"/>
<UBITNO Label="Item number"/>
	<Line>
<UBPONR>1</UBPONR>
<UBITNO>MB_101</UBITNO>
</Line>
<Line>
<UBPONR>2</UBPONR>
<UBITNO>MB_202</UBITNO>
		<SublineValues>
<Element 1/>
<Element 2/>
		</SublineValues>
<Line>
<UBPONR>3</UBPONR>
<UBITNO>MB_303</UBITNO>
</Line>
<Line>
<UBPONR>4</UBPONR>
<UBITNO>MB_404</UBITNO>
		<SublineValues>
<Element 1/>
<Element 2/>
		</SublineValues>
</Line>
</Lines>

XML example with sorting by address:

If lines are grouped by any other reason than subtotals, subline must also be used. Below are the lines sorted by address. Address information is then included per subline.

<Lines Label="Lines">
<UBPONR Label="Line"/>
<UBITNO Label="Item number"/>
	<Subline>
<Address Label="Delivery Address Type="Delivery">
	<Line>
<UBPONR>3</UBPONR>
<UBITNO>MB_303</UBITNO>
</Line>
</Subline>
	<Subline>
<Address Label="Delivery Address Type="Delivery">
<Line>
<UBPONR>4</UBPONR>
<UBITNO>MB_404</UBITNO>
</Line>
	<Line>
<UBPONR>5</UBPONR>
<UBITNO>MB_505</UBITNO>
</Line>
	</Subline>
</Lines>

XML example with Pre and Post text:

If Pre and Post text is used for the line, they should be placed within the line.

<Lines Label="Lines">
<UBPONR Label="Line"/>
<UBITNO Label="Item number"/>
<Line>
<UBPONR>3</UBPONR>
<UBITNO>MB_303</UBITNO>
<TextBlock Label="Item text" Type="ItemText" SubType="PreText">
<TextBlock Label="Item text" Type="ItemText" SubType="PostText">
</Line>
</Lines>

HeadCharges

XML example with one charge:

<HeadCharges>
<USCRD0 Label="Description"/>
<USCRID Label="Charge"/>
<VFCHAM Label="Charge amount"/>
<VFVTCD Label="Vcd"/>
<Charge Label="Charge">
<USCRD0>Monica's Head charge_VATcd01</USCRD0>
<USCRID>MBHC1</USCRID>
<VFCHAM>200.00</VFCHAM>
<VFVTCD>1</VFVTCD>
</Charge>
</HeadCharges>

XML example with two charges:

<HeadCharges>
<USCRD0 Label="Description"/>
<USCRID Label="Charge"/>
<VFCHAM Label="Charge amount"/>
<VFVTCD Label="Vcd"/>
<Charge Label="Charge">
<USCRD0>Monica's Head charge_VATcd01</USCRD0>
<USCRID>MBHC1</USCRID>
<VFCHAM>200.00</VFCHAM>
<VFVTCD>1</VFVTCD>
</Charge>
<Charge Label="Charge">
<USCRD0>Monica's Head charge_VATcd03</USCRD0>
<USCRID>MBHC3</USCRID>
<VFCHAM>400.00</VFCHAM>
<VFVTCD>1</VFVTCD>
</Charge>
</HeadCharges>

DocumentTotal

Additional labels

Example 1

Text "***PRELIMINARY***" included in the DocumentHead

<DocumentHead Label="Document header">
<VFPREL Label="Preliminary">true</VFRELI>
…..
</DocumentHead>
<DocumentTotal Label="Document total">
<VFPLAC Label="Place">true</VFPLAC>
<VFDATE Label="Date">true</VFDATE>
<VFSIGN Label="Signature">true</VFSIGN>
…..
</DocumentTotal>

Example 2

Signature line with "Place", "Date" and "Signature" in DocumentTotal:

Place Date Signature

XML example

<DocumentTotal Label="Document total">
<VFPLAC Label="Place">true</VFPLAC>
<VFDATE Label="Date">true</VFDATE>
<VFSIGN Label="Signature">true</VFSIGN>
…..
</DocumentTotal>

Format 2 - M3 standard report

These are the most important standards for Format 2 - M3 standard report:

M3OutReport

<M3OutReport>
	<Metadata> 
	<DataArea> 
		<Report>
<Report>
<Report>
</DataArea>
</M3OutReport>

Report

<Report>
<Cover>
<Formatting>
<Header>
<Subreport>
<Media>
</Report>

Section Cover to be deactivated on (CMS025/E).

Subreport

<Subreport>
<TableInformation Type="xx">
<TableInformation Type="yy">
<TableInformation Type="zz">
<Table Type="xx"
</Subreport>

Free fields

Additional fields called 'Free fields' are defined in 'XML Structure. Open' (CMS006/H). Free fields enable you to build a search query for a layout in IDM Output Management. These fields are also used to set the attribute values in IDM.

Selection of free fields

To set free fields in (CMS006/H), you must first set up values in 'Document Type. Open' (MNS060/E).

These are the free fields defined on (MNS060/E):

Selected attribute value (60-69) on (MNS060/E) should correspond to the free fields on (CMS006/H).

Related topics