Páginas filhas
  • Share table between companies

How to use the same table for a routine in different companies

Product:

Microsiga Protheus

Versions:

11 and 12

Step by step:

Protheus allows you to use the table of a company shared with another company. For example, if your Customer Register is common between companies 01 and 02, you can set up the customer table (SA1) of company 01 to be shared with company 02. When you view, add or change customers in one of these companies, the other also views the records in the same way.

To configure, proceed as follows:
- On the main company, go to Configurator > Database > Dictionary > Databases

- Select the table you want to share, click on it and then click Edit



- In the next screen, as shown in the image below, you find the name of this table in the field Name. Copy this name (in the example, SA1010)



- Exit this routine, exit the Configurator, and access it again, but this time, by the company that will use the shared table

- Access Configurator > Database > Dictionary > Databases

- Select the table you want to use with the shared table, click on it and then Edit

- The field Name will be filled with SA1020 initially in the following screen. Change this name to SA1010, indicating that when you enter the Customer Register routine of company 02, the table used will be the SA1 of company 01



- Click Confirm (seleção)
- In the table listing screen, click Update Database




Warning:

This ‘Update Database’ procedure is intended to confirm the inclusion of the field in the table in the database. This procedure must be done exclusively, that is, there can be no user with an open routine using the table involved. 


- On the Data Dictionary Update screen, click Next.

- On the next screen, click Next again

- Wait for processing. At the end, a screen indicating Update completed successfully will be displayed. Click Finish.


Notes:


  • Sem rótulos