Import/export template >  Module Sales >  Import/export template SOH (Sales Orders)  

Display all Hide all

Use the order import to create orders or to import modifications on an existing order.
You can also delete specific lines without deleting the order itself, if required. This means that at least one order line must exist.
A sales order is made up of a header and one or more lines. The main file to set up is always SORDER (order header) as this is the file linked to the SOH object.

For order creations, you must define two identifiers, one for the SORDER header file and one for the SORDERQ detail file.

During the import of the modification, the existence of the principal object is acknowledged automatically with the principal key that is the order number (SOHNUM). The existence of the detail lines is acknowledged, if actual, in three ways depending on the presence/absence of the order line number in the import template:

  • Search with the line number (SOPLIN) if it is set up and assigned. If the line exists, it is modified otherwise it is created.
  • Search with the product reference and the shipment date if these two fields are set up and entered. If the line exists, it is modified otherwise it is created.
  • Search with the product reference if the field is set up and assigned. If the line exists, it is modified otherwise it is created.

SEEINFO If two lines have the same product reference (and the same shipment date), the line number must be redefined in order to differentiate them. If this is not done, the first line corresponding to the search criteria is always processed.

The order import processes the deletion of a line detail. An order line will be deleted if it is imported with a blank order quantity. An order cannot be completely deleted. At least one line must exist.

During an import, you can also specify if the order line must be closed or not. You must then add the SOQSTA field to the template.

Import of invoicing terms

If an invoicing term is included in the import template on the header or on a line, this term is used to calculate the scheduled invoices of lines related to non deliverable products. This rule only applies to orders of the normal category.

Import of kits and BOMs

Two ways exist to import the kits and BOMs.

  • The LINTYP field is not present 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). The import of the parent product then leads to the automatic generation of all the components defined by the first alternative. The components defined as Option or Variant are also generated for the first option and the first variant.
  • The LINTYP field is present 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 variables.
Import of plain texts

When required, you can import texts into the order header, order footer and order line. Set this up in the import template using the global variable GIMP (in the template *71... fields are included).

  • GIMP(71..78) are used to import the texts linked to the order header. It is possible to import a text of 8*100 characters i.e. 800 characters.
  • GIMP(81..88) are used to import the texts linked to the order footer.
  • GIMP(91..98) are used to import the texts linked to the order lines.
Import of dimension types on the line

To import the dimension types of a document line, it is necessary to add an additional level to enter the common table containing the analytical information on the line (CPTANALIN).
SEEREFERTTO See SOHFL 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).

Project code import and impact on prices and discounts
  • Project code management:

    For documents, single project and multi-project management must be distinguished. This mode of management is determined by the parameter PJTNSGDOC - One project by document (TC chapter, PRP group).

    1/ Single project management of documents :

    Import template with
    The project code ...

    Management of the project code
    on the order

    ... in header

    ... on the line

    In creation

    In modification

    YES

    NO

    Header = Value of the header import file
    Line = Header value

    YES

    YES

    Header = Value of the header import file
    Line = Value of the line import file,
    or header value if the line value is different from the header + information message

    NO

    YES

    Header = Blank value
    Line = Blank value (+ information message if attempt to
    import a not blank project code)

    Header = Non modified value
    Line = Non modified value (+ information message
    if attempt to import a different project code)



    2/ Multi-project management of documents :

    Import template with
    The project code ...

    Management of the project code
    on the order

    ... in header

    ... on the line

    In creation

    In modification

    YES

    NO

    Header = Value of the header import file
    Line = Header value

    Header = Value of the header import file
    Header = Non modified value

    YES

    YES

    Header = Value of the header import file
    Line = Value of the line import file

    NO

    YES

    Header = Blank value
    Line = Value of the line import file

    Header = Non modified value
    Line = Value of the line import file


  • Impact on prices and discounts

    No re-calculation of prices and discounts is carried out on import. However, the behavior can change whether the price is entered or not in the import file:

    1/ The price is not specified on the file:
    - In creation, the price results from the price list search based on the project code of the quote.
    - In modification, the price is not recalculated.

    2/ If the price is specified on the import file: in creation and in modification, the price corresponds to the one of the import file.

Prerequisites

Mandatory fields in the template

The minimum information that must be imported is:

  • Customer code (BPCORD)
  • Product code (ITMREF)
  • Quantity (QTY) If no unit is specified, the sales unit of the product is used by default.
    During imports in modification mode, if the unit is changed, the new unit is not considered and the import quantity in modification mode corresponds to the existing unit of the order line.
    In order to perform an import considering a unit change, you need to start by deleting 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 order import. The main controls are the following:

Sales site does not exist

Message on the sales site control in the order.

Shipment site does not exist

Message on the shipping site control in the order.

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

Tables used

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

Table

Table description

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

ITMCATEG [ITG]

Product category

ITMFACILIT [ITF]

Products-sites

ITMMASTER [ITM]

Products

ITMMVT [ITV]

Product-site totals

ITMSALES [ITS]

Products - sales

ITMWRH [ITW]

Products-warehouses

PRICSTRUCT [PRS]

Price structure (cust/supp)

SALESREP [REP]

Sales rep

SORDER [SOH]

Sales orders - header

SORDERP [SOP]

Sales orders - price

SORDERQ [SOQ]

Sales orders - quantities

SPRICLINK [SPK]

Sales price list search

SPRICLIST [SPL]

Customer price lists

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

TABSOHTYP [TSO]

Order type table

TABUNIT [TUN]

Table of units of measure

WAREHOUSE [WRH]

Warehouses