Baan A&D Interface

This section explains how Shop Floor Time’s import and export forms and services can be used to import and export data from Baan IVc4 A&D 2.2.c.

Shop Floor Time uses a combination of database triggers and database polling to import charge element data from Baan. Shop Floor Time exports labor transactions to HRA and HRS staging tables in Baan, and the Baan function servers are used to update the core Baan tables. The function servers then write a success or error message to a Baan table, and Shop Floor Time imports this error information to update the transaction and the error log.

The import and export processes and the configurations needed for each are explained below.

See Also:

Baan Configuration and Prerequisites

How the Import and Export Processes Work

Run the Schema and Trigger Scripts on Your Baan Database

Configuring the Import Definitions

Configuring the Export Rules

Configuring the Export Definitions

Configuring the Baan Events

Configuring the Interface Host

Configuring the Process Policy

Configuring the Distribution Model

Configuring the Service Instances

Shop Floor Time-Baan Interface – Import Example

Shop Floor Time-Baan Interface – Export Example

 

Baan Configuration and Prerequisites

The Shop Floor Time – Baan interface is only supported for Baan IVc4 A&D 2.2c. The Baan instances must be on an Oracle database. This interface requires the Baan HRA and HRS function servers.

The person responsible for maintaining your Shop Floor Time database (the Shop Floor Time interface schema owner) must be granted the following permissions on the Baan ERP database:

 

How the Import and Export Processes Work

Shop Floor Time uses a combination of database triggers and database polling to import charge element data from Baan. Triggers are used to detect add, update and delete actions on the Baan master tables. These triggers write to corresponding autotime_interface_tables created on the Baan database. If a record is added to or updated in the Baan table (for example, the ttisfc001100 table), then a record gets written in the ttisfc001_interface table. When a charge element is deleted in Baan, a record is placed in the autotime_interface_delete table. The IN_BAAN service will poll these interface tables to find the charge elements to import or delete.

The triggers and interface tables mentioned above are created by the BAAN_INTERFACE_SCHEMA.sql and BAAN_INTERFACE_TRIGGERS.sql scripts.

The OUT_BAAN_HRS and OUT_BAAN_HRA services export labor transactions to HRA and HRS staging tables in Baan. These services select Shop Floor Time transactions with a specific Sender Name, which is determined by a person’s Process Policy, and send the transactions to the appropriate Baan table. Baan function servers then update the core Baan tables with the HRA and HRS records. The function servers then write a success or error message to a Baan table. A trigger on the Baan table creates a record in the autotime_interface_error table. The IN_BAAN service polls this table to find error messages and updates the transaction and the Shop Floor Time error log accordingly.

See Shop Floor Time-Baan Interface – Import Example and Shop Floor Time-Baan Interface – Export Example.

 

Run the Schema and Trigger Scripts on Your Baan Database

You need to run the following scripts (in the order shown) on your Baan database:

BAAN_INTERFACE_SCHEMA.sql

BAAN_INTERFACE_TRIGGERS.sql

These scripts are located in \db folder where you installed the database schema (db\sql\scripts\schema\ORACLE\ERP\BAAN).

These scripts add tables and triggers to the Baan database to allow Shop Floor Time to poll the Baan database for charge element data to import.

Master tables in Baan do not have an update date/time column, which Shop Floor Time uses to select records during database polling. The Baan master tables also have a company number at the end of the table name. These company numbers will be unique for every Shop Floor Time customer. For example, at Acme Aerospace the Baan table for production orders is ttisfc001100 and at Dynamite Defense, the same table is named ttisfc001200.

To allow this interface to work for all Shop Floor Time customers, the BAAN_INTERFACE_SCHEMA.sql script creates a synonym for each table. This script also creates interface tables with a create_date column to indicate when the record was added, modified, or deleted. The BAAN_INTERFACE_TRIGGERS.sql script creates triggers for add, update, and delete actions on these synonyms.

If a record is added to or updated in the Baan table (for example, ttisfc001100 table), then a record gets written in the corresponding interface table (for example, ttisfc001_interface table). When a charge element is deleted in Baan, a record is placed in the autotime_interface_delete table. Shop Floor Time’s IN_BAAN service will poll these interface tables to find the charge elements to import or delete.

When you run the BAAN_INTERFACE_SCHEMA.sql script you will be prompted for your Baan company number. The table below shows the synonym that will be created for each Baan table. In the Baan Table Name, xxx denotes the Baan company number.

Baan Table Name

Synonym Name

Table Description

ttisfc001xxx

ttisfc001

Production Order

ttisfc010xxx

ttisfc010

Operation

ttirou001xxx

ttirou001

Work Center

ttirou002xxx

ttirou002

Machine

ttirou003xxx

ttirou003

Task

ttppdm600xxx

ttppdm600

Project

ttppss200xxx

ttppss200

Project Task

ttpptc100xxx

ttpptc100

Project Account

ttppdm615xxx

ttppdm615

Project Cost Object

ttppdm015xxx

ttppdm015

Cost Object

ttuddc100xxx

ttuddc100

DDC

If your company number changes, you will need to run the BAAN_INTERFACE_SCHEMA.sql and BAAN_INTERFACE_TRIGGERS.sql scripts again, entering the new company number at the prompt.

The BAAN_INTERFACE_SCHEMA.sql and BAAN_INTERFACE_TRIGGERS.sql scripts also create database tables and triggers to record errors that may occur when Shop Floor Time transactions are being exported to Baan.

The BAAN_INTERFACE_SCHEMA.sql script creates a table in Baan called the autotime_interface_error table. The BAAN_INTERFACE_TRIGGERS.sql script creates a trigger on the Baan table TTUDDC100xxx. When the Baan function servers process the Shop Floor Time transactions, a trigger on the TTUDDC table writes a success or error message to the autotime_interface_error table. The IN_BAAN service polls this table to find error messages and updates the transaction and the Shop Floor Time error log accordingly.

 

Configuring the Import Definitions

The Import Definition form (Main Menu > Configuration > Interfaces > Import Definition) contains several system-defined Import Definitions for importing Baan charge elements. These Import Definitions are listed below.

If you want to modify the system-defined Import Definitions, you must copy them and modify the duplicates.

BAAN_COST_OBJECT: Use this Import Definition to import cost object data from Baan.

BAAN_DELETE: This Import Definition will delete charge elements from Shop Floor Time that have been deleted in Baan.

BAAN_MACHINE: Use this Import Definition to import machine data from Baan.

BAAN_OPERATION: Use this Import Definition to import operations from Baan.

BAAN_ORDER: Use this Import Definition to import production orders from Baan.

BAAN_ORDER_WORKCENTER: Use this Import Definition to import order work center data from Baan.

BAAN_PROJECT: Use this Import Definition to import projects from Baan.

BAAN_PROJECT_ACCOUNT: Use this Import Definition to import CCN (account) data from Baan.

BAAN_PROJECT_COST_OBJECT: Use this Import Definition to import project cost object data from Baan.

BAAN_PROJECT_TASK: Use this Import Definition to import project tasks from Baan.

BAAN_TASK: Use this Import Definition to import task data from Baan.

BAAN_TRANSACTION_ERROR: This Import Definition will import transaction errors from the autotime_interface_error table to the Shop Floor Time error log. These errors occur when transactions are exported from Shop Floor Time to Baan.

 

Configuring the Export Rules

The BAAN_HRA, BAAN_HRS, and BAAN_SFC Export Definitions use rules and rulesets to calculate some items that are being exported. For example, the BAAN_HRA export uses the Set Baan Work Order Number export rule to determine the work order number to export to Baan.

You can use the rules and rulesets that are already defined for these exports, or you can create your own using the Calc Rule and Rulesets forms. If you want to modify these rules, it is recommended that you copy them and then modify the duplicate versions.

 

Configuring the Export Definitions

The Export Definition form (Main Menu > Configuration > Interfaces > Export Definition) is used to define the export records for transactions you are exporting to Baan.

Shop Floor Time comes with several pre-defined Export Definitions for Baan. It is recommended that you copy the system-defined Export Definitions and use the duplicate versions, which can be modified as necessary.

BAAN_HRA: Use this Export Definition to export work order transactions to the TTMHRA100 table in Baan.

BAAN_HRS: Use this Export Definition to export project transactions to the TTMHRS100 table in Baan.

BAAN_SFC: Use this Export Definition to export project and financial transactions to the TTMSFC100 table in Baan.

 

Configuring the Baan Events

Shop Floor Time comes with two pre-defined labor events you can use for posting transactions that will be exported to Baan.

BAAN_PROJECT

BAAN_WORKORDER_NO_MOVE

If you want to modify these events, it is recommended that you copy them and modify the duplicates.

 

Configuring the Interface Host

The Interface Host form (Main Menu > Configuration > Interfaces > Interface Host) is used to define the senders and receivers in the Distribution Model form. Your Baan ERP system needs to be defined in this form.

Shop Floor Time comes with pre-defined Sender and Receiver Interface Hosts for Baan. It is recommended that you copy the system-defined Interface Hosts and modify the duplicate versions. Change the Host Data Source to point to the correct Baan database instance.

 

Configuring the Process Policy

The Process Policy form (Main Menu > Configuration > Policies > Process Policy) is used to determine the Sender Name for a transaction’s export process. The Sender Name is used by the OUT_BAAN_HRA and OUT_BAAN_HRS services to determine which data to select from the transaction tables.

The Sender Name is defined in the Interface Host form.

Shop Floor Time comes with a predefined Process Policy for Baan. It is recommended that you copy this policy and use the duplicate version, which can be modified as necessary.

 

Configuring the Distribution Model

The IN_BAAN, OUT_BAAN_HRA, and OUT_BAAN_HRS services use the Distribution Model to determine which Import or Export Definition to run. These services use their SENDER_NAME and TRANSACTION_GROUP parameters to look up the Import Name or Export Name in the Distribution Model.

You need to define the Sender Name, Receiver Name, and Import Name or Export Name for the Baan import or export you want to run.

The application comes with predefined Distribution Model records for importing and exporting Baan data. It is recommended that you copy these records and use the duplicate versions, which can be modified as necessary.

 

Configuring the Service Instances

You need to configure the following service instances to import and export data with Baan.

Import:

The IN_BAAN service will poll the Baan interface tables to find charge elements to import or delete. The service uses its SENDER_NAME and TRANSACTION_GROUP parameters to look up the Import Name on the Distribution Model. This Import Name specifies the type of charge element to import.

Export:

The OUT_BAAN_HRA, OUT_BAAN_HRS, and OUT_BAAN_SFC services export labor transactions to Baan.

The OUT_BAAN_HRA and OUT_BAAN_HRS services export labor transactions to HRA and HRS staging tables in Baan. OUT_BAAN_HRA exports work order transactions and OUT_BAAN_HRS exports project transactions. The OUT_BAAN_SFC service will export project and financial transactions to the TTMSFC100 table in Baan.

These services select transactions with a specific Sender Name, which is determined by a person’s Process Policy. Baan function servers then update the core Baan tables with the HRA, HRS, and SFC records. The function servers then write a success or error message to a Baan table, and Shop Floor Time imports this error information to update the transaction and the error log.

These services use the Export Definition specified in the service's parameter.

 

Shop Floor Time-Baan Interface – Import Example

Acme Aerospace uses Baan IVc4 A&D 2.2.c and Shop Floor Time. Their Baan company number is 100. Baan table ttisfc001100 holds production orders which need to be downloaded to Shop Floor Time.

The database administrator at Acme Aerospace runs the BAAN_INTERFACE_SCHEMA.sql and BAAN_INTERFACE_TRIGGERS.sql scripts on their Baan database, entering company number 100 when prompted. These scripts create the synonyms, triggers, and interface tables for the Baan tables as explained above.

A production order is added to the Baan table ttisfc001100. A trigger on the synonym for this table (ttisfc001) creates a record in the ttisfc001_interface table. In addition, an operation is deleted from the Baan table ttisfc010100. A trigger on the synonym for this table (ttisfc010) creates a record in the autotime_interface_delete table.

The Shop Floor Time  Import Definition, Polling, and Distribution Model forms are already configured to poll the ttisfc001_interface and autotime_interface_delete tables for updates.

When the IN_BAAN service runs, it takes the order from the ttisfc001_interface table and places it in the appropriate Shop Floor Time table. It also looks at the record in the autotime_interface_delete table and deletes the operation from Shop Floor Time.

 

Shop Floor Time-Baan Interface – Export Example

Acme Aerospace wants to export certain labor transactions to Baan. Specifically, it wants to export transactions for the BAAN_PROJECT event.

Acme Aerospace has configured a Process Policy called Baan_Projects that is configured for the BAAN_PROJECT event with the Process Name OUT_BAAN_HRS.

When the OUT_BAAN_HRS service runs, it selects transactions with the Sender Name BAAN and uses the BAAN_HRS Export Definition to send these transactions to the TTMHRS100100 table in Baan. Baan function servers read and process the data in the TTMHRS100100 table and write a success or error message to the TTUDDC100100 table. Note that the “100” at the end of these table names is the Acme Aerospace company number.

A trigger on the TTUDDC100100 table (which was created by the BAAN_INTERFACE_TRIGGERS.sql script) takes this response and creates a record in the autotime_interface_error table (which was created by the BAAN_INTERFACE_SCHEMA.sql script). The IN_BAAN service polls this table to find error messages and updates the transaction and the Shop Floor Time error log accordingly.