What this document contains:
- What is CDM
- Setting up data on system level
- Setting up data in the sending company
- Setting up data in the receiving company
- Selecting field values to send/receive
- Setting up data in the DI transfer routine
- Error log handling
- Send item, business partner and account data
- Send table data
- Inactivate send
- Activate receive
- Inactivate receive
What is CDM
The Corporate Data Maintenance (CDM) tool allows your company to transfer data from “supported” DC1 files between DC1 companies within the same release and iSeries. The data that you want to send and/or receive and the number of companies between which you want to transfer data is entirely up to you. You decide the file and/or record you want to send, to whom you want to send the data and what can be received. Protection can be set up to prohibit the receiving, and thereby updating, of field data in the receiving company.
The technique takes advantage of the functionality in the existing DI Interface programs, (see CDM processes overview below), and provides the following preloaded DI documents, DI subtype and DI method for use. Note: CDM supports Unicode. However, Unicode will NOT be supported for key fields in files for CDM.
CDM-related DI documents:
ACCOUNT | Allows you to transfer data from the Account file for the selected account part and any connecting summary ID’s |
BPARTNER | Allows you to transfer data from the Business partner file |
ITEM | Allows you to transfer data from the Item file |
TABLE | Allows you to transfer data from supported tables in DC1 |
Each of these DI documents are connected to the following:
- A preloaded DI document subtype (= 1, all files), which contains the applicable files that can be sent and/or received.
- A preloaded DI document method link (= *INTERNAL), which defines the method of distributing the data and an associating Method subtype (= *ASWXML), which is the method used to interpret the data.
The set-up procedure is divided into four main areas:
- System set-up
- Sending company set-up
- Receiving company set-up
- Data transfer set-up
The actual triggering of the send is divided into two areas:
- Enabling the send on file level
- Enabling the send on record level
You define on Business partner file level who will be your senders and receivers of information, by connecting the applicable DI documents to each sending/receiving business partner. You can then transfer any data from any of the applicable files. When the send has been initiated, either on file or record level, a number of programs are triggered which map and validate the data. If erroneous data is detected on the receiving side, the file(s) is kept in an error log. Correction is aided by an error message in this error log. Once corrected, the file can be re-sent.
CDM processes overview
Setting up data on system level
To be able to send/receive information the following must be done on system level:
File/Table | To do |
---|---|
Work with companies | Activate the DC1 Corporate Data Maintenance application for all sending and receiving DC1 companies. |
Database definitions file | All supported files within the DC1 CDM application come preloaded with the External interface field set to YES. |
Database definitions file | Some fields within the DC1 CDM supported files are hardcoded by DC1 PD with the value O (= Output) in the I/O attribute field. This is to prohibit data from being received into these fields (panel ASTR19604). |
Setting up data in the sending company
Every Sending company must be set up with the following data:
File/Table | To do | ||||||||
---|---|---|---|---|---|---|---|---|---|
DI methods table | This table is preloaded with all methods supported within DC1 (both for the DI Interchange functionality and the CDM functionality). The *INTERNAL method is used for CDM purposes and comes preloaded with the Send program ECNC810.
|
||||||||
Work with DI documents | For each applicable preloaded DI document (i.e. ACCOUNT, BPARTNER, ITEM, TABLE and SUPPAGR) and connecting DI document subtype, you have to do the following:
Note: You may want to separate the data you are transferring between your different companies. (E.g., one receiving company may only receive Pricing information for items while another may only receive Unit information for items). You can set this up as follows: |
||||||||
Business partner file | For every business partner that will be Receiving information from this sending company define the following:
|
||||||||
G/L control file: Only for ACCOUNT data | For every account part, define in the snd part of the Corporate snd/rcv field one of the following codes:
|
Example of outbound string
File/mail names out | Result in receiver’s archive directory |
---|---|
/I/Q/Y, where I = Internal doc name (e.g., ITEM) | ITEM(sequence number)2012 |
DC1AB/I/Q/Y.txt, where I = TABLE | DC1ABTABLE(sequence number)2012.txt |
DC1HQTAB/Q.xml | DC1HQTAB(sequence number).xml |
Setting up data in the receiving company
Every Receiving company must be set up with the following data:
File/Table | To do | ||||||||
---|---|---|---|---|---|---|---|---|---|
DI methods table | This table is preloaded with all methods supported within DC1 (both for the DI Interchange functionality and the CDM functionality). The *INTERNAL method is used for CDM purposes and comes preloaded with the Receive program ECNC812.
|
||||||||
Work with DI documents | To be able to receive anything, activate the desired files (choosing from the supported, preloaded ones).
If you want to prohibit fields from being updated/overridden with sent data in the receiving company you can do the following:
|
||||||||
Business partner file | For every business partner that will be Sending information to this receiving company define the following:
|
||||||||
G/L control file: Only for ACCOUNT data | For every account part, define in the rcv part of the Corporate snd/rcv field one of the following codes:
|
Example of inbound string
Outbound string in sending company | Inbound entry in receiving company |
---|---|
/I/Q/Y, where I = Internal doc name (e.g., ITEM) | ITEM* |
DC1AB/I/Q/Y.txt, where I = TABLE | DC1ABTABLE* or DC1ABTABLE*.txt |
DC1HQTAB/Q.xml | DC1HQTAB* or DC1HQTAB*.xml |
Selecting field values to send/receive
You have the possibility to select, on field level, which records you want to send/receive for DI documents BPARTNER, ITEM, ACCOUNT and TABLE. This feature allows flexibility and control over the transmission and reception of data, being selective about the data a business partner should send and/or receive.
The entering of selection values is done on DI document/Document subtype/File/Field/Value level in the sending and receiving companies.
Example of item group selection
You have a company hierarchy consisting of three companies: A, B and C, where
- each company maintains their own item groups
- company A has all item groups in stock (central warehouse for company B and C)
According to this example, you would do the following for each company:
In company | Sender | Receiver |
---|---|---|
A | Set up environment to be able to send Item group 1 to B and C | Set up environment to be able to receive Item group 2 from B and Item group 3 from C |
B | Set up environment to be able to send Item group 2 to A | Set up environment to be able to receive Item group 1 from A |
C | Set up environment to be able to send Item group 3 to A | Set up environment to be able to receive Item group 1 from A |
The table below, outlines the instructions for setting up CDM in the three companies above (i.e. A, B and C) working with the DI document ITEM. Company A is going to send the applicable data to companies B and C, defining selection values on item group level. Companies B & C are going to receive the applicable data from A. (Repeat the instructions in all applicable companies that will send, respectively receive information.)
Sending company (A) |
Receiving company (B and C) |
||
---|---|---|---|
File/Table | To do | File/Table | To do |
Work with DI documents |
|
Work with DI documents |
|
Work with DI mapping definition | On the Header view panel, create a new mapping definition for the new document subtypes by copying the applicable record for subtype 1. | Work with DI mapping definition | On the Header view panel, create a new mapping definition for the new document subtypes by copying the applicable record for subtype 1. |
Work with DI documents | Add the selection values as follows:
|
Work with DI documents | In the receiving company you can also add selection values, restricting the information you want to receive.
Repeat the same instructions as outlined in the sending company. |
Business partner file | For every business partner that will be receiving the Item group records, connect them to the suitable document/subtype (on the DI documents, All panel). | Business partner file | For every business partner that will be sending the Item group records, connect them to the suitable document/subtype (on the DI documents, All panel). |
Activate the desired file for send. See Send item, business partner and account data below. | Activate the desired file for receive. See Activate receive below. |
When the transfer routine reads the send log, a check for selection values takes place. The validation of the selection values works as follows:
- When selection values are defined on a Master file, (e.g., Item file SROPRG, Business partner file SRONAM or Account file SROKTO) and the values do not match those in the actual file, no records from the sub-files (e.g., SROPRU, SROPRS, etc.) will be sent.
- When selection values are defined on a Master file, and the values match those in the actual file, all records from the sub-files will be sent.
- When a selection value is defined on a Sub-file and that value does not match that in the actual file, that particular record from the sub-file will not be sent.
- When a selection value is defined on a Sub-file and that value matches, the record from the sub-file will be sent. Example: Unit EACH is defined as selection value on sub-file SROPRU. A new item is added that contains the unit EACH. All item information will be sent (assuming that the item related files are active for send, etc.), but only the record with unit EACH from SROPRU will be sent.
Set-up and transmission example
Selection values in Company A
File | Field | Value |
---|---|---|
SROPRG | Item group | 1 |
SROPRU | Unit | EACH |
New items entered in Company A:
SROPRG Item |
SROPRG Item group |
SROPRU Unit |
Result |
---|---|---|---|
100 | 1 | EACH | All information is sent |
200 | 5 | EACH | Nothing is sent |
300 | 1 | EACH, BOX12, BOX24 | SROPRG record plus SROPRU record “EACH” is sent |
Setting up data in the DI transfer routine
The transfer of data for the activated files in a CDM-related DI document/subtype is controlled by parameters you set on the following two preloaded routines:
- CMDSND
- CMDRCV
Every time the maintenance of data is completed in one of the activated CDM related files, the data is written to a log file. Depending on the run interval you set on the CDMSND transfer routine, the data will be transferred from the log file, aided by several programs that are triggered. Mapping of data is performed on both the receiving and sending side. If erroneous data is found during validation on the receiving side, then a message will be sent to an Error log file. See Error log handling below. After correction the record can be re-sent.
File/Table | To do |
---|---|
Work with DI transfer routines |
Sending companyFor the CMDSND routine, define/displays the following:
Receiving companyFor the CMDRCV routine, define/displays the following:
Common fields
|
Error log handling
This log displays all errors that exist in the Corporate data error log file for all received DI documents (ITEM, BPARTNER, ACCOUNT, TABLE and SUPPAGR) that are in error (status 2) in the receiving company. These records could not, for some reason, be updated into the receiving company’s files.
What you do to solve the problem is up to you. Your choices are:
- Correct the error(s) in the receiving company and then re-send the erroneous document(s) via this program. The system will delete the original error log and attempt to validate the data. If errors still exist, a new error log will be created with another unique receipt number. If the validation is successful, the data will be written into the applicable files.
- Correct all errors, delete all error logs and then request that the sending company re-send all the information.
- Delete the error logs that you don’t want, meaning this data will never be received into the files.
Send item, business partner and account data
In the sending company, you can send data on either file or record level.
Send entire file | Send a record only |
---|---|
Do as follows:
|
For BPARTNER and ITEM record data, do as follows:
For ACCOUNT data, the record is automatically sent according the run interval if the Corporate snd flag is YES in the Account file for the account part. |
Send table data
In the sending company, the sending of table data (both entire file and individual records) is triggered from one location.
If a lot of time has lapsed since the entire table file was sent and a lot of changes have taken place in the table, (excluding physical deletes – they are not handled), inactivate the table file and then reactivate and answer YES to send the entire table. If you decide that you no longer want to send table data, inactivate the Table files in the DI documents table using the Inactivate option.
Send TABLE data |
Do as follows:
|
Inactivate send
In the sending company, you can inactivate the sending of data on either file or record level.
Inactivate entire file | Inactivate a record only |
---|---|
Do as follows:
|
For BPARTNER and ITEM record data, do as follows:
For ACCOUNT record data, do as follows:
|
Activate receive
In the receiving company, you can grant/allow the reception of data on either file or record level.
Activate entire file | Activate a record only |
---|---|
Do as follows:
|
Do as follows:
|
Inactivate receive
In the receiving company, you can stop the reception of data on either file or record level.
Inactivate entire file | Inactivate a record only |
---|---|
Do as follows:
|
The Corporate rcv flag is automatically set to YES the first time the business partner receives record data, regardless of whether or not the record already exists. If you want to stop all future reception of BPARTNER, ITEM or ACCOUNT record data, do as follows:
|