Páginas filhas
  • Creating Companies and Branches

How to create companies and/or branches in Protheus

Product:

Microsiga Protheus

Versions:

11 and 12

Step by steo:

Starting with version 11 of Protheus, there are 2 ways to create a business structure:

1. Concept of Company/Branch
2. Concept of Business Management

The purpose of the new Business Management concept is:

- Enable sharing of the Data Dictionary of several companies by Microsiga Protheus.

- Introduce Business Unit.

- Allow the configuration of the Company and Branch code size.

- Allow configuration of sharing between Companies, Business Units and Branches.


Warning:

As of the LIB released in August 2014, Protheus no longer considers the M0_DTVLD field (expiration date) in the sigamat.emp company file.

Similarly, future entries in routines of modules such as Financial and Accounting, for instance, will not consider this field to enable the entry on a later date.

So if you have in your LIB environment a date equal to or later than this one, you no longer need to revalidate sigamat.emp in the following cases:
- maturity of sigamat.emp (it will no longer have an expiration date)

- creation of a new company/branch (unless the contract is Corporate¹)

- change of mandatory fields of the branch register by the Configurator

¹ For customers with a Corporate contract, it is still necessary to revalidate sigamat.emp when adding a new Company or Branch, due to the CNPJ being verified in sigamat.emp and in the license file for this type of contract.

If it is an earlier LIB , you have to open a ticket to CST-Passwords (or use the Self-service CST in the Portal), sending the current sigamat.emp file for revalidation.

Groups of Companies with a code with more than 2 digits is already considered as a Business Management model.



Below you will see the creation of companies/branches in the two concepts.

1. Company/Branch Concept

Allows creating a company and branches below it. There is a possibility of sharing tables between the branches. It is a ‘simpler’ concept.


To create a company/branch using this concept:
- Access Configurator > Environment > Companies > Group of Companies.
- Click Include.
- In Code, select a code to identify this company (Ex.: 01)
- In Description, define a name for the company
- In Size, set a number of characters for the field Branch in the tables (Ex.: 2)
- In Layout, define how the characters will make up the branch code. If Size is 2, like in the example, the Layout could be FF, indicating that the branch code will consist of 2 characters (F=Branch)

According to the Layout, you will see a Sequence, Initial, Order and Mask for each digit. Each identifier (not mandatory) allows setting a restriction mask to be completed according to the example:

F - 0-2 (Only numbers between 0 and 2)
F - 5-9 (Only numbers between 5 and 9)
* For details on the masks, double click the field in the Mask column and press F1.

- After setting up the company, click Confirm. A window displays “Do you want to create the data dictionary now?”.

If you click No, the dictionary will be created when you access any module through this company. If you click Yes, a new question appears:

Create Dictionary:

  • from an existing base: the dictionary files of this company will be created from the dictionary of another company, thus maintaining the same fields, tables, etc.
  • with default records: the dictionary files of this company will be created from the default Protheus dictionary
  • do not create now: the dictionary will be created when you access any module through this company.

If you select the option "from an existing database", a window opens to select the base company, and then a window asks about the "Directory of data files". Select folder ‘data’.

If the option "with default records" is selected, a window opens asking to inform the Country. Make sure you selected the right country before continuing. Then, a window pops up asking about the "Directory of data files". Select folder ‘data’.

When finished, exit the Company Group menu, and go to the Branch menu.

- Access the Configurator > Environment > Companies > Branch.

- Click Include.

- In "Group", enter the code of the Company Group created, and the Company Group of this Branch (Ex .: 01)
- In "Code", enter a code for this Branch (according to the mask created in the example, the branch must have 2 digits, the first one being a number between 0 and 2, and the second a number between 5 and 9. Ex.: 17).
- In "Description", set the name of the Branch.

- The fields without an asterisk are optional.

- When finished, click Confirm.

- The company and branch are ready for use.


2. Concept of Business Management

This concept allows a more comprehensive configuration by increasing the divisions of companies in business units and branches, also allowing greater scalability of shares. Below are the settings of each part of the Business Management structure:

- Group of Companies

A set of companies that are linked together for different reasons and that share the same definitions of the data model.

- Companies

Set of Branches or Business Units that are within the same legal or fiscal dependence.

- Business unit

Set of branches that are within the same economic activity.

- Branch

Business establishment dependent on another that practices acts that have legal or fiscal validity.


Follow the steps below to create a company/branch following the Business Management concept:

- Access Configurator > Environment > Companies > Group of Companies.
- Click Include.
- In Code, select a code to identify this company (Ex.: 12)
- In Description, define a name for the company
- In Size, set a number of characters for the field Branch in the tables (Ex.: 6)
- In Layout, define how the characters will make up the branch code. If the Size is 6, like in the example, the Layout could be EEUUFF, indicating that the branch code will consist of 2 characters representing the company code, 2 characters representing the business unit code, and 2 characters representing the branch code (E=Company / U=Business Unit / F=Branch)

According to the Layout, you will see a Sequence, Initial, Order and Mask for each digit. Each identifier (not mandatory) allows setting a restriction mask to be completed according to the example:

E - 0-9 (Only number between 0 and 9)
E - 5-9 (Only numbers between 5 and 9)
U - A-Z (Only characters between A and Z)
U - X-Z (Only characters between X and Z)
F - !-! (Any numeric or alphanumeric digit)
F - A,B,5,9 (Only characters between A,B,5 and 9)
F - 0-9 (Only numbers between 0 and 9)
F - A-Z (Only characters between A and Z)
* For details on the masks, double click the field in the Mask column and press F1.

- After setting up the company, click Confirm. A window displays “Do you want to create the data dictionary now?”.

If you click No, the dictionary will be created when you access any module through this company. If you click Yes, a new question appears:

Create Dictionary:

  • from an existing base: the dictionary files of this company will be created from the dictionary of another company, thus maintaining the same fields, tables, etc.
  • with default records: the dictionary files of this company will be created from the default Protheus dictionary
  • do not create now: the dictionary will be created when you access any module through this company.


If you select the option "from an existing database", a window opens to select the base company, and then a window asks about the "Directory of data files". Select folder ‘data’.

If the option "with default records" is selected, a window opens asking to inform the Country. Make sure you selected the right country before continuing. Then, a window pops up asking about the "Directory of data files". Select folder ‘data’.

When finished, exit the Company Group menu, and go to the Companies menu.

- Access Configurator > Environment > Companies > Companies.

- Click Include.

- In "Group", enter the code of the Company Group created, and the Company Group of this Company (Ex .: 12).

- In "Code", enter the code that this Company will have (Ex .: 01).
- In "Description", set the name of the Company.
- Click Confirm.

When finished, exit the Company menu, and go to the Business Unit menu.
- Access Configurator > Environment > Companies > Business Units.

- Click Include.

- In "Group", enter the code of the Company Group created, and the Company Group of this Company (Ex .: 12)
- In “Company”, enter the code of the Company created (Ex.: 01).

- In "Code", enter the code that this Business Unit will have (Ex .: 01).

- In "Description", set the name of the Business Unit.

- Click Confirm.

When finished, exit the Business Unit menu, and go to the Branch menu.
- Access Configurator > Environment > Companies > Branch.

- Click Include.

- Select the Group, Company and Business Unit code to which this Branch belongs, then define a code for this Branch (Ex .: 01).

- In "Description", set the name of the Branch.

- The fields without an asterisk are optional.

- When finished, click Confirm.

- The company and branch are ready for use in the Business Management mode.


Notes: