powered by CADENAS

Manual

Manual

5.8.7.1.1.3. ERP Number Generator

The ERP Number Generator gives you the opportunity to set ERP numbers after a freely configurable key (prefix - number - postfix) - also possible for different catalogs, directories or projects.[94]

5.8.7.1.1.3.1. Prerequisites

The following prerequisites must be met in order to use the ERP Number Generator:

  • The CNSSEQ table must be set in the LinkDB.

    You can use the corresponding command lines in the following section to apply the table.

  • In the erpcustom.cfg configuration file the ERP Number Generator must be activated.

5.8.7.1.1.3.1.1. SQL commands for applying the "Sequencer" table in the LinkDB

Make sure your PARTsolutions version contains the "Sequencer" table "CNSSEQ". If needed, use the following corresponding command lines.

  • MSSQL

    CREATE TABLE CNSSEQ (
      TOPIC VARCHAR(50) NOT NULL,
      PREFIX VARCHAR(50) NOT NULL,
      COUNTER INTEGER NOT NULL,
    PRIMARY KEY(TOPIC,PREFIX,COUNTER)
    );
    grant all on dbo.CNSSEQ to public;

  • MySQL

    CREATE TABLE CNSSEQ (
      TOPIC VARCHAR(50) NOT NULL,
      PREFIX VARCHAR(50) NOT NULL,
      COUNTER INTEGER NOT NULL,
    PRIMARY KEY(TOPIC,PREFIX,COUNTER)
    );
    grant all on dbo.CNSSEQ to public;

  • Oracle

    CREATE TABLE CNSSEQ (
      TOPIC VARCHAR(50) NOT NULL,
      PREFIX VARCHAR(50) NOT NULL,
      COUNTER INTEGER NOT NULL,
      PRIMARY KEY(TOPIC,PREFIX,COUNTER)
    );
    CREATE PUBLIC SYNONYM CNSSEQ FOR SYSTEM.CNSSEQ;
    GRANT ALL ON CNSSEQ

5.8.7.1.1.3.1.1.1.  CNSSEQ Table

In the LinkDB, the respectively next counter for the generation is saved in the "CNSSEQ" table.

If needed, as many counter names (GEN1, GEN2,...) as possible may be used in order to differentiate between the counters in the LínkDB.

5.8.7.1.1.3.1.2. Activating ERP Number Generator

Before you can use the ERP Number Generator you must make the appropriate settings in PARTadmin.

In PARTadmin, under CADENAS_SETUP open the configuration file erpcustom.cfg in the dialog area Category.

Set the settings as follows:

  • TIMESTAMPNR=0

  • ERPNR_ENABLED=0 (Activate the key - if needed - per right-click on the key name)

  • erp_nrgenerator (Activate the key per right-click on the key name)

Save changes.

Now both keys ERP_NRGENERATOR and ERP_NRGENERATOR_CONDITIONS are used.

With both these keys you define the pattern after which the ERP numbers are to be generated.

5.8.7.1.1.3.2.  Incorporate ERP number into the PARTdataManager

Choose a part which does not yet have a number.

Click on Add dataset to link database .

Choose the Material.

Please note: The entry field ERPNo is deactivated since the ERP number is automatically generated.

Click on OK.

The number is inserted into the LinkDB according to the defined key and displayed in the attribute table.

5.8.7.1.1.3.3.  Further number generations based on the example of the default setting

The numbers are set consecutively, independent of settings for special catalogs or directories.

Prefix and postfix are set specifically according to the setting in PARTadmin in the configuration file erpcustom.cfg.

Standard part: Number 00000, 00001, 00002, 00005

Standard part: Number 00000, 00001, 00002, 00005

Supplier catalog part: 00003, 00004

Supplier catalog part: 00003, 00004

The parts with counters 00000, 00001 and 00002 were set consecutively in the standard parts catalog.

Afterwards, the counters 00003 and 00004 were set in the supplier catalog.

Then the counter 00005 is again inserted into the standard parts catalog.

5.8.7.1.1.3.4. Adjust conditions for number generation

The following figure shows the default setting.

The ERP_NRGENERATOR key, defines the generator names with the special generating pattern. You can attach as many variables as needed.

  • GENERATOR_1

  • GENERATOR_2

  • etc.

The EPR_NRGENERATOR_CONDITIONS key defines the related catalog, directory and project path for every generator.

ERP_NRGENERATOR

The following table shows the syntax for the entry of the generating pattern and explains the meaning of the individual values.

Separators between individual values are colons.

In the standard environment two generating patterns (GENERATOR_1 and GENERATOR_2) are defined.

Example value for GENERATOR_1: STD:0:0:5:-std:GEN1

Example value for GENERATOR_2: CAT:0:100:5:-cat:GEN1

Key name Prefix Minimum Maximum Place number Postfix Counter name

GENERATOR_1

STD 0 0 5 -std GEN1

GENERATOR_2

CAT 0 100 5 -cat GEN1

  • Key name

    The name can be chosen as desired.

    Please note that when specifying the path in the ERP_NRGENERATOR_CONDITIONS key, exactly this value is referenced to.

  • Prefix

    Any text specification

  • Minimum

    Numerical value

    Shows the starting value

    Per default the starting value is set to 00000.

  • Maximum

    Numerical value

    Shows maximum limit for the number generation

    0 means that there is no limit.

    100 means that counting ends at 100.

  • Place number

    Numerical value

    For an example value of '5', the '0' is shown as '00000'; the number '101', for example, as '00101'.

    The following figure shows an example of a counter as seen for "Minimum", "Maximum" and "Counter name".

  • Postfix

    Any text specification

  • Counter name

    Name in order to differentiate between counters in the database table

    Any entry

    Usually this entry is left alone

ERP_NRGENERATOR_CONDITIONS

The following table shows how to configure the requirements.

Separators between individual values are colons.

Requirement number Neutral identifier Path description Key name from ERP_NRGENERATOR
1 PRJ norm/ GENERATOR_1
2 PRJ * GENERATOR_2
Number the requirements with consecutive numbers. (1, 2, 3, ...) 'PRJ' is a fixed value which is carried on consecutively.

Enter the catalog, directory and project path here.

'/norm' means that these requirements are used for all parts of the standard catalog.

'*' means that these requirements are used for all other parts, for example for all manufacturer catalogs, as well.

Pay attention that the key name references to ERP_NRGENERATOR.

Requirements depending on roles

You can also define requirements based on user-role dependencies.

The syntax is:

[ERP_NRGENERATOR_CONDITIONS(rolename)]

Via the context menu, launch Insert block. Insert the necessary key. Detailed information can be found under Section 1.1.7.3.5, “Edit blocks and keys”.



[94] Available starting at Version 8.1.06