#LineItems – The system variable

Use the #LineItems system variable when inserting line item fields into a transaction description. A single #LineItems variable contains the data from the "normal" line item fields on the invoice. (For bank account tables and tax tables, use the name of the table.)

The data is transferred in a single transaction field. The transaction field contains XML tags and data. The transaction field starts and ends with an XML tag that identifies the field as a list of line items. In between the start and end tag are XML tags that mark the start and end of each line item, and the start and end of each line item field value.

The length of this transaction field is variable. The length depends on the line items to be transferred.

Note
This value is never truncated.

The XML tags are:

Object Start tag End tag
List of line items

<LINEITEMS>

</LINEITEMS>

Line item

<LINEITEM>

</LINEITEMS>

Line item field value

<LINEITEMFIELD>

</LINEITEMFIELD>

Example

A list on an invoice looks like this:

Quantity Article No. Description Unit Price Price
5 12345 Screwdriver 3.00 15.00
2 9876543 Hammer 9.00 18.00

Two line item fields are defined for this invoice. L_ArticleNo contains the article number, and L_Ext_Price contains the price.

The approximate content of the #LineItems transaction field is shown below. The exact field content and length depends on the format specification for each line item field. The field is not padded.

<LINEITEMS>

     <LINEITEM>

          <LINEITEMFIELD>12345</LINEITEMFIELD>

          <LINEITEMFIELD>15.00</LINEITEMFIELD>

     </LINEITEM>

     <LINEITEM>

          <LINEITEMFIELD>9876543</LINEITEMFIELD>

          <LINEITEMFIELD>18.00</LINEITEMFIELD>

     </LINEITEM>

</LINEITEMS>