To copy a multicompany structure - Example
This example describes how you can copy an entire multicompany structure, including the central DEM company, to a new multicompany structure having its own central DEM company.
Points of attention:
- Company 500 is the central DEM company that contains the Enterprise Modeler data, which is shared by all companies in the structure.
- Each enterprise unit contains entities of one company in the structure. For example: EU_B contains logistic entities in company 501. Therefore, the logistic entities (for example warehouses, departments) in company 501 contain a reference to this enterprise unit. Note: the codes of the enterprise units are unique within the multicompany structure. Therefore, when you copy the entire multicompany structure, including the central DEM company 500, changing the codes of the enterprise units is not required, since in this example these codes are unique within the new target structure as well.
- Companies 501, 502 and 503 contain logical tables that are all linked to physical tables in company 500.
- Company 500 does not contain logical tables.
-
Company 600 is the central DEM company in the new structure.
Company 600 is the central DEM company that contains the Enterprise Modeler data, which is shared by all companies in the new structure. Each enterprise unit contains entities of one company in the structure. For example: EU_B contains logistic entities in company 601. Therefore, the logistic entities (for example warehouses, departments) in company 601 contain a reference to this enterprise unit.
The codes of the enterprise units are unique within the new multicompany structure. They do not conflict with the (identical!) codes of the enterprise units in the source multicompany structure.
- Create target companies 600, 601, 602 and 603
Create the target companies 600, 601, 602 and 603 through the Companies (ttaad1100m000) session. Convert the changes to runtime and restart your bshell.
- Define logical tables for companies 601, 602 and
603
Note: in the source environment, companies 501, 502 and 503 contain logical tables that are all linked to physical tables in company 500. Company 500 does not contain logical tables.
Run the Logical Tables (ttaad4120m000) session to define the logical tables for the new companies 601, 602, and 603.
Points of attention:
- The set of logical tables for each target company must be identical to the set of the corresponding source company. For example: the set of logical tables for company 601 must be identical to the set for company 501, only the physical company must differ.
- You must link all logical tables to physical company 600.
- Convert the changes to the runtime data dictionary and restart your bshell to load the new settings.
Note: the companies in the new multicompany structure must at least share the tccom000 (Implemented Software Components) and tcemm170 (Companies) tables, and their reference tables.
- Export data from source companies 500, 501, 502 and
503
Extract data from the source companies 500, 501, 502 and 503 to sequential files. Do not export data from the Enterprise Modeling (tg) package.
Company 500
To extract data for company 500, you must run the Create Sequential Dump of Table (ttaad4226m000) session twice.
Use these settings for the first export:
Create Sequential Dump of Table (ttaad4226m000) Field Value Company 500-500 Package aa-tf Table <empty> - zzz999 Suppress Error Messages No Drop Table after Dump No Create Fixed Length Records No Specify Field Separator Yes | (pipe) Directory for Table Files /tmp/500 Basic Name for Dump File(s) <Empty> Name of the Error File /tmp/err500-1 For the second export, use exactly the same settings, except:
- Range of packages: th-zz
- Specify a different name for the error file, for example
/tmp/err500-2
Remaining companies
Use the same procedure to extract data from the companies 501, 502 and 503.
Points of attention:
- Specify a different directory for each company:
/tmp/501
,/tmp/502
and/tmp/503
for companies 501, 502 and 503 respectively. - Specify a different name for the error file for each export.
- Correct company numbers
Run the Copy Company Data (tccom0214m000) session to correct references to company numbers in the sequential files. References to the source companies 500, 501, 502 and 503 must be changed into references to the target companies 600, 601, 602 and 603 respectively.
Company 500
To correct the company number references in the sequential files of company 500:
- Switch to company 500
- Run the session with these settings:
Copy Company Data (tccom0214m000) Field Value Specify Field Separator | (pipe) Directory for Table Files /tmp/500 Companies to Copy Yes 500>600;501>601;502>602;503>603 Enterprise Units to Copy No Remaining companies
Run the session another 3 times to correct the sequential files of companies 501, 502 and 503. Points of attention:
- Before you run the session you must switch to the appropriate source company number, for example switch to company 501 before you run the session to correct the files that were extracted from company 501.
- The Directory for Table Files differs per
company number:
/tmp/501
,/tmp/502
and/tmp/503
for the files of companies 501, 502 and 503 respectively. - The remaining settings must be exactly identical to the settings in the former example.
- Import data into companies 600, 601, 602 and 603
Run the Create Table from Sequential Dump (ttaad4227m000) session to import the contents of the sequential files into the target companies.
Company 600
This table shows the settings to load data into company 600:
Create Table from Sequential Dump (ttaad4227m000) Field Value Create Tables for Different Company Yes 600 Append if Table Exists No Delete Existing Tables No Create Rows before Index Yes Disable Domain Constraints No Ignore Referential Integrity Constraints Yes Specify Field Separators of Seq File Yes | (pipe) Directory for Searching Table Files /tmp/500 Pattern to Match Table Names * File to Store Table Names not Created No Name of the Error File /tmp/err_imp600 Remaining companies
Use the same procedure to import data for the companies 601, 602 and 603. Points of attention:
- The Directory for Searching Table Files is different for each company:
/tmp/501
contains the files that must be loaded into company 601/tmp/502
contains the files that must be loaded into company 602/tmp/503
contains the files that must be loaded into company 603
- Specify a different name for the error file for each import.
- The Directory for Searching Table Files is different for each company:
- Create missing tables for companies 600, 601, 602 and
603
Run the Create Tables (ttaad4230m000) session to create missing tables for the companies 600, 601, 602 and 603. Specify these settings:
Create Tables (ttaad4230m000) Field Value Company 600 - 603 Package <Empty> - zz Table <Empty> - zzz999 - Define company 600 as the central DEM company
Define company 600 as the central DEM company for all target companies.
Repeat these steps for each target company (600, 601, 602, and 603):
- Switch to the new target company.
- Run the Central Company to store Enterprise Modeler Data (tgbrg0100s000) session. Specify company 600 as the central DEM company.
- Export version and model data
Export version and model data from company 500 (the source central DEM company).
- Switch to company 500.
- Run the Export Version Dump (tgbrg1235m000) session to export the version and model data. Points
of attention:
- Select the version to export
- Specify the name and path of the dump file
- Click Yes on All Tabs
- Click Yes in any questions that are displayed during the export process
- Import version and model data
Import version and model data into company 600 (the target central DEM company).
- Switch to company 600.
- Run the Import Version Dump (tgbrg1245m000) session to import the version and model data. Points
of attention:
- Specify the name and path of the dump file that was created by the export process.
- Click Yes on All Tabs
- Click Yes in any questions that are displayed during the import process
- Correct financial company number for enterprise
units
Correct the financial company number for enterprise units in the target multicompany structure.
- Switch to one of the target companies.
- Run the Enterprise Structure Models (tgbrg0512m000) session.
- Specify the current version (the version that was imported in step 9). The imported Enterprise Structure Model is displayed.
- Select the model and subsequently, on the Specific menu, click Enterprise Structure Model Browser. The enterprise units are displayed in a graphical browser.
- Repeat these steps for each enterprise unit:
- Select the enterprise unit.
- On the Specific menu, click Details. A dialog is started.
- Replace 503 (the original financial source company) by 603 (the financial target company).
- Specify operational enterprise structure model and
version
Specify the operational enterprise structure model and version for the target multicompany structure.
- Switch to company 600.
- Run the DEM Parameters (tgbrg0135s000) session
- Specify the operational enterprise structure model and the version (the model and the version that were imported in step 9).
- Reorganize tables and repair reference counters
Run the Reorganize Tables (ttaad4225m000) session to reorganize the tables and to repair the reference counters for the companies 600, 601, 602 and 603.
Specify these settings:
Reorganize Tables (ttaad4225m000) Field Value Company 600 - 603 Package <Empty> - zz Table <Empty> - zzz999 Data and Indices No Reference Integrity Yes Check Validity of Reference No Repair Reference Counter Yes All other check boxes No