The Line Item tab under Documents is where you define one or more joined SQL statements and the fields that make up the document's line items. The Line Items tab is visible for the Document Types of Order and Shipment. Line items are fields that occur once per line item on an order, invoice, or return, for example, and contain fields related to line items. These may be item number, item description, order quantity, unit of measure, and so on.
Enter one or more SQL statements in order to retrieve the Line Item fields. One of these must be the Key Provider, which is run first and determines the number of rows returned. The SQL statements on the Line Item tab can use the following input parameters :
For each SQL statement, add fields to retrieve, so that they are available to be used by other Line Item queries, and mapped by default or by the user to StarShip fields.
Line Item queries may return more than one row, so you need to provide an explicit join to the Key Provider query or another joined query when adding additional SQL statements. You may find it easier and faster to perform the join within the Key Provider SQL statement.
See Joins for more information.
The SQL Interface requires that line items have an sequence associated with them from 1 to the number of line items. If no value is specified, the SQL Interface will assign the line item number according to the order in which SQL statement returns the items. If the results table includes a field that represents the line sequence, you can select that field from the drop-down list instead.