Sales Orders
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 there must always be at least one order line.
The import of open orders is not supported in standard mode.
A sales order is comprised of a header and one or several lines. The main file to set up is always SORDER (order header) as this is the file linked to the SOH object.
In order creation, you thus need to set up two identifiers:
- one for the header file SORDER,
- one for the detail file SORDERQ.
During the import in modification mode, the existence of the main object is acknowledged automatically with the main key that is the order number (SOHNUM). The existence of the detail lines is acknowledged in three ways depending on whether or not the order line number is included in the import template:
- Search with the line number (SOPLIN) 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 and the shipment date if these two fields are set up and entered. 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.
If two lines have the same product reference (and the same shipment date), the line number must be redefined in order to differentiate them. Otherwise, the first line corresponding to the search criteria is always the one to be 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. There must always be at least one line.
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.
When the import impacts a large number of records, the process duration can be quite long.
Implementing solutions to improve performances can reduce the process duration.
These solutions can consist in:
- Implementing a mechanism to disable the management of fields that are not contained in the import template.
For additional information on this mechanism, see section: Import performance improvement.
- Creating the multilegislation records for each legislation of the folder.
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.
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
There are two methods to import kits and BOMs.
- The LINTYP field is not included in the template. In this case, it will be necessary to only import the parent product (as the components are not considered as belonging to the kit or the BOM but they are processed like standard 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 included in the template. In this case, importing 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 texts into the order headers, order footers and order lines. Set this up in the import template using the GIMP global variable (in the template, *71... fields are included).
- The GIMP(71..78) fields are used to import the texts linked to the order 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 order footer.
- The GIMP(91..98) fields are used to import the texts linked to the order lines.
Import of dimension types on the line
See the SOHFL import template.
Import of invoicing elements
The value entered for the invoicing elements can be imported into the different documents using 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 management mode is determined by the PJTNSGDOC - One project by document parameter (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 the header
... on the line
In creation mode
In modification mode
YES
NO
Header = Value of the header import file
Line = Header valueYES
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 messageNO
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 for documents:
Import template with
The project code ...Management of the project code
on the order... in the header
... on the line
In creation mode
In modification mode
YES
NO
Header = Value of the header import file
Line = Header valueHeader = Value of the header import file
Header = Non modified valueYES
YES
Header = Value of the header import file
Line = Value of the line import fileNO
YES
Header = Blank value
Line = Value of the line import fileHeader = 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 mode the price results from the price list search based on the project code of the quote.
- In modification mode, 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.
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.
Import performance improvements
During a standard import, the import process simulates the interactive mode and runs all actions associated with all the enterable fields in the screens of the Orders function. In other words, even the fields that are not contained in the import template are managed, and their associated actions are run. The process duration can be quite long.
In order to improve performances, a mechanism can be implemented to disable the management of fields not contained in the import template, throughout the whole process duration.
This mechanism is based on the use of an entry transaction dedicated to imports and a customized template that is consistent with this transaction.
With this mechanism, the following elements will be impacted:
- The import template
- The object
- The entry transaction
- The window associated with the entry transaction
- The process
To implement this mechanism, you must follow specific steps:
1. Create a template only containing the useful fields.
For example, this template is called SOHIMP. It only includes those fields that cannot be disabled by the entry transaction or that cannot be initialized by another function, such as the Sales site, the Sold-to customer and the Ordered quantity.
2. Create an entry transaction with enterable fields matching the fields of the template.
For example, the IMP transaction.
3. Duplicate the SOH base object.
The duplicated object can be named SOHIMP. In this new object, rename the codes for each of the SOH1 to SOH4 screens, in order to ensure that the codes are consistent with those of the newly created entry transaction.
In our example, the SOH1 screen code must be renamed as WK2IMP1, SOH2 as WK2IMP2, etc.
4. Edit the new template to replace the SOH object code with the new object code, SOHIMP.
5. Edit the window associated with the entry transaction to assign the new object code to this window.
In our example, this is the WOSOHIMP window. Replace the SOH object code with the SOHIMP code.

6. Create the script associated with the new object as follows (in our example, it is the SUBSOHIMP script):
$ACTION
Gosub ACTION From SUBSOH
Return
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 existMessage on the sales site control in the order.
Shipment site does not existMessage on the shipping site control in the order.
XXX Customer record does not existWarning to check the existence of the customer.
Product YYY record does not existWarning to check the existence of the product and the sales-product.
Unit ZZZ record does not existWarning to check the existence and the validity of the unit for the product.
Mandatory QTY fieldControl 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] |
|
BPCUSTMVT [MVC] |
Customer transactions |
BPCUSTOMER [BPC] |
|
BPDLVCUST [BPD] |
|
CPTANALIN [CAL] |
Analytical accounting lines |
FACILITY [FCY] |
|
ITMBPC [ITU] |
|
ITMCATEG [ITG] |
|
ITMFACILIT [ITF] |
|
ITMMASTER [ITM] |
|
ITMMVT [ITV] |
Product-site totals |
ITMSALES [ITS] |
|
ITMWRH [ITW] |
|
PRICSTRUCT [PRS] |
|
SALESREP [REP] |
|
SORDER [SOH] |
|
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] |
|
TABMODELIV [TMD] |
|
TABPRTMOD [TPM] |
|
TABSOHTYP [TSO] |
|
TABUNIT [TUN] |
|
WAREHOUSE [WRH] |