Вы находитесь на странице: 1из 117

Version 14.1.7.

2
Published January 27, 2011
Document Number M3EPRCONRG---draft
Legal Notices
This information pertains to computer programs or solutions under development that have not yet been
made commercially available to customers by Lawson. Lawson may make changes, cease development,
or modify the timetable for commercial release of these programs, at any time, without notice. These programs
and the information contained herein are provided As-is and Lawson makes no warranty regarding the
programs or the suitability or accuracy of the information contained in this document. Any information related
to these computer programs, including any performance results, is the confidential and proprietary information
of Lawson.
Export Notice: Pursuant to your agreement with Lawson, you are required (at your own expense) to comply
with all laws, rules, regulations, and lawful orders of any governmental body that apply to you and the
products, services or information provided to you by Lawson. This obligation includes, without limitation,
compliance with the U.S. Foreign Corrupt Practices Act (which prohibits certain payments to governmental
officials and political parties), U.S. export control regulations, and U.S. regulations of international boycotts.
Without limiting the foregoing, you may not use, distribute or export the products, services or information
provided to you by Lawson except as permitted by your agreement with Lawson and any applicable laws,
rules, regulations or orders. Non-compliance with any such law, rule, regulation or order shall constitute a
material breach of your agreement with Lawson.
Intellectual Property: All brand or product names mentioned herein are trademarks or registered trademarks
of Lawson, or the respective trademark owners. This documentation is the proprietary information of Lawson
protected internationally under copyright and related intellectual property laws. Lawson customers or
authorized Lawson business partners may use, copy, or transmit this document for their internal use only.
Any other use or transmission requires advance written approval of Lawson.
Copyright 2011 Lawson Software. All rights reserved.
Version Log
The version log describes the changes between versions of this document.
Description Release Date Part Number
Release for October 2010.
9-14-2010 1.0
3
Contents
Introduction 7 Chapter 1
System Requirements............................................................................................7
Interface Strategy...................................................................................................9
Installation and Setup Overview..........................................................................13
Detailed Field-Mapping Documentation...............................................................14
Pre-installation 15 Chapter 2
Preparing M3 Data...............................................................................................15
Gathering Required M3 Data for Connector Set-up.............................................17
Creating an ODBC Data Source for M3...............................................................22
Installing SQLXML...............................................................................................22
Installing MEC......................................................................................................23
Installation 24 Chapter 3
Introduction..........................................................................................................24
Preparing to Install...............................................................................................24
Running the Connector Install Wizard..................................................................25
Running the Connector Setup Wizard..................................................................26
Establishing the Replication database 31 Chapter 4
Creating the Replication database.......................................................................31
Setting the replication data mappings..................................................................32
Establishing the Lawson M3 e-Procurement
database 33
Chapter 5
Creating an interfaced application database........................................................33
Updating the application database.......................................................................33
Configuring and Using the Interfaced System 1 34 Chapter 6
Initial replication...................................................................................................34
Preparing e-Procurement Data after Initial Replication........................................36
The Connector Interface Overview......................................................................37
Configuring Business Center...............................................................................37
Configuring the Supply Center.............................................................................38
Dealing with Records Deleted or Deactivated in M3............................................38
Data Validation and Erroneous Record Detection................................................40
Error messages....................................................................................................47
Replication database cleanup..............................................................................48
Monitoring and Troubleshooting Replication........................................................49
Customizing the Solution From M3 50 Chapter 7
Overview..............................................................................................................50
Contents 4
Adding New Attributes for Replication..................................................................50
The two-stage replication database.....................................................................51
Setting up the template files.................................................................................54
Setting up XSL transformations...........................................................................55
Configuring the XML Gateway.............................................................................55
Running the replication........................................................................................55
Setting up MEC 58 Chapter 8
Setting up as a Front-end to M3...........................................................................58
Interfacing with M3 MBM Envelopes....................................................................58
Configuring and Using the Interfaced System 59 Chapter 9
Configuring the new ERP Field Settings..............................................................59
Allowing Purchases from Unregistered Suppliers................................................60
Transmission Control...........................................................................................61
Customizing The Solution From M3 e-Procurement 63 Chapter 10
Setting up Request Documents...........................................................................63
Setting up transformation to MBMs......................................................................65
Setting up Success/failure Requests for XML Gateway.......................................66
Configuring the XML Gateway.............................................................................67
Running the replication........................................................................................67
The View from M3 69 Chapter 11
Overview..............................................................................................................69
Interface Transactions..........................................................................................69
Functional Aspects...............................................................................................70
Mandatory Basic Data in M3................................................................................71
API/Transaction description for V11RPG.............................................................71
API/Transaction description for V12RPG.............................................................74
API/Transaction description for V12Java..............................................................77
Field Mappings.....................................................................................................80
Modified Members...............................................................................................82
Action Numbers V11RPG....................................................................................83
Action Numbers V12RPG....................................................................................84
M3 Connector Tools 86 Appendix A
Using the M3 Replicator.......................................................................................86
Using the Message Transfer Agent......................................................................90
SQLXML Interface 95 Appendix B
Setting up the SQLXML interface.........................................................................95
IIS 7 Configuration 98 Appendix C
Overview..............................................................................................................98
Access Permissions (Windows) 99 Appendix D
5 Contents
Setting access permissions.................................................................................99
Effects of Interfacing 101 Appendix E
Maintaining Lawson M3 e-Procurement Data....................................................101
Data Interface Overview.....................................................................................101
Business Object Methods used for Replication..................................................102
Additional Settings made by the Setup Wizard..................................................102
Known Issues 104 Appendix F
Validation of duplicate entries (from M3 BE)......................................................104
M3 BE Database Selection Criteria 105 Appendix G
Selection criteria philosophy..............................................................................105
Selection criteria................................................................................................105
Contents 6
Chapter 1
Introduction
System Requirements
Lawson M3 e-Procurement and Application Server Software
The Lawson M3 e-Sales Connector requires the following:
Design Center
Lawson M3 e-Procurement
M3 e-Collaborator
e-Commerce Extension for M3 e-Collaborator.
Before installing the Connector, prepare your application server by installing all of the application server
software included with Lawson M3 e-Procurement.
See Lawson M3 e-Procurement Installation Guide for complete system and third-party software
requirements for your application server and complete details about how to install the required Lawson
software.
M3 BE System Versions
The Lawson M3 e-Sales Connector for Lawson M3 e-Procurement has been developed for and tested
against the following versions of M3:
Movex 11.6 RPG
Movex 12.8 RPG
M3 BE 12.4 Java
M3 BE 13.1
M3 BE 14.1
See your M3 BE documentation for complete system requirements and installation details.
Required M3 API programs and transactions
When using the Connector, Lawson M3 e-Procurement must be able to execute the ERP-system
programs listed in the table below. You must make sure that these are available over the connection
provided between Lawson M3 e-Procurement and the ERP system.
For M3 Version Transaction Program
11RPG AddIdReq PPS160MI
11RPG AddEPRText PPS160MI
11RPG CrtIdPO PPS160MI
11RPG ConfirmIDLine PPS001MI
7 Chapter 1 Introduction
For M3 Version Transaction Program
11RPG ReceiptID PPS001MI
12RPG AddEPRReq PPMEPRMI
12RPG CrtEPRPO PPMEPRMI
12RPG ConfirmEPRLine PPMEPRMI
12RPG ReceiptEPR PPMEPRMI
12RPG AddEPRText PPMEPRMI
12RPG ChgPOADr PPMEPRMI
12Java AddEPRReq PPSEPRMI
12Java CrtEPRPO PPSEPRMI
12Java ConfirmEPRLine PPSEPRMI
12Java ReceiptEPR PPSEPRMI
12Java AddEPRText PPSEPRMI
12Java ChgPOADr PPSEPRMI
Server software
In addition to the requirements for Lawson M3 e-Procurement, as outlined in the Lawson M3
e-Procurement Installation Guide, your application and database servers must have the following installed
in order to use the Lawson M3 e-Sales Connector:
Microsoft MDAC 2.7
Microsoft XML 4.0 SP2
Microsoft SQL Server 2005 SP1 with Integration Services
Microsoft SQLXML version 3 (Service Pack 3) for Microsoft SQL Server (see also "Setting up the
SQLXML interface" on page 95)
Microsoft Internet Information Server (IIS); this is required in order to use SQLXML and must be
running on the same server as the Lawson M3 e-Sales Connector installation
All databases must use the same collation as the default collation for the SQL Server installation
The database must be tested for latin1.
Each of these software packages is available for download from Microsofts Web site. See the Web site
for software details, release notes and installation instructions.
Furthermore, the application server must be able to access the M3 BE system via ODBC. This requires
IBM System i Access for Windows V6R1M0.
See also "Creating an ODBC Data Source for M3" on page 22.
Chapter 1 Introduction 8
Interface Strategy
Interface Method
Replication of data can be either from M3 BE to the Lawson M3 e-Procurement application (base data)
or vice versa (order data).
Both Lawson M3 e-Procurement and the M3 BE system are stand-alone applications, each with its own
user interface and database. In addition, each of these systems provides an interface for communicating
with external systems: Lawson M3 e-Procurement provides an XML Gateway combined with a M3
e-Collaborator (MeC); M3 also provides an e-Collaborator. Both the Gateway and the e-Collaborator
are passive, message-based systems that process incoming request documents and return response
documents. For this reason, a third application; the Message Transfer Agent, will initiate communication
and transfer request and response documents between the two systems.
The Lawson M3 e-Sales Connector combines both synchronous and asynchronous interface techniques.
To minimize the demand on the ERP system after interface, most of the data used by Lawson M3
e-Procurement will come from the standard Lawson M3 e-Procurement database. You will establish a
regular replication schedule for updating this database with data from the ERP system.
In the interfaced solution, most elements of the Lawson M3 e-Procurement system remain within Lawson
M3 e-Procurement. From here, buyers are able to generate requisitions and managers are able to review
and approve requisitions. When all approval criteria for a requisition have been met, purchase orders
are generated and submitted to the relevant suppliers. This is the first event that is of interest to the
ERP system, so it is first here that data are replicated. An optional process will allow suppliers to confirm
orders through the Lawson M3 e-Procurement system, with the confirmation message also replicated
to the ERP system. Finally, buyers will use the Lawson M3 e-Procurement system to register received
orders, notice of which is also replicated.
Invoice matching and payment are not tracked through the Lawson M3 e-Procurement system, so these
processes are done by the relevant employees working directly in M3. By the time invoices arrive, M3
is sure to have received all of the relevant data from the e-Procurement system.
M3 BE to Lawson M3 e-Procurement Replication
The figure below shows elements and transactions of the interfaced solution.
9 Chapter 1 Introduction
The replication system uses Microsofts SQL Server Integration Services (SSIS) to retrieve the appropriate
records from the M3 BE system database and store them in a temporary database at regular intervals.
This helps minimize the load placed on the ERP system. Data from the temporary database will then
be extracted as XML documents, which are submitted to the standard Lawson M3 e-Procurement XML
Gateway to update the Lawson M3 e-Procurement database.
A program called the M3 Replicator initiates the transfer of updated records from the ERP system to
the replication database; a program called the Message Transfer Agent then handles the task of
requesting new and updated records and returning them as XML documents to Lawson M3
e-Procurement. These programs must be executed at regular intervals by the standard Windows Task
Scheduler. The frequency at which you decide to schedule the transfer of each type of data from the
ERP system to Lawson M3 e-Procurement will vary according to the needs of each individual installation.
The following types of data are transferred between the two systems using scheduled replication:
M3 Warehouses including warehouse addresses (mapped to e-Procurement Locations)
M3 Facilities (mapped to e-Procurement Location Groups)
Currencies
Quantity Units (Unit of Measure)
Cost Centers
Accounts
Users (including e-mail addresses and some employee data)
Suppliers (including supplier addresses and e-mail addresses)
Payment Terms
Goods Receipt transactions
Replication proceeds as follows (see also the figure above):
Chapter 1 Introduction 10
1. The Windows Task Scheduler launches the M3 Replicator, which replicates new and updated
records from the M3 BE System database into the Stage-1 replication database via Microsoft
Data Transformation Services. Changes are then inserted into the Stage-2 database where
status codes are updated.
2. A stored procedure then validates the data by verifying keys and by checking against data in
the Lawson M3 e-Procurement database.
3. The Windows Task Scheduler launches the Transfer Agent and specifies a configuration file.
The configuration file specifies a URL, which identifies the replication database server and
includes the name of a template file stored there. The template file contains an SQL expression
that retrieves the required data and formats it as an XML document using the native Lawson
e-Commerce format (iXML version 1). You might establish several different scheduled tasks,
each designed to initiate a different type of replication.
4. The replication database processes the request, which usually results in a check for new
records received from the M3 database, and returns the result as an XML document.
5. The Transfer Agent forwards the response document to the Lawson M3 e-Procurement XML
Gateway.
6. The Transfer Agent stores a copy of the original response. It holds this document until it gets
a status message back from the Gateway (see below).
7. The Gateway processes the incoming document and attempts to import its contents into the
Lawson M3 e-Procurement database. It then returns a signal to the Transfer Agent to indicate
the success of failure of the import attempt. On failure, return transformed XML to mark failed
records and make a note in the replication log.
8. When the Transfer Agent receives the response signal, it does one of the following:
If an OK signal is received, the Agent loads its stored copy of the response document,
applies the success style sheet and forwards the result back to the replication database
to mark successfully replicated records.
If a failed signal is received, the Agent loads its stored copy of the response document,
applies the failure style sheet and forwards the result back to the replication database to
mark the unsuccessfully replicated records. The system can be configured to generate
an e-mail message to inform an administrator of failed import attempts.
Lawson M3 e-Procurement to M3 BE Replication
The figure below shows elements and transactions of the interfaced solution.
11 Chapter 1 Introduction
The Message Transfer Agent will be executed at regular intervals by the standard Windows Task
Scheduler. This is required because the interface points on both systems (the XML Gateway and the
e-Collaborator) are passivethey will only respond when a request document arrives.The frequency at
which you decide to schedule the transfer of each type of data from Lawson M3 e-Procurement to the
ERP system will vary according to the needs of each individual installation.
The Connector is designed to support an interface strategy that allows for the following types of records
to be transferred from Lawson M3 e-Procurement to the ERP system:
Orders
Order Confirmations
Goods-received notices
The replication will proceed as follows (see also the figure above):
1. The Windows Task Scheduler launches the Transfer Agent and specifies a configuration file.
The configuration file includes communication parameters and specifies which XML request
document(s) to send to Lawson M3 e-Procurement XML Gateway. Only the names of each
request document are specifiedthe connector must already have developed the necessary
request documents. Request documents use the XML request format expected by the Gateway
(iXML). You might establish several different scheduled tasks, each designed to initiate a
different type of replication.
2. The Transfer Agent sends the first of the specified request documents to the Lawson M3
e-Procurement XML Gateway.
3. The XML Gateway processes the request, which usually results in a check for new records
in the Lawson M3 e-Procurement databases (for example, to find a new (unreplicated) purchase
order). Because the M3 e-Collaborator is only able to process a single record at a time, the
XML request is designed to return only one record.
4. The Gateway finds the requested record and formats it using the M3 Business Message
(MBM) schema (MBM documents also fit to the XML standard). This reformatting is done
using the standard XSL transformation technique supported by the MeC in the Gateway.
Chapter 1 Introduction 12
5. The Gateway returns the MBM response document to the Transfer Agent.
6. The Transfer Agent forwards the response document to the M3 e-Collaborator using either
HTTP / HTTPS or by writing the document to a folder watched by the e-Collaborator.
7. The e-Collaborator processes the document and then enters the data into the M3 BE system
database.
8. If the Transfer Agent successfully delivers the document, then it updates the Lawson M3
e-Procurement database by submitting another XML request document that marks the record
as replicated to the ERP system. If a transmission error does occur, then an alternative request
document is sent to mark the replication as failed.
9. The Transfer Agent resubmits the XML request document to fetch the next available record
and responds just as it did for the first request; this is repeated until no additional new records
are returned.
10. Once all new records of each type specified in the configuration file have been replicated, the
Transfer Agent quits and remains inactive until it is launched once again by the scheduler.
Installation and Setup Overview
This section explains how to create an interfaced Lawson M3 e-Procurement/ERP system solution by starting
with a completely new, default Lawson M3 e-Procurement installation.
We recommend that you read the entire procedure below to familiarize yourself with the overall process.
Then read the entire procedure again, starting with a default Lawson M3 e-Procurement Connector site and
executing each step as you go. This time, follow each cross-reference for additional information and details,
but return to this procedure afterwards. Once you have the default site up and running and have confirmed
that the interface is working, you are ready to begin customizing your Lawson M3 e-Procurement and/or
ERP system to create the final required solution.
1. Prepare your development machine(s) and application server(s) for developing and running
Lawson M3 e-Procurement by following the instructions in the Lawson M3 e-Procurement
Installation and Setup Guide. This will include installing the Design Center on your development
machine, the M3 e-Collaborator on a dedicated server machine (typically the application server)
and the e-Commerce Extension for the e-Collaborator.
2. Gather details about your M3 installation, verify the M3 data for interface and create an ODBC
data source that connects to the M3 BE system database as described in"Creating an ODBC
Data Source for M3" on page 22.
3. Make the following installations and settings on each development and application server:
Run the Connector setup program as described in "Running the Connector Setup Wizard"
on page 26.
Run the Connector Setup Wizard to establish a Connector instance configured to work with
a specific e-Procurement/M3 installation. For details, see "Running the Connector Setup
Wizard" on page 26.
4. Create new e-Procurement presentations, as described in the Lawson M3 e-Procurement
Installation and Setup Guide.
5. Modify the application to hide/expose application areas, as you require.
6. Create an e-Procurement database and then run the database utility to update the database with
your virtual enterprise settings. For details, see "Establishing the Lawson M3 e-Procurement
database" on page 33.
7. Set up the replication system as follows:
13 Chapter 1 Introduction
Create the replication databases and establish access rights as described in "Creating the
Replication database" on page 31.
Edit the MasterData table of the Stage-2 replication database with language mappings and
other settings to ensure proper data interface as described in "Setting the replication data
mappings" on page 32.
Check the SQLXML configuration set by the Install Wizard. If it is not OK, configure the
SQLXML interface of the replication database so that it can find and use the template files
that it needs. For instructions, see "Setting up the SQLXML interface" on page 95.
8. Make the initial data replication as described in "Initial replication" on page 34.
9. Establish all of the various initial data settings in Lawson M3 e-Procurement, as described in
"Configuring and Using the Interfaced System 1 " on page 34.
Once you see a hole through between Lawson M3 e-Procurement and the ERP system, you are
ready to start customizing your solution. Details to help you do this are provided in the following
sections and documents:
"Configuring and Using the Interfaced System 1 " on page 34 and "Configuring and Using
the Interfaced System " on page 59
"Customizing the Solution From M3 " on page 50 and "Customizing The Solution From M3
e-Procurement" on page 63
"Effects of Interfacing" on page 101
When you have confirmed that the system is running correctly, establish a replication schedule so that
replication will occur automatically at regular intervals (see "Replication scheduled tasks and batch jobs" on
page 57).
Detailed Field-Mapping Documentation
This manual is intended to get you started by helping you install the Lawson M3 e-Sales Connector and get
a solution up and running with basic communication between systems. It also gives a few ideas of how to
implement the most common types of customizations and its appendices provide details about how to work
with the replication and real-time configuration.
As you customize your solution for a specific project, you will probably need to see an even more detailed
description of how each individual table and field in M3 is mapped to the Lawson M3 e-Procurement database.
These details are provided in a separate document, which is saved on your development machine in Microsoft
Excel format when you install the Connector. A link to this spreadsheet is provided from the Windows Start
menu; select Start > Programs > Lawson > Lawson M3 e-Sales Connector for Lawson M3 e-Procurement
14.1.7.2 > Documentation > Mappings Reference.
NOTE Mapping is not implemented in M3 BE version 12RPG.
Chapter 1 Introduction 14
Chapter 2
Pre-installation
Preparing M3 Data
Before you try to replicate any data from the M3 BE system, you must check the data contained there to
make sure that it will work correctly with Lawson M3 e-Procurement. For some installations, no changes
will be required. However, you will often set up the M3 data before your initial replication. The table below
lists specific issues that must be set up correctly in M3 to apply with the business logic of EPR and the
replication. See "Data Validation and Erroneous Record Detection" on page 40 and "Error messages" on
page 47 for further information about handling/manipulation of records before insertion in EPR.
Links to validation logic Comment M3 program M3 data entity EPR BO
"Currencies and Exchange Rates" on page 40 Set up exchange rates for all
replicated currencies.
CRS058 Exchange
rates
Currency
"Quantity Units (Unit of Measure)" on page 41 EPR is not case sensitive,
therefore multiple units using
the same characters in different
case can not be used
CRS050 Unit of
Measure
Quantity
Units (UoM)
"Locations" on page 41 Address Line 1 may not be
blank; if blank, the record is
error marked.
Address line 2 may not be
blank; if blank, the value N/A is
populated.
CRS235 Internal
address
Locations
"EPRSpecificPurchaseOrderSeriesinM3"onpage16
and "Companies" on page 41
IMPORTANT Set up Purchase
order series correctly!
CRS165 Order Series Companies
"Companies" on page 41 Set up a specific Purchase
Order type.
PPS095,
PPS098
Order Type
e-Mail address, the table in
"Users" on page 42
Set up an e-mail address for all
users.
CRS111 Email Users
Cost center, the table in
"Users" on page 42
Set up a cost center either in
the employee table or in the
user table.
CRS530
or
MNS150
Cost center
15 Chapter 2 Pre-installation
Links to validation logic Comment M3 program M3 data entity EPR BO
Supplier, the table in
"Suppliers" on page 44
Set up an e-mail address for all
suppliers.
CRS949 Email Suppliers
Supplier address, the table in
"Suppliers" on page 44
Set up supplier addresses
(even though not required in
M3).
CRS622 Address
Phone number, the table in
"Suppliers" on page 44
Set up a phone number for a
supplier.
CRS620 Phone
Contact name/contact person,
the table in
"Suppliers" on page 44
Set up a contact person for all
suppliers, or N/A will be
inserted.
CRS623 Contact
person
EPR Specific Purchase Order Series in M3
Purchase order series, - there is risk for a potential Purchase Order number conflict, since Purchase
Order no. series are set up on company level in M3, but EPR does this on EPR company level
(equals M3 Division level).
In M3, it is possible to set up several number series for purchase order using CRS165.
You can reserve number series and give them names like:
Purchase Order numbers for EPR Company CONO_DIVI: 1000000 - 1099999
Purchase Order numbers for EPR Company CONO_DIVI: 1100000 - 1199999
to assign them to a special type of purchase order.
M3 Purchase Order number series are 7 positions (M3 11) or 10 positions (M3 12) and typically the
Number Series Type (NBTY) = 20.
You can also connect different Purchase Order number series per Purchase Order type and facility.
IMPORTANT The order series must be created in M3 so that each EPR Company has its own interval
in M3. There will otherwise be serious conflict when trying to interface several EPR Companies into
several M3 Divisions (Please note: one-to-one relation only).
1. Create the series
2. M3 will warn if there is a clash with other series.
If so, correct the series
The specific series will naturally be different per installation, but this must be set up correctly.
3. Set up your data and take notes on the series first 2 digits per ERP Company. You will need
this data in the Setup Wizard.
EPR Specific Purchase Order Type in M3
An order type must be set up in M3 since the order interface supplied by M3 Connector will insert the
Purchase Orders on a specific order type and that order type must exist. Otherwise, the insertion via
the API will fail. The order type should be set up in the M3 program CRS 200. Please refer to M3
documentation for further information about M3 Purchase Order Types.
Chapter 2 Pre-installation 16
IMPORTANT The purchase order number series reserved/set up in M3 (see
"EPR Specific Purchase Order Series in M3" on page 16) should NOT be connected to the EPR specific
Purchase Order Type. The reason for this is that if a user manually creates a Purchase Order in M3
using the EPR specific Purchase Order type, a number from the reserved series could be used and this
causes a conflict when the same order number is created in EPR and transferred to M3.
Gathering Required M3 Data for Connector Set-up
Before you install the Connector, you must gather some information about the M3 installation with which
you will be interfacing. The required information is summarized in the tables below. One way to use the
tables is to copy or print them from this manual and fill out the blank column with the required settings. You
will be asked to provide these values when you establish the ODBC data source and run the M3 Connector
setup program.
If the information is not currently available, you can install the Connector without it. However, you will then
need to enter the settings manually as you configure the interfaced system, as detailed later in this manual.
Parameters required by the M3 Connector
Oracle Service setup
Your values Where to find Description Parameter name Wheretheparameterisset
Oracle Net
Manager
This is called TNS Service Name
in the MS ODBC setup
Service
name
Oracle
Service
M3
administrator
The IP address for the M3
database server
IP address Oracle
Service
Oracle Net
Manager
The port to access on the M3
database server
Port number Oracle
Service
Oracle Net
Manager
For the ODBC connection to the
M3 Oracle database
Username Oracle
Service and
Setup
Wizard
Oracle Net
Manager
For the ODBC connection to the
M3 Oracle database
Password Oracle
Service and
Setup
Wizard
IBM DB2 setup
Your values Where to find Description Parametername Wheretheparameteri sset
IBM Net Manager For the ODBC connection to the
M3 IBM database
Username Setup
Wizard
IBM Net Manager For the ODBC connection to the
M3 IBM database
Username Setup
Wizard
17 Chapter 2 Pre-installation
Microsoft ODBC setup
Your values Where to find Description Parameter name Wheretheparameterisset
See
"Creat i nganODBCDat aSourcef or M3"onpage22
For the ODBC connection
to the M3 Oracle database
Username Microsoft
ODBC setup
M3 administrator The name of the SQL
default library for the M3
installation
SQL default
library
IBM DB2
Service
M3 administrator IP address for the M3
server
AS/400
System
IBM DB2
Service
Connector Setup Wizard
Your values Where to find Description Parameter name SetupWizardpage
M3 program MNS095/B Specifies the ID number
for the company within
M3 (maps to the M3
CONO field).
Company
No.
First
Company
page
M3 program PPS095 and
PPS098
Specifies the order type
used for EPR orders
when inserted in M3.
Order Type First
Company
page
M3 program CRS012/B
(or CRS012/E)
Specifies the dimension
for cost centers in M3
Chart of Accounts.
Cost Center
Dimension
First
Company
page
M3 program CRS056/B Specifies the M3 rate
type to be used (typically
01 = Variable rate, the
exchange rates used in
the production
environment)
Rate Type Second
Company
page
M3 program CRS056/B Specifies M3 Division
where the Rate type is
set up.
Rate
Division
Second
Company
page
M3 program CRS055/B Specifies M3 currency
code for Euro
Euro
Currency
Second
Company
page
M3 Program CRS075/E Specifies the language
code (key field CTLNCD)
to be used when
retrieving Payment terms.
Default
Language
Third
Company
page
M3 Program MNS100/B Specifies the M3 division
to be used when
assigning a default
division to users with a
blank division.
Default
division
Third
Company
page
Chapter 2 Pre-installation 18
Your values Where to find Description Parameter name SetupWizardpage
The e-mail should be the
EPR administrators e-mail
or similar.
Specifies an e-mail
address to be set on a
user if no e-mail address
is available from M3
(where to send the
notification if there is no
e-mail on the user in M3).
Default E-
mail
Third
Company
page
Specifies the e-
Procurement ID for the
order language used by
the company.
Order
Language
ID
Fourth
Company
page
M3 Program MNS100/B Specifies the first M3
Division to replicate data
from.
Division First
Division
page
M3 Program MNS095/B Specifies EPR Company
code:
If the connector is
being installed on a
new installation,
specify your
preferred code for
the EPR company.
We strongly suggest
that you use the
following syntax
XXX_YYY (where
XXX = M3 CONO
and YYY = M3 DIVI
If the connector is
being installed on an
existing installation
and you want to map
the M3 Divisions to
the existing EPR
company, then
specify the exact
EPR code.
EPR
Company
Code
First
Division
page
19 Chapter 2 Pre-installation
Your values Where to find Description Parameter name SetupWizardpage
M3 Program MNS095/B
or if you map to an
existing installation, then
go to EPR Business
Center -> Company
Administration
Specifies the EPR
Company Name:
If the connector is
being installed on a
new installation,
specify your
preferred name for
the EPR Company.
We suggest that you
use similar naming
as the Division name
in M3.
If the connector is
being installed on an
existing installation
and you want to map
the M3 Divisions to
the existing EPR
Company, then
specify the exact
EPR Company
name.
EPR
Company
Name
First
Division
page
M3 Program CRS165/B Specifies the M3
Purchase Order Series to
use in EPR and M3 (must
be synchronal). Typically,
series type 20 are used.
IMPORTANT The series
must be defined using
two digits. See
"EPRSpeci fi cPurchaseOrderSeri esi nM3"onpage16.
Order
Series
Second
Division
page
M3 Program CRS008/B Specifies a facility to be
set on a user if the user
has a blank facility
(equals the EPR Location
Group).
Default
Facility
Second
Division
page
M3 Program CRS630/B Specifies a cost center to
be set on a user if the
user has a blank cost
center.
Default cost
center
Second
Division
page
See
"Confi guri ngthenewERPFi el dSetti ngs"onpage59.
ERP
Company
Number
Third
Division
page
See
"Confi guri ngthenewERPFi el dSetti ngs"onpage59.
ERP
Integration
Description
Third
Division
page
Chapter 2 Pre-installation 20
Your values Where to find Description Parameter name SetupWizardpage
See
"Confi guri ngthenewERPFi el dSetti ngs"onpage59.
ERP
Purchase
Order Type
Third
Division
page
See
"Confi guri ngthenewERPFi el dSetti ngs"onpage59.
ERP
Miscellaneous
1
Fourth
Division
page
See
"Confi guri ngthenewERPFi el dSetti ngs"onpage59.
ERP
Miscellaneous
2
Fourth
Division
page
Specifies the URL for the
e-Collaborator configured
for use with the e-
Procurement application
you are interfacing with
M3.
e-
Collaborator
URL
Replication
page
A user with administrator
rights should be used.
Specifies the user
account required to
access the application.
User Name Replication
page
Password for user entered
above
Specifies the user
password required to
access the application.
Password Replication
page
Specifies whether the
MBMs are stored in the
file system or sent to the
M3 e-Collaborator.
Destination M3
Business
Messages
page
If MBMs are stored in the
file system, this
parameter specifies the
destination path.
Destination
path
M3
Business
Messages
page
If MBMs are sent to the
M3 e-Collaborator, this
parameter specifies the
URL.
e-
Collaborator
URL
M3
Business
Messages
page
Specifies a valid user
name (if required) for the
HTTP server (e-
Collaborator).
User Name M3
Business
Messages
page
Specifies the password
for the above user.
Password M3
Business
Messages
page
TIP For further information about the parameters listed above, see
"Customizing the Solution From M3 " on page 50.
21 Chapter 2 Pre-installation
Creating an ODBC Data Source for M3
The server hosting the Lawson M3 e-Procurement database must include an ODBC data source that connects
to the M3 BE system. The driver used for an IBM DB2 database is IBM System i Access for Windows
V6R1M0 (see "Server software" on page 8 for version requirements) and configure an ODBC source using
the driver installed by that package.
Download and install System i Access from
http://www-03.ibm.com/systems/i/software/access/windows/casp.html. Before you run the M3 Connector
for Lawson M3 e-Procurement setup program, you must create this ODBC data source. The setup program
checks for it.
To create the ODBC data source in 32-bit:
1. Working on the application server machine, open the Windows Control Panel and run
Administrative Tools > Data Sources (ODBC).
2. In the ODBC Data Source Administrator, click Add on the System DSN tab.
3. In the Create New Data Source window, all of the various types of ODBC drivers installed on
your system are listed.
Select the IBM AS/400 driver called Client Access ODBC Driver (32-bit) and click Finish.
4. On the General tab of the setup window, enter the following values:
Enter a name for the data source. This is the name by which the M3
ODBC data source will be known to your application server.
Data source name
Enter the IP address for the M3 server. AS/400 System
If you are not sure what these values should be, speak with the M3 administrator. The other
settings in this window can be left at their default values.
5. Click Connection Options.
6. In the Connection Options window, select Never prompt for SQL Connection.
Click OK when you are done with this window.
7. Go to the Server tab of the setup window.
Enter the following value:
Enter the name of the SQL default library for the M3 installation. For
M3 RPG, you can use QPGL as the default library.
SQL default library
If you are not sure what this value should be, speak with the M3 administrator. The other
settings in this window can be left at their default values.
Click OK to create the data source on your system.
To create the ODBC data source in 64-bit
1. Open System i Access for Windows and select ODBC Administration. Ensure that you selected
the administration for 32-bit and not 64-bit.
2. Use the setup procedures mentioned above for a 32-bit environment to create data sources.
Installing SQLXML
The Transfer Agent communicates with the replication database through the SQLXML interface for Microsoft
SQL Server. This interface is not part of the default SQL Server installationit is an add-on package from
Chapter 2 Pre-installation 22
Microsoft. You can download the package from Microsofts Web site (see "System Requirements" on page
7 for version requirements).
Please refer to Microsofts Web site for download and installation instructions. Install the interface so that
the Transfer Agent will be able to interact with the Stage-2 replication database
Installing MEC
Please refer to the appropriate M3 Enterprise Collaborator Installation Guide
23 Chapter 2 Pre-installation
Chapter 3
Installation
Introduction
The Connector installation and configuration is done using two separate wizards; the Install Wizard and the
Setup Wizard. The Install Wizard installs the Setup Wizard software. The Setup Wizard which can be run
at any time configures the Connector for specific e-Procurement/M3 installations. It uses files installed by
the Install Wizard as a source for generating replication files.
Install Wizard
The Connector Install Wizard installs the following:
The M3 Replicator application
The Message Transfer Agent application and its support files (including a sample configuration file).
Documentation files for the Connector.
The Connector Setup Wizard
The Install Wizard copies all the files and utilities that are required to implement the Connector to your
hard disk. Files are installed at:
C:\Program Files\Lawson\M3 Connector for e-Procurement 14.1.7.2
Utilities are installed at:
C:\Program Files\Lawson\m3 connector tools 14.1.7.2
Setup Wizard
The Connector Setup Wizard installs the following:
Scheduled tasks for running the Replicator and Transfer Agent
Configuration files for the Replicator and Transfer Agent
A database-creation tool for creating the stage-1 and stage-2 databases.
SQL scripts for adding new tables, triggers and data (such as site texts and status values) to an
existing Lawson M3 e-Procurement database set (required to run the Connector with all types of
Lawson M3 e-Procurement installations).
By default, these files are installed at:
C:\Program Files\Lawson\M3 Connector for e-Procurement 14.1.7.2\<Replication>
Preparing to Install
You must run the Connector Install Wizard and Setup Wizard on the machine on which you plan to run the
M3 Replicator and Transfer Agent applications. This machine must be able to access both the M3 and
e-Procurement databases. The M3 database will be accessed via ODBC, so you must create an ODBC
data source for it (see "Creating an ODBC Data Source for M3" on page 22). The e-Procurement database
Chapter 3 Installation 24
will be accessed directly in SQL server. After running the Connector Install Wizard, you will use the Setup
Wizard installed to create the stage-1 and stage-2 databases on the same database server as the
e-Procurement database (see "Establishing the Replication database" on page 31).
Many of the values requested by the Setup Wizard are also mentioned in "Gathering Required M3 Data for
Connector Set-up" on page 17. If you filled out the table provided in that section, then you can use that
information here.
Running the Connector Install Wizard
The Installation and Setup Wizards can be used to deploy the connector on both new and existing installations.
For new installations, the Setup Wizard will create companies (one per M3 Division) in EPR. For an existing
installation, the Setup Wizard will allow you to map M3 Divisions to existing EPR companies.
To use the Connector, it must be installed on the same SQL server installation as the Lawson M3
e-Procurement database.
1. If you have not already done so, do the following:
a. Install Lawson M3 e-Procurement and all of its required software on your development machine
and application servers.
b. Create an ODBC data source that points to the M3 BE system database (see "Creating an
ODBC Data Source for M3" on page 22 for details).
c. Copy the M3 Connector for e-Procurement installation files to your hard disk and decompress
them if necessary.
2. Open the folder in which you copied the M3 Connector for e-Procurement installation files and
run the installer file; Setup.exe
3. On the Welcome page, click Next. Follow the on-screen prompts to proceed.
Use this page to enter your name and the company to which the Connector is licensed.
4. Once you reach the Select Components page, select the components you want to install.
By default, all components will be installed. Usually, you will keep this default. However, you can
now review the selection of components that will be installed and, if you like, modify the selection.
Each component showing a selected check box will be installed. For more information about a
component, click its name to read help text about that component in the Description area.
Make your selections and click Next when you are done.
5. If you choose to install the M3 Connector Tools (in the Select Components page), a second
Choose Destination Location window is displayed.
By default, the Message Transfer Agent is installed as M3 Connector Tools in the same folder as
the M3 Connector. For example, if you select the default destination for the M3 Connector (given
above), the Transfer Agent is installed as C:\Program Files\Lawson\m3 connector tools 14.1.7.2.
NOTE If M3 Connector Tools are already installed, this Choose Destination page is not displayed.
M3 Connector Tools and M3 Connector are uninstalled separately.
6. The files are now installed and the relevant settings are made. After a few seconds, the Setup
Complete page appears.
The M3 Connector is now installed.
You now have the option of running the Setup Wizard, which configures the Connector for specific
e-Procurement/M3 installations.
25 Chapter 3 Installation
NOTE You can run the Wizard to create a new set of files at any time, but you cannot use the
Wizard to edit existing files.
If you want to run it now, select the check box and click Finish.
To quit the installer without running the Setup Wizard, clear the check box before clicking
Finish.
Running the Connector Setup Wizard
What the Wizard does
The Connector Setup Wizard creates a full Connector instance configured to work with a specific
e-Procurement/ M3 installation.
NOTE The Wizard eliminates the need to configure parameters manually, as was the case with previous
versions of the connector.
The Wizard creates the following:
A Working Folder containing a full set of Replicator configuration files, including batch files and
configurations for all elements of the Connector. However, the non-SQL Server version-specific
executable elements (such as the Transfer Agent) are not copied; these can be shared by all
connector configurations you have on your machine.
NOTE The path for the working folder is:
C:\Lawson\e-Procurement\<Configuration name>\
The replication template installed together with the program files is expanded by the Wizard using the
values you enter. For example, values you enter when you run the Wizard are saved to another conf.XML
(configuration parameters file) in the working folder.
A script to insert base data (companies etc.) into the e-Procurement database.
Scripts for creating new replication databases (both Stage-1 and Stage-2).
A Start menu shortcut to tools configured to work with the new set of Replicator configuration files.
You will give the configuration a name as you run the Wizard, so the resulting Start menu path for
each configuration will look something like:
Start > Programs > Lawson > M3 Connector for e-Procurement 14.1.7.2> configuration name >
Running the Wizard
The Connector Setup Wizard configures the Connector for specific e-Procurement/M3 installations. You
can run the Wizard several times to generate multiple configurations.
To generate a Connector configuration:
1. Launch the Connector Setup Wizard by doing one of the following:
If you have not yet installed the Connector, run the Connector installer and select the Run
the Setup Wizard check box on the final page of the installer; click Finish to continue to
the Setup Wizard.
If you installed the Connector during a previous session and have since quit the installer,
click Start > Programs > Lawson > M3 Connector for e-Procurement 14.1.7.2 > Setup
Wizard.
Chapter 3 Installation 26
2. The Wizard welcome page opens. Click Next and follow the succeeding on-screen prompts
to proceed.
Once you reach the Choose working folder page, choose where you would like to save the
active configuration files for the M3 Replicator. The default location is:
C:\Lawson\e-Procurement\Replication
A folder named SQLXML Templates will be created in the folder you named here. This folder
will be configured as the target of a virtual directory in IIS (see also "Setting up the SQLXML
interface" on page 95).
Click Next when you are done and follow the succeeding on-screen prompts.
3. In the M3 version window page opens, specify the version with which you are interfacing.
4. You will be asked if you have already created an ODBC data source on your machine (you
should already have done this, see "Creating an ODBC Data Source for M3" on page 22).
If you have done this, click Yes.
If you do not have the data source present, click No. This will prevent the Setup Wizard from
looking for the data source on your machine (see step 5).
5. In The ODBC data source page, specify the following:
The drop-down list (available if you clicked Yes in step 4) includes all
of the sources currently configured on your machine. Select the source
that you created for accessing M3.
If you clicked No in step 4, there is no drop-down list. You must enter
a name for the ODBC data source to be configured later (see "Creating
an ODBC Data Source for M3" on page 22).
NOTE The source name you enter is written to the M3-Replicator
configuration file. For this reason, if you create an ODBC data source
later, you must ensure that its name matches the one you enter
here.You can check and modify the name in the M3-Replicator
configuration file later (see
"Configuring the M3 Replicator" on page 88).
ODBC data source
The user name for an account with access to all of the required tables
of the M3 BE system via ODBC.
Username
The password for the user specified above. Password
When you are done, click Next.
6. in the Microsoft SQL Server Version page opens, specify the version you are using and then
click Next.
7. In the Databases page, specify the following:
Enter the name of the SQL Server installation where the e-Procurement
database is installed. Often, this will be the local machine, in which
case you should enter (local).
SQL Server Name
Enter the name of the currently installed e-Procurement database. e-Procurement
Database
Enter a name for the Stage-1 replication database. This will be installed
on the same SQL server as the e-Procurement database.
Stage1 Database
27 Chapter 3 Installation
Enter a name for the Stage-2 replication database. This will be installed
on the same SQL server as the e-Procurement database.
Stage2 Database
NOTE If you wish to install multiple instances of the connector, every time you reach this page
in the Wizard, you must ensure that you give each database a unique name.
8. Specify details for your default M3 Company with which the online solution will work.
For M3 Company 1/4, specify the following:
The ID number for the company within M3 (maps to the M3 CONO
field).
Company No
NOTE You must drop any leading zeros in company numbers from M3. For example, if
the company number in M3 is 065, you must type 65 here. This is not necessary for the
other IDs requested by the Setup Wizard.
Order type used for EPR orders when inserted in M3. Order Type
Dimension for cost centers in M3 Chart of Accounts. Cost Center Dim
Click Next.
For M3 Company 2/4, specify the following:
M3 rate type to be used (typically 01 = Variable rate, the exchange
rates used in the production environment)
Rate Type
M3 Division where the rate type is set up to get the exchange rates
from.
Rate Division
M3 currency code for Euro. Euro Currency
Click Next.
For M3 Company 3/4, specify the following:
Specifies the default language code to be used when retrieving
Payment terms.
Default Language
The M3 division to be used when assigning a default division to
users with a blank division (required since the division is part of the
EPR company key and a user must be assigned to a company in
EPR).
Default Division
An e-mail address to be set on a user if no e-mail address is
available from M3 (e-mail address is required in EPR).
Default Email
Click Next.
For M3 Company 4/4, specify the following:
Order Language ID: Specifies the e-Procurement ID (e.g. EN for english) for order
language used by the company.
9. In the M3 Division pages, specify details for the M3 Division from which to replicate data.
For M3 Division 1/2, specify the following:
The first M3 Division from which to replicate data. Division
Chapter 3 Installation 28
If the connector is being installed on a new installation, enter your
preferred code for the EPR company, - we strongly suggest that
you use the following syntax: XXX_YYY (where XXX = M3 CONO
and YYY = M3 DIVI). If the connector is being installed on an
existing installation and you want to map the M3 Divisions to the
existing EPR Company, enter the exact EPR Company code.
EPR company code
If the connector is being installed on a new installation, enter your
preferred name for the EPR company, - we suggest that you use
similar naming as the Division name in M3. If the connector is being
installed on an existing installation and you want to map the M3
Divisions to the existing EPR company, enter the exact EPR
Company name.
EPR company name
Click Next.
For M3 Division 2/2, specify the following
The M3 Purchase Requisition Order Series to use in EPR and M3
(this is typically controlled by the order series to be used for EPR
purchase orders in M3 and that series is normally XXxxxxx.
Order Series
IMPORTANT The series must be defined using two digits if orders are to be transferred
back to multiple M3 Division, or there will be an order number conflict. Since order series
are defined at company level in EPR (equals M3 divisions) and on company level in M3.
We strongly advise that you use the following syntax:
M3 order series 10xxxxx (enter 10 in Setup Wizard) Division 1
M3 order series 11xxxxx (enter 11 in Setup Wizard) Division 2
etc..
See "EPR Specific Purchase Order Series in M3" on page 16.
A value to be set on a user if the user has a blank facility (equals
the EPR Location Group).
Default Facility
A value to be set on a user if the user has a blank cost center. Default Cost Center
Click Next.
NOTE The Setup Wizard defaults some other parameter on the e-Procurement Company
master, see "Additional Settings made by the Setup Wizard" on page 102.
10. You will be asked if you want to enter more divisions.
Click Yes to loop the previous two Division pages and specify parameters for more
Divisions from which to replicate data.
Click No when you have specified parameters for all the M3 Divisions from which you
wish to replicate data.
11. Enter the ID in the Suppliers page.
12. In the Replication page, specify the e-Collaborator URL and the e-Procurement user account
that will be used by the replication system to submit XML request documents to the
e-Procurement XML Gateway.
Make the following settings:
29 Chapter 3 Installation
Enter the URL for the e-Collaborator configured for use with the e-
Procurement application you are interfacing with M3.
e-Collaborator URL
Specify a user that has execution rights to all of the business object
methods used by the replication system. When you create the e-
Procurement database, you must specify an administrative user by e-
mail and password. We recommend that you decide now what these
should be and then enter the same values when you create the
database (see also "Creating an interfaced application database" on
page 33). This user will be pre-configured to execute all of the required
gateway methods. The account that you specify here will be saved in
a Transfer Agent configuration file called GatewayPlugInCon
fig.xml; see also "Using the Message Transfer Agent" on page 90.
Name and Password
Click Next when you are done.
13. In the first M3 Business Messages, note that these two fields are contained within the MBM
header. The information must match the MeC configuration on the M3 side you can find this
in the M3 Agreement for e-Procurement.
14. In the second M3 Business Messages page, note the following:
If you select File System (Test), MBMs are dumped in a file. You must select this option
if the MeC is set up to take files from a folder
If you select e-Collaborator (Live), MBMs are sent to the M3 e-Collaborator (HTTP server)
15. In the M3 Business Messages Destination path page, note the following:
If you selected File System (Test), enter a valid path to a file system folder, as requested.
The MBMs will be dumped to this location; you can examine them later.
If you selected e-Collaborator (Live), enter the URL for the e-Collaborator (HTTP server),
as requested. For example; http://serverX/MeC.
If the HTTP server requires authentication, you must also enter a valid User Name and
Password otherwise just leave these fields empty.
16. In the Scheduled Tasks page, the Setup Wizard will create tasks in your computers Scheduled
Tasks control panel. These tasks will replicate data at regular intervals from the ERP system
to the Lawson M3 e-Procurement database or from the Lawson M3 e-Procurement database
to the ERP system. For this to work, the tasks must be executed as though they are being
run by a user who is permitted to access the replication database (see "Setting access per
missions" on page 99).
Any Windows account can be used, provided that it matches the settings you make for the
replication database.
17. Click Next when you are done. n the Start Copying Files page is a summary of your settings.
Review the information displayed and if it looks correct, click Next to start copying files to your
computer.
18. Click Finish after the Setup Wizard Complete page appears.
The Wizard has created the SQL files; company.sql and ApplicationData.sql, which contain data you
entered in the Wizard plus some hard coded data.You will run them later using the Start menu command:
Start > Programs > Lawson > M3 Connector for e-Procurement 14.1.7.2 > <Configuration Name>
Databases > Update e-Procurement Application Database
You can run the Wizard again at any time. Each time you run it, you create a new set of configuration
files and scripts. By choosing a different working folder and different Replication database names each
time, you can have multiple configurations available at the same time. This can be useful during
development and testing.
Chapter 3 Installation 30
Chapter 4
Establishing the Replication database
Creating the Replication database
This chapter concerns replication from M3 to Lawson M3 e-Procurement only.
To create the replication database, you will use the Connectors Database Setup Utility to run a set of SQL
scripts.You must run the utility twice; once for each database stage. For details about how these two
databases are used, see "The two-stage replication database" on page 51.
IMPORTANT You must create both the Stage-1 and Stage-2 databases on the same database server as
the Lawson M3 e-Procurement database.
Creating a default replication database
The databases created by the default scripts use the same structure as the default M3 BE system
database. If you have customized the ERP system database, then you may also need to customize the
replication databasessee the next section for advice.
1. Be sure that you have installed the M3 Connector on the machine from which you will create
the databases.
2. Create the Stage-1 database by clicking Start > Programs > Lawson > M3 Connector for
e-Procurement 14.1.7.2 > Database > Configuration Name > Databases > Create stage 1
of the shadow database. This will launch the Database Setup Utility.
3. Work through the Wizard pages of the Database Setup Utility, following the instructions on
your screen. Remember that you must run both replication databases on the same database
server as the Lawson M3 e-Procurement database.
4. Create the Stage-2 database by clicking Start > Programs > Lawson > M3 Connector for
e-Procurement 14.1.7.2 > Database > Configuration Name > Databases > Create stage 2
of the shadow database. Be sure to create the Stage-2 database on the same database
server as the Stage-1 and Lawson M3 e-Procurement databases.
5. Once again, work through the Wizard pages of the Database Setup Utility, which works in
exactly the same way as with the Stage-1 database.
NOTE For details on how to set up access permissions see "Setting access permissions" on page 99.
Creating a customized replication database
If you have customized your M3 BE-system database, then you may also need to customize the replication
database to handle your changes. This may require adding a few extra fields to existing tables, or even
adding extra tables.
1. Be sure that you have installed the M3 Connector on the machine from which you will create
the databases.
2. If you have not already done so, run the Connector Setup Wizard.
31 Chapter 4 Establishing the Replication database
3. Locate the working folder containing the SQL scripts that create the Stage-1 and Stage-2
replication databases. Using the standard installation settings, you can find these scripts in:
C:\Lawson\e-Procurement\<Configuration Name>\Databases
This folder contains all of the SQL scripts that are required for a default database, plus two
descriptor files, which tell the Database Setup Utility to run the supplied scripts. Each descriptor
file always runs a specific set of scripts saved in the same folder as the descriptor itself. Modify
the scripts to customize the existing tables in stage databases. If you need to remove or add
new tables, you might also need to update the descriptors. This is done by opening them in
a text editor they simply contain a header and then a list of SQL files to run.
NOTE For details on how to set access permissions, see "Setting access permissions" on page 99.
As an alternative to the above procedure, you could instead start with a default set of replication databases
and customize them as needed using the standard tools of Microsoft SQL Server.
Setting the replication data mappings
To make sure that the replicated records arriving to Lawson M3 e-Procurement are valid there, the replication
mechanism must allow for a few extra default settings and mappings between language codes. The settings
that control these are stored in the Stage-2 replication database in a table called MasterData. Most of the
initial settings stored here are taken from the input you provided when installing the Connector. However,
you may need to change these later.
In addition, the language selection is initially set to support the default languages of Lawson M3 e-Procurement
and mapping to default language codes in M3. If your M3 installation is using different language codes
and/or different languages, then you must modify the language set stored in the MasterData table. You
should always remove the language records for languages you are not using; this will help increase replication
performance.
The table below lists all of the various types of settings stored in the MasterData table. To edit this table,
locate the MasterData.sql file and open in a text editor such as Notepad. We recommend that you always
review the contents of this table immediately after creating the Stage-2 database, especially with reference
to the language entries.
NOTE The [Mapping] column is used only for the language keys; it is ignored for all other types of keys.
Description Mapping (for
language
keys only)
Value Key
There must be a language record for each of the
languages that you are using in Lawson M3 e-
Procurement. Each record must specify the following:
Key must be Language
Value must be the language code used in the ERP
system
Mapping must be the language code used in Lawson
M3 e-Procurement
The default setup uses the three language-mapping
records. However, you should remove any unused
languages because this will improve performance.
DE DE Language
DK DK Language
EN GB Language
. . .
. . .
. . .
Chapter 4 Establishing the Replication database 32
Chapter 5
Establishing the Lawson M3
e-Procurement database
Creating an interfaced application database
The Lawson M3 e-Procurement application database installer can make three different types of installation:
Migrate the existing e-Procurement database
Install a new and empty e-Procurement database
Install a new database fitted with demo data
Of these three, it is the first two options that are relevant for M3 interface you can either migrate an existing
database or create a new and empty one.
NOTE The M3-interfaced database must not include demo data. This is because the demo data can interfere
with incoming data from M3.
When you installed the M3 Connector, you were asked to specify an e-Procurement user to be associated
with XML replication. You might also consider specifying the same e-mail address and password when you
are asked to name an administrator for the e-Procurement application (see step 12 in the list in
"Running the Wizard" on page 26).
See the Lawson M3 e-Procurement Installation Guide for further details about the database installer.
Updating the application database
When you installed the M3 Connector, you were asked to specify details about the M3 company and division.
These were saved locally in several of the replicator configuration files and in an SQL file. To finish preparing
your e-Procurement database for use with M3, you must update the database to include your company
settings as follows:
1. Click Start > Programs > Lawson > M3 Connector for e-Procurement 14.1.7.2 > Configuration
Name > Databases > Update e-Procurement Application Database.
This starts the Database Setup Utility. There are no settings on the first page so just click Next.
2. On the Enter connection details page, enter the connection details for connecting to the
e-Procurement database that you created for your project.
3. Click Next.
4. The Database Setup Utility is Finished page opens.
Select the View log file check box if you wish to see the log file when you quit the utility. Otherwise,
clear this check box.
5. Click Finish to close the utility.
33 Chapter 5 Establishing the Lawson M3
e-Procurement database
Chapter 6
Configuring and Using the Interfaced
System 1
Initial replication
This chapter concerns replication from M3 to Lawson M3 e-Procurement.
1. If you are using SQL 2008, perform the following procedures to configure compatibility of the
replicator MVXRepl.exe:
a. Locate 00 Replicate to Stage Databases.bat in your <e-Procurement install
folder>\<Replication>\Initial Tasks folder.
b. Open the file in a text editor and change the text MVXRepl.exe to MVXRepl2008.exe.
@ECHO OFF
..\MVXRepl2008.exe /configfile=..\conf.xml
c. Locate BaseDataReplication.bat in your <e-Procurement install
folder>\<Replication>\Scheduled Tasks folder.
d. Open the file in a text editor and change the text MVXRepl.exe to MVXRepl2008.exe.
@ECHO OFF
..\MVXRepl2008.exe /configfile=..\conf.xml
TransferAgent.exe "..\Transfer Configurations\BaseData.xml.trf"
rem MVXLogAsMail.exe /configfile=..\MVXLogAsMailConf.xml
2. Prepare the entire interfaced system as described elsewhere in this manual, including:
a. Gather basic details about the M3 installation. Many of these will be necessary later in this
procedure. For instructions, see "Gathering Required M3 Data for Connector Set-up" on page
17.
b. Check the current data and setup of the ERP system as described in "Preparing M3 Data"
on page 15.
c. Install Lawson M3 e-Procurement and the M3 Connector ("Installation" on page 24).
d. Create the Lawson M3 e-Procurement database ("Establishing the Lawson M3 e-Procurement
database" on page 33).
e. Create and publish the Lawson M3 e-Procurement application (see Lawson M3 e-Procurement
Installation Guide).
f. Create the Replication database (both stage 1 and stage 2) and configure its SQLXML interface
("Establishing the Replication database" on page 31).
3. Make sure you have established the initial data mappings in the MasterData table of the Stage
2 replication databases. These settings help ensure that records replicated from the ERP system
will be valid when used in Lawson M3 e-Procurement. For instructions, see "Setting the replication
data mappings" on page 32.
Chapter 6 Configuring and Using the Interfaced
System 1
34
4. Log on to the machine where you have installed the Transfer Agent and M3 Replicator. Be sure
to use a log on account that is able to access the replication database (see "Setting access per
missions" on page 99).
5. Find the folder that contains the set of initial replication batch files installed by the Connector
Setup Wizard. Using the default installation settings, you can find this in:
<e-Procurement install path>\<Replication>\Initial Tasks\
The folder includes a shortcut named Command Prompt Here, which will open a command
prompt in the Initial Tasks folder, thereby making it easy to run each of the other tasks in a
way that will enable you to study the output log after each job.
Working in the command-prompt window, run the 00 Replicate to Stage Databases.bat
file. After each replication do the following:
a. Read feedback messages in the command prompt window. If an error is shown, investigate
the message and/or replication log in the Stage-2 database and correct the cause.
b. Check the contents of the TVFReplicationLog table in the Stage-2 database. If it indicates
that you need to change data in M3, then delete the Stage-1 and Stage-2 databases and
reinstall them; remember also to update the MasterData table afterwards (see "Setting the
replication data mappings" on page 32.
6. We recommend that you test the SQLXML gateway before replication is started. First, enter the
following URL in Internet Explorers address line:
http://localhost/EPR_Stage2/template/CurrencyTemplate.xml
Click Go. The result should be an empty request no errors.
7. Start the XML Communication Test Tool and send the following request to the gateway (remember
to change the user and password to those specified in step 12 in ):
<?xml version="1.0" encoding="UTF-8"?>
<IdealXML version="1.0" requestid="Currencies from Movex"
xmlns="Request" xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<Header>
<Credential>
<Login>admin</Login>
<Password>demo</Password>
</Credential>
</Header>
<Request command="commit">
<Currency xmlns="Currency" CurrencyCode="000"
CurrencyName="No Money" RateToEuro="13.760300">
<Text LanguageID="DK" CurrencyName="Ingen Penge"/>
<Text LanguageID="EN" CurrencyName="No Money"/>
<Text LanguageID="SE" CurrencyName="Ingen Penge"/>
</Currency>
</Request>
</IdealXML>
If there is an error, check that the MEC is started. Then trying sending the request again.
Finally, go to the Business Center and delete the currency.
8. Once you have run the first batch file successfully, continue by running 02 Transfer Coun
tries.bat in the command-prompt window. Again, check the feedback and log tables to confirm
that the replication has worked. If you have problems, you can also check the Transfer Agent log
files, which are stored in %SystemRoot%\System32\LogFiles\TransferAgent\.
NOTE If a transfer fails, you must run the 00 Replicate to Stage Databases.bat file
again in order to reset status in the stage database.
35 Chapter 6 Configuring and Using the Interfaced
System 1
9. Continue working in the command-prompt window, executing the remaining batch files in the order
indicated by their file names. After each step, re-check the database and logs to confirm that the
transfer has completed successfully and, if necessary, correct any problems.
NOTE You might instead choose to run the transfer jobs (batch files 1 to 10) in the Transfer Agent
Console rather than by executing the batch files at the command prompt. To do this, open the
BaseData.xml.trf file in the Transfer Agent Console and then use the Lookup button to run
each job, one at a time. See also "Using the Transfer Agent console" on page 56. Error messages
are shown in the Transfer Agent Console and additional help might be found in the Transfer Agent
log files.
10. Once you have confirmed that the initial replications have worked correctly, modify the template
files for daily operation and establish the replication schedule (see "Replication scheduled tasks
and batch jobs" on page 57).
Preparing e-Procurement Data after Initial Replication
The following setup is required before e-Procurement is operational after a master data replication from M3:
1. Configure user roles in Buy Center. All users from M3 are inserted with the Buyer role. Some
users may require other e-Procurement Buy Center roles. Give relevant users the authorizer role.
Also remember to add the finance manager role to a user per e-Procurement company.
Refer to the e-Procurement help text for further details.
2. Set up relevant authorizers and other authorization workflows for all cost centers.
Refer to the e-Procurement help text for further details and see the note below.
3. Set up product groups and their hierarchy in the Supply Center.
Refer to the e-Procurement help text for further details.
4. If full use is to be taken of the connector, update the Product Group ID with the corresponding
M3 Dummy item.
Refer to "Configuring the Supply Center" on page 38 for further details.
5. Create the necessary users in Supply Center.
6. Fill out supplier master fields not populated by the replication, such as URL.
7. Create the required agreements in Supply Center.
8. Create the required catalogs in Supply Center.
9. Populate the catalogs with the relevant products.
10. Assign default accounts to all product groups. This is done in the finance manager interface in
Buy Center.
Refer to the e-Procurement help text for further details.
11. Populate the e-Procurement Company master with address details.
Refer to the e-Procurement help text for further details.
12. Set up the required extra account demands for all new companies (typically the companies created
by the Setup Wizard).
13. Prepare e-mail functionality.
Refer to the Lawson M3 e-Procurement Deployment Guide for further details.
Chapter 6 Configuring and Using the Interfaced
System 1
36
The Connector Interface Overview
The table below gives a quick overview of what to do when making a new e-Procurement installation fully
interfaced to M3. For mapping against an existing installation please evaluate the relevance of each step.
The baseline or prerequisite for the list below is a new Lawson M3 e-Procurement installation
Link / Where to find Description No.
"EPR Specific Purchase Order Series in M3" on page 16 Set up (reserve) purchase order
series in M3.
1
"EPR Specific Purchase Order Type in M3" on page 16 Set up order type in M3 2
"Preparing M3 Data" on page 15 Set up M3 data to match e-
Procurement master data replication
3
"Gathering Required M3 Data for Connector Set-up" on page 17 Gather M3 information required
when running installation
4
"Creating an ODBC Data Source for M3" on page 22 Set up ODBC connection 5
"Running the Connector Setup Wizard" on page 26 Install the connector and run first
master data replication
6
"Preparing e-Procurement Data after Initial Replication" on page 36 Set up remaining data in e-
Procurement manually
7
Chapter 11:, "The View from M3" on page 69, especially the
sections "Mandatory Basic Data in M3" on page 71,
"Modified Members" on page 82 and
"Action Numbers V11RPG" on page 83.
If you havent already done so, install
the MeC and the e-Commerce
Extension
8
Chapter 9:,
"Configuring and Using the Interfaced System " on page 59,
section "Configuring the new ERP Field Settings" on page 59.
Set up interface attributes for
replication to M3 on e-Procurement
Company master
9
Configuring Business Center
This section only applies to data replication from e-Procurement to M3.
Configure Order Numbers for M3
Lawson M3 e-Procurement generates unique order numbers automatically according to the rules
established for each company. You must configure the system to generate numbers that are compatible
with the ERP system and which fit in with any additional conventions in use there.
NOTE If you used the Setup Wizard, these values are already configured.
To work with the ordering number settings, use the System Administration:Companies area of the Buy
Center Administration site to configure each company. The relevant settings are at the bottom of the
company-administration page. (Please see the Lawson M3 e-Procurement Deployment Guide for a
complete description of how to use these settings).
To ensure that the system you establish will be compatible with the ERP system, please note the following
restrictions:
37 Chapter 6 Configuring and Using the Interfaced
System 1
Order numbers must be seven characters long, so set LengthOrderNo to 7 in M3 11 or 10 in M3
12.
Because of the 7 (or 10) character limitation, use only a minimum number of fixed characters for
the prefix and postfix of the order numbers. Note that the order number postfix can even be blank,
which is what we recommend you use if possible. Usually, you will use the prefix to help identify
the company and system (in this case, Lawson M3 e-Procurement) that generated the order or
requisition.
Configuring the Supply Center
This section only applies to data replication from e-Procurement to M3.
For each product group defined in Lawson M3 e-Procurement, there must be a matching product group in
the ERP system. Because product groups are not synchronized by the M3 Connector, you must re-define
all of the relevant groups from the ERP system in Lawson M3 e-Procurement and ensure that the Product
Group ID fields match in each system.
In Lawson M3 e-Procurement, you maintain product groups using the Supply Center. Please see the Lawson
M3 e-Procurement Deployment Guide manual for complete details.
Dealing with Records Deleted or Deactivated in M3
Only some records can be marked as deleted when data is replicated from M3 to e-Procurement. Therefore,
in many cases when you delete records from the M3 BE Java system, you may also need to delete them
from e-Procurement manually. However, some types of records include a status field, which is simply
changed from active to inactive when the record is removed from the M3 BE Java system.
The following main records include a status field or other fields in M3, that are used to delete-mark or lock
records in e-Procurement:
(M3 Program CRS620) Suppliers
(M3 Program CRS630) Accounts
(M3 Program CRS630) Cost centers
TIP For further information, see "Delete handling" on page 39.
The following main records do not include a status field and must therefore be removed manually from
e-Procurement if you delete them from the M3 BE Java system:
(M3 Program CRS055) Currencies
(M3 Program CRS050) Unit of Measure (Quantity Units)
(M3 Program CRS008) Facilities (e-Procurement Location Groups)
(M3 Program MMS005) Warehouses (e-Procurement Locations)
(M3 Program MNS150) Users
(M3 Program CRS075) Payment terms
The following sub records do not include a status field and must therefore be removed manually from
e-Procurement if you delete them from the M3 BE Java system:
Chapter 6 Configuring and Using the Interfaced
System 1
38
(M3 Program CRS622) Supplier addresses
(M3 Program CRS623) Supplier Reference persons
(M3 Program CRS949) Document /Partner/Media
(M3 Program CRS235) Warehouse addresses
(M3 Program CRS058) Exchange rates
(M3 Program CRS530) Employee Master File
(M3 Program CRS111) Mail addresses
(M3 Program MNS100) Division Master
Delete handling
This section describes the business logic implemented for:
(M3 table CIDMAS) Suppliers
(M3 table FCHACC) Accounts
(M3 table FCHACC) Cost centers
When status of a record in one of above mentioned tables changes in M3 (and makes the record inactive
in M3), the corresponding record in e-Procurement is delete-marked, - the specific technical solutions
differ, please refer to the details below.
Suppliers
M3:
No delete-mark, the record is (or can be) removed from the database.
The field IDSTAT (status) in table CIDMAS will be used as selection criteria. Value of the field can
be:
10 = Preliminary
20 = Approved
30 = Stopped
90 = Deactivated
Suppliers in all statuses are replicated to Stage 2.
e-Procurement:
Status 10, 30, 90 in M3 (IDSTAT) = the supplier is locked in e-Procurement (field
Supplier.isDeleted = 1)
Status 20 in M3 (IDSTAT) = the supplier is not locked in e-Procurement (field Supplier.isDeleted
= 0)
If the value of this field (IDSTAT) changes from 10 or 30 or 90 => 20, the supplier will be enabled
in e-Procurement (meaning that field Supplier.isDeleted will be updated to value 0)
The following logic applies:
39 Chapter 6 Configuring and Using the Interfaced
System 1
If IDSTAT = 10 or 30 or 90 and the record does not exist in e-Procurement - then do not
insert into e-Procurement, set status 11 in Stage 2.
If IDSTAT = 10 or 30 or 90 and the record exists in e-Procurement and is active (field
Supplier.isDeleted = 0), then update e-Procurement record (update field Supplier.isDeleted
to value = 1)
If IDSTAT = 10 or 30 or 90 and the record exists in e-Procurement and is not active (field
Supplier.isDeleted = 1), then do nothing.
If IDSTAT = 20 insert or update the record.
Accounts and Cost centers
M3:
No delete-mark, the record is (or can be) removed from the database.
The fields EALCCD and EAVFDT in table FCHACC will be used as selection criteria.
EALCCD = 0 (num, 1) (Value 0 or 1, value = 1 means that the account is blocked).
EAVFDT (valid from), EAVTDT (valid to) (Date check, validity check,- num (8))
Records in all statuses are replicated to Stage 2.
e-Procurement:
The following logic applies (similar for both fields, field EALCCD used as example):
If EALCCD = 1 (blocked) and the record does not exist in e-Procurement - then do not insert
into e-Procurement, set status 11 in Stage 2.
If EALCCD = 1 (blocked) and the record exists in e-Procurement - then update e-Procurement
record (field payerNumber.isLocked) to value = 1 (Please refer to note 1).
If EALCCD = 0 insert or update the record.
Data Validation and Erroneous Record Detection
M3 Replicator program generates and executes an SSIS package, which transfers data from the M3 database
to Stage 1 and Stage 2 and also executes the stored procedure EPR_Stage2.spValidateData . This
procedure checks that all the data waiting to be replicated are actually valid for use within the e-Procurement
databases. Records that are considered invalid are marked as such by the procedure (by setting status =
10 or 11), and will thereby be filtered out by the SQLXML templates rather than being transferred to the
e-Procurement databases, where they would be rejected by the XML Gateway.
Each replication executes SpValidateData. SpValidateData will update all error-marked records (status <>
NULL), since some records may have been marked as invalid because of a missing corresponding record
(for example, an invalid supplier record because of missing supplier address record (in M3) or the XML
Gateway was not configured correctly in the previous replication).
Currencies and Exchange Rates
M3 is able to hold more than one exchange rate for each currency. Usually, these are used in conjunction
with validation dates (valid from and valid to). e-Procurement, however, can store only one rate per
currency. If more than one rate is defined, then the most recent one will be used. The Setup Wizard
prompts for a Rate Division and a Rate Type. These parameters are used to determine which exchange
rates to use and which division to get these from in M3 (since M3 can hold these per division and
exchange rates are global in e-Procurement). Follow the links for more information. The data validation
procedure in the Stage-2 database is responsible for selecting which rates to use in e-Procurement.
Chapter 6 Configuring and Using the Interfaced
System 1
40
Currencies in M3 are set up with a rate to Local Currency. In e-Procurement the currencies all have a
rate to Euro. To calculate the correct rate for e-Procurement (the M3 rate to euro) the replication finds
both the rate to local currency, the rate between local currency and Euro, and also looks at the rate type
and the rate factor to be able to calculate the correct rate to insert into e-Procurement.
NOTE Calculation of the actual e-Procurement exchange rate (rate to Euro) is done in the SQLXML
Template, not by SpValidateData.
Exchanges can also be set up in the Monetary Union setup as fixed rates against the euro (CRS432).
If a rate is set up here, this rate is used. This rate (fixed to euro) can be set up on Division level or on
Blank Division. The default by the Setup Wizard is to replicate the rates set up on the Division entered
in the Setup Wizard as Rate Division. To reconfigure this (for example, to Blank correct the specific
criteria in conf.xml file, see "Configuring the M3 Replicator" on page 88.
Checks are carried out on:
If record exists in Monetary Union setup (fixed rate to euro), then this value is used
Rate to local: If no rate (CUARAT) is set up for a currency, the corresponding currency record is
error marked (status 10 is set).
Rate between Euro and Local currency: If no rate (CUARAT), then all currency records are error
marked (status 10 is set).
Quantity Units (Unit of Measure)
NOTE The units in e-Procurement are not case sensitive, though they are in M3. This means that if M3
uses both KG and kg to indicate two different units, then you must change the convention used by your
M3 installation.
Quantity Unit: Quantity units are validated for duplicate entries. If multiple entries exist, all records are
error marked (set status 10). Please see the example below:
PCS, Pcs, pcs
If two or more of these exist in M3 and are replicated, they will all be error marked (status 10 set).
NOTE There are special cases where these duplicate entries will not be found by data validation, see
"Validation of duplicate entries (from M3 BE)" on page 104.
Locations
e-Procurement Locations are replicated from M3 Warehouses and the Address lines are replicated from
M3 Internal Addresses. In e-Procurement, address 1 and address 2 are required. Therefore a check is
made on the corresponding fields in M3 (OAADR1, OAADR2). If the fields are blank, the corresponding
warehouse record is error marked (status 10 is set).
If value = blank: Set status 10 (Error)
If value <> blank: Set status 1 or 2 (insert or update)
Location Groups
No special data validation/data manipulations are carried out.
Companies
Companies are created by the install script. For further details, see the table in "Additional Settings
made by the Setup Wizard" on page 102. For reconfiguration, update e-Procurement Company master(s)
and re-configure the replication settings.
41 Chapter 6 Configuring and Using the Interfaced
System 1
Also see "EPR Specific Purchase Order Series in M3" on page 16 about how to set up Order Series
correctly in M3 to map to e-Procurement companies and avoid purchase order number conflicts in M3.
Cost centers
Cost centers are in the Chart of Account table in M3 and set up in a specific Dimension per installation,
- the specific dimension for an installation is prompted by the Setup Wizard.
Cost center can be set up on Division level and on a blank division in M3. Cost center setup on a blank
division can be used in all divisions. In e-Procurement, cost centers are set up on company level (equals
M3 Divisions). Therefore, the following business logic is required:
All cost centers in M3 with blank division are inserted into all relevant e-Procurement companies.
All cost centers in M3 with a division are only inserted into the matching e-Procurement Company.
See also the example below:
Cost centers where
CONO = 512, DIVI = Blank
CONO = 512, DIVI = AAA
Goes to company 512_AAA in e-Procurement
Cost centers where
CONO = 512, DIVI = Blank
CONO = 512, DIVI = BBB
Goes to company 512_BBB in e-Procurement
Cost center is one of 3 record types where handling of blocked or not-valid records are carried out
automatically by the replication. Also see "Dealing with Records Deleted or Deactivated in M3" on page
38.
Accounts
Same logic as cost centers, except that the dimension is not promoted by the Setup Wizard since this
dimension is always 1 in M3 and selection is made on Profit and Loss account only. See "Accounts" on
page 108.
Accounts is one of 3 record types where handling of blocked or not-valid records are carried out
automatically by the replication. Also see "Dealing with Records Deleted or Deactivated in M3" on page
38.
Users
The selection and validation of user records is quite complicated due to different data models in M3 and
e-Procurement. Due to the impact on connector transactions in which replication is from e-Procurement
to M3, it is important that users are set up correctly. For example, the warehouse must map to the correct
company (via division and facility), otherwise the purchase may be booked in the wrong company in
e-Procurement.
All users (in table CMNUSR) are replicated to EPR_Stage2. It is not yet possible to mark a user as
inactive or not-used-anymore in M3, therefore the only option is to consider all users relevant for
e-Procurement. The validations in the following table are hereafter applied.
Chapter 6 Configuring and Using the Interfaced
System 1
42
Business logic Field
M3 users can operate with a blank default company code (typically used if
the user operates in multiple companies). In e-Procurement the user must be
assigned to a company (since the company and the division (combined) is
mapped to the e-Procurement company). If the default company code on the
user (JUDFCO) is not the same as the company code for the replication, the
company code for the replication is set on the user. (The company field
(JUCONO) on the user record is not used since this field may be wrong for
historic reasons). If the company value (JUDFCO) is defaulted, then the facility
(JUFACI) and warehouse (JUWHLO) on the user master are also defaulted
(to make sure it's a valid combination).
Blank default M3
Company code
A user can be created without a default division in M3. This causes a problem
in e-Procurement since the M3 division level equals the e-Procurement
company and a user must be assigned to a company in e-Procurement.
Therefore, users with a blank division or a division different from the division(s)
replicated (entered in the Setup Wizard Division) are assigned with a default
division (also entered in Setup Wizard - Default Division). The default division
value is kept as a parameter value <mvxUserDefaultDivision>.
An e-Procurement user assigned to one e-Procurement company can make
an order in another ERP company using the cross company functionality
(please refer to the help text in e-Procurement Buy Center). This functionality
can be used if the user has been assigned to the wrong e-Procurement
company as a result of the above mentioned logic.
Division/e-
Procurement
Company
An e-Procurement user is assigned to a Location Group; this is mapped to
M3 facilities. If the facility value on the user record (JUFACI) is blank or invalid
for the M3 division specified on the user record (JUDFDI - User default division)
the record is populated with a default facility value. The check on whether the
facility is valid for the division is carried out against table CFACIL in Stage 2
db. The default location group value is kept as a parameter value
<mvxUserDefaultFacility>.
An e-Procurement user can change this value by accessing the user profile
link in the top menu in e-Procurement Buy Center, but note that the record
should be set up in M3 to avoid it being overwritten at a following replication.
Facility/Location Group
An e-Procurement user is assigned to a Location; this is mapped to M3
Warehouses. If the warehouse value on the user record (JUWHLO) is blank
or invalid for the facility (also specified on the user record JUFACI- see above),
the record is populated with a value from the table CFACIL (EPR_Stage2)
field CFWHLO.
Warehouse/Location
43 Chapter 6 Configuring and Using the Interfaced
System 1
Business logic Field
An e-mail address is required for e-Procurement users. This e-mail is mapped
to one out of two options in M3 program CRS111:
Users can have e-mail set up as a CBEMTP (E-mail type) = 03 where the
e-mail address key equals the employee ID (EAEMNO - CRS530).
The syntax here is that EAEMNO = JUUSID, as for cost center setup.
See Employee number syntax in the cost center section in this table.
Users can have e-mail set up as a CBEMTP = 04 where the e-mail address
key equals the user ID (JUUSID - MNS150)
An e-mail address must be set up per user. If no e-mail address is found, the
validation program will default an e-mail address using the e-mail address
prompted by the Setup Wizard. The default e-mail value is kept as a parameter
<mvxUserDefaultEmail>.
An e-Procurement user can change this value by accessing the user profile
link in the top menu in e-Procurement Buy Center, but note that the record
should be set up in M3 to avoid it being overwritten at a following replication.
e-Mail address
A cost center is required for a user in e-Procurement. The cost center is
mapped in one out of two fields in M3:
Users can have a record set up in the Employee table (table CEAEMP
field EATACC - CRS530).
A cost center value can be entered into the field JUDEPT user record
(table CNMUSR - MNS150, (this field is normally a department field, but
not frequently used in M3 and not validated against other M3 tables).
The validation business logic checks for a value in the JUDEPT field (MNS150
- since the user record must be set up for any user in M3). If no value is found
here, the validation looks for the cost center value in the EATACC field
(CRS530).
Employee number syntax: It is very important to use a specific syntax when
setting up an employee record in CRS530. The record must map to the user
ID and the employee number must equal the user ID (JUUSID = EAEMNO)
since several records can exist for a user in CRS530.
If no cost center is found in the places mentioned above, the validation program
uses a default cost center value, prompted by the Setup Wizard on M3 Division,
page 2. The default cost center value is kept as a parameter
<mvxUserDefaultCostcenter>.
The short pseudo code for above mentioned is: "If EATACC is blank (where
JUUSID = EAEMNO) then check for a value in JUDEPT. If this field is also
blank, populate the field with the default cost center value
<mvxUserDefaultCostcenter>.
Cost center
NOTE M3 users are only replicated to e-Procurement as Buy Center users; no users will appear in the
Supply Center. The Supply Center users are set up manually. See
"Preparing e-Procurement Data after Initial Replication" on page 36.
Suppliers
The following fields on the supplier master are required or have special business:
Chapter 6 Configuring and Using the Interfaced
System 1
44
Business logic Field
The Order method selection on the e-Procurement supplier master controls
which fields are required:
If Order Method e-mail is selected then an e-mail address is required
on the supplier master, this is replicated from M3 field CGTOMA (e-
mail).
If Order Method fax is selected then a fax no. is required on the supplier
master. The fax no. is replicated from M3 field IDTFNO (Fax number).
If none of the above mentioned is available the order method is set to
none. This naturally also means that it will not be possible to submit
an e-mail with an order attachment to a supplier.
Order method
Suppliers should have an e-mail record in the CGTOMA field (this e-mail
address can be set up in M3 using program CRS949). The supplier e-mail
is used when submitting order by e-mail to the supplier from e-Procurement.
When setting up the supplier e-mail:
The Document variant parameter (CGDOVA ) must equal value 10.
This parameter is set at the connector installation and can be found
in conf.xml file. See "Suppliers" on page 113.
The Media parameter (CGMEDC) must equal value *MAIL. This
parameter value is set at the connector installation and can be found
in conf.xml file. See "Suppliers" on page 113.
Supplier e-Mail
A contact name or contact person is required for a supplier in e-
Procurement, a Reference person (field IRYRE1) is replicated from M3,
this record can be setup in M3 program CRS623. Multiple contact persons
may however apply or be setup per supplier. The record with the lowest
table sequence value (IRRFID - Reference ID) is selected (same logic as
M3). If no contact person is found the field is populated with N/A.
Contact name/contact
person
e-Procurement has some settings on the supplier master regarding RFQ's.
The default settings by the connector is to enable RFQ and to notify
purchase manager on RFQ's above value 0 Euro. This is set up at
connector installation. See SQL-XML Templates in
"Setting up the template files" on page 54.
Supplier RFQ
45 Chapter 6 Configuring and Using the Interfaced
System 1
Business logic Field
The following logic is applied when selecting the relevant supplier address
in M3:
It is possible to hold multiple supplier addresses in M3; ERP can only
hold one. If more than one record is found (in CIDADR), the record
with the latest valid start date and the lowest ID (where SAADID =
Lowest value) is used.
A supplier address record is not required in M3. If the supplier address
exists, the fields Address line 1, Address line 2, Address line 3 and
Postal code are not required in M3. But, these are mapped to required
fields in e-Procurement, so if no supplier address record can be found
or if any of the mentioned fields are blank, the related supplier record
is set to status 10.
The country field on the e-Procurement supplier master is implemented
using a special Design Center component, a static look up table; not
a normal database table. This can cause the following problem: if the
value of the record replicated from M3 does not exactly match the
value in the static look up table, the country field on the supplier master
may appear empty. A relevant record can be selected from the list,
press update and the country will appear in the e-Procurement supplier
master (this would however potentially be overwritten if the supplier
is updated in M3). If no relevant country is in the list, please use the
Design Center to add the relevant country.
Supplier address
The supplier phone number (IDPHNO) is not required in M3 but it is
required in e-Procurement. Therefore, a supplier record is error marked
(set to status '10') if the phone number is blank.
Phone number
Suppliers are one of 3 record types where handling of blocked or not-valid records are carried out
automatically by the replication. See "Dealing with Records Deleted or Deactivated in M3" on page 38.
Payment terms
No special data validation/data manipulations are carried out.
Only payment terms exsiting in the default language supplied in the Setup Wizard are replicated. They
are replicated in all the languages that exist in the master table. If the terms are missing a language,
this language is replicated containing the default language text.
Goods Receipt
Goods Receipt records are selected in M3 based on the Order Series, the Status and the Transaction
date. See "EPR Specific Purchase Order Series in M3" on page 16 Records in status 50, 51 and 75
are selected in M3 and may be used to update e-Procurement.
Duplicate entries
NOTE The following combinations may exist in M3 for the same ICREPN (Receiving number) (for
non-stocked items):
Status 50 and 51 (see logic below)
Status 50 and 75 (see logic below)
Status 51
Status 75
Chapter 6 Configuring and Using the Interfaced
System 1
46
The following logic is applied to the records in Stage 2:
If there is an ICPUOS (Purchase order status) = 50 and ICPUOS = 75 where ICREPN (Receiving
number) are the same, then mark the '75' record as error (set status to '10'), do not insert into
e-Procurement. (75 = when the put away is carried out after quality inspection)
If there is a ICPUOS (Purchase order status) = 50 and ICPUOS = 51 where and ICREPN
(Receiving number) are the same, then mark the '51' record as error (set status '10'), do not
insert into e-Procurement. (51 = when the put away is carried out before quality inspection)
StatusCode
The status code in M3 (ICOEND) determines whether the Goods Receipt has been completed or
not (value 1 or 0). This value is used for updating the Goods Receipt in e-Procurement (field
statusCode on e-Procurement table arrivalReport). The value in e-Procurement can be:
NULL: No GR transaction yet
PD: Partly delivered
PC: Partly completed
FC: Fully completed
Logic is as follows:
If ICOEND = 0, then set value PD in e-Procurement
If ICOEND = 1 and IBORQA (Ordered quantity - alternate U/M) > IBRVQA (Received quantity)
then set value PC in e-Procurement
If ICOEND = 1 and IBORQA (Ordered quantity - alternate U/M) =< IBRVQA (Received quantity)
then set value FC in e-Procurement
Error messages
An e-mail address for the e-mail agent must be configured manually. The e-mail agent notifies on records
error-marked in some way.
An agent can send e-mails with errors from the TVFReplicationLog in EPR_Stage 2 database. Edit
MvxLogAsMailConf in the replication setup. Set up a scheduled task to run initial tasks\send log
mail.bat.
TIP For further information about how to reconfigure the e-mail service, see
"Sending replication error reports by e-mail" on page 87 and "Replication status" on page 53.
The following error messages can be issued:
Link to validation logic Body, example Header, example No.
"Currencies and Exchange Rates" on page 40 Currency (ATS) has no rate to
local division currency
No header, all records are listed. 1
"Currencies and Exchange Rates" on page 40 Currency (USD) has no rate to
euro currency
No header, all records are listed. 2
"Currencies and Exchange Rates" on page 40 There are multiple currencies
with the key CSYTAB.CTSTCO
= 'XXX' CSYTAB.CTSTKY =
'YYY
There are 52 currencies with the
same key. 50 of the errors follow
next in the log.
3
47 Chapter 6 Configuring and Using the Interfaced
System 1
Link to validation logic Body, example Header, example No.
"Quantity Units (Unit of Measure)" on page 41 There are multiple quantity units
with the key hhhhhh
There are 52 quantity units with
the same key. 50 of the errors
follow next in the log.
4
"Locations" on page 41 Location (MITWHL.MWCONO:
'330'), (MITWHL.MWWHLO:
'170')
52 locations are missing a valid
address. The first 50 are logged.
5
"Locations" on page 41 Location (MITWHL.MWCONO:
'330'), (MITWHL.MWWHLO:
'170')
52 locations have invalid
address. The OAADR1 and
OAADR2 fields are required.
The first 50 are logged.
6
"Users" on page 42 and
"Locations" on page 41
User (CMNUSR.JUUSID:
'XXXYYY0'),
(CMNUSR.JUWHLO: '110')
52 users have invalid location.
The first 50 are logged.
"Suppliers" on page 44 Supplier (CIDMAS.IDCONO:
'330'), (CIDMAS.IDSUNO:
'100001')
52 suppliers are missing phone
number. The first 50 are logged.
"Suppliers" on page 44 Supplier (CIDMAS.IDCONO:
'330'), (CIDMAS.IDSUNO:
'100001')
52 suppliers have invalid
address. The SAADR1,
SAADR3, SAPONO, and
SACSCD fields are required.
The first 50 are logged.
"Suppliers" on page 101 Supplier (CIDMAS.IDCONO:
'330'), (CIDMAS.IDSUNO:
'100001')
52 suppliers have no address.
The first 50 are logged.
A number of users in the batch
starting with JUUSID = '*USER'
failed to be inserted in the XML
Gateway. All records in this
batch are updated with the
status code 92 in the stage 2
database. To find and correct
the record causing this failure,
please see the files dumped
from the TransferAgent and
consult the documentation.
The message is an example
(user records) of the error
messages that will be logged for
e-Procurement XML Gateways
insertion errors.
Replication database cleanup
The Stage-2 replication database will keep all of the records ever transferred through the replication system,
thereby growing with time. For most types of data, this is not a problem. However, for purchase orders, the
database might grow very large as it is filled with old orders.
Althought the Connector does not include any sample procedures for clearing the Stage-2 replication
database, you could easily create your own. For example, you could:
1. Edit the M3 Replicator configuration file to set up a maximum age for replicated records (see
"Using the M3 Replicator" on page 86).
Chapter 6 Configuring and Using the Interfaced
System 1
48
2. Write a stored procedure for the Stage-2 database that removes records in relevant tables older
than the date you choose in step 1.
Monitoring and Troubleshooting Replication
Testing the SQLXML Configuration
To test the SQLXML interface setup and the output created by your templates, open a standard web
browser and enter the URL that you have configured as the virtual directory for SQLXML templates, for
example:
http://localhost/EPR_Stage2/template/SupplierTemplate.xml
If the interface is working correctly, then the database server will return an XML document which will
be displayed in your browser. Of course, the Stage-2 database will be empty until you make the initial
replication (see "Preparing e-Procurement Data after Initial Replication" on page 36).
49 Chapter 6 Configuring and Using the Interfaced
System 1
Chapter 7
Customizing the Solution From M3
Overview
This chapter concerns replication from M3 to Lawson M3 e-Procurement only.
The Connector Setup Wizard eliminates the need to configure parameters manually when you want a
customized solution (see "What the Wizard does" on page 26). Each time you want to configure the Connector
for a specific e-Procurement/M3 installation you need only run the Wizard.
The only situation in which you need to configure manually is when you want to modify the behaviour of the
Connector, for example; if you want to replicate another business object or attribute.
Adding New Attributes for Replication
This section gives a short outline and an example of how to add new attributes to the replication mechanism
for transferring data from the M3 BE system to Lawson M3 e-Procurement.
Procedure Outline
1. Select the field in the M3 database that should be replicated to the new attribute. Update the
Stage-1 and Stage-2 databases to contain this field.
2. Add the new field to the M3-Replicator configuration file (see "Configuring the M3 Replicator"
on page 88).
3. Update the appropriate SQLXML replication template so that it requests the field for replication
from the Stage-2 replication database to Lawson M3 e-Procurement (see "Setting up the
template files" on page 54).
4. Add the new attribute to your business object using the standard controls of Design Center
(see Design Center Users Guide for details).
The replication (gateway) method must take the attribute as Input. See also "Replication from
M3 to e-Procurement" on page 102.
5. If you are adding a new replication (gateway) method, update the converter.properties file in
the e-Commerce Extension for MeC configuration. The path is as follows:
C:\MeC\e-Commerce\<configuration name>\converter.properties
6. Update the time stamp for the replication in the Stage-1 replication database (in the table
TransferDates).
7. Update the table-change number in the Stage-2 replication database to ensure replication of
the new field for all records.
8. Run the replication.
Chapter 7 Customizing the Solution From M3 50
Example
The example below shows how to add the field IDSUTY (Supplier Type) from the table CIDMAS in
the M3 database to the Supplier business object in Lawson M3 e-Procurement. In Lawson M3
e-Procurement, we will call this field SupplierCategory.
1. Add the field to Stage-1 and Stage-2 replication databases by executing the following
SQL command:
USE EPR_Stage1
ALTER TABLE CIDMAS ADD IDSUTY Tinyint
USE EPR_Stage2
ALTER TABLE CIDMAS ADD IDSUTY Tinyint
2. Add the field to the M3-Replicator replication configuration file by adding the new column
name to the CIDMAS table as follows:
<table name="CIDMAS"
.
.
<column name="IDSUTY"/>
</table>
3. Add the field to the SQLXML template file that requests product details (SupplierTem
plate.xml) by adding the following SQL command to the template:
.
CASE
WHEN CIDMAS.status IS NULL THEN NULL
ELSE CIDMAS.IDSUTY
END
AS [UserGroup!1!SupplierCategory],
.
NOTE The status field is selected to avoid updating data that has not changed.
4. Remember to add the field to all sub-selects (if any) as:
NULL AS [UserGroup!1!SupplierCategory],
5. The new field should be mapped to the field to the Lawson M3 e-Procurement database
by running the following SQL command:
ALTER TABLE Supplier ADD ProductGroup varchar(8)
6. Create the attribute on the Supplier business object and map the attribute to the new
database field using Design Center.
Add the attribute as Input on the replication (gateway) method.
7. Update both the time stamp for the CIDMAS replication in the TransferDates table of the
Stage-1 replication database and the table-change number in Stage-2 replication database
to ensure replication of the new field for all records. The following SQL command will do
this:
use EPR_Stage1
update transferdates set stamp = 0 where tablename = 'cidmas'
use EPR_Stage2
update CIDMAS set IDCHNO = 0
8. Run the replication.
The two-stage replication database
Though it is often referred to as a single entity, the replication database actually consists of two databases,
called by default EPR_Stage1 and EPR_Stage2, respectively (see also "M3 BE to Lawson M3 e-Procurement
51 Chapter 7 Customizing the Solution From M3
Replication" on page 9). This approach is used to ensure a comprehensive replication of all changed
records while maximizing replication performance and minimizing the load placed on the ERP system.
The replication process
The records in the ERP-system database that are used by the Connector include the following two fields:
LMDT: the last-modified date (date only, no time stamp is stored here)
CHNO: the change number, which is incriminated each time the record is touched
Because a record might be updated more than once on any given day, both of these fields must be
considered when identifying a record that must be replicated to Lawson M3 e-Procurement. The replication
solution, therefore, operates as follows:
1. The M3 Replicator requests all records from the ERP-system database that show a LMDT
value that is greater than or equal to the day of the last replication. All of the found records
are loaded into the Stage-1 replication database. This requires only a very simple query,
thereby minimizing the load placed on the ERP system database.
2. Stored procedures in the replication database join the Stage-1 database with the Stage-2
database as follows:
a. Copy all new records.
b. Update all records having matching key values, but an older LMDT value in the Stage-2
database.
c. Update all records having matching key values and LMDT values, but showing a different
CHNO value in the Stage-2 database.
d. Select all of the records moved or updated by this operation in the Stage-2 database so
that they will be sent on to the Lawson M3 e-Procurement database when requested (see
"Replication status" on page 53).
This is the most complex SQL operation required by the replication. By running it here, the
operation is done independently of the ERP-system database. The performance of this
Chapter 7 Customizing the Solution From M3 52
operation is furthermore optimized because the Stage-1 and Stage-2 database are running
on the same server.
3. Clear the Stage-1 database.
4. The Transfer Agent will be scheduled to run periodically to request all new and updated
records from the Stage-2 database, replicate these to the Lawson M3 e-Procurement database
and then update the Stage-2 database so that all replicated records are marked as such (see
also the figure in "M3 BE to Lawson M3 e-Procurement Replication" on page 9).
With time, the Stage-2 database will grow to include all records ever replicated between the ERP system
and Lawson M3 e-Procurement. This should not present a problem, but you might consider cleaning
previous orders older than a certain age (see "Replication database cleanup" on page 48).
This replication system will not cause records deleted from the ERP system to also be deleted in Lawson
M3 e-Procurement. However, this is not considered a problem because records are very rarely deleted
from the ERP system. Instead, they are marked as deleted or cancelled. The replication system handles
this so that, for example, deleted products are marked as inactive in Lawson M3 e-Procurement,
effectively removing them from the online catalog. If records must be removed from the Lawson M3
e-Procurement database, this must be done manually.
NOTE The replication strategy described above can, in some very rare cases, result in a failure to
replicate some types of updates in which a record is removed and then recreated in M3. The failure
occurs only when a record is recreated the same date as the previous LMDT and then changed afterwards
that same day a number of times equaling the CHNO number stored for the matching record in the
Stage-2 database. This series of events is extremely unlikely.
Replication date
The Stage-1 replication database includes a table called transferdates. This table stores a date
stamp that records the day each relevant table was replicated from M3. The M3 Replicator uses this
date when requesting new records from the ERP system. Only records that were created or modified
on that day or later will be replicated to the Stage-1 database. Set the date to zero for each table to
request all records from the ERP system (as during initial replication).
The M3 Replicator configuration file can also be configured to specify a maximum age for replicated
records. For details, see "Configuring the M3 Replicator" on page 88.
Replication status
Each record stored in the Stage-2 replication database includes a field called status, which marks the
status of the record with one of the following values:
Status Value
The record has been successfully replicated and has not changed in the replication database
since the last replication
<null>
Record is new in the replication database and needs to be replicated 1
The record has been updated in the replication database and needs to be replicated 2
The record was found to be invalid when it was added to the replication database. This is
typically due to missing related records. Records marked with this status will be kept in the
database, but no further attempts will be made to replicate them to Lawson M3 e-
Procurement. See also "Data Validation and Erroneous Record Detection" on page 40.
10
53 Chapter 7 Customizing the Solution From M3
Status Value
This appears only in the product table (MITMAS). It marks a product that was marked as
deleted in the ERP system (MMSTAT >80) before it was ever transferred to Lawson M3 e-
Procurement.
11
Several records have identical keys 91
The Transfer Agent failed to send the XML request to the XML Gateway and has returned
a failure update gram to the EPR_Stage2 database, typically multiple records with the same
composite key, and this would cause the update grams to fail.
92
NOTE If records with status 10 in the Stage-2 database are deleted within the ERP system, then these
records will not be updated within the replication databasethey will be resident there until removed. If
required, a you can create a stored procedure to clean these up on a project basis.
Setting up the template files
When the Transfer Agent is run, its configuration file specifies a URL that identifies a template file stored
on the replication database server. A template is a valid XML document that consists of one or more SQL
statements. When a template file is specified at the URL, the SQL commands that are stored in the template
file are executed on the database server. Output generated by the template file is returned as an XML
response document.
For each type of replication you wish to make, you must create a template file that establishes the necessary
SQL expression and save this file on the replication database server.
Creating and modifying template files
The template files must establish the basic form of the XML document that will be returned to the Transfer
Agent and include SQL statements that will retrieve the required data and format it to conform to the
iXML format expected by Lawson M3 e-Procurement. See the Design Center Users Guide for complete
details about the iXML format.
The best way to learn how to create and/or customize template files is to study the examples included
with M3 Connector (see above).
Saving the active template files
The Web server will only execute template files that are stored in a single, specified folder. All of your
templates must be saved on the database server in this folder. On the Web server, this is configured
as the target of a virtual directory that allows template execution. For details, see "Setting up the SQLXML
interface" on page 95.
The Connector Setup Wizard creates a folder intended to be used as the template folder for the SQLXML
interface and copies the sample templates to it. Using the default installation settings, this folder is:
C:\Lawson\e-Procurement\Replication\SQLXML Templates\
As explained in "About the Message Transfer Agent" on page 90, the Transfer Agent program works
by submitting a URL that specifies an appropriate request file on the replication database server.
Chapter 7 Customizing the Solution From M3 54
Setting up XSL transformations
Please refer to the Design Center Installation Guide for a description of how to install the e-Commerce
Extension for MeC. During this installation, choosing e-Procurement templates makes the installer configure
the (three) XSL transformations. They are configured in the file:
MEC\e-Commerce\processlist.xml
For example:
<?xml version="1.0" encoding="UTF-8"?>
<ports>
<port detection="ECOM:method" no="2001">
<doctype name="GatewayTransferPurchaseOrders"
outpath="c:\MEC\e-Commerce\e-Procurement\TransferPurchaseOrdersResponse.xsl"/>
<doctype name="GatewayTransferOrderConfirmations"
outpath="c:\MEC\e-Commerce\e-Procurement\TransferOrderConfirmationsResponse.xsl"/>
<doctype name="GatewayTransferGoodsReceived"
outpath="c:\MEC\e-Commerce\e-Procurement\TransferGoodsReceivedResponse.xsl"/>
</port>
</ports>
In the above example, port 2001 is used for e-Procurement.
In addition, the following is added to the targets.xml file:
<target>
<name>ECOM:method</name>
<xpath>\idealXML\commands\command@method</xpath>
</target>
Configuring the XML Gateway
The gateway is preconfigured to receive requests from the M3 Connector. For more information, please
refer to Design Center Users Guide. It is recommended that you create a specific user for the gateway
requests. The user must have the Role Gateway User and must be registered in the domain used for
authentication of Buy Center users.
Running the replication
You can run replication manually, by calling each of the replication programs from the command line or
using the Transfer Agent console, or automatically by establishing scheduled tasks in the operating system.
IMPORTANT In Windows 64-bit, configure IIS 7 before replication to ensure that SQLXML templates can
be accessed through virtual directory in the web server. Please refer to "IIS 7 Configuration" on page 98.
Order of replication
Regardless of how you execute the replication, you must transfer data in a certain order to ensure that
all of the relations will be valid when they arrive in Lawson M3 e-Procurement.
This is to ensure that all related records are present as required. The supplied templates, configuration
files and scheduled tasks ensure that the correct replication order is followed:
1. Currencies
2. Location Groups
3. Locations
4. Cost Centers
55 Chapter 7 Customizing the Solution From M3
5. Account Codes
6. Quantity Units
7. Users
8. Arrival Reports
9. Terms of Payment
10. Suppliers
Calling the M3 Replicator
To replicate data from M3 to the replication database, you must call the M3 Replicator from the command
line or from a scheduled tasks (which essentially does the same thing). For details about how to do this,
see "Calling the M3 Replicator" on page 86.
Often, however, you might instead choose to execute the supplied scheduled tasks (or their associated
batch files) manually. This will call both the M3 Replicator and the Transfer Agent, thereby replicating
data all the way from M3 to Lawson M3 e-Procurement. For details, see "Replication scheduled tasks
and batch jobs" on page 57 for details.
Calling the Transfer Agent from the command line
To run the Transfer Agent from a command line, open a command-line window and type the following:
TransferAgent.exe full_path_to_configuration > Actions.log 2 > Errors.log
Where full_path_to_configuration identifies the configuration file that you wish to run. If you used the
default installation settings, you can find a sample configuration file in:
C:\Lawson\e-Procurement\<Replication>\Transfer Configurations\BaseData.xml.trf
The final two parameters in the command tell the program where to store log messages.
Often, however, you might instead choose to execute the supplied scheduled tasks (or their associated
batch files) manually. This will call both the M3 Replicator and the Transfer Agent, thereby replicating
data all the way from M3 to Lawson M3 e-Procurement. For details, see "Replication scheduled tasks
and batch jobs" on page 57.
Using the Transfer Agent console
As an alternative to the command-line interface, you can also run the Transfer Agent through a console,
which provides a graphical interface.
To run the console:
1. Click Start > Programs > Lawson > M3 Connector Tools 14.1.7.2 > Transfer Agent. (Or
right-click the .trf file in Windows Explorer and select Open).
2. The Message Transfer Console window opens.
In the Transfer configuration file field, use Browse to enter the full path of the configuration
file you wish to run with the Transfer Agent.
If you used the default installation settings, you can find sample configuration files in:
C:\Lawson\e-Procurement\<Replication>\Transfer Configurations\
Click Lookup to select a single request in the file to run. This way the requests can be run
one by one.
Leaving the field blank will process all requests in the file.
Select Dump requests and responses to dump all requests in the folder:
Chapter 7 Customizing the Solution From M3 56
C:\Windows\system32\LogFiles\TransferAgent
If an error is encountered, the requests will be dumped here regardless of the selection of the
check box. Don't select this unless you want to study the requests.
Click Run.
3. Logging information will appear in the Transfer log field as the agent runs. If you wish to clear
the log field, click Clear.
4. Click Close to quit the console (however, this will not quit the Transfer Agent if it is still running).
5. Click Help for further information (online help).
Replication scheduled tasks and batch jobs
Once you have finished developing and testing your solution, you will undoubtedly want data replication
to take place automatically. To do this, use the Windows Scheduled Tasks control panel to set up a
schedule of executing the appropriate command using the syntax described in "Calling the Transfer
Agent from the command line" on page 56 and "Calling the M3 Replicator" on page 86. Usually, you
will set up several different scheduled tasks, each specifying a different set of configuration files, thereby
implementing the various required types of replication.
The M3 Connector includes several batch files, each of which calls the M3 Replication and Transfer
Agent, in succession, with appropriate configuration files for a given type of replication. The following
two batch files are provided for this purpose:
BaseDataReplication.bat
TransferMBM.bat
By default, the Connector Setup Wizard stores these in:
C:\Lawson\e-Procurement\<Replication>\Scheduled Tasks\
You can open these in any text editor to view the commands and configuration files used.
The Connector Setup Wizard also establishes a set of items in the Windows Scheduled Tasks control
panel. Initially, none of these are set to run.
To schedule the replication, use the standard controls provided by the control panel. You can also
execute the tasks manually from here. For complete details about how to use the Scheduled Tasks
control panel, please see Windows online help of a Windows reference manual.
The Transfer Agent and M3 Replicator write logging details to the standard output and will dump
information to %SystemRoot%\System32\LogFiles\TransferAgent. To monitor the replication
more closely, run the batch files from a command-prompt window; this will display all logging details
and keep them there so you can scroll through them afterwards. If you run them from the Scheduled
Tasks control panel, the output log will not be preserved on your screen.
NOTE You must configure the scheduled tasks to run as a user that has full access to the Stage-1 and
Stage-2 replication databases. For more details about this issue, see
"Setting up the SQLXML interface" on page 95.
You must make sure that your schedule honors the replication order outlined in
"Order of replication" on page 55.
57 Chapter 7 Customizing the Solution From M3
Chapter 8
Setting up MEC
Setting up as a Front-end to M3
This chapter concerns replication from Lawson M3 e-Procurement to M3 BE only.
To configure the M3 e-Collaborator as a front-end to M3 BE you need to:
Update all necessary Partner references.
Enter agreements and connect them to a User ID in M3 BE. The M3 BE user will be the API-user. The
company number to which the user is connected is importantthis will control the M3 BE company in
which the transactions will be created.
Interfacing with M3 MBM Envelopes
The M3 Connector supports interfacing with both M3 11 and M3 12. However, each of these two versions
of M3 BE expects a slightly different MBM envelope to appear in incoming XML request documents. The
MBM envelope is added by the stylesheets applied to the ideal XML responses resulting from the specific
ideal XML requests sent through the MeC.
The stylesheets are installed with the e-Commerce extension. They are found in:
C:\Mec\e-Commerce\<configuration name>
All of the stylesheets supplied with the M3 Connector are pre-configured to supply the MBM envelope
expected by M3 Version 11. If you are using M3 Version 12, then you must modify the set of outgoing
stylesheets as described below.
The following stylesheets are affected:
TransferGoodsReceivedResponse.xsl
TransferOrderConfirmationsResponse.xsl
TransferPurchaseOrdersResponse.xsl
The syntax change for the envelope requires only that you change the way you specify the the URI called
by each request. To support M3 12 rather than M3 11, make the text replacements specified in the table
below, for each of the files listed above (see "Configuring the XML Gateway" on page 55).
M3 12 Syntax M3 11 Syntax Message Type
<env:reference uri="#EPR_ORDERS@1"> <env:reference uri="#MBM_ORDERS_
IP@1">
Requisition
<env:reference uri="#EPR_ORDRSP@1"> <env:reference uri="#MBM_ORDRSP_
IP@1">
Order
confirmation
<env:reference uri="#EPR_
OrdersReceive@1">
<env:reference uri="#MBM_OrdersReceive_
IP@1">
Receipt
Chapter 8 Setting up MEC 58
Chapter 9
Configuring and Using the Interfaced
System
Configuring the new ERP Field Settings
This chapter concerns replication from Lawson M3 e-Procurement to M3 BE only.
The Company Details page will enable you to configure data fields that will be submitted for all orders coming
from a given company, thereby ensuring that the orders are processed correctly in the context of the ERP
system.
These settings are shown if the Application Property Connector/ ERP Company Information is true (you can
see this in Design Center on the Application Properties tab). To work with the new settings, use the System
Administration:Companies area of the Buy Center Administration site to configure each company. Most of
the settings on this page are the same as for a stand-alone installation of Lawson M3 e-Procurement (see
the Lawson e-Procurement Deployment Guide for a complete description of these). To find the interface
settings, scroll down until you see the group of settings in which all of the field labels start with ERP. Fill out
the ERP fields as required to work with your specific ERP system installation. See the table below for a
description of each of these new fields.
Description Field Name
This field is optional. Use it for keeping information for your own reference
inside the ERP system.
(The e-Collaborator derives the M3 BE company number from the from, to
and reference elements in the envelope. The from and to elements are defined
by the ERP Miscellaneous 1 and ERP Miscellaneous 2 settings (see below);
the reference is hard-coded in the Connector.)
ERP Company Number
This field is optional. Use it for keeping information for your own reference
inside the ERP system.
ERP Integration
Description
This value is used when generating the envelope for each MBM document
sent to the ERP system (part of the MBM standard). It sets the <env:to> field
in the envelope, which identifies the receiver of the document.
ERP Miscellaneous 1
This value is used when generating the envelope for each MBM document
sent to the ERP system (part of the MBM standard). It sets the <env:from>
field in the envelope, which identifies the sender of the document
ERP Miscellaneous 2
This field is not used in the current M3 interface scenario. It is reserved for
future use.
ERP Miscellaneous 3
59 Chapter 9 Configuring and Using the Interfaced
System
Description Field Name
M3 records a type for each purchase order, thereby allowing, for example,
users to search for all purchase orders submitted from the e-Procurement
system.
Enter a short code (for example, EPR) which will identify purchase orders from
Lawson M3 e-Procurement. Usually, you will use the same code for all
companies.
ERP Purchase Order Type
Allowing Purchases from Unregistered Suppliers
NOTE This section only applies to data replication from e-Procurement to M3 BE.
The standard version of the M3 API is not able to accept new supplier details as part of a purchase order,
though Lawson M3 e-Procurement normally does allow this, thereby enabling buyers to purchase from
suppliers not already listed in the Lawson M3 e-Procurement database.
To be compatible with a standard M3 BE system, you must therefore disable the define supplier controls of
Lawson M3 e-Procurement. When you do this, you will ensure that requisitions will always specify a registered
supplier (by supplier ID).
However, if you are working on a project that requires the original functionality of Lawson M3 e-Procurement,
then you must modify the API for your M3 BE installation so that it is able to accept supplier details as part
of a new purchase order, rather than simply a supplier ID.
Basic support for allowing buyer-defined suppliers is built into the M3 Connector, though this is simply ignored
for all purchase orders that do not include them. The mechanism works by applying the standard combination
of XML request document and stylesheet as follows:
TransferPurchaseOrders.xml: This is the request document that fetches data for the purchase
orders forwarded to M3 BE. The request is designed so that supplier details are always requestedwhether
or not they are used depends on the stylesheet.
TransferPurchaseOrdersResponse.xsl: This is the stylesheet that formats the purchase order
before it is sent to M3 BE. It checks to see if the buyer has selected an existing supplier or not. If so,
the supplier ID is added to the XML document, as expected by the standard M3 API. If not, the data
that the buyer has supplied about the supplier are added to the XML document instead. See the figures
below for examples.
The figure shows supplier details included in the purchase order when the buyer has selected a listed supplier
(as supported by the standard M3 API)
The figure shows supplier details included in the purchase order when the buyer has specified a new supplier
Chapter 9 Configuring and Using the Interfaced
System
60
In the default connector configuration, the extra data fields shown in the previous figure work as follows:
This is hard-coded to UNKNOWN for buyer-defined suppliers. <SenderIdentity>
This value is generated as the concatenation of the
SupplierName, SupplierEmail and SupplierFax fields from
Lawson M3 e-Procurement, separated by commas. The
commas and the labels for the e-mail address and fax values,
as shown in the figure, are added by the stylesheet.
<Name>
These values are taken from the SupplierAddress1...4, fields
of Lawson M3 e-Procurement, respectively.
<AddressLine1...4>
This value is taken from the SupplierCountry, field of Lawson
M3 e-Procurement.
<CountryCode>
In an actual implementation, you might choose to design the stylesheet differently than described and shown
in the text and figures above. You should also modify the define-supplier form of presentation layer to make
sure that buyers will enter data correctly.
To enable M3 BE to accept the extra supplier information outlined above, you must modify its API to match
the output of your purchase-order stylesheet. One example for how this data may arrive from the default
configuration is shown in the figure above, though your specific implementation may be different.
Please consult your M3 BE developer documentation for details about how to modify the API.
Transmission Control
NOTE This section only applies to data replication from e-Procurement to M3 BE.
You can check the status of each event to be transferred from Lawson M3 e-Procurement to the ERP system.
To work with the Transmission Control settings:
1. Open the Buy Center site and click on the Administrator link. You must log in as a user with the
Admin profile.
2. Click on the Application Control:Transmission Control link in the navigator. A search filter and a
list of relevant transactions (if any) appears. When there are many relevant transactions, then
you will only see part of the list.
61 Chapter 9 Configuring and Using the Interfaced
System
3. You can either browse the list or use the search filter to find a specific transaction. You can also
sort the list by clicking on the arrow at the top of the relevant column; click again to reverse the
direction (ascending/descending) of the sort. For each listed transaction, you are shown the
following information:
Order number: The ID number for the order to which the transaction belongs. Click on a
number to view the actual order.
Transaction type: Tells whether the transaction is a purchase order, order confirmation or
goods-received notice.
Company: The ID of the company to which the buyer belongs.
Trans.ID: The ID of the transaction itself.
Date: The date and time when the transaction first became ready to be sent to the ERP
system.
History: Provides a link to the transaction-history page, which provides extra details about
the transaction.
Status: Shows the current state of the transaction (pending, initiated, completed or failed).
This is shown as a drop-down list, so you can change it here. If you change a pending
transaction to completed, then it will not be sent. If you change a completed transaction to
pending, then it will be sent again. For failed transactions, you can either change the status
to pending, if you wish to try again, or completed if you wish to leave the transaction
unreplicated.
4. If you would like to see more information about a transaction, click on its number in the History
column. You will then see a short overview of events that have occurred to affect your selected
transaction.
Chapter 9 Configuring and Using the Interfaced
System
62
Chapter 10
Customizing The Solution From M3
e-Procurement
Setting up Request Documents
This chapter concerns replication from Lawson M3 e-Procurement to M3 BE only.
Request documents are XML files that ask the Lawson M3 e-Procurement XML Gateway to perform a
specific database action (e.g., search or update). The documents must be formatted correctly (according
to the expectations of the Gateway) and be submitted to the Gateway using HTTP. As explained earlier,
this is the mechanism that the Transfer Agent uses to transfer new and updated records from Lawson M3
e-Procurement to the M3 BE system.
A complete set of request documents required to implement the default interface scenario for M3 is installed
by the Connector Setup Wizard. Using the default installation settings, you can find these in:
C:\Lawson\Lawson M3 e-Procurement\<Replication>\TransferRequests\
The contents of this folder are listed and briefly described in the table below.
The request documents installed in this folder will work with the Lawson M3 e-Procurement database structure
created when you run the database utility scripts included with the M3 Connector. If you modify the database
structure, for example by adding or removing fields or tables, you may need to modify these request
documents to reflect your changes. You might also choose to write new request documents to replicate
other types of data from the e-Procurement system into the ERP system.
Function File Name
Searches the Lawson M3 e-Procurement database
for all goods-received notices that have changed
since the last replication.
This request will return only a single record (a single
line item from an order that has been received since
the last replication). The Transfer Agent will submit
this request several times, until no new updates exist
to replicate.
TransferGoodsReceived.xml
Updates the Lawson M3 e-Procurement database to
note that the attempt to replicate a specified goods-
received record failed.
TransferGoodsReceivedFailed.xml
Updates the Lawson M3 e-Procurement database to
note that the attempt to replicate a specified goods-
received record succeeded.
TransferGoodsReceived Succeeded.xml
Works like the TransferGoodsReceived.xml file,
except that it searches for order confirmations.
TransferOrderConfirmations.xml
63 Chapter 10 Customizing The Solution From M3
e-Procurement
Function File Name
Same as TransferGoodsReceivedFailed.xml,
but notes a failure to replicate an order-confirmation
record.
TransferOrderConfirmations Failed.xml
Same as
TransferGoodsReceivedSucceeded.xml, but
notes a success in replicating an order-confirmation
record.
TransferOrderConfirmations Succeeded.xml
Works like the TransferGoodsReceived.xml file,
except that it searches for new purchase orders.
TransferPurchaseOrders.xml
Same as TransferGoodsReceivedFailed.xml,
but notes a failure to replicate a purchase-order
record.
TransferPurchaseOrdersFailed.xml
Same as
TransferGoodsReceivedSucceeded.xml, but
notes a success in replicating a purchase-order
record.
TransferPurchaseOrders Succeeded.xml
Creating and Modifying Request Documents
The best way to learn how to create and/or customize request documents for the Gateway is to study
the examples included with M3 Connector. For a complete description of the XML format used by Lawson
M3 e-Procurement (called iXML), please see also the Design Center Users Guide manual.
A few special cases of and exceptions to the iXML standard, which apply for request documents used
with the Connector, are discussed below.
Collaboration Parameters
All request documents designed to fetch data for the M3 BE system must be configured to request
only one record at a time. This is because the M3 e-Collaborator is only able to process a single
record at a time.
For more information about how XSL documents are assigned for each request name, see "Config
uring the XML Gateway" on page 67. For an overview of each XSL document shipped with the
connector, see "Setting up transformation to MBMs" on page 65.
Limiting Transfers by Company
If you would like to limit the company or companies from which orders will be replicated to the ERP
system by a given request document, do the following:
1. Add a <Bindings> section in the request document (standard Gateway behaviorsee the
Design Center Users Guide manual for details)
2. Add the company to the associated succeeded and failed documents (e.g., change <Request
command="UpdateTransferStatus">to <Request command ="UpdateTransferSta
tus" company="BCE">
Saving the Active Request Documents
As described in "Using the Message Transfer Agent" on page 90, the Transfer Agent program submits
XML request documents whenever it is called with an appropriate configuration file name. The
Chapter 10 Customizing The Solution From M3
e-Procurement
64
configuration file contains communication settings and a list of XML request documents, which must be
identified using a file name and path either relative to the configuration file itself, or an absolute path
(relative to the root). You may therefore find it easiest to store your request documents in the same
folder as the Transfer Agent configuration file. Using the default installation settings, this would be:
C:\Lawson\e-Procurement\<Replication>\Transfer Configurations
Setting up transformation to MBMs
Required style sheets
After Lawson M3 e-Procurement has successfully updated its database, the XML Gateway returns an
iXML response containing the status of the update and the IDs of the updated business objects. An OK
signal is returned back to the Transfer Agent, which then submits an XML request document to the
replication database to mark each affected record as successfully replicated. This request document is
created by applying a style sheet to the original response document sent from the replication database
to Lawson M3 e-Procurement. The result is an XML request (called an updategram by Microsoft) that
updates the replication status of each record from the original response document. One style sheet is
required for each type of response document expected from the replication database.
Each style sheet must remove most of the data from the original response document and add a command
to update the replication-status field as necessary for each record returned.
You must save your confirmation-document style sheets on the machine where the Transfer Agent is
running. Usually, you will use the same folder as the one containing the Transfer Agent configuration
file, or a sub-folder of this folder. For each request, you must specify a success style sheet in the Transfer
Agent configuration file (see "Using the Message Transfer Agent" on page 90).
Supplied style sheets
The Connector includes a complete set of XSL documents prepared to implement the default interface
scenario.
Using the default installation settings, you can find these in:
C:\Lawson\e-Procurement\<Replication>\Stylesheets\
Transforming to MBM
The XML documents returned from the Gateway for use by M3 BE must use the M3 MBM schema.
However, because the Gateway uses its own internal schema (iXML), which is based on the data
structure internal to Lawson M3 e-Procurement, you must configure the Gateway to translate the schema
before it returns a response document to the Transfer Agent.
The Gateway supports this function by implementing the standard XML technique of applying a stylesheet
(XSL) to each response document, which maps the iXML standard to the required MBM standard. You
will configure the Gateway to recognize a specific communication port as requiring a specific XSL
transformation for each type of incoming request and each type of outgoing reply. For more details about
this issue, see "Configuring the XML Gateway" on page 67.
XSL Documents
The Connector includes a complete set of XSL documents prepared to implement the default interface
scenario. Using the default installation settings, you can find these in:
C:\Program Files\Lawson\M3 Connector for e-Procurement 14.1.7.2\ Replication\Transfer
Configurations\Stylesheets
The contents of this folder are listed and briefly described in the table below.
65 Chapter 10 Customizing The Solution From M3
e-Procurement
Function File Name
Passes a document without making any changes.
This is used for all incoming and outgoing
documents that are not related to the M3 interface.
No translation is applied.
Clone.xsl
Translates a goods-received response document
from iXML to MBM.
TransferGoodsReceivedResponse.xsl
Translates an order-confirm response document
from iXML to MBM.
TransferOrderConfirmationResponse.xsl
Translates a purchase-order response document
from iXML to MBM.
TransferPurchaseOrdersResponse.xsl
Removes the request-name wrapper and then
passes the enclosed iXML document as-is (see
"Creating and modifying template files" on page 54
for details about why this is required).
This is used for all documents that request records
that will be forwarded to the M3 BE system.
TransferRequest.xsl
Creating and Modifying XSL Documents
If you are working with a customized version of the Lawson M3 e-Procurement database and/or a
customized M3 BE database, then you may need to modify the XSL documents to match your changes.
Furthermore, if you decide to implement other types of data replication between the two systems, you
will also need to write new XSL documents to format Gateway output as needed.
A complete discussion of how to write and use XSL documents is beyond the scope of this manual.
Please see an XML reference and refer to the sample XSL documents included with the M3 Connector
for guidance.
Saving the Active XSL Documents
As described in "Configuring the XML Gateway" on page 67, the Gateway must be specifically configured
if you wish to apply XSL documents when communicating over a given port. Because full path to each
XSL file is specified in the configuration file, you can save them wherever you like, provided the actual
location of each file matches the configuration. Usually, you will want to keep them together, for example
in:
C:\AppWork\Buy Center\XLS Transformations\
If you move to a new server, you must be sure to copy of the relevant XSL files to their matching locations
on the new server. If you must change the paths used (for example, to a new drive letter), then you must
also update the configuration file to match.
Setting up Success/failure Requests for XML Gateway
The transfer status for the order is set by a success/failure request, which is sent to the gateway to call the
method UpdateTransferStatus. The parameters are codes defined in the code table. To change the behaviour,
study the standard requests installed with replication.
The install path of the standard success/ failure request is as follows:
C:\Lawson\e-Procurement\Replication\Transfer Configurations\Stylesheets
See also "Configuring the Transfer Agent" on page 91.
Chapter 10 Customizing The Solution From M3
e-Procurement
66
Configuring the XML Gateway
The XML Gateway is used by the Connector in exactly the same way as it is used in the stand-alone version
of Lawson M3 e-Procurement. It must be configured as follows:
Each type of replication request must be configured and enabled
Each replication request must furthermore be assigned to a user segment that includes the user specified
in the Transfer-Agent configuration file that generates it.
In a standard Connector installation, the XML Gateway is pre-configured to accept the default set of requests.
See the Lawson e-Procurement Deployment Guide and Design Center Users Guide for details about how
to configure the Gateway. See also "Adding New Attributes for Replication" on page 50 for an example of
how you might modify the Gateway settings to accommodate a simple change in the set of replicated fields.
Adding a stylesheet for a new MBM in e-Commerce extension for
MeC
The name of the e-Procurement method is used to select the MBM. This is configured in the tar
gets.xml file found in the MEC directory, where ECOM:method is defined by the following xpath:
<target>
<name>ECOM:method</name>
<xpath>\idealXML\commands\command@method</xpath>
</target>
The XSL transformation from the response (in iXML format) is defined in the MEC\e-Commerce\pro
cesslist.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<ports>
<port detectionkey="ECOM:method" no="2001">
<doctype name="GatewayTransferPurchaseOrders"
outpath="c:\MEC\e-Commerce\e-Procurement\TransferPurchaseOrdersResponse.xsl"/>
<doctype name="GatewayTransferOrderConfirmations"
outpath="c:\MEC\e-Commerce\e-Procurement\TransferOrderConfirmationsResponse.xsl"/>
<doctype name="GatewayTransferGoodsReceived"
outpath="c:\MEC\e-Commerce\e-Procurement\TransferGoodsReceivedResponse.xsl"/>
</port>
</ports>
where the name attribute in the doctype elements corresponds to the e-Procurement method name.
Running the replication
You can run replication manually, by calling each of the transfer configurations from the command line or
using the Transfer Agent console, or automatically by establishing scheduled tasks in the operating system.
Order of replication
Regardless of how you execute the replication, you must transfer data in the following order to ensure
that all of the relations will be valid when they arrive in M3 BE:
1. Purchase Order
2. Order Confirmation
3. Goods Receive
The transfer configuration file MBM.xml.trf contains this configuration. The file can be found in the
folder (default installation):
C:\Lawson\e-Procurement\Replication\Transfer Configurations
67 Chapter 10 Customizing The Solution From M3
e-Procurement
Transfer Agent
Please refer to "Calling the Transfer Agent from the command line" on page 56 for a description of how
to run the Transfer Agent.
Scheduled Job
The Setup Wizard creates a scheduled job for running the transfer agent.
Please refer to "Replication scheduled tasks and batch jobs" on page 57 to see how other scheduled
jobs are set up.
Chapter 10 Customizing The Solution From M3
e-Procurement
68
Chapter 11
The View from M3
Overview
This chapter is only relevant for replication from e-Procurement to M3 BE.
Most of this manual is written from the point of view of the Lawson M3 e-Procurement developer. This
chapter, however, is written for the ERP system developer or manager. It includes information about how
to handle the data arriving from Lawson M3 e-Procurement and other details that will help you to prepare
M3 BE for the interface.
The descriptions in this chapter are valid for M3 version 11RPG, 12RPG and 12Java. The interface on the
M3 side is included in releases 11.6, 12.4 and 12.8. For previous versions you must install the action numbers
listed is "Action Numbers V11RPG" on page 83. This section also gives an indication of how the interface
can be installed in even earlier versions.
Interface Transactions
Create Purchase Order
Purchase orders are created in M3 BE as a result of Lawson M3 e-Procurement requisition approval.
When a requisition is approved in Lawson M3 e-Procurement, it will trigger the creation of a purchase
order in M3 BE by the generation of MBM file. In cases when one requisition results in more than one
purchase order, the split into purchase orders will be done by Lawson M3 e-Procurement. The PO
(Purchase Order) number is generated by Lawson M3 e-Procurement and used by M3 through the
interface. We recommend that you reserve the order-number series interval used in Lawson M3
e-Procurement in a separate number series in the ERP system. The purchase orders created in M3 BE
have reference to the corresponding requisition in Lawson M3 e-Procurement via the PO number.
Purchase Order Confirmation
When a purchase order is confirmed in Lawson M3 e-Procurement, the confirmation information is
transferred to M3 BE as a purchase-order confirmation.
NOTE Purchase orders created in M3 BE from Lawson M3 e-Procurement should not be confirmed in
M3 BE. The reason is that any confirmation entered in M3 BE will not update Lawson M3 e-Procurement.
A parameter setting in the order type (PPS098) controls whether it is possible to confirm the order in
M3 BE.
Goods Receipt
After goods have been reported as received in Lawson M3 e-Procurement, the receiving information is
transferred to M3 BE as a PO Goods receipt. The finish mark flag can be controlled from Lawson M3
e-Procurement when the received quantity is lower than the ordered quantity.
69 Chapter 11 The View from M3
NOTE Purchase orders created in M3 BE from Lawson M3 e-Procurement should not be goods received
in M3 BE. The reason is that any receipt information entered in M3 BE will not update Lawson M3
e-Procurement. A parameter setting in the order type (PPS098) controls if it is possible to report goods
receipt for the order in M3 BE.
Functional Aspects
Cost Accounting of Requisitions
The Lawson M3 e-Procurement cost-accounting functionality for assigning the accounting string for a
requisition is not synchronized to the M3 BE accounting setup. The M3 BE accounting identities can be
made available for accounting in Lawson M3 e-Procurement so that selected accounting items will
correspond to the M3 BE accounting items. The account cross-reference checks are not performed in
Lawson M3 e-Procurement. In cases where M3 BE identifies errors, the transactions can be checked
and corrected in Trans Work File. Restart Erroneous Jobs (GLS037).
Item Number Mapping
The items used in Lawson M3 e-Procurement are selected from the various catalogs that have been
made available in the application. Typically, not all items in Lawson M3 e-Procurement are defined as
items in M3 BE. The logic implemented in the interface uses the following hierarchy for item-number
mapping:
1. If the Lawson M3 e-Procurement EPR Supplier item number is defined as an item number in
M3 BE, the EPR Supplier item number will be used for the purchase order. The Item Name
from the M3 BE item master (MMS001) will be used as PO item name.
2. If the Lawson M3 e-Procurement item is not defined as an item number in M3 BE, the Lawson
M3 e-Procurement product group to which the Lawson M3 e-Procurement item belongs is
used as the item number for the M3 BE purchase order. For reference purposes, the Lawson
M3 e-Procurement item number will be stored as the Supplier item number on the created
purchase order. The Description for the M3 BE product group will be used as PO item name.
3. If the Lawson M3 e-Procurement item does not exist as an item in M3 BE and the product
group also is missing as an item number in M3 BE, then the transaction will be rejected.
Transactions can be corrected in the e-Collaborator.
In all cases, the item description from Lawson M3 e-Procurement will be stored on the M3 BE purchase
order as PO Item description.
The recommendation is to ensure that all product groups in Lawson M3 e-Procurement are defined as
item numbers in M3 BE.
Purchase Order Printout
You must decide if the purchase orders will be printed from Lawson M3 e-Procurement or M3 BE.
Lawson M3 e-Procurement provides a printout feature that is not interfaced to M3 Out (MOM).
If the purchase orders are to be printed from the Lawson M3 e-Procurement printout function, then
M3 BE must be configured not to print the purchase orders. This is done for the involved order types
listed for the Lawson M3 e-Procurement interface (PPS098). For each order type listed, there is a
print parameter for this purpose. In the MBM there is also a purchase-order process parameter that
can be configured so that the purchase orders are generated in M3 BE with status 20/20 (printed).
If the purchase orders are to be printed from M3 (MOM), then Lawson M3 e-Procurement must be
configured not to print the purchase orders. An automatic printout functionality of the purchase order
document can be activated via parameter 710 Automatic printout of PO documents in PPS095. The
documents are printed directly after the planned PO is released and the PO is generated in M3 BE.
Chapter 11 The View from M3 70
Considerations Due to the One-Way Interface
The M3 actions listed below are dangerous to use unless the action is manually synchronized in Lawson
M3 e-Procurement.
Undoing (reversing) of PO transactions (possible using Purchase Order. Display Line Transactions
(PPS330)).
Closing POs or PO lines for further updates (using PPS350).
Any entry in these functions in M3 BE will not update Lawson M3 e-Procurement.
Mandatory Basic Data in M3
When interfacing with Lawson M3 e-Procurement, the following data requirements apply in the ERP system:
Suppliers used in Lawson M3 e-Procurement must exist in the M3 BE supplier master file
Dummy-items used as product group in Lawson M3 e-Procurement must exist in the M3 BE item master.
We recommend that you define the dummy-items as non-stocked.
The unit of measure for the product group must be synchronized to the dummy item. If a dummy item
is to be used with several different units, they must be added as alternative units per item.
Warehouse in M3 BE must be synchronized to the Location Code in Lawson M3 e-Procurement. This
is done using functionality in the Connector.
The number series to be used must have Series Type 20 and No Series I and can be entered in CRS165.
This is the number series reserved for PO numbers generated by Lawson M3 e-Procurement. A
reservation will prevent automatic generation of POs in M3 BE within the Lawson M3 e-Procurement
number series interval. It is possible to use another No Series than I, but it must not be used by any
other order type entered in PPS095. This also has to be checked in PPS097. Series Type must be 20
as it is hard-coded in the programs.
All other non-mandatory data can be used optionally in, for example, cost accounting. This information
is included in the optional fields in API-transaction PPS160MI/AddIdReq (V11RPG), PPMEPRMI/
AddEPRReq (V12RPG) or PPSEPRMI/ AddEPRReq (V12Java).
The M3 user that is used for the API transactions (M3 e-Collaborator Agreements) must be connected
to the right company in M3 BE.
The Requisitioner in Lawson M3 e-Procurement must exist as a User ID in M3 BE
Currency codes, Order types, Unit of measure, Cost center and Accounts in M3 BE must be synchronized
with the corresponding codes in Lawson M3 e-Procurement. Note that codes are case sensitive.
Currency codes, Order types, Unit of measure, Cost center and Accounts in M3 BE must be synchronized
with the corresponding codes in Lawson M3 e-Procurement. Note that codes are case sensitive.
Users in M3 BE must be synchronized with users in Lawson M3 e-Procurement (remember that the
user name is case-sensitive in M3 BE, so you must be sure to use the same casing in both systems.)
In Order types EPR (PPS098), it is possible to limit the reporting of Confirmation and Goods receipt in
M3 BE according to the Order type.
API/Transaction description for V11RPG
PPS160MI AddIdReq
The API-transaction AddIdReq adds planned purchase orders in M3 BE. The planned purchase orders
are used as a workfile to consolidate several requisition lines into consolidated purchase orders. Once
71 Chapter 11 The View from M3
all lines for an order are created as planned purchase orders, they are automatically released to purchase
orders using the API-transaction CrtIdPO.
The table shows mandatory fields for AddIdReq.
Description Field
Set as a parameter in Lawson M3 e-Procurement CONO
Same as Location Code in Lawson M3 e-Procurement WHLO
Requisition number, the unique requisition in Lawson M3 e-Procurement RQNO
Requisition Id, equivalent of M3 BE purchase order number used in Lawson M3 e-
Procurement
RQID
Requisition detail number, equivalent of PO line number RQDN
Supplier number SUNO
Dummy item in M3 BE, product group in Lawson M3 e-Procurement ITNO
Planned quantity PPQT
Purchase order unit of measurement PUUN
Purchase price PUPR
Currency CUCD
Planned delivery date DLDT
Requisition by PURC
Supplier Item number, the ordered item SITE
Description of the ordered item PITD
This transaction will create a planned PO for the item number or dummy-item number with the generation
reference (GETY) set to 40. A new planned order will be created for each new Requisition identity
(RQID).
The Requisition line number will be used as a sub-number for the planned purchase order. This is used
for the sequencing of PO lines. Each PO line will also be created with a line number equal to the
Requisition line number from Lawson M3 e-Procurement.
PPS160MI CrtIdPO
The API-transaction CrtIdPO creates purchase orders from a planned purchase order for a given PO
number.
The table shows mandatory fields for CrtIdPO.
Description Field
Company number CONO
Requisition number RQNO
This transaction will release the planned PO with the same PO number
Chapter 11 The View from M3 72
PPS001 ConfirmIDLine
The API transaction will make a PO Confirmation for a PO line. The information possible to confirm is
Quantity, Delivery date and Purchase price. Lawson M3 e-Procurement can only manage the confirmation
of delivery date. The confirmed PO lines will receive status 35, Confirmed.
The table shows mandatory fields for ConfirmIDLine.
Description Field
Company CONO
Requisition identity. Will be used to find the PO in M3 BE. RQID
Requisition line number in Lawson M3 e-Procurement and purchase order
line number in M3 BE.
RQDN
PPS001MI ReceiptID
The API-transaction ReceiptID reports goods receipt in M3 BE triggered from Lawson M3 e-Procurement.
The reporting of goods receipts is performed at line-level using the same business logic as available in
traditional M3 BE. Note that there is an optional finish mark-flag as an optional field. If a requisition line
is finish-marked in Lawson M3 e-Procurement without any received quantity, the transaction will close
the corresponding PO-line in M3 BE.
The table shows mandatory fields for ReceiptID.
Description Field
Company CONO
Transaction date TRDT
Responsible RESP
Requisition identity. Will be used to find the PO in M3 BE RQID
Line number in Lawson M3 e-Procurement and M3 BE. RQDN
Quantity RVQA
PPS001 ChgPOAdr
This API transaction will change existing addresses used for a PO. It is not possible to add addresses
of a new address type to a PO head or a PO line. This has to be done using regular M3 BE functions.
The table shows mandatory fields for ChgPOAdr.
Description Field
Company CONO
Purchase order number in M3 BE, Requisition identity in Lawson M3 e-
Procurement.
PUNO
Purchase order line number in M3 BE, Requisition line number in Lawson
M3 e-Procurement.
PNLI
73 Chapter 11 The View from M3
Description Field
PO address type in M3 BE. Can be final address, via address or supplier
address
POAD
Address line 1 ADR1
Address line 2 ADR2
Address line 3 ADR3
Address line 4 ADR4
PPS160 AddEPRText
This API transaction will add a text line to an EPR requisition which has not been released, that is, it
exists as a Purchase Order Proposal in M3 BE. When it is released, the text line added will be put into
the PO line.
The table shows mandatory fields for AddEPRText.
Description Field
Company CONO
Requisition number, the unique requisition in Lawson M3 e-Procurement RQNO
Requisition Id, equivalent of M3 BE purchase order number used in Lawson
M3 e-Procurement
RQID
Requisition detail number, equivalent of PO line number RQDN
Line number of the text line LINO
Text TX60
API/Transaction description for V12RPG
PPSEPRMI AddEPRReq
The API-transaction AddEPRReq adds planned purchase orders in M3 BE. The planned purchase
orders are used as a workfile to consolidate several requisition lines into consolidated purchase orders.
Once all lines for an order are created as planned purchase orders, they are automatically released to
purchase orders using the API-transaction CrtEPRPO.
The table shows mandatory fields for AddEPRReq..
Description Field
Set as a parameter in Lawson M3 e-Procurement CONO
Same as Location Code in Lawson M3 e-Procurement WHLO
Requisition number, the unique requisition in Lawson M3 e-Procurement RQNO
Requisition Id, equivalent of M3 BE purchase order number used in Lawson
M3 e-Procurement
RQID
Chapter 11 The View from M3 74
Description Field
Requisition detail number, equivalent of PO line number RQDN
Supplier number SUNO
Dummy item in M3 BE, product group in Lawson M3 e-Procurement ITNO
Planned quantity PPQT
Purchase order unit of measurement PUUN
Purchase price PUPR
Currency CUCD
Planned delivery date DLDT
Requisition by PURC
Supplier Item number, the ordered item SITE
Description of the ordered item PITD
This transaction will create a planned PO for the item number or dummy-item number with the generation
reference (GETY) set to 40. A new planned order will be created for each new Requisition identity
(RQID).
The Requisition line number will be used as a sub-number for the planned purchase order.
This is used for the sequencing of PO lines. Each PO line will also be created with a line number equal
to the Requisition line number from Lawson M3 e-Procurement.
PPSEPRMI CrtEPRPO
The API-transaction CrtEPRPO creates purchase orders from a planned purchase order for a given
requisition number.
The table shows mandatory fields for CrtEPRPO..
Description Field
Company number CONO
Requisition number RQNO
This transaction will release all planned PO with the same Requisition number from e-Procurement.
The planned PO with the same PO number will be sorted together into the same PO.
PPSEPRMI ConfirmEPRLine
The API transaction will make a PO Confirmation for a PO line. The information possible to confirm is
Quantity, Delivery date and Purchase price. Lawson M3 e-Procurement can only manage the confirmation
of delivery date. The confirmed PO lines will receive status 35, Confirmed.
The table shows mandatory fields for ConfirmEPRLine..
Description Field
Company CONO
Requisition identity. Will be used to find the PO in M3 BE. RQID
75 Chapter 11 The View from M3
Description Field
Requisition line number in Lawson M3 e-Procurement and purchase order
line number in M3 BE.
RQDN
PPSEPRMI ReceiptEPR
The API-transaction ReceiptEPR reports goods receipt in M3 BE triggered from Lawson M3
e-Procurement. The reporting of goods receipts is performed at line-level using the same business logic
as available in traditional M3 BE. Note that there is an optional finish markflag as an optional field. If a
requisition line is finish-marked in Lawson M3 e-Procurement without any received quantity, the
transaction will close the corresponding PO-line in M3 BE.
The table shows mandatory fields for ReceiptEPR..
Description Field
Company CONO
Transaction date TRDT
Responsible RESP
Requisition identity. Will be used to find the PO in M3 BE RQID
Line number in Lawson M3 e-Procurement and M3 BE. RQDN
Quantity RVQA
PPS001 ChgPOAdr
This API transaction will change existing addresses used for a PO. It is not possible to add addresses
of a new address type to a PO head or a PO line. This has to be done using regular M3 BE functions.
The table shows mandatory fields for ChgPOAdr.
Description Field
Company CONO
Purchase order number in M3 BE, Requisition identity in Lawson M3 e-
Procurement.
PUNO
Purchase order line number in M3 BE, Requisition line number in Lawson
M3 e-Procurement.
PNLI
PO address type in M3 BE. Can be final address, via address or supplier
address
POAD
Address line 1 ADR1
Address line 2 ADR2
Address line 3 ADR3
Address line 4 ADR4
Chapter 11 The View from M3 76
PPS160 AddEPRText
This API transaction will add a text line to an EPR requisition which has not been released, that is, it
exists as a Purchase Order Proposal in M3 BE. When it is released, the text line added will be put into
the PO line.
The table shows mandatory fields for AddEPRText.
Description Field
Company CONO
Requisition number, the unique requisition in Lawson M3 e-Procurement RQNO
Requisition Id, equivalent of M3 BE purchase order number used in Lawson
M3 e-Procurement
RQID
Requisition detail number, equivalent of PO line number RQDN
Line number of the text line LINO
Text TX60
API/Transaction description for V12Java
PPSEPRMI AddEPRReq
The API-transaction AddEPRReq adds planned purchase orders in M3 BE. The planned purchase
orders are used as a workfile to consolidate several requisition lines into consolidated purchase orders.
Once all lines for an order are created as planned purchase orders, they are automatically released to
purchase orders using the API-transaction CrtEPRPO.
The table shows mandatory fields for AddEPRReq.
Description Field
Set as a parameter in Lawson M3 e-Procurement CONO
Same as Location Code in Lawson M3 e-Procurement WHLO
Requisition number, the unique requisition in Lawson M3 e-Procurement RQNO
Requisition Id, equivalent of M3 BE purchase order number used in Lawson
M3 e-Procurement
RQID
Requisition detail number, equivalent of PO line number RQDN
Supplier number SUNO
Dummy item in M3 BE, product group in Lawson M3 e-Procurement ITNO
Planned quantity PPQT
Purchase order unit of measurement PUUN
Purchase price PUPR
Currency CUCD
77 Chapter 11 The View from M3
Description Field
Planned delivery date DLDT
Requisition by PURC
Supplier Item number, the ordered item SITE
Description of the ordered item PITD
This transaction will create a planned PO for the item number or dummy-item number with the generation
reference (GETY) set to 40. A new planned order will be created for each new Requisition identity
(RQID).
The Requisition line number will be used as a sub-number for the planned purchase order.
This is used for the sequencing of PO lines. Each PO line will also be created with a line number equal
to the Requisition line number from Lawson M3 e-Procurement.
PPSEPRMI CrtEPRPO
The API-transaction CrtEPRPO creates purchase orders from a planned purchase order for a given
requisition number.
The table shows mandatory fields for CrtEPRPO.
Description Field
Company number CONO
Requisition number RQNO
This transaction will release all planned PO with the same Requisition number from e-Procurement.
The planned PO with the same PO number will be sorted together into the same PO.
PPSEPRMI ConfirmEPRLine
The API transaction will make a PO Confirmation for a PO line. The information possible to confirm is
Quantity, Delivery date and Purchase price. Lawson M3 e-Procurement can only manage the confirmation
of delivery date. The confirmed PO lines will receive status 35, Confirmed.
The table shows mandatory fields for ConfirmEPRLine.
Description Field
Company CONO
Requisition identity. Will be used to find the PO in M3 BE. RQID
Requisition line number in Lawson M3 e-Procurement and purchase order
line number in M3 BE.
RQDN
PPSEPRMI ReceiptEPR
The API-transaction ReceiptEPR reports goods receipt in M3 BE triggered from Lawson M3
e-Procurement. The reporting of goods receipts is performed at line-level using the same business logic
as available in traditional M3 BE. Note that there is an optional finish markflag as an optional field. If a
requisition line is finish-marked in Lawson M3 e-Procurement without any received quantity, the
transaction will close the corresponding PO-line in M3 BE.
Chapter 11 The View from M3 78
The table shows mandatory fields for ReceiptEPR.
Description Field
Company CONO
Transaction date TRDT
Responsible RESP
Requisition identity. Will be used to find the PO in M3 BE RQID
Line number in Lawson M3 e-Procurement and M3 BE. RQDN
Quantity RVQA
PPS001 ChgPOAdr
This API transaction will change existing addresses used for a PO. It is not possible to add addresses
of a new address type to a PO head or a PO line. This has to be done using regular M3 BE functions.
The table shows mandatory fields for ChgPOAdr.
Description Field
Company CONO
Purchase order number in M3 BE, Requisition identity in Lawson M3 e-
Procurement.
PUNO
Purchase order line number in M3 BE, Requisition line number in Lawson
M3 e-Procurement.
PNLI
PO address type in M3 BE. Can be final address, via address or supplier
address
POAD
Address line 1 ADR1
Address line 2 ADR2
Address line 3 ADR3
Address line 4 ADR4
PPS160 AddEPRText
This API transaction will add a text line to an EPR requisition which has not been released, that is, it
exists as a Purchase Order Proposal in M3 BE. When it is released, the text line added will be put into
the PO line.
The table shows mandatory fields for AddEPRText.
Description Field
Company CONO
Requisition number, the unique requisition in Lawson M3 e-Procurement RQNO
Requisition Id, equivalent of M3 BE purchase order number used in Lawson
M3 e-Procurement
RQID
79 Chapter 11 The View from M3
Description Field
Requisition detail number, equivalent of PO line number RQDN
Line number of the text line LINO
Text TX60
Field Mappings
This section shows how the M3 Connector maps data fields from the Lawson M3 e-Procurement database
to those used by the M3 BE system.
The figure below is an overview of M3 Connector field mappings.
The table below is a detailed view of M3 Connector field mappings.
Note M3 Field Length Format e-Procurement Field e-Procurement Table
Accounting
dimension 1
8 Alfa accountCode AccountCode
Note 1 Company 3 Num Metadata Collaboration Units
Note 1 Ordertype 3 Alfa Metadata Collaboration Units
Order number 7 Alfa orderNumber Order
Requested by
(Requester)
10 Alfa userName User
Accounting
dimension 6
8 Alfa userName User
Cost center 8 Alfa payerNumber CostCenter
Chapter 11 The View from M3 80
Note M3 Field Length Format e-Procurement Field e-Procurement Table
Accounting
dimension 2
8 Alfa payerNumber CostCenter
PO item
Description
60 Alfa productName Product
Note 3 Item number 15 Alfa supplierProductNumber Product
Note 3 Item number 15 Alfa productGroupCode ProductGroup
Accounting
dimension 3
8 Alfa productGroupCode ProductGroup
Delivery
Address Line 1
36 Alfa deliveryAddress1 Requisition
Delivery
Address Line 2
36 Alfa deliveryAddress2 Requisition
Delivery
Address Line 3
36 Alfa deliveryAddress3 Requisition
Delivery
Address Line 4
36 Alfa deliveryAddress4 Requisition
Invoice
Address Line 1
36 Alfa invoiceAddress1 Requisition
Invoice
Address Line 2
36 Alfa invoiceAddress2 Requisition
Invoice
Address Line 3
36 Alfa invoiceAddress3 Requisition
Invoice
Address Line 4
36 Alfa invoiceAddress4 Requisition
Warehouse 3 Alfa locationCode Requisition
Requisition
number
Alfa requisitionNumber Requisition
Currency 3 Alfa currencyCode RequisitionDetail
Order Line
number
3 Num detailNumber RequisitionDetail
Project number 8 Alfa info1 RequisitionDetail
Accounting
dimension 4
8 Alfa info1 RequisitionDetail
Project
element
8 Alfa info2 RequisitionDetail
Accounting
dimension 5
8 Alfa info2 RequisitionDetail
Accounting
control object
8 Alfa info3 RequisitionDetail
81 Chapter 11 The View from M3
Note M3 Field Length Format e-Procurement Field e-Procurement Table
Accounting
dimension 7
8 Alfa info3 RequisitionDetail
Note 4 Quantity 15,6 Num (1,0) quantity RequisitionDetail
Unit of
measure
3 Alfa quantityUnitName RequisitionDetail
Planned
delivery date
8 Num requestedDeliveryDate RequisitionDetail
Order line post
text
1000 Alfa supplierComment RequisitionDetail
Purchase price 17,6 Num (120,
25)
unitPrice RequisitionDetail
Supplier
number
10 Alfa externalSupplierNumber Supplier
Note 2 Order Status 2 Alfa preferredOrderMethodCode Supplier
NOTE
Note 1: The value to be transmitted can be found in the Collaboration table.
Note 2: Conversion around Collaboration Units table:
M3 BE order status value 15 (created): EPR value N => M3 BE will send PO.
M3 BE order status value 20 (printed): EPR value EM => M3 BE will not send PO.
Note 3: The M3 API checks to see if the item number exists in M3 BE. If it does exist, then the value will be
inserted in that item number; if it does not exist, then the Product Group value is inserted into the Item
Number field. See also "Item Number Mapping" on page 70.
Note 4: No comma means Integer.
Modified Members
Members Modified in M3 version 11RPG
The table shows Members Modified in M3 version 11RPG.
Description of the modification Member
Prevent releasing of planned PO with GETY =40. MMS940
New file for complementary information to MPMREQ. MPMIDR
New logical files 00, 10 & 20. MPMIDRXX
Handle the new transactions. PPMNGREQ
Handle new fields. PPMNGREQDS
New transaction. PPS001MI
Chapter 11 The View from M3 82
Description of the modification Member
New program Order types EPR PPS098
New transactions. PPS160MI
Handle new transaction & set GETY =40. PPS167
Allow GETY =40 and TEOR =9 PPS170
New check of order types entered in PPS098 PPS250
New check of order types entered in PPS098 PPS300
Initiation of Buyer from CIDVEN PPS912
Prevent releasing of planned PO with GETY =40. PPS913
Selection field if GETY = 40 should be released. PPS913DS
Selections if to release the planned PO with GETY = 40. PPS914
New Fields Connected with Action Number 31764
The table shows New Fields Connected with Action Number 31764.
Description Field
Requisition detail number (PO line). RQDN
Requisition identity (PO) RQID
Requisition number (requisition reference). RQNO
Action Numbers V11RPG
Programs V11ThisGen Action number
MM940, MPMIDR, MPMIDR00, MPMIDR10, MPMIDR20, PPMNGREQ,
PPMNGREQDS, PPS001MI, PPS160MI, PPS167, PPS170, PPS913, PPS913DS,
PPS914
31764
PPS001MI, PPS251 31889
PPS001MI 32439
PPS001MI 32869
PPS098, PPS098AP, PPS098DF 33763
PPS170, PPS914 33824
PPS001MI, PPS160MI 33987
MPMIDR30, PPMNGREQ, PPMNGREQDS, PPS160MI 33992
PPS250, PPS300 34026
83 Chapter 11 The View from M3
Programs V11ThisGen Action number
PPFINMRK, PPFINMRKDS, PPS001MI 34080
PPS001MI 34225
PPS912 34389
PPS001MI, PPS914 34440
PPS001MI 34603
PPS160MI 35313
Action Numbers V12RPG
Description Type Source member
Wrk: M3 e-Procurement RPG PPMEPRMI
Wrk: M3 e-Procurement - cpy RPG PPMEPRMI1
Wrk: M3 e-Procurement - cpy RPG PPMEPRMI2
Wrk: M3 e-Procurement - cpy RPG PPMEPRMI3
Fnc: Manage M3 e-Procurement RPG PPMNGEPR
Fnc: Manage M3 e-Procurement RPG PPMNGEPRDS
MF: M3 e-Procurement Request PF MPEPRR
Key: C RQID RQDN LF MPEPRR00
Key: C RQNO RQID LF MPEPRR10
Key: C PLPN PLPS LF MPEPRR20
Key: C RQNO RQID PLPS LF MPEPRR30
Order types EPR PFDS: DSORTY
Confirmation handling FLD EPRC
Confirmation handling FRF EPRC
Printing FLD EPRP
Printing FRF EPRP
Goods receiving handling FLD EPRR
Goods receiving handling FRF EPRR
Asj: Create WO/PO/DO RPG MMS940
WARNING - EPR order MSG PP_0015
Fnc: Close mark on PO RPG PPFINMRK
Chapter 11 The View from M3 84
Description Type Source member
Fnc: Close mark on PO PF PPFINMRKDS
Wrk: Order type EPR RPG PPS098
Wrk: Order type EPR DSPF PPS098DF
Fnc: Dispatch material RPG PPS167
Wrk: Purchase order RPG PPS171
Wrk: Confirm delivery RPG PPS250
Wrk: Goods receipt RPG PPS300
Fnc: Create PO RPG PPS913
Fnc: Create PO PF PPS913DS
Fnc: Create PO RPG PPS914
EPR Order Type CON PP09801
The EPR requisition MSG PP16006
EPR order - confirmation MSG PP25037
EPR order - receipt MSG PP30067
Requisition detail number FRF RQDN
Requisition identity FRF RQID
Requisition number FRF RQNO
Printing GWO WEP1B
Goods receiving handling GWO WEP1C
Confirmation handling GWO WEP1D
Extended planning paragraph GWO WEP10
Requisition identity GWO WRQ16
Requisition detail number GWO WRQ17
Requisition number GWO WRQ18
85 Chapter 11 The View from M3
Appendix A
M3 Connector Tools
Using the M3 Replicator
As illustrated in the figure in "M3 BE to Lawson M3 e-Procurement Replication" on page 9, the M3 Replicator
is responsible for retrieving data from the ERP-system database and storing in the Stage-1 replication
database. The communication is done through Microsofts SQL Server Integration Services (SSIS).
The M3 Replicator is an application program installed by the Connector Install Wizard. Using the default
installation settings, you can find it in the following folder:
C:\Program Files\Lawson\m3 connector tools 14.1.7.2\SqlServer2005
The replicator is called MVXRepl.exe. Its default configuration file (for M3 12) is called conf.xml and after
running the Setup Wizard is located in the following folder:
C:\Lawson\e-Procurement\Replication\
NOTE A version of MvxRepl.exe is also found in
C:\Program Files\Lawson\m3 connector tools 14.1.7.2\SqlServer2000. This replicator is included for
backwards compatibility with SQLServer 2000 (using Data Transformation Services (DTS)).
Calling the M3 Replicator
To initiate the replication, the M3 Replicator must be executed either manually or by a scheduled task
by the operating system. Either way, it must be called as follows:
mvxrepl /configfile=<config-file>[/savetodb=<dbhostname>]
[/logfile=<log-file-path>]
Where:
names the configuration file to use. Usually, you will specify the
path relative to the MVXRepl.exe program itself, but you could
also use a full path. This is the only mandatory parameter for
calling MVXRepl.exe.
configfile
causes the reply from M3 BE to be saved as an SSIS package
within the named database server. The reply will not be executed.
This is useful when testing and debugging, but will never be used
as part of a regularly scheduled replication.
savetodb
specifies the filename and location of the logfile (enables logging).
This is useful when testing and debugging, but will never be used
as part of a regularly scheduled replication.
logfile
When you run the command, the package is saved as Movex Connector 2 0 for e-Procurement.dtsx in
C:\Program Files\Microsoft SQL Server\90\DTS\Packages.
Appendix A M3 Connector Tools 86
NOTE You can specify more than one configuration file in a single call of MVXRepl.exe:
Ensure that the configuration file names are separated by commas.
The savetodb takes effect for all configuration files.
If you use more than one configuration file, ensure that you use M3-Replicator configuration file
version 2.0, as this will avoid calling the validate data stored procedure spValidateData more than
once. See also "Configuring the M3 Replicator" on page 88 and "Data Validation and Erroneous
Record Detection" on page 40.
Sending replication error reports by e-mail
It is possible to send the recent entries of the replication log as an e-mail. The system requires the
following elements:
A third-party product that provides basic mail-sending capabilities;
it is made by Dimac AB. This product is not included with e-
Procurement; you must download an installer from the Dimac
Web site and install it on the computer where you are running the
M3 Replicator.
Dimac JMail
This is a stored procedure included in the stage-2 replication
database. It collects the required log records and returns them
as a data set to the log-as-mail program.
Stage2.spMail
This program is included with e-Procurement. It runs the
Stage2.spMail stored procedure and uses JMail to mail a report.
MvxLogAsMail.exe
This is an XML file that configures MvxLogAsMail.exe. Log-as-mail configuration file
To obtain JMail go to:
http://tech.dimac.net/
The site provides a downloadable installer and documentation with a complete syntax description of all
of the commands that you can use with JMail.
To generate an error mail, run the following command (for example, from a Windows scheduled task
set to run at an appropriate interval):
MvxLogAsMail.exe /configfile=LogAsMailConf.xml
Where the named configuration file must be in the same folder as the MvxLogAsMail.exe program. The
configuration file must be an XML file formatted as follows:
<?xml version="1.0" encoding="UTF-8"?>
<check-replication-conf>
<connection class="SQLOLEDB" datasource="(local)" database="EPR_Stage2"/>
<stored-procedure name="spMail"/>
<mail server="" from="" to="" title="Validation Report"/>
</check-replication-conf>
Where:
The connection element sets the following attributes:
Specifies the type of data source. This is always SQLOLEDB. class
Specifies the name of the server running the stage-2
replication database.
datasource
87 Appendix A M3 Connector Tools
Specifies the name of the stage-2 database itself (default
EPR_Stage2).
database
The stored-procedure element sets the following attribute:
name: specifies the name of the stored procedure to run (default spMail).
The mail element sets the following attributes:
Specifies the SMTP server through which to send the mail. server
Specifies the address to which the mail should be sent. to
Specifies a title for the mail. title
Configuring the M3 Replicator
Communication parameters for accessing the ERP system and replication database are stored in the
M3 Replicators configuration file, together with the full details of the set of data tables and fields to be
replicated.
The M3-Replicator configuration file is a plain-text file in XML format. You can open and edit it using
any text or XML editor. When you run the M3 Replicator, you must specify the configuration file name.
You can therefore name and save your configuration files however you want, but it is usually most
convenient to store them together.
The (abbreviated) contents of a typical M3-Replicator configuration file after running the Install Wizard
are illustrated in the figure above. The elements and settings shown there are described below:
The replication-conf Element
All of the configuration settings are nested below this element. Its attributes establish the context of the
connection to the ERP system. The following attributes are always required:
Appendix A M3 Connector Tools 88
This assigns a name to the SSIS package created by the M3 Replicator and
saved in the Stage-1 replication database. Usually, this is immediately executed,
thereby updating the database, and then deleted again. However, you might
also choose to save the package in the database without executing or deleting
it automatically. For instructions about how to set the save-package option, see
"Calling the M3 Replicator" on page 86 .
packagename
The M3 BE company number from which to replicate. The initial value for this is
taken from the value you entered the M3 Connector for Lawson M3 e-
Procurement setup wizard.
cono
The M3 BE division number from which to replicate. The initial value for this is
taken from the value you entered the M3 Connector for Lawson M3 e-
Procurement setup wizard.
divi
Sets the unit by which to limit the age of all replicated records. Valid values are:
y for years, m for months, and d for days. This is combined with the expn value
described below.
expi
Sets the value (using the unit established by the expi parameter described above)
that limits the age of all replicated records. Records older than the value
established by these two parameters is not replicated. The value must be an
integer.
expn
NOTE When the expiration parameters (expi and expn) are evaluated the actual cutoff is rounded up
to the next-higher interval. For example, if these are set to one month, than records from January will
be replicated until the first of March. If the expiration parameters are not set, then the default is six
months.
The connection Elements
These elements hold the connection details for connecting to the ERP-system database and the replication
database. Three of these are required: one for the ERP system and one for each stage of the replication
database. The following attributes are always required for each of these elements:
This identifies which type of database the connection element defines. It must
be one of the following: 1 for the M3 BE database; 2 for the Stage-1 database;
or 3 for the Stage-2 database.
id
Establishes whether the connection element applies to the ERP system (value
= MSDASQL) or the replication database (value = SQLOLEDB).
class
The name of the database server to which to connect. datasource
The name of the database (running on the above-specified database server) to
which to connect (replication databases only).
database
The user account under which to connect (M3 BE database only) userid
The password associated with the above user id. password
The schema used to access Oracle database. You must delete this element if
an IBM DB2 is to be used.
schema
The table Elements
Each of these elements identifies a M3 BE table from which data will be replicated and, optionally,
establishes selection criteria (not including last-replication dates, which are held within the Stage-1
replication database, see "Replication date" on page 53). Each must include the following attributes:
89 Appendix A M3 Connector Tools
The name of the table. Name
The name of the key field for the table. key-field
This defines the name of a field that holds a company ID associated with each
record of the table (if any). If this is defined, then the returned records will be
filtered by company ID.
cono-field
This defines the name of a field that holds a division ID associated with each
record of the table (if any). If this is defined, then the returned records will be
filtered by division ID.
divi-field
The name of the field that holds the last-modification date. This is used to identify
the records that must be replicated (see "The replication process" on page 52).
lmdt-field
The name of the field that holds the change number. M3 BE increments this
value each time a record is changed. This is used to find records that have been
updated more than once on the same day (see
"The replication process" on page 52).
chno-field
(optional): The name of the field that holds the date on which a given record
expires. This is used, for example, by the previous-orders clean-up procedure
to find orders that should no longer be included in the Lawson M3 e-Procurement
database.
expy-field
(optional): Adds extra selection criteria for the table. The M3 Replicator always
selects only those records that have changed on the day of the last replication
or afterwards, but you can also add extra criteria using this attribute using
standard SQL syntax.
criteria
The column Elements
Nested below each table element is always a collection of column elements. Each of these name a
column (field) whose values will be replicated. Unnamed columns will not be replicated.
The name of the column. Name
Using the Message Transfer Agent
About the Message Transfer Agent
As explained in "Interface Strategy" on page 9, the Message Transfer Agent is a program that is able
to submit an URL to the SQLXML interface of the replication database and forward the returned XML
response document to the Lawson M3 e-Procurement XML Gateway. The program is usually launched
by the Windows Scheduled Task Manager at regular intervals to ensure that the Lawson M3
e-Procurement database remains reasonably up-to-date with that of the ERP system.
The Transfer Agent can be started from Scheduled Tasks in Windows. The setup and scheduling
of the job(s) are maintained manually.
When calling the Transfer Agent, you must specify the name of a descriptor (configuration) file
whose settings control how the Transfer Agent will manage the replication.
Each run by the transfer agent will perform the following operations per request (see also the figure in
"M3 BE to Lawson M3 e-Procurement Replication" on page 9):
Appendix A M3 Connector Tools 90
1. The agent sends a URL request, which identifies a template file stored on the replication
database server. The template file contains an SQL expression that retrieves the records to
be replicated.
2. The response is an XML document in iXML format.
3. The agent sends this response to another URL, which is the Lawson M3 e-Procurement XML
Gateway. Depending on whether or not the transfer succeeds, the agent applies either the
success of failure style sheet to transform the original response from the replication database
into an XML request document and sends the result to another URL, which is the XML-request
input for the replication database. This request marks the records as updated or failed.
Configuring the Transfer Agent
When you run the Transfer Agent, you must specify a configuration file to use. This file sets up the
communication between the replication database and the Lawson M3 e-Procurement database and
also specifies the type of replication to perform by naming a template file on the replication database
server.
The Connector setup program installs a configuration file: BaseData.xml.trf. This configuration supports
the default replication system. Using the default installation settings, you will find these in:
C:\Lawson\e-Procurement\Replication\Transfer Configurations\
The configuration file is a plain-text file in XML format, which you can maintain manually using a text or
XML editor. Its structure is illustrated in the figure below.
Because a configuration file is specified each time you run the Transfer Agent, you can create several
different configurations (as in the default scenario), each triggering a different kind of replication, and
schedule each of them differently, depending on the needs of your specific solution.
91 Appendix A M3 Connector Tools
The contents of a typical configuration file are illustrated in the figure above. The elements and settings
shown there are described below:
The TransferRequests Element
This is the main element; there is one of them per file. It defines how the Transfer Agent will function
and how it will use the other settings of the configuration file. The following attributes are always required:
Controls the basic function of the Transfer Agent. When used with M3 Connector 2.0
for Lawson M3 e-Procurement, this will be set to SQL XML when replicating from M3
BE to e-Procurement and IAS XML when replicating from EPR to M3 BE. This setting
causes the Transfer Agent to act as described elsewhere in this manual.
Type
When the type is SQL XML, this attribute sets the base URL for contacting the
SQLXML interface of the replication database. To this URL will be added the various
suffixes defined for various purposes in the TransferRequest element. When the
type is IAS XML, this attribute sets the URL for the gateway.
URL
The TransferProtocol Element
There is only one element of this type per file. It defines which output plug-in to use and provides
configuration input for the selected plug-in. For the M3 Connector, the output plug-in will be gateway,
which will forward the XML response from the replication database to the M3 e-Collaborator. The following
attributes are required to configure this connection:
The name of the plug-in to use for the transfer. For replication from M3
BE to e-Procurement, this is either file or http. For replication from
e-Procurement to M3 BE, this is XML gateway.
ConnectionType
Appendix A M3 Connector Tools 92
Specifies where output will be sent. For the M3 Connector, this will always
be the URL for contacting the M3 e-Collaborator.
ConnectionString
The gateway plug-in will submit the XML response document to the specified URL and wait for a failed/OK
response.
TransferRequest Elements
There can be, and often are, several TransferRequest elements. Each of them controls the transfer
of a specific set of records from the replication database to Lawson M3 e-Procurement. Each element
specifies the following attributes, some of which are optional (optional attributes must be listed, but their
values can be blank):
(optional): The name for the request. Name
(optional): A description of the request. Description
Specifies a file that holds the log-in and password to use when
submitting the XML response returned by the replication database
to the Gateway. The default setting for this parameter is
ConfigFile='GatewayPlugInConfig.xml', which names a
file in the same folder as the other transfer configuration files. This
file holds the e-Procurement log-in and password that you specified
when installing the Connector. Edit this file if you wish to change
the credentials associated with replication messages to the XML
Gateway.
ConnectionParameter
(required): Specifies the name and path of a template file stored
on the replication database server. The value specified here will
be appended to the base URL specified in the TransferRequests
element. This file must contain an SQL command that will generate
the contents of the response document expected back from the
replication database. For details about how to write and store
templates, see "Setting up the template files" on page 54.
RequestURL
(required): This attribute controls which XML file will be transformed
and returned to the replication database server if the Lawson M3
e-Procurement XML Gateway returns an OK message. It must
always be set to [Response] when you are using the M3
Connector, thereby using the response document originally returned
from the replication database. For more information about the
success document, see
"Setting up XSL transformations" on page 55.
SuccessDocument
(required): Specifies an HTTP address on the replication database
server to which an XML request will be sent if the Transfer Agent
receives an OK message back from the Lawson M3 e-Procurement
XML Gateway. The value specified here will be appended to the
base URL specified in the TransferRequests element.
SuccessURL
(required): This attribute controls the style sheet that will be applied
to a copy of the forwarded XML response document to create an
XML request document for marking successfully replicated records
in the replication database. For more information about the success
document, see "Setting up XSL transformations" on page 55.
SuccessStylesheet
(required): These are similar to the success-handling settings (see
above), except they control failure handling.
FailureDocument, FailureURL and
FailureStylesheet
93 Appendix A M3 Connector Tools
(optional): When set to yes, this will cause the Transfer Agent to
run the request repeatedly until all matching and valid records have
been transferred (i.e., no matching records with status 1 (new) or
2 (updated) remain). In the standard solution, this is used together
with SQLXML templates that request only 100 records at a time.
If this parameter is not specified, then it defaults to no.
RepeatUntilNoData
The paths specified for the success and failure style sheet documents can either be relative to the
configuration file itself, or absolute.
Appendix A M3 Connector Tools 94
Appendix B
SQLXML Interface
Setting up the SQLXML interface
Provided that you run the Connector Install Wizard on the same computer as the Stage-2 database and
SQLXML server, then the Setup Wizard will configure IIS with a virtual directory for holding template files.
A template file is an XML document that includes one or more SQL statements. During replication, the
Transfer Agent will send a request to the database server to execute a specific template filethis will cause
the database to return an XML file containing new and updated records. However, the system will only
accept these template requests if you have configured and enabled a virtual directory for the templates.
All of the template files you create for the solution must be saved in the target folder for the template virtual
directory, thereby making them available to be executed by the Transfer Agent. See also "Setting up the
template files" on page 54.
The procedure below explains how to configure a template virtual directory manually using the configuration
program included with the SQLXML package. Refer to Microsofts online help for complete details.
NOTE As mentioned above, the Connector Setup Wizard tries to create the required virtual directory. In
most cases, you will not need to use the procedure given below.
1. Launch the virtual-directory management tool for SQLXML. Usually, you can do this via Start >
Programs > SQLXML 3.0 > Configure IIS Support.
2. Expand the tree structure to expose the server where you are running the Stage-2 replication
database and the Web site to which you will post the template-document requests (usually, this
will be the default Web site for your selected server). The Web site you select will establish the
URL to which you must send the request, but no additional files are required there.
Right-click the appropriate Web-site icon and select New > Virtual Directory.
3. On the General tab, make the following settings:
Virtual Directory Name: Enter a name for the top-level virtual directory here (we recommend
EPR_Stage2). Avoid spaces, since this will be used as an URL. The name you enter here
must be added as a folder to the URL for your selected Web site whenever you (or, more
especially, the Message Transfer Agent) want to access the virtual directory.
NOTE Several of the supplied configuration files and stored procedures for the Connector
assume that the virtual directory will be called by the name you supplied for the Stage 2
database. If you need to use a different name, then you must update the affected files.
Local Path: Enter the full path to the folder where you wish to store the template files
themselves. The Connector Setup Wizard initially saves a set of default templates in the path
below, which we recommend.
C:\Lawson\e-Procurement\<Configuration Name>\SQLXML Templates\
4. On the Security tab, Windows login is selected as the default authentication method.
95 Appendix B SQLXML Interface
NOTE Alternatively, you can select Always log on as to specify single user authentication.
5. On the Data Source tab, make the following settings:
Enter the name of the SQL Server installation where you have installed
the Stage-2 replication database. Often, this will be the local machine, in
which case you should enter (local). To select another machine, click the
ellipsis button.
SQL Server
Use this drop-down list to select the name of the Stage-2 database from
your selected server.
Database
6. On the Settings tab, make the following settings:
Select the Allow sql=... or template=... URL queries check box.
Select the Allow template queries check box.
Select the Allow POST check box and set the Maximum size of POST queries field to a large
value, such as 10,000.
These settings ensure that the SQLXML interface will execute template requests from the Transfer
Agent and also accept updategrams from the Transfer Agent, which mark successfully replicated
records in the Stage-2 database.
7. On the Virtual Names tab, you can configure the SQLXML to provide several different types of
services. The only one we need for the Connector is the ability to execute templates named in a
URL. We must therefore add a single virtual directory configured for this purpose. Make the
following settings:
Enter a name for the template virtual directory here (we recommend
template). Avoid spaces, since this will be used as a URL. The name you
enter here must be added as a folder to the URL (after the top-level virtual
directory name you specified on the General tab) for your selected Web
site whenever you (or, more especially, the Message Transfer Agent)
want to execute a template stored in the virtual directory.
NOTE Several of the supplied configuration files and stored procedures
for the Connector assume that this virtual directory will be called template.
If you need to use a different name, then you must update the affected
files.
Name
Select template. Type
Enter the full path to the template folder (or click the ellipsis button to
select one using a browse window). The M3 Connector installer initially
saves a set of default templates in the path below, which we recommend.
Because this is the only feature of the SQLXML interface that we are
using, this path is the same as the path we suggested for the top-level
virtual directory.
C:\Lawson\e-Procurement\<Configuration Name>\SQLXML
Templates\
When you are done, click Save to add the template directory to the list at
the top of the window.
Path
8. Click OK to save your new virtual-directory settings.
If you were to use the example values given in the procedure above, then the following URL (entered in a
browser running on the same machine as the replication database and Web server, i.e., the local host):
Appendix B SQLXML Interface 96
http://localhost/stage2/template/CostCenterTemplate.xml
would execute the following template stored on the replication database server:
C:\Lawson\e-Procurement\Replication\SQLXML Templates\ CostCenterTemplate.xml
97 Appendix B SQLXML Interface
Appendix C
IIS 7 Configuration
Overview
Follow these steps to configure IIS 7 in 64-bit Windows platforms.
Configuring IIS 7
1. Launch Windows Server Manager.
2. Make sure that the 64-Bit server has a Web Server (IIS) role. You can add it by clicking Add
Roles in the Roles page then select Web Server (IIS). Proceed with the installation.
3. Make sure that IIS7 has the IIS 6 Management Compatibility installed. You can add it by
clicking Add Roles in the Roles page then select Application Server. Select IIS 6 Management
Compatibility from the list and then proceed with the installation.
4. In Server Manager, click Roles > Web Server (IIS) > Internet Information Service.
5. Click Application Pools and select DefaultAppPool. Choose Advance Settings in the Actions
pane.
6. Make sure that the Enable 32-bit Applications is set to True.
7. Edit the permission for Default Web Site. In the Security tab, add the user IIS_IUSRS with
Full control permissions.
8. Edit the permission for e-Procurement Stage 2 Virtual Directory. In the Security tab, add the
user IIS_IUSRS with Full control permissions.
9. Handler Mappings of the stage 2 database should be enabled. Click each Mapping and choose
Edit Feature Permission in the Actions pane. Make sure that Read permission is selected.
10. In IIS Manager Permission, make sure that the specific users of the stage 2 database are
allowed to access it.
11. Find the 32-bit version of iisWASPlugin_http.dll then replace the 64-bit version found in
C:\Program Files\IBM\WebSphere\Plugins\bin\IIS_webserver1.
IMPORTANT Back up the 64-bit copy of iisWASPlugin_http.dll before overwriting with the
32-bit version.
12. Restart IIS 7 so that changes in the configuration will be reflected.
Appendix C IIS 7 Configuration 98
Appendix D
Access Permissions (Windows)
Setting access permissions
The Connector installation assumes that the current user (in Windows) has the permissions required to run
the replication. Assigning user access permissions is described in the section below. If you wish to use SQL
server authentication, see "SQL Server Authentication" on page 100.
Windows Authentication
All processes running in Windows operate under a specific user account, just as though they were
manual actions being taken by a user. Because SQL Server applies access restrictions to its databases,
you must configure your replication databases to accept commands initiated both by you as you set up
the system and by the scheduled tasks control panel.
The required database actions are automated by the M3 Replicator and Message Transfer Agent; the
user account associated with the database commands executed by these programs will either be your
current log in (if you launch them manually) or the account used by the scheduled tasks control panel,
which is configurable for each task.
When you ran the M3 Connector setup program, you were asked to specify a user name and password
to associate with the scheduled tasks created by the setup program (see "Running the Connector Setup
Wizard" on page 26). You can check the account configured for each task by opening the Scheduled
Tasks control panel, right-clicking a task and choosing Properties.
The account is shown in the Run as field.
To grant access to the replication databases:
1. Open Microsoft SQL Server Management Studio.
2. Expand the tree until you can see the Logins settings (under the Security folder) for the server
where the replication databases are running.
If your planned scheduled-tasks user and/or your own account are not shown as user icons,
add these by right-clicking the Logins icon and selecting New Login. Use the dialog box
presented to add the required user(s); see your SQL Server documentation if you need help
doing this. For now, simply add the user icons without making any settings other than the
user name, the required settings are described in the subsequent steps of this procedure.
Double-click the icon for your own account.
3. In the Login Properties dialog box, on the Server Roles page, check the sysadmin checkbox.
4. Go to the User Mapping page.
5. Check Map for the Stage1 database in the top half of the page, then check public and db_owner
for Database role membership lower down.
6. Repeat step 5 for the Stage2 database, then click OK to save your settings.
7. Repeat this procedure for users associated with each scheduled task established for the
replication, if these are not the same as your own account.
99 Appendix D Access Permissions (Windows)
SQL Server Authentication
Instead of setting the system up to use Windows Authentication, is it possible to use SQL Server
authentication for parts of the components. This can be a good idea if the database is placed on a
different server to the application. The user for running the scheduled job must be a Windows user.
1. Open Microsoft SQL Server Management Studio.
2. Go to Security \ Logins.
3. Create a new SQL server login, or re-use the one used for the EPR database.
4. Select the User Mapping page.
5. Give the user permission to access the two stage databases EPR_Stage1 and EPR_Stage2,
plus the main database EPR.
6. Save the settings.
7. Open the SQLXML 3.0 configuration.
8. Open the properties for EPR_Stage2.
9. Select the Security tab.
10. Check Always log on as and enter the user Credentials. Check SQL Server.
11. Open the conf.xml file and enter the user for the connection to the two stage databases:
<connection id="2" class="SQLOLEDB" datasource="(local)"
database="EPR_Stage1" userid="rep_user" password="rep_user"/>
<connection id="3" class="SQLOLEDB" datasource="(local)"
database="EPR_Stage2" userid="rep_user" password="rep_user"/>
Appendix D Access Permissions (Windows) 100
Appendix E
Effects of Interfacing
Maintaining Lawson M3 e-Procurement Data
Though the interfaced system is typically controlled from M3 BE, data replicated from M3 BE can be modified
using the e-Procurement Buy Center Administrators interface. However, any changes you apply using this
interface may be overwritten by M3 BE data at the next replication. Most replicated data is one way only
from M3 BE to e-Procurement.
Only Goods Received (ArrivalReport) is replicated in both directions. To see a complete list of which business
objects are replicated and the direction, see "Business Object Methods used for Replication" on page 102.
Data Interface Overview
Accounts and Cost Centers
In M3 BE, it is possible to set up user-specific account authorization (user-specific access to specific
accounts). Similar logic does not exist in e-Procurement and therefore this possible restriction in M3 BE
is not handled in e-Procurement.
In e-Procurement, the combination of the users relation to Company and Location Group (Division and
Facility in M3 BE) controls which supplier catalogs (and thereby products) the user can access. The
product group is assigned to the product that controls the accounts suggested, allowing the users to
see the accounts and use the accounts assigned to the products he can see. The user can also suggest
another account; all valid accounts may be used. The authorizer has the option to change the account.
Similar logic applies to all entities in the M3 BE account string (accounts, cost centers, product groups
and projects are relevant for e-Procurement) and to warehouses and facilities. And again, e-Procurement
does not support these restrictions in exactly the same way. See the e-Procurement user help text for
further information.
All accounting records can be deleted (the record is entirely removed from db), but this is not to be done
when interfaced to e-Procurement. The block functionality must be used since this is the trigger to delete
mark the record in e-Procurement.
Suppliers
Some information about suppliers is not kept in M3 BE, whereas e-Procurement can hold data about
suppliers such as URL.
Goods Received (Arrival Report)
The standard connector installation assumes that the items purchased are only non-stocked items,
meaning that the Purchase Order type should be set up as described in "EPR Specific Purchase Order
Type in M3" on page 16 and according to the logic described in "Goods Receipt" on page 46.
If the application and interface is used for other types of purchases using other Goods Receipt processes
(other statuses), the business logic for selecting Goods Receipt records in M3 BE and for validating
these must be modified, see "Goods Receipt" on page 46.
101 Appendix E Effects of Interfacing
Business Object Methods used for Replication
Replication from M3 to e-Procurement
Business Object Method Business Object
GatewayUpload Account Code
GatewayUpload ArrivalReport
GatewayUpload CostCenter
GatewayUpload Currency
GatewayUpload Location
GatewayUpload LocationGroup
GatewayUpload Quantity
GatewayUpload Supplier
GatewayUpload TermOfPayment
GatewayUploadBuyCenter User
Replication from e-Procurement to M3
Business Object Method Business Object
GatewayTransferGoodsReceived ArrivalReport
GatewayTransferPurchaseOrders Order
GatewayTransferOrderConfirmations Order
Additional Settings made by the Setup Wizard
The Connector Setup Wizard also executes a number of tasks behind the scene. The most important are:
e-Procurement companies are created (if the company code entered on page M3 BE Division, page 1,
and input field EPR Company does not already exist in e-Procurement).
An e-Procurement Expense Type is created, using the defaulted values listed below; - this expense
type is assigned to all e-Procurement Account codes replicated from M3 BE Accounts (the assignment
of an expense type to an account code is required in e-Procurement). The table below lists the logic
used to default the expense type attributes:
The Setup Wizard updates the following e-Procurement Company attributes:
The following is inserted by the Setup Wizard: Field name: No:
The code entered in the Setup Wizard on page M3 BE
Division, page 1
Company code 1
The Company name entered in the Setup Wizard on page
M3 BE Division, page 1
Company name 2
Appendix E Effects of Interfacing 102
The following is inserted by the Setup Wizard: Field name: No:
Euro by default Currency 3
10 by default ApprovalNotificationInterval 4
10 by default ArrivalNotificationInterval 5
CONO_DIVI by default ERP Company Number 6
Same as Company name ERP Integration Description 7
The Order type entered in the Setup Wizard on M3 BE
Company, page 1
ERP Purchase Order Type 8
10 by default LengthOrderNo 9
9 by default LengthReqNo 10
Blank OrderNoPostfix 11
Two first numbers from M3 BE order series OrderNoPrefix 12
0 by default ReqNoPostfix 13
R + OrderNoPrefix by default ReqNoPrefix: 14
The Setup Wizard updates the following e-Procurement Expense type attributes:
Insert: Field name: No:
As entered in Setup Wizard on first Division page Company code 1
As entered in Setup Wizard on first Division page Expense type code 2
Defaults all languages to Products Danish Expense type name 3
Defaults all languages to Products English Expense type name 4
Defaults all languages to Products Swedish Expense type name 5
103 Appendix E Effects of Interfacing
Appendix F
Known Issues
Validation of duplicate entries (from M3 BE)
The M3 BE database is case-sensitive; the e-Procurement database is by default not case-sensitive. As a
result of this difference, duplicate entries can occur from an e-Procurement point of view for example, PCS
and pcs.
Duplicate entries will only be validated as an error if they are found in the same replication. If first one record
(for example, PCS) is replicated, and then pcs is created (in M3 BE) and replicated, this will not be seen as
an error. It will instead just be seen as an update to PCS (since the database is not case sensitive it cannot
see the difference between the two records). If, after the above mentioned scenario, both records are
modified and replicated, this will be seen as two updates to the existing record. The only way to locate these
duplicate entries in this scenario is to make an SQL query directly on the Stage-2 database (or M3 BE
database).
If you install the e-Procurement database as case sensitive, you avoid the problem of duplicate entries. This
requires you to install the database on an SQL server with case-sensitive collation.
Appendix F Known Issues 104
Appendix G
M3 BE Database Selection Criteria
Selection criteria philosophy
In general, selection of records in the M3 BE database, to be transferred to the Stage-1 and Stage-2
databases, are done with a quite wide selection criteria. Let's look at an example:
Supplier (master) records, selection on M3 BE table CIDMAS, one of the criteria is the supplier status, the
IDSTAT field. The value of the field can be:
10 = Preliminary
20 = Approved
30 = Stopped
90 = Deactivated
It could seem logical to only select approved suppliers (where IDSTAT = '20'), since these are the only
suppliers that will be activated in e-Procurement. But, as you can see in this appendix, suppliers in all
statuses are selected to be replicated to Stage 1 and Stage 2. Why is this?
Actually, it's quite simple. Let's say that only approved suppliers (where IDSTAT = '20'), are selected and
supplier A has status '20' at the first replication. Then the supplier is deactivated in M3 BE (IDSTAT = '90').
At the next replication, this supplier is deselected, since IDSTAT >< '20'. This means that the record (for
supplier A) is not transferred to Stage 1 and Stage 2 and therefore there is nothing to "trigger" an update of
the record to the corresponding status in EPR.
This philosophy has the side effect that in some cases records that are in a status similar to '90' (for the
supplier example, for instance a supplier that has been phased out or doesn't exist anymore) will stay or
build up in the Stage 2 database. See "Replication database cleanup" on page 48.
Selection criteria
Below is listed the selection criteria used in the std. Connector for selection records to transfer from M3 BE
database to Stage 1 and Stage 2 databases.
Users
CMNUSR - User definition
Key columns
Description Data type Column name
Company Number JUCONO
Division String(3) JUDIVI
User String(10) JUUSID
105 Appendix G M3 BE Database Selection Criteria
Select "relevant attributes" where:
JUDFCO = 'CONO' or (JUCONO = "CONO" and JUDFCO = 'Blank'): All records matching the CONO
value from parameter file
And
JUDFDI = "DIVI" or 'Blank': All records matching the DIVI (one or multiple) value(s) from parameter
file.
And
JULMDT = "LMDT": All records with a value greater then or equal to the day of the last replication
Get attributes according to mapping document.
CEAEMP - Personnel master file
Key columns
Description Data type Column name
Company Number EACONO
Division String(3) EADIVI
Employee number String(10) EAEMNO
Select "relevant attributes" where:
EACONO = "CONO": All records matching the CONO value from parameter file
And
EADIVI = "DIVI": All records matching the DIVI (one or multiple) value(s) from parameter file
And
EAUSID = EAEMNO (Records relevant for EPR must be set up with matching user ID and employee
number).
And
EALMDT ="LMDT": All records with a value greater than or equal to the day of the last replication
Get attributes according to mapping document.
CMNDIV - Division
Key columns
Description Data type Column name
Company Number CCCONO
Division String(3) CCDIVI
Select "relevant attributes" where:
CCCONO = "CONO": All records matching the CONO value from parameter file
And
CCDIVI = "DIVI": All records matching the DIVI (one or multiple) value(s) from parameter file
And
CCLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
Appendix G M3 BE Database Selection Criteria 106
Get attributes according to mapping document.
CEMAIL - E-mail address
Key columns
Description Data type Column name
Company Number CBCONO
e-Mail type String(2) CBEMTP
e-Mail key value String(10) CBEMKY
e-Mail reference 3 String(10) CBEMR3
e-Mail reference 4 String(10) CBEMR4
e-Mail reference 5 String(15) CBEMR5
Select "relevant attributes" where:
CBCONO = "CONO": All records matching the CONO value from parameter file
And
CBEMTP = '03' or '04'
And
CBLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
Get attributes according to mapping document.
MITWHL - Warehouse location
Key columns
Description Data type Column name
Company Number MWCONO
Warehouse String(3) MWWHLO
Select "relevant attributes" where:
MWCONO ="CONO": All records matching the CONO value from parameter file
And
MWDIVI = "DIVI": All records matching the DIVI (one or multiple) value(s) from parameter file.
And
MWLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
Get attributes according to mapping document.
Cost centers
FCHACC - Chart of accounts
Key columns
107 Appendix G M3 BE Database Selection Criteria
Description Data type Column name
Company Number EACONO
Division String(3) EADIVI
Accounting dimension Number EAAITP
Accounting identity String(8) EAAITM
Select "relevant attributes" where:
EACONO ="CONO": All records matching the CONO value from parameter file
And
EADIVI = "DIVI": All records matching the DIVI (one or multiple) value from parameter file or BLANK
(see note below)
And
EALMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
EAAITP (select dimension): All records matching the "cost center dimension" value from parameter
file
And select
EAAT02 = 0.
Get attributes according to mapping document.
NOTE Accounts/cost centers can be assigned to both company level and division level. This means
that the selection on the DIVI column must be both records matching all the DIVI values from the
parameter file and all records with DIVI = blank.
For example, if one company and two divisions, then the following combinations exist:
CONO = 512, DIVI = Blank
CONO = 512, DIVI = AAA
CONO = 512, DIVI = BBB
Accounts
Same criteria as cost centers, but EAAITP =1 (Account always in dimension 1) and EAAT02 = 1 (Profit
and loss accounts).
Currencies
CSYTAB - System Table
Key columns
Description Data type Column name
Company Number CTCONO
Division String(3) CTDIVI
Appendix G M3 BE Database Selection Criteria 108
Description Data type Column name
Constant value String(10) CTSTCO
Key value String(10) CTSTKY
Language String(2) CTLNCD
Select "relevant attributes" where:
CTCONO ="CONO": All records matching the CONO value from parameter file
And
CTDIVI = "Blank" (see note below)
CTLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
CTSTCO = "CUCD" (record type = currency code)
Get attributes according to mapping document.
NOTE Currencies are set up on company level in M3 BE (that is why DIVI = Blank). This maps to
EPR where currencies are set up on application level.
CCURRA - System Table
Key columns
Description Data type Column name
Company Number CUCONO
Division String(3) CUDIVI
Currency String(3) CUCUCD
Exchange rate type Number CUCRTP
Rate date Smallint CUCUTD
Select "relevant attributes" where:
CUCONO = "CONO" (All records matching the "CONO" value from parameter file)
And
CUDIVI = All records matching the "default currency division value" from parameter file (see note
1 below)
And
Select Ratetype CCURRA.CUCRTP = "default Ratetype value" from parameter file.
And
Select Ratedate CCURRA.CUCUTD (from date) = "Ratedate" (see note 2 below)
Get attributes according to mapping document.
109 Appendix G M3 BE Database Selection Criteria
NOTE
Note 1: Exchange rate, rate to euro, is on Division level in M3 BE, but globally in EPR. Therefore a
specific Division must be selected to retrieve the exchange rates from. Please note that the exchange
is only used to view data in EPR; the exchanged rates are not sent to M3 BE.
Note 2: Other considerations:
1. The value CUARAT can be retrieved based on the above described selection, but the
retrieved value is a rate to the local Division currency (CULOCD field), and EPR needs
a rate to Euro. This means that the rate between the local Division currency and the local
Division Euro must be calculated and used to convert the rates of the local Division
currency to the rate to euro. For this purpose the currency that represents the euro are
kept in the EPR parameter file and prompted by the Setup Wizard.
2. Furthermore the M3 BE currency conversion method CUDMCU must now be considered:
Value 1 = multiplication, value 2 = division
3. The Ratefactor CURAFA must also be considered
Monetary Union - Fixed Exchange Rates (to Euro)
CSYTAB - System table
Key columns
Description Data type Column name
Company Number CTCONO
Division String(3) CTDIVI
Constant value String(10) CTSTCO
Key value String(10) CTSTKY
Language String(2) CTLNCD
Select "relevant attributes" where:
CTCONO = "CONO": All records matching the CONO value from parameter file
And
CTDIVI = Blank (the field can be "not-blank", but for purchase orders this field is always blank).
And
CTLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
CTSTCO = "TEPY" (record type = payment terms)
And
CTLNCD = "LNCD" = LNCD values from the MasterData table.
Get attributes according to mapping document.
Appendix G M3 BE Database Selection Criteria 110
Quantity Units
CSYTAB - System table
Key columns
Description Data type Column name
Company Number CTCONO
Division String(3) CTDIVI
Constant value String(10) CTSTCO
Key value String(10) CTSTKY
Language String(2) CTLNCD
Select "relevant attributes" where:
CTCONO = "CONO": All records matching the CONO value from parameter file
And
CTDIVI = Blank (Always defined on company level)
And
CTLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
CTSTCO = "UNIT" (record type = Quantity Unit/UoM)
And
CTLNCD = "LNCD" = Language code (Get LNCD = Blank, multi-language handling has been
Descoped.)
Get attributes according to mapping document.
Locations
MITWHL - Warehouse location
Key columns
Description Data type Column name
Company Number MWCONO
Warehouse String(3) MWWHLO
Select "relevant attributes" where:
MWCONO: = "CONO": All records matching the CONO value from parameter file
And
MWDIVI = "DIVI" (DIVI = Blank will not be selected)
And
MWLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
Get attributes according to mapping document.
111 Appendix G M3 BE Database Selection Criteria
CIADDR - Internal address
Key columns
Description Data type Column name
Company Number OACONO
Internal address type Number OAADTH
Address key 1 String(10) OAADK1
Address key 2 String(3) OAADK2
Address key 3 String(3) OAADK3
Select "relevant attributes" where:
OACONO = "CONO" ": All records matching the CONO value from parameter file
And
OALMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
OAADTH (Internal address type) = "1"
And
OAADK1 (Address key 1) = "blank"
And
OAADK3 (Address key 3) = "blank"
Get attributes according to mapping document.
Location Groups
The Location Group entity will be mapped to Facility dimension in M3 BE. The Location Group entity is
global for the EPR application (across all companies). All Facilities within one M3 BE company (across
Divisions) is mapped to the Location Group structure (as a forest structure, the tree structure will be
built manually in EPR).
CFACIL - Facilities
Key columns
Description Data type Column name
Company Number CFCONO
Facility String(3) CFFACI
Select "relevant attributes" where:
CFCONO: = "CONO": All records matching the CONO value from parameter file
And
CFDIVI = "DIVI" (Facilities are always on division level)
And
CFLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
Appendix G M3 BE Database Selection Criteria 112
Get attributes according to mapping document.
Special requirement:
The CFWHLO field (main warehouse for the specific facility) will also be replicated. This field value
acts as location (warehouse) for the user if the JUWHLO field is blank. See the user section for
further information.
Suppliers
CIDMAS - Vendor master
Key columns
Description Data type Column name
Company Number IDCONO
Supplier number String(10) IDSUNO
Select "relevant attributes" where:
IDCONO: = "CONO": All records matching the CONO value from parameter file
And
IDLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
IDSUTY = 0 (Supplier type = supplier)
Get attributes according to mapping document.
CIDADR - Vendor address
Key columns
Description Data type Column name
Company Number SACONO
Supplier number String(10) SASUNO
Address type Number SAADTE
Address number String(6) SAADID
Start date Smallint SASTDT
Select "relevant attributes" where:
SACONO = "CONO": All records matching the CONO value from parameter file
And
IDLMDT = "LMDT": All records with a value greater then or equal to the day of the last replication
And
SAADTE = 01 (address type)
And
SASTDT = (use the latest start date that still is before today's date)
Get attributes according to mapping document.
113 Appendix G M3 BE Database Selection Criteria
CSYTAB - System table
Key columns
Description Data type Column name
Company Number CTCONO
Division String(3) CTDIVI
Constant value String(10) CTSTCO
Key value String(10) CTSTKY
Language String(2) CTLNCD
Select "relevant attributes" where:
CTCONO = "CONO": All records matching the CONO value from parameter file
And
CTDIVI = Blank (Always defined on company level)
And
CTLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
CTSTCO = "CSCD" (record type = Country)
And
CTLNCD = "LNCD" = Language code (Get LNCD = Blank)
Get attributes according to mapping document.
CIDREF - Vendor reference persons
Key columns
Description Data type Column name
Company Number IRCONO
Supplier number String(10) IRSUNO
Reference type String(2) IRRFTY
Reference String(10) IRRFID
Select "relevant attributes" where:
IRCONO = "CONO": All records matching the CONO value from parameter file
And
IRLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
IRRFTY (reference type) = '10'
Get attributes according to mapping document.
Appendix G M3 BE Database Selection Criteria 114
E-mail address selection
CSYDPM - Document/Partner/Media
Key columns
Description Data type Column name
Company Number CGCONO
Division String(3) CGDIVI
Document number String(3) CGDONR
Document variant String(2) CGDOVA
Media profile String(2) CGMEPF
Document/media controlling object 1 String(17) CGPRF1
Document/media controlling object 2 String(17) CGPRF2
Media String(10) CGMEDC
Sequence number Number CGSEQN
Select "relevant attributes" where:
CGCONO: = "CONO": All records matching the CONO value from parameter file
And
CGDIVI = "DIVI": All records matching the DIVI (one or multiple) value from parameter file.
And
CGLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
CGDONR = "105" (Document Number, the Doc is a Purchase Order)
And
CGDOVA = "10" (Document variant, - value to be verified)
And
CGPRF2 = Blank
And
CGMEDC = *MAIL (Media) - Is defaulted in M3 BE to value *MAIL.
And
CGSEQN = 1
Get attributes according to mapping document.
The following columns are used as joins when retrieving e-mail addresses:
CGMEPF = IDMEPF (Table CIDMAS)
And
CGPRF1 = IDSUNO (Supplier Number)
115 Appendix G M3 BE Database Selection Criteria
Goods receipts from M3 BE
MPLINE - Purchase order, line
Key columns
Description Data type Column name
Company Number IBCONO
Purchase order number String(7) IBPUNO
Purchase order line Number IBPNLI
Purchase order line sub number Number IBPNLS
Select "relevant attributes" where:
IBCONO = "CONO": All records matching the CONO value from parameter file
And
IBLMDT = "LMDT": All records with a value greater than or equal to the day of the last replication
And
IBORTY = "mvxPurchaseOrderType" All records matching the value from parameter file.
Get attributes according to mapping document
MPLIND - Purchase order line transactions
Key columns
Description Data type Column name
Company Number ICCONO
Purchase order number String(7) ICPUNO
Purchase order line Number ICPNLI
Purchase order line sub number Number ICPNLS
Purchase order line suffix Number ICPNLX
Select "relevant attributes" where:
ICCONO = "CONO": All records matching the CONO value from parameter file
And
ICRGDT = Entry Date (used instead of LMDT)
And
ICPUNO = First digits = First digits (2) in Purchase order series
And
ICPUOS = '50' (Goods Receipts) or '51' (Goods Receipts) or '75' (Direct Put Away)
Get attributes according to mapping document
Special Requirement:
Appendix G M3 BE Database Selection Criteria 116
The field IBORQA must also be replicated to Stage1/2. For further information, see "Goods Receipt"
on page 46.
117 Appendix G M3 BE Database Selection Criteria

Вам также может понравиться