Import/export template > Module Sales > Import/export template SQH (Quotes) 

The import of quotes can be used to create new quotes or import modifications on a quote that is already in the system. It is possible to delete lines from a quote, if needed, without deleting the quote itself. This means that there must be at least one quote line.

When the import impacts a large number of records, the process duration can be quite long.
Implementing solutions to create multilegislation records for each of the legislation of the folder can reduce the process duration.

Example: The FRA, POR and USA legislations are used in a folder. If the FRA and POR legislations have the same setup, it is recommended to create a record for the FRA legislation and a record for the POR legislation, instead of having a single record for all legislations.
To view more information on the multilegislation performance improvement principle and obtain the list of objects that you can create by legislation, refer to the document:Performance improvement: List of the multilegislation objects..


A quote consists of a header and several lines. The main file to be set up is always the SQUOTE file (quote header) because it is the file linked to the SQH object.

In the import template for quotes, you need to set up two identifiers:

  • One for the SQUOTE header file
  • One for the SQUOTED detail file

During the import in modification mode, the existence of the main object is acknowledged automatically with the main key that corresponds to the quote number (SQHNUM).
The existence of any detail lines is acknowledged in two ways according to the presence or not of the quote line number in the import template:

  • Search with the line number (SQDLIN) if it is set up and assigned: If there is such a line, it is modified, otherwise it is created.
  • Search with the product reference if the field is set up and assigned. If there is such a line, it is modified, otherwise it is created. In this case, it is always the first line of the quote containing this product that will be affected.

The quote import processes the deletion of a line detail. An order line will be deleted if it is imported with a 0 order quantity. An order cannot be completely deleted. There must always be at least one line.

Import of kits and BOMs

There are two methods to import the kits and BOMs.

  • The LINTYP field is not contained in the template. In this case, it will be necessary to import only the parent product (the components not being considered as belonging to the kit or BOM but processed like classic products). Importing the parent product leads to the automatic generation of all the components defined by the first BOM code. The components with the Option or Variant type are also generated for the first option and the first variant.
  • The LINTYP field is contained in the template. In this case, the import of the parent product does not trigger the automatic generation of the components. The component lines must be imported by specifying the value of the corresponding LINTYP. You can thus specify the selected components for kits or BOMs containing options or variants.
Import of plain texts

When required, you can import the texts of the quote header, quote footer and quote line. Set this up in the import template using the GIMP global variable (*71... fields must be indicated in the template).

  • The GIMP(71..78) fields are used to import the texts linked to the quote header. You can thus import a text of 8*100 characters, in other words 800 characters.
  • The GIMP(81..88) fields are used to import the texts linked to the quote footer.
  • The GIMP(91..98) fields are used to import the texts linked to the quote lines.
Import of dimension types on the line

You cannot force an analytical dimension type to a blank value. As a consequence, if analytical dimension fields are defined in the template, but these fields are blank in the import file, the default dimension codes linked to the document will still populate the fields.
To import the dimension types of a document line, you need to add an additional level to enter the common table containing the analytical information on the line (CPTANALIN).
See SQHFL import template.

Import of invoicing elements

The value entered for the invoicing elements can be imported into the different documents through the INVDTAAMT fields. (SQH, SOH, SDH).

Mandatory fields in the template

The minimum information that must be imported is:

  • the customer code (BPCORD),
  • the product code (ITMREF),
  • the quantity (QTY).

If no unit is specified, the sales unit of the product is used by default. Warning, at the time of the import in modification mode, if the unit has been modified, it will not be considered and the import quantity in modification mode will correspond to the existing unit in the quote line. In order to carry out an import taking a change of unit into consideration, it is necessary to first delete the line.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

All the checks carried out by the object in interactive entry are also carried out on quote import. The principal checks being:

Sales site does not exist: Warning to check the sales site for the quote.

Shipment site does not exist: Warning to check the shipment site for the quote.

XXX Customer record does not exist: Warning to check the existence of the customer.

Product YYY record does not exist: Warning to check the existence of the product and the sales-product.

Unit of measure ZZZ record does not exist: Warning to check the existence and the validity of the unit for the product.

Mandatory QTY field: Control message corresponding to the existence of this information at the time of importing the quote.

Tables used

This template can be used in import and export modes. The data is updated in the following tables :

Table

Table description

AOBJBUR [AOA]

Office documents

AOBJBURMOD [AON]

Default documents

BOM [BOH]

Header BOMS

BOMD [BOD]

Detail BOMs

BPADDRESS [BPA]

Addresses

BPARTNER [BPR]

Business partner

BPCUSTMVT [MVC]

Customer transactions

BPCUSTOMER [BPC]

Customers

BPDLVCUST [BPD]

Ship-to customer

CPTANALIN [CAL]

Analytical accounting lines

FACILITY [FCY]

Sites

ITMBPC [ITU]

Customer product

ITMFACILIT [ITF]

Products-sites

ITMMASTER [ITM]

Products

ITMSALES [ITS]

Products - sales

PRICSTRUCT [PRS]

Price structure (cust/supp)

SALESREP [REP]

Sales rep

SALTRS [SLT]

Entered sales transactions

SPRICLINK [SPK]

Sales price list search

SQUOTE [SQH]

Quote header

SQUOTED [SQD]

Quote detail

SVCRFOOT [SVF]

Sales document - footer el.

SVCRVAT [SVV]

Sales document - tax

TABCUR [TCU]

Currency table

TABMODELIV [TMD]

Delivery mode table

TABPRTMOD [TPM]

Print template table

TABSQHTYP [TSQ]

Quote type table

TABUNIT [TUN]

Table of units of measure