Skip to main content

Import ordered materials

Use these steps to define the materials ordered for a group of customers in a given period from a text file instead of entering them one by one. The example imports two materials for the customer classification A in 2026: an obligatory material with quantity 10 and an optional material with quantity 3.

Before you begin​

  • Your licence must include the distribution feature, and you need the Import Ordered Materials permission in Users Management, on the Reports page.
  • The materials and the customer classifications (or the materials templates, customer types or sales channels you will use) must already exist in the file. The import does not create them. The program matches the classification and the template by name, the type and the channel by code or name, and the material by code or name.
  • Prepare the file in UTF-16 (Unicode text), one line per material, with the columns separated by a tab. The file format is explained in The file format. In the example the seven columns are:
Customer classification From To Material code Qty Unit Material type
A 01-01-2026 31-12-2026 P01 10 Piece 0
A 01-01-2026 31-12-2026 P02 3 Piece 1
  • Write the quantity as a whole number: the program cuts fractions. Write the material type 0 for obligatory and any other number, such as 1, for optional.
  • Close the file in any other program that holds it open for writing.

Steps​

  1. Open Distribution > Tools > Distribution Tools > Import Ordered Materials. The welcome page appears. Click Next.
  2. Type the file path, D:\data\ordered.txt, or click Preview... and choose it, then click Next.
  3. Choose Tab, then click Next.
  4. The option Update Existing Ordered Materials is ticked by default. Leave it ticked if you want the program to replace the quantity of a material that is already in the same group, and clear it if you want the program to reject those lines. Then click Next.
  5. Type 2 in Start line to skip the header line. In the first row of the grid choose: Customer Classification for the first column, From for the second, To for the third, Material Code for the fourth, Qty for the fifth, Unit for the sixth, and Material Type for the seventh.
  6. Click Start. If something is missing, a message names the missing field. Correct it and click Start again.
  7. Answer Yes to the question "Are you sure to start?Import Ordered Materials؟". The bar moves, then the result message appears. Click OK.

Result​

A message shows "Imported records:" and "Unimported records:". In the example they are 2 and 0. The program created a group of ordered materials for the customer classification A from 01-01-2026 to 31-12-2026, and added the two materials to it: P01 with quantity 10, obligatory, and P02 with quantity 3, optional. You can see them in the Ordered Materials window.

The program stores the quantity multiplied by the factor of the chosen unit, so it is saved in the first unit. If the unit name in the file does not match any unit of the material, the program uses the first unit. If the group already exists and does not hold the material, the material is added to it. The program does not list the failed lines. If their count is higher than you expect, look for the cause in the table below.

If something goes wrong​

Message or situationWhy it appearsWhat to do
"Must select "From Date" field", "Must select "To Date" field" or "Must select quantity field"You did not choose the column on the last page.Choose the field.
"Must select customer classification, material template, customer type and sales channel"You chose none of these four.Choose at least one of them.
"Must select material code or name" or "Must select either material code or name"You did not choose a column for the material, or you chose the code and the name together.Choose only one of them.
A line was not imported and its quantity is a fraction, such as 0.5The program cuts fractions, so the quantity becomes 0, and a quantity of 0 rejects the line.Write a whole quantity.
A line was not imported although its material and classification existThe code or name in the file does not match the card. The program matches the classification and the template by name only.Correct the value in the file.
A line was not imported and its material is already in the same groupYou did not tick Update Existing Ordered Materials.Tick the option and import again.
The group has no channel or type, and no warning appearedThe program found one of the four values and not the others, so it created the group with the one it found only.Check the names in the file and update the group.
The program used the first unit although you wrote 2The program matches the name of the unit, not its number.Write the unit name as in the material card.
Every line failed, although the grid on the last page shows them correctlyThe file is not UTF-16.Save the file as Unicode (UTF-16).

This page applies to alameen ERP 10, version 10.1.79.764.