Using codes

Codes uniquely identify data in LN. You use the code, instead of the name or description, to specify any type of record. When you create a new record, you must enter the record's code. For example, you must use codes for:

  • Companies
  • Currencies
  • Calendars
  • Items
  • Payment methods
  • Storage conditions
Company number

The company code is always referred to as the company number. Company numbers must be numeric.

Item codes

You create items and enter the item codes in the Items - General (tcibd0501m000) session. Item codes can be up to 50 characters and can include spaces. You can use the long item codes to insert an item description in the item code. In addition, item codes can consist of more than one segment. For details, see Segmented item codes.

You can use the sessions of the Product Classification module to define a classification system for your items.

Note

If the item is a generic item, the following characters are not allowed in the item code:

% ' " ^ \ ! @ # $ & * ( ) | / ; ~ ` ? { } [ ] < >

The reason is that object files that are generated for constraints in the Product Configuration module cannot contain these characters.

Defining codes

It is important that you design a coding system before you create records and enter codes. Once a coding system is in use, it is difficult to change the coding system later.

If you enter a new code, the following rules apply:

  • Codes must be unique per record type. For example, you cannot define two countries that have the same code, but you can define a country and a currency that have the same code.
  • Codes are usually alphanumeric. LN changes lowercase letters to uppercase letters.
  • Codes can include spaces.
  • Most codes can be up to three characters long. Some types of codes can be up to six characters long. Item codes can be up to 50 characters long.
  • Some types of codes must be numeric. If you enter letters for such a record code, LN displays the message: Digit expected. For example, a company code must be numeric.
Using generated codes

For example, LN generates the codes of:

  • Sales orders.
  • Purchase orders.
  • Service contracts.
  • Other order-related documents.

The generated code consists of the series code followed by the first free number in the series. You must assign the number groups to the various document types when you define:

You can also use number groups and series to generate the codes of:

You must specify the number groups for these codes in the COM Parameters (tccom0000s000) session.