Top Banner
Version 14.1.7.2 Published January 27, 2011
117
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: m 3 e Procurement

Version 14.1.7.2Published January 27, 2011

Page 2: m 3 e Procurement

Document Number M3EPRCONRG---draft

Legal NoticesThis information pertains to computer programs or solutions under development that have not yet beenmade 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 programsand the information contained herein are provided As-is and Lawson makes no warranty regarding theprograms or the suitability or accuracy of the information contained in this document. Any information relatedto these computer programs, including any performance results, is the confidential and proprietary informationof Lawson.

Export Notice: Pursuant to your agreement with Lawson, you are required (at your own expense) to complywith all laws, rules, regulations, and lawful orders of any governmental body that apply to you and theproducts, 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 governmentalofficials 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 informationprovided 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 amaterial breach of your agreement with Lawson.

Intellectual Property: All brand or product names mentioned herein are trademarks or registered trademarksof Lawson, or the respective trademark owners.This documentation is the proprietary information of Lawsonprotected internationally under copyright and related intellectual property laws. Lawson customers orauthorized 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.

Page 3: m 3 e Procurement

Version Log

The version log describes the changes between versions of this document.

DescriptionRelease DatePart NumberRelease for October 2010.

9-14-20101.0

3

Page 4: m 3 e Procurement

Contents

Introduction 7Chapter 1

System Requirements............................................................................................7Interface Strategy...................................................................................................9Installation and Setup Overview..........................................................................13Detailed Field-Mapping Documentation...............................................................14

Pre-installation 15Chapter 2

Preparing M3 Data...............................................................................................15Gathering Required M3 Data for Connector Set-up.............................................17Creating an ODBC Data Source for M3...............................................................22Installing SQLXML...............................................................................................22Installing MEC......................................................................................................23

Installation 24Chapter 3

Introduction..........................................................................................................24Preparing to Install...............................................................................................24Running the Connector Install Wizard..................................................................25Running the Connector Setup Wizard..................................................................26

Establishing the Replication database 31Chapter 4

Creating the Replication database.......................................................................31Setting the replication data mappings..................................................................32

Establishing the Lawson M3 e-Procurementdatabase 33

Chapter 5

Creating an interfaced application database........................................................33Updating the application database.......................................................................33

Configuring and Using the Interfaced System – 1 34Chapter 6

Initial replication...................................................................................................34Preparing e-Procurement Data after Initial Replication........................................36The Connector Interface Overview......................................................................37Configuring Business Center...............................................................................37Configuring the Supply Center.............................................................................38Dealing with Records Deleted or Deactivated in M3............................................38Data Validation and Erroneous Record Detection................................................40Error messages....................................................................................................47Replication database cleanup..............................................................................48Monitoring and Troubleshooting Replication........................................................49

Customizing the Solution From M3 50Chapter 7

Overview..............................................................................................................50

Contents4

Page 5: m 3 e Procurement

Adding New Attributes for Replication..................................................................50The two-stage replication database.....................................................................51Setting up the template files.................................................................................54Setting up XSL transformations...........................................................................55Configuring the XML Gateway.............................................................................55Running the replication........................................................................................55

Setting up MEC 58Chapter 8

Setting up as a Front-end to M3...........................................................................58Interfacing with M3 MBM Envelopes....................................................................58

Configuring and Using the Interfaced System 59Chapter 9

Configuring the new ERP Field Settings..............................................................59Allowing Purchases from Unregistered Suppliers................................................60Transmission Control...........................................................................................61

Customizing The Solution From M3 e-Procurement 63Chapter 10

Setting up Request Documents...........................................................................63Setting up transformation to MBMs......................................................................65Setting up Success/failure Requests for XML Gateway.......................................66Configuring the XML Gateway.............................................................................67Running the replication........................................................................................67

The View from M3 69Chapter 11

Overview..............................................................................................................69Interface Transactions..........................................................................................69Functional Aspects...............................................................................................70Mandatory Basic Data in M3................................................................................71API/Transaction description for V11RPG.............................................................71API/Transaction description for V12RPG.............................................................74API/Transaction description for V12Java..............................................................77Field Mappings.....................................................................................................80Modified Members...............................................................................................82Action Numbers V11RPG....................................................................................83Action Numbers V12RPG....................................................................................84

M3 Connector Tools 86Appendix A

Using the M3 Replicator.......................................................................................86Using the Message Transfer Agent......................................................................90

SQLXML Interface 95Appendix B

Setting up the SQLXML interface.........................................................................95

IIS 7 Configuration 98Appendix C

Overview..............................................................................................................98

Access Permissions (Windows) 99Appendix D

5Contents

Page 6: m 3 e Procurement

Setting access permissions.................................................................................99

Effects of Interfacing 101Appendix E

Maintaining Lawson M3 e-Procurement Data....................................................101Data Interface Overview.....................................................................................101Business Object Methods used for Replication..................................................102Additional Settings made by the Setup Wizard..................................................102

Known Issues 104Appendix F

Validation of duplicate entries (from M3 BE)......................................................104

M3 BE Database Selection Criteria 105Appendix G

Selection criteria philosophy..............................................................................105Selection criteria................................................................................................105

Contents6

Page 7: m 3 e Procurement

Chapter 1

Introduction

System Requirements

Lawson M3 e-Procurement and Application Server SoftwareThe 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 serversoftware included with Lawson M3 e-Procurement.

See Lawson M3 e-Procurement Installation Guide for complete system and third-party softwarerequirements for your application server and complete details about how to install the required Lawsonsoftware.

M3 BE System VersionsThe Lawson M3 e-Sales Connector for Lawson M3 e-Procurement has been developed for and testedagainst 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.1See your M3 BE documentation for complete system requirements and installation details.

Required M3 API programs and transactionsWhen using the Connector, Lawson M3 e-Procurement must be able to execute the ERP-systemprograms listed in the table below.You must make sure that these are available over the connectionprovided between Lawson M3 e-Procurement and the ERP system.

For M3 VersionTransactionProgram

11RPGAddIdReqPPS160MI

11RPGAddEPRTextPPS160MI

11RPGCrtIdPOPPS160MI

11RPGConfirmIDLinePPS001MI

7Chapter 1 Introduction

Page 8: m 3 e Procurement

For M3 VersionTransactionProgram

11RPGReceiptIDPPS001MI

12RPGAddEPRReqPPMEPRMI

12RPGCrtEPRPOPPMEPRMI

12RPGConfirmEPRLinePPMEPRMI

12RPGReceiptEPRPPMEPRMI

12RPGAddEPRTextPPMEPRMI

12RPGChgPOADrPPMEPRMI

12JavaAddEPRReqPPSEPRMI

12JavaCrtEPRPOPPSEPRMI

12JavaConfirmEPRLinePPSEPRMI

12JavaReceiptEPRPPSEPRMI

12JavaAddEPRTextPPSEPRMI

12JavaChgPOADrPPSEPRMI

Server softwareIn addition to the requirements for Lawson M3 e-Procurement, as outlined in the Lawson M3e-Procurement Installation Guide, your application and database servers must have the following installedin 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 theSQLXML interface" on page 95)

• Microsoft Internet Information Server (IIS); this is required in order to use SQLXML and must berunning 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 sitefor software details, release notes and installation instructions.

Furthermore, the application server must be able to access the M3 BE system via ODBC. This requiresIBM System i Access for Windows V6R1M0.

See also "Creating an ODBC Data Source for M3" on page 22.

Chapter 1 Introduction8

Page 9: m 3 e Procurement

Interface Strategy

Interface MethodReplication 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 ownuser interface and database. In addition, each of these systems provides an interface for communicatingwith external systems: Lawson M3 e-Procurement provides an XML Gateway combined with a M3e-Collaborator (MeC); M3 also provides an e-Collaborator. Both the Gateway and the e-Collaboratorare passive, message-based systems that process incoming request documents and return responsedocuments. For this reason, a third application; the Message Transfer Agent, will initiate communicationand 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 M3e-Procurement will come from the standard Lawson M3 e-Procurement database.You will establish aregular 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 LawsonM3 e-Procurement. From here, buyers are able to generate requisitions and managers are able to reviewand approve requisitions. When all approval criteria for a requisition have been met, purchase ordersare generated and submitted to the relevant suppliers. This is the first event that is of interest to theERP system, so it is first here that data are replicated. An optional process will allow suppliers to confirmorders through the Lawson M3 e-Procurement system, with the confirmation message also replicatedto the ERP system. Finally, buyers will use the Lawson M3 e-Procurement system to register receivedorders, notice of which is also replicated.

Invoice matching and payment are not tracked through the Lawson M3 e-Procurement system, so theseprocesses are done by the relevant employees working directly in M3. By the time invoices arrive, M3is sure to have received all of the relevant data from the e-Procurement system.

M3 BE to Lawson M3 e-Procurement ReplicationThe figure below shows elements and transactions of the interfaced solution.

9Chapter 1 Introduction

Page 10: m 3 e Procurement

The replication system uses Microsofts SQL Server Integration Services (SSIS) to retrieve the appropriaterecords 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 thenbe extracted as XML documents, which are submitted to the standard Lawson M3 e-Procurement XMLGateway to update the Lawson M3 e-Procurement database.

A program called the M3 Replicator initiates the transfer of updated records from the ERP system tothe replication database; a program called the Message Transfer Agent then handles the task ofrequesting new and updated records and returning them as XML documents to Lawson M3e-Procurement. These programs must be executed at regular intervals by the standard Windows TaskScheduler. The frequency at which you decide to schedule the transfer of each type of data from theERP 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 transactionsReplication proceeds as follows (see also the figure above):

Chapter 1 Introduction10

Page 11: m 3 e Procurement

1. The Windows Task Scheduler launches the M3 Replicator, which replicates new and updatedrecords from the M3 BE System database into the Stage-1 replication database via MicrosoftData Transformation Services. Changes are then inserted into the Stage-2 database wherestatus codes are updated.

2. A stored procedure then validates the data by verifying keys and by checking against data inthe 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 andincludes the name of a template file stored there.The template file contains an SQL expressionthat retrieves the required data and formats it as an XML document using the native Lawsone-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 newrecords 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 XMLGateway.

6. The Transfer Agent stores a copy of the original response. It holds this document until it getsa status message back from the Gateway (see below).

7. The Gateway processes the incoming document and attempts to import its contents into theLawson M3 e-Procurement database. It then returns a signal to the Transfer Agent to indicatethe success of failure of the import attempt. On failure, return transformed XML to mark failedrecords 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 databaseto 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 tomark the unsuccessfully replicated records. The system can be configured to generatean e-mail message to inform an administrator of failed import attempts.

Lawson M3 e-Procurement to M3 BE ReplicationThe figure below shows elements and transactions of the interfaced solution.

11Chapter 1 Introduction

Page 12: m 3 e Procurement

The Message Transfer Agent will be executed at regular intervals by the standard Windows TaskScheduler. This is required because the interface points on both systems (the XML Gateway and thee-Collaborator) are passivethey will only respond when a request document arrives.The frequency atwhich you decide to schedule the transfer of each type of data from Lawson M3 e-Procurement to theERP 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 recordsto be transferred from Lawson M3 e-Procurement to the ERP system:

• Orders

• Order Confirmations

• Goods-received noticesThe 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 requestdocument(s) to send to Lawson M3 e-Procurement XML Gateway. Only the names of eachrequest document are specifiedthe connector must already have developed the necessaryrequest documents. Request documents use the XML request format expected by the Gateway(iXML).You might establish several different scheduled tasks, each designed to initiate adifferent type of replication.

2. The Transfer Agent sends the first of the specified request documents to the Lawson M3e-Procurement XML Gateway.

3. The XML Gateway processes the request, which usually results in a check for new recordsin the Lawson M3 e-Procurement databases (for example, to find a new (unreplicated) purchaseorder). Because the M3 e-Collaborator is only able to process a single record at a time, theXML 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 doneusing the standard XSL transformation technique supported by the MeC in the Gateway.

Chapter 1 Introduction12

Page 13: m 3 e Procurement

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 eitherHTTP / 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 systemdatabase.

8. If the Transfer Agent successfully delivers the document, then it updates the Lawson M3e-Procurement database by submitting another XML request document that marks the recordas replicated to the ERP system. If a transmission error does occur, then an alternative requestdocument is sent to mark the replication as failed.

9. The Transfer Agent resubmits the XML request document to fetch the next available recordand responds just as it did for the first request; this is repeated until no additional new recordsare returned.

10. Once all new records of each type specified in the configuration file have been replicated, theTransfer Agent quits and remains inactive until it is launched once again by the scheduler.

Installation and Setup OverviewThis section explains how to create an interfaced Lawson M3 e-Procurement/ERP system solution by startingwith 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 andexecuting 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 confirmedthat the interface is working, you are ready to begin customizing your Lawson M3 e-Procurement and/orERP system to create the final required solution.

1. Prepare your development machine(s) and application server(s) for developing and runningLawson M3 e-Procurement by following the instructions in the Lawson M3 e-ProcurementInstallation and Setup Guide. This will include installing the Design Center on your developmentmachine, 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 ODBCdata source that connects to the M3 BE system database as described in"Creating an ODBCData 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 witha specific e-Procurement/M3 installation. For details, see "Running the Connector SetupWizard" on page 26.

4. Create new e-Procurement presentations, as described in the Lawson M3 e-ProcurementInstallation 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 withyour virtual enterprise settings. For details, see "Establishing the Lawson M3 e-Procurementdatabase" on page 33.

7. Set up the replication system as follows:

13Chapter 1 Introduction

Page 14: m 3 e Procurement

• Create the replication databases and establish access rights as described in "Creating theReplication database" on page 31.

• Edit the MasterData table of the Stage-2 replication database with language mappings andother settings to ensure proper data interface as described in "Setting the replication datamappings" on page 32.

• Check the SQLXML configuration set by the Install Wizard. If it is not OK, configure theSQLXML interface of the replication database so that it can find and use the template filesthat 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 areready to start customizing your solution. Details to help you do this are provided in the followingsections and documents:

• "Configuring and Using the Interfaced System – 1 " on page 34 and "Configuring and Usingthe Interfaced System " on page 59

• "Customizing the Solution From M3 " on page 50 and "Customizing The Solution From M3e-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 thatreplication will occur automatically at regular intervals (see "Replication scheduled tasks and batch jobs" onpage 57).

Detailed Field-Mapping DocumentationThis manual is intended to get you started by helping you install the Lawson M3 e-Sales Connector and geta solution up and running with basic communication between systems. It also gives a few ideas of how toimplement the most common types of customizations and its appendices provide details about how to workwith the replication and real-time configuration.

As you customize your solution for a specific project, you will probably need to see an even more detaileddescription 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 MicrosoftExcel format when you install the Connector. A link to this spreadsheet is provided from the Windows Startmenu; select Start > Programs > Lawson > Lawson M3 e-Sales Connector for Lawson M3 e-Procurement14.1.7.2 > Documentation > Mappings Reference.

NOTE Mapping is not implemented in M3 BE version 12RPG.

Chapter 1 Introduction14

Page 15: m 3 e Procurement

Chapter 2

Pre-installation

Preparing M3 DataBefore you try to replicate any data from the M3 BE system, you must check the data contained there tomake sure that it will work correctly with Lawson M3 e-Procurement. For some installations, no changeswill be required. However, you will often set up the M3 data before your initial replication. The table belowlists specific issues that must be set up correctly in M3 to apply with the business logic of EPR and thereplication. See "Data Validation and Erroneous Record Detection" on page 40 and "Error messages" onpage 47 for further information about handling/manipulation of records before insertion in EPR.

Links to validation logicCommentM3 programM3 data entityEPR BO

"Currencies and Exchange Rates" on page 40Set up exchange rates for allreplicated currencies.

CRS058Exchangerates

Currency

"Quantity Units (Unit of Measure)" on page 41EPR is not case sensitive,therefore multiple units usingthe same characters in differentcase can not be used

CRS050Unit ofMeasure

QuantityUnits (UoM)

"Locations" on page 41Address Line 1 may not beblank; if blank, the record iserror marked.

Address line 2 may not beblank; if blank, the value N/A ispopulated.

CRS235Internaladdress

Locations

"EPR Specific Purchase Order Series in M3" on page 16and "Companies" on page 41

IMPORTANT Set up Purchaseorder series correctly!

CRS165Order SeriesCompanies

"Companies" on page 41Set up a specific PurchaseOrder type.

PPS095,PPS098

Order Type

e-Mail address, the table in"Users" on page 42

Set up an e-mail address for allusers.

CRS111EmailUsers

Cost center, the table in"Users" on page 42

Set up a cost center either inthe employee table or in theuser table.

CRS530orMNS150

Cost center

15Chapter 2 Pre-installation

Page 16: m 3 e Procurement

Links to validation logicCommentM3 programM3 data entityEPR BO

Supplier, the table in"Suppliers" on page 44

Set up an e-mail address for allsuppliers.

CRS949EmailSuppliers

Supplier address, the table in"Suppliers" on page 44

Set up supplier addresses(even though not required inM3).

CRS622Address

Phone number, the table in"Suppliers" on page 44

Set up a phone number for asupplier.

CRS620Phone

Contact name/contact person,the table in"Suppliers" on page 44

Set up a contact person for allsuppliers, or N/A will beinserted.

CRS623Contactperson

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 - 1199999to 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 theNumber 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 intervalin M3. There will otherwise be serious conflict when trying to interface several EPR Companies intoseveral 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 needthis data in the Setup Wizard.

EPR Specific Purchase Order Type in M3An order type must be set up in M3 since the order interface supplied by M3 Connector will insert thePurchase Orders on a specific order type and that order type must exist. Otherwise, the insertion viathe API will fail. The order type should be set up in the M3 program CRS 200. Please refer to M3documentation for further information about M3 Purchase Order Types.

Chapter 2 Pre-installation16

Page 17: m 3 e Procurement

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 specificPurchase Order Type. The reason for this is that if a user manually creates a Purchase Order in M3using the EPR specific Purchase Order type, a number from the reserved series could be used and thiscauses a conflict when the same order number is created in EPR and transferred to M3.

Gathering Required M3 Data for Connector Set-upBefore you install the Connector, you must gather some information about the M3 installation with whichyou will be interfacing. The required information is summarized in the tables below. One way to use thetables is to copy or print them from this manual and fill out the blank column with the required settings.Youwill be asked to provide these values when you establish the ODBC data source and run the M3 Connectorsetup program.

If the information is not currently available, you can install the Connector without it. However, you will thenneed 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 valuesWhere to findDescriptionParameter nameWhere the parameter is set

Oracle NetManager

This is called TNS Service Namein the MS ODBC setup

Servicename

OracleService

M3administrator

The IP address for the M3database server

IP addressOracleService

Oracle NetManager

The port to access on the M3database server

Port numberOracleService

Oracle NetManager

For the ODBC connection to theM3 Oracle database

UsernameOracleService andSetupWizard

Oracle NetManager

For the ODBC connection to theM3 Oracle database

PasswordOracleService andSetupWizard

IBM DB2 setup

Your valuesWhere to findDescriptionParameter nameWhere the parameter is set

IBM Net ManagerFor the ODBC connection to theM3 IBM database

UsernameSetupWizard

IBM Net ManagerFor the ODBC connection to theM3 IBM database

UsernameSetupWizard

17Chapter 2 Pre-installation

Page 18: m 3 e Procurement

Microsoft ODBC setup

Your valuesWhere to findDescriptionParameter nameWhere the parameter is set

See"Creating an ODBC Data Source for M3" on page 22

For the ODBC connectionto the M3 Oracle database

UsernameMicrosoftODBC setup

M3 administratorThe name of the SQLdefault library for the M3installation

SQL defaultlibrary

IBM DB2Service

M3 administratorIP address for the M3server

AS/400System

IBM DB2Service

Connector Setup Wizard

Your valuesWhere to findDescriptionParameter nameSetup Wizard page

M3 program MNS095/BSpecifies the ID numberfor the company withinM3 (maps to the M3CONO field).

CompanyNo.

FirstCompanypage

M3 program PPS095 andPPS098

Specifies the order typeused for EPR orderswhen inserted in M3.

Order TypeFirstCompanypage

M3 program CRS012/B(or CRS012/E)

Specifies the dimensionfor cost centers in M3Chart of Accounts.

Cost CenterDimension

FirstCompanypage

M3 program CRS056/BSpecifies the M3 ratetype to be used (typically01 = Variable rate, theexchange rates used inthe productionenvironment)

Rate TypeSecondCompanypage

M3 program CRS056/BSpecifies M3 Divisionwhere the Rate type isset up.

RateDivision

SecondCompanypage

M3 program CRS055/BSpecifies M3 currencycode for Euro

EuroCurrency

SecondCompanypage

M3 Program CRS075/ESpecifies the languagecode (key field CTLNCD)to be used whenretrieving Payment terms.

DefaultLanguage

ThirdCompanypage

M3 Program MNS100/BSpecifies the M3 divisionto be used whenassigning a defaultdivision to users with ablank division.

Defaultdivision

ThirdCompanypage

Chapter 2 Pre-installation18

Page 19: m 3 e Procurement

Your valuesWhere to findDescriptionParameter nameSetup Wizard page

The e-mail should be theEPR administrators e-mailor similar.

Specifies an e-mailaddress to be set on auser if no e-mail addressis available from M3(where to send thenotification if there is noe-mail on the user in M3).

Default E-mail

ThirdCompanypage

Specifies the e-Procurement ID for theorder language used bythe company.

OrderLanguageID

FourthCompanypage

M3 Program MNS100/BSpecifies the first M3Division to replicate datafrom.

DivisionFirstDivisionpage

M3 Program MNS095/BSpecifies EPR Companycode:

• If the connector isbeing installed on anew installation,specify yourpreferred code forthe EPR company.We strongly suggestthat you use thefollowing syntaxXXX_YYY (whereXXX = M3 CONOand YYY = M3 DIVI

• If the connector isbeing installed on anexisting installationand you want to mapthe M3 Divisions tothe existing EPRcompany, thenspecify the exactEPR code.

EPRCompanyCode

FirstDivisionpage

19Chapter 2 Pre-installation

Page 20: m 3 e Procurement

Your valuesWhere to findDescriptionParameter nameSetup Wizard page

M3 Program MNS095/Bor if you map to anexisting installation, thengo to EPR BusinessCenter -> CompanyAdministration

Specifies the EPRCompany Name:• If the connector is

being installed on anew installation,specify yourpreferred name forthe EPR Company.We suggest that youuse similar namingas the Division namein M3.

• If the connector isbeing installed on anexisting installationand you want to mapthe M3 Divisions tothe existing EPRCompany, thenspecify the exactEPR Companyname.

EPRCompanyName

FirstDivisionpage

M3 Program CRS165/BSpecifies the M3Purchase Order Series touse in EPR and M3 (mustbe synchronal). Typically,series type 20 are used.

IMPORTANT The seriesmust be defined usingtwo digits. See"EPR Specific Purchase Order Series in M3" on page 16.

OrderSeries

SecondDivisionpage

M3 Program CRS008/BSpecifies a facility to beset on a user if the userhas a blank facility(equals the EPR LocationGroup).

DefaultFacility

SecondDivisionpage

M3 Program CRS630/BSpecifies a cost center tobe set on a user if theuser has a blank costcenter.

Default costcenter

SecondDivisionpage

See"Configuring the new ERP Field Settings" on page 59.

ERPCompanyNumber

ThirdDivisionpage

See"Configuring the new ERP Field Settings" on page 59.

ERPIntegrationDescription

ThirdDivisionpage

Chapter 2 Pre-installation20

Page 21: m 3 e Procurement

Your valuesWhere to findDescriptionParameter nameSetup Wizard page

See"Configuring the new ERP Field Settings" on page 59.

ERPPurchaseOrder Type

ThirdDivisionpage

See"Configuring the new ERP Field Settings" on page 59.

ERPMiscellaneous1

FourthDivisionpage

See"Configuring the new ERP Field Settings" on page 59.

ERPMiscellaneous2

FourthDivisionpage

Specifies the URL for thee-Collaborator configuredfor use with the e-Procurement applicationyou are interfacing withM3.

e-CollaboratorURL

Replicationpage

A user with administratorrights should be used.

Specifies the useraccount required toaccess the application.

User NameReplicationpage

Password for user enteredabove

Specifies the userpassword required toaccess the application.

PasswordReplicationpage

Specifies whether theMBMs are stored in thefile system or sent to theM3 e-Collaborator.

DestinationM3BusinessMessagespage

If MBMs are stored in thefile system, thisparameter specifies thedestination path.

Destinationpath

M3BusinessMessagespage

If MBMs are sent to theM3 e-Collaborator, thisparameter specifies theURL.

e-CollaboratorURL

M3BusinessMessagespage

Specifies a valid username (if required) for theHTTP server (e-Collaborator).

User NameM3BusinessMessagespage

Specifies the passwordfor the above user.

PasswordM3BusinessMessagespage

TIP For further information about the parameters listed above, see"Customizing the Solution From M3 " on page 50.

21Chapter 2 Pre-installation

Page 22: m 3 e Procurement

Creating an ODBC Data Source for M3The server hosting the Lawson M3 e-Procurement database must include an ODBC data source that connectsto the M3 BE system. The driver used for an IBM DB2 database is IBM System i Access for WindowsV6R1M0 (see "Server software" on page 8 for version requirements) and configure an ODBC source usingthe driver installed by that package.

Download and install System i Access fromhttp://www-03.ibm.com/systems/i/software/access/windows/casp.html. Before you run the M3 Connectorfor Lawson M3 e-Procurement setup program, you must create this ODBC data source. The setup programchecks 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 onyour 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 M3ODBC 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 othersettings 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. ForM3 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 othersettings 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-bit1. 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 SQLXMLThe Transfer Agent communicates with the replication database through the SQLXML interface for MicrosoftSQL Server. This interface is not part of the default SQL Server installationit is an add-on package from

Chapter 2 Pre-installation22

Page 23: m 3 e Procurement

Microsoft.You can download the package from Microsofts Web site (see "System Requirements" on page7 for version requirements).

Please refer to Microsofts Web site for download and installation instructions. Install the interface so thatthe Transfer Agent will be able to interact with the Stage-2 replication database

Installing MECPlease refer to the appropriate M3 Enterprise Collaborator Installation Guide

23Chapter 2 Pre-installation

Page 24: m 3 e Procurement

Chapter 3

Installation

IntroductionThe Connector installation and configuration is done using two separate wizards; the Install Wizard and theSetup Wizard. The Install Wizard installs the Setup Wizard software. The Setup Wizard which can be runat any time configures the Connector for specific e-Procurement/M3 installations. It uses files installed bythe Install Wizard as a source for generating replication files.

Install WizardThe 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 WizardThe Install Wizard copies all the files and utilities that are required to implement the Connector to yourhard 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 WizardThe 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 anexisting Lawson M3 e-Procurement database set (required to run the Connector with all types ofLawson 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 InstallYou must run the Connector Install Wizard and Setup Wizard on the machine on which you plan to run theM3 Replicator and Transfer Agent applications. This machine must be able to access both the M3 ande-Procurement databases. The M3 database will be accessed via ODBC, so you must create an ODBCdata source for it (see "Creating an ODBC Data Source for M3" on page 22). The e-Procurement database

Chapter 3 Installation24

Page 25: m 3 e Procurement

will be accessed directly in SQL server. After running the Connector Install Wizard, you will use the SetupWizard installed to create the stage-1 and stage-2 databases on the same database server as thee-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 forConnector Set-up" on page 17. If you filled out the table provided in that section, then you can use thatinformation here.

Running the Connector Install WizardThe 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 existinginstallation, 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 M3e-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 machineand application servers.

b. Create an ODBC data source that points to the M3 BE system database (see "Creating anODBC Data Source for M3" on page 22 for details).

c. Copy the M3 Connector for e-Procurement installation files to your hard disk and decompressthem if necessary.

2. Open the folder in which you copied the M3 Connector for e-Procurement installation files andrun 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 cannow 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 acomponent, 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 secondChoose Destination Location window is displayed.

By default, the Message Transfer Agent is installed as M3 Connector Tools in the same folder asthe M3 Connector. For example, if you select the default destination for the M3 Connector (givenabove), 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 SetupComplete page appears.

The M3 Connector is now installed.

You now have the option of running the Setup Wizard, which configures the Connector for specifice-Procurement/M3 installations.

25Chapter 3 Installation

Page 26: m 3 e Procurement

NOTE You can run the Wizard to create a new set of files at any time, but you cannot use theWizard 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 clickingFinish.

Running the Connector Setup Wizard

What the Wizard doesThe Connector Setup Wizard creates a full Connector instance configured to work with a specifice-Procurement/ M3 installation.

NOTE The Wizard eliminates the need to configure parameters manually, as was the case with previousversions of the connector.

The Wizard creates the following:

• A Working Folder containing a full set of Replicator configuration files, including batch files andconfigurations for all elements of the Connector. However, the non-SQL Server version-specificexecutable elements (such as the Transfer Agent) are not copied; these can be shared by allconnector 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 thevalues 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 foreach configuration will look something like:

Start > Programs > Lawson > M3 Connector for e-Procurement 14.1.7.2> configuration name >

Running the WizardThe Connector Setup Wizard configures the Connector for specific e-Procurement/M3 installations.Youcan 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 Runthe Setup Wizard check box on the final page of the installer; click Finish to continue tothe 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 > SetupWizard.

Chapter 3 Installation26

Page 27: m 3 e Procurement

2. The Wizard welcome page opens. Click Next and follow the succeeding on-screen promptsto proceed.

Once you reach the Choose working folder page, choose where you would like to save theactive 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 folderwill be configured as the target of a virtual directory in IIS (see also "Setting up the SQLXMLinterface" 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 (youshould 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 fromlooking 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 allof the sources currently configured on your machine. Select the sourcethat you created for accessing M3.

If you clicked No in step 4, there is no drop-down list.You must entera name for the ODBC data source to be configured later (see "Creatingan ODBC Data Source for M3" on page 22).

NOTE The source name you enter is written to the M3-Replicatorconfiguration file. For this reason, if you create an ODBC data sourcelater, you must ensure that its name matches the one you enterhere.You can check and modify the name in the M3-Replicatorconfiguration 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 tablesof 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 thenclick Next.

7. In the Databases page, specify the following:

Enter the name of the SQL Server installation where the e-Procurementdatabase is installed. Often, this will be the local machine, in whichcase you should enter (local).

SQL Server Name

Enter the name of the currently installed e-Procurement database.e-ProcurementDatabase

Enter a name for the Stage-1 replication database.This will be installedon the same SQL server as the e-Procurement database.

Stage1 Database

27Chapter 3 Installation

Page 28: m 3 e Procurement

Enter a name for the Stage-2 replication database.This will be installedon 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 pagein 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 CONOfield).

Company No

NOTE You must drop any leading zeros in company numbers from M3. For example, ifthe company number in M3 is 065, you must type 65 here. This is not necessary for theother 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 exchangerates used in the production environment)

Rate Type

M3 Division where the rate type is set up to get the exchange ratesfrom.

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 retrievingPayment terms.

Default Language

The M3 division to be used when assigning a default division tousers with a blank division (required since the division is part of theEPR company key and a user must be assigned to a company inEPR).

Default Division

An e-mail address to be set on a user if no e-mail address isavailable 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 orderlanguage 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 Installation28

Page 29: m 3 e Procurement

If the connector is being installed on a new installation, enter yourpreferred code for the EPR company, - we strongly suggest thatyou use the following syntax: XXX_YYY (where XXX = M3 CONOand YYY = M3 DIVI). If the connector is being installed on anexisting installation and you want to map the M3 Divisions to theexisting EPR Company, enter the exact EPR Company code.

EPR company code

If the connector is being installed on a new installation, enter yourpreferred name for the EPR company, - we suggest that you usesimilar naming as the Division name in M3. If the connector is beinginstalled on an existing installation and you want to map the M3Divisions to the existing EPR company, enter the exact EPRCompany 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 EPRpurchase 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 transferredback to multiple M3 Division, or there will be an order number conflict. Since order seriesare 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 (equalsthe 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 Companymaster, 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 moreDivisions from which to replicate data.

• Click No when you have specified parameters for all the M3 Divisions from which youwish 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 accountthat will be used by the replication system to submit XML request documents to thee-Procurement XML Gateway.

Make the following settings:

29Chapter 3 Installation

Page 30: m 3 e Procurement

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 objectmethods 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 theseshould be and then enter the same values when you create thedatabase (see also "Creating an interfaced application database" onpage 33).This user will be pre-configured to execute all of the requiredgateway methods. The account that you specify here will be saved ina Transfer Agent configuration file called GatewayPlugInConfig.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 MBMheader. The information must match the MeC configuration on the M3 side you can find thisin 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 optionif 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 andPassword otherwise just leave these fields empty.

16. In the Scheduled Tasks page, the Setup Wizard will create tasks in your computers ScheduledTasks control panel. These tasks will replicate data at regular intervals from the ERP systemto the Lawson M3 e-Procurement database or from the Lawson M3 e-Procurement databaseto the ERP system. For this to work, the tasks must be executed as though they are beingrun 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 thereplication 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 yourcomputer.

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 youentered 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 configurationfiles and scripts. By choosing a different working folder and different Replication database names eachtime, you can have multiple configurations available at the same time. This can be useful duringdevelopment and testing.

Chapter 3 Installation30

Page 31: m 3 e Procurement

Chapter 4

Establishing the Replication database

Creating the Replication databaseThis 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 SQLscripts.You must run the utility twice; once for each database stage. For details about how these twodatabases 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 asthe Lawson M3 e-Procurement database.

Creating a default replication databaseThe databases created by the default scripts use the same structure as the default M3 BE systemdatabase. If you have customized the ERP system database, then you may also need to customize thereplication databasessee the next section for advice.

1. Be sure that you have installed the M3 Connector on the machine from which you will createthe databases.

2. Create the Stage-1 database by clicking Start > Programs > Lawson > M3 Connector fore-Procurement 14.1.7.2 > Database > Configuration Name > Databases > Create stage 1of the shadow database. This will launch the Database Setup Utility.

3. Work through the Wizard pages of the Database Setup Utility, following the instructions onyour screen. Remember that you must run both replication databases on the same databaseserver as the Lawson M3 e-Procurement database.

4. Create the Stage-2 database by clicking Start > Programs > Lawson > M3 Connector fore-Procurement 14.1.7.2 > Database > Configuration Name > Databases > Create stage 2of the shadow database. Be sure to create the Stage-2 database on the same databaseserver 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 inexactly 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 databaseIf you have customized your M3 BE-system database, then you may also need to customize the replicationdatabase to handle your changes. This may require adding a few extra fields to existing tables, or evenadding extra tables.

1. Be sure that you have installed the M3 Connector on the machine from which you will createthe databases.

2. If you have not already done so, run the Connector Setup Wizard.

31Chapter 4 Establishing the Replication database

Page 32: m 3 e Procurement

3. Locate the working folder containing the SQL scripts that create the Stage-1 and Stage-2replication 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 twodescriptor files, which tell the Database Setup Utility to run the supplied scripts. Each descriptorfile always runs a specific set of scripts saved in the same folder as the descriptor itself. Modifythe scripts to customize the existing tables in stage databases. If you need to remove or addnew tables, you might also need to update the descriptors. This is done by opening them ina 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 databasesand customize them as needed using the standard tools of Microsoft SQL Server.

Setting the replication data mappingsTo make sure that the replicated records arriving to Lawson M3 e-Procurement are valid there, the replicationmechanism must allow for a few extra default settings and mappings between language codes.The settingsthat control these are stored in the Stage-2 replication database in a table called MasterData. Most of theinitial 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-Procurementand mapping to default language codes in M3. If your M3 installation is using different language codesand/or different languages, then you must modify the language set stored in the MasterData table.Youshould always remove the language records for languages you are not using; this will help increase replicationperformance.

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 alwaysreview the contents of this table immediately after creating the Stage-2 database, especially with referenceto the language entries.

NOTE The [Mapping] column is used only for the language keys; it is ignored for all other types of keys.

DescriptionMapping (forlanguagekeys only)

ValueKey

There must be a language record for each of thelanguages 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 ERPsystem

• Mapping must be the language code used in LawsonM3 e-Procurement

The default setup uses the three language-mappingrecords. However, you should remove any unusedlanguages because this will improve performance.

DEDELanguage

DKDKLanguage

ENGBLanguage

...

...

...

Chapter 4 Establishing the Replication database32

Page 33: m 3 e Procurement

Chapter 5

Establishing the Lawson M3e-Procurement database

Creating an interfaced application databaseThe 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 dataOf these three, it is the first two options that are relevant for M3 interface you can either migrate an existingdatabase or create a new and empty one.

NOTE The M3-interfaced database must not include demo data.This is because the demo data can interferewith incoming data from M3.

When you installed the M3 Connector, you were asked to specify an e-Procurement user to be associatedwith XML replication.You might also consider specifying the same e-mail address and password when youare 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 databaseWhen 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 preparingyour e-Procurement database for use with M3, you must update the database to include your companysettings as follows:

1. Click Start > Programs > Lawson > M3 Connector for e-Procurement 14.1.7.2 > ConfigurationName > 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 thee-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.

33Chapter 5 Establishing the Lawson M3e-Procurement database

Page 34: m 3 e Procurement

Chapter 6

Configuring and Using the InterfacedSystem – 1

Initial replicationThis 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 thereplicator MVXRepl.exe:

a. Locate 00 Replicate to Stage Databases.bat in your <e-Procurement installfolder>\<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 installfolder>\<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.xmlTransferAgent.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 thisprocedure. For instructions, see "Gathering Required M3 Data for Connector Set-up" on page17.

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-Procurementdatabase" on page 33).

e. Create and publish the Lawson M3 e-Procurement application (see Lawson M3 e-ProcurementInstallation 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 Stage2 replication databases. These settings help ensure that records replicated from the ERP systemwill be valid when used in Lawson M3 e-Procurement. For instructions, see "Setting the replicationdata mappings" on page 32.

Chapter 6 Configuring and Using the InterfacedSystem – 1

34

Page 35: m 3 e Procurement

4. Log on to the machine where you have installed the Transfer Agent and M3 Replicator. Be sureto 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 ConnectorSetup 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 commandprompt in the Initial Tasks folder, thereby making it easy to run each of the other tasks in away 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.batfile. After each replication do the following:

a. Read feedback messages in the command prompt window. If an error is shown, investigatethe 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 indicatesthat you need to change data in M3, then delete the Stage-1 and Stage-2 databases andreinstall them; remember also to update the MasterData table afterwards (see "Setting thereplication data mappings" on page 32.

6. We recommend that you test the SQLXML gateway before replication is started. First, enter thefollowing 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 (rememberto 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 Countries.bat in the command-prompt window. Again, check the feedback and log tables to confirmthat the replication has worked. If you have problems, you can also check the Transfer Agent logfiles, which are stored in %SystemRoot%\System32\LogFiles\TransferAgent\.

NOTE If a transfer fails, you must run the 00 Replicate to Stage Databases.bat fileagain in order to reset status in the stage database.

35Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 36: m 3 e Procurement

9. Continue working in the command-prompt window, executing the remaining batch files in the orderindicated by their file names. After each step, re-check the database and logs to confirm that thetransfer 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 AgentConsole rather than by executing the batch files at the command prompt. To do this, open theBaseData.xml.trf file in the Transfer Agent Console and then use the Lookup button to runeach job, one at a time. See also "Using the Transfer Agent console" on page 56. Error messagesare shown in the Transfer Agent Console and additional help might be found in the Transfer Agentlog files.

10. Once you have confirmed that the initial replications have worked correctly, modify the templatefiles for daily operation and establish the replication schedule (see "Replication scheduled tasksand batch jobs" on page 57).

Preparing e-Procurement Data after Initial ReplicationThe 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. Someusers 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 correspondingM3 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 inBuy 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 createdby 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 InterfacedSystem – 1

36

Page 37: m 3 e Procurement

The Connector Interface OverviewThe table below gives a quick overview of what to do when making a new e-Procurement installation fullyinterfaced 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 findDescriptionNo.

"EPR Specific Purchase Order Series in M3" on page 16Set up (reserve) purchase orderseries in M3.

1

"EPR Specific Purchase Order Type in M3" on page 16Set up order type in M32

"Preparing M3 Data" on page 15Set up M3 data to match e-Procurement master data replication

3

"Gathering Required M3 Data for Connector Set-up" on page 17Gather M3 information requiredwhen running installation

4

"Creating an ODBC Data Source for M3" on page 22Set up ODBC connection5

"Running the Connector Setup Wizard" on page 26Install the connector and run firstmaster data replication

6

"Preparing e-Procurement Data after Initial Replication" on page 36Set up remaining data in e-Procurement manually

7

Chapter 11:, "The View from M3" on page 69, especially thesections "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, installthe MeC and the e-CommerceExtension

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 forreplication to M3 on e-ProcurementCompany master

9

Configuring Business CenterThis section only applies to data replication from e-Procurement to M3.

Configure Order Numbers for M3Lawson M3 e-Procurement generates unique order numbers automatically according to the rulesestablished for each company.You must configure the system to generate numbers that are compatiblewith 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 BuyCenter Administration site to configure each company. The relevant settings are at the bottom of thecompany-administration page. (Please see the Lawson M3 e-Procurement Deployment Guide for acomplete description of how to use these settings).

To ensure that the system you establish will be compatible with the ERP system, please note the followingrestrictions:

37Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 38: m 3 e Procurement

• Order numbers must be seven characters long, so set LengthOrderNo to 7 in M3 11 or 10 in M312.

• Because of the 7 (or 10) character limitation, use only a minimum number of fixed characters forthe 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 identifythe company and system (in this case, Lawson M3 e-Procurement) that generated the order orrequisition.

Configuring the Supply CenterThis 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 inthe ERP system. Because product groups are not synchronized by the M3 Connector, you must re-defineall of the relevant groups from the ERP system in Lawson M3 e-Procurement and ensure that the ProductGroup ID fields match in each system.

In Lawson M3 e-Procurement, you maintain product groups using the Supply Center. Please see the LawsonM3 e-Procurement Deployment Guide manual for complete details.

Dealing with Records Deleted or Deactivated in M3Only 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 themfrom e-Procurement manually. However, some types of records include a status field, which is simplychanged 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 lockrecords 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 frome-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 frome-Procurement if you delete them from the M3 BE Java system:

Chapter 6 Configuring and Using the InterfacedSystem – 1

38

Page 39: m 3 e Procurement

(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 handlingThis 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 inactivein M3), the corresponding record in e-Procurement is delete-marked, - the specific technical solutionsdiffer, 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 canbe:

• 10 = Preliminary

• 20 = Approved

• 30 = Stopped

• 90 = DeactivatedSuppliers 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 enabledin e-Procurement (meaning that field Supplier.isDeleted will be updated to value 0)

The following logic applies:

39Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 40: m 3 e Procurement

• If IDSTAT = 10 or 30 or 90 and the record does not exist in e-Procurement - then do notinsert 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 (fieldSupplier.isDeleted = 0), then update e-Procurement record (update field Supplier.isDeletedto value = 1)

• If IDSTAT = 10 or 30 or 90 and the record exists in e-Procurement and is not active (fieldSupplier.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 insertinto e-Procurement, set status 11 in Stage 2.

• If EALCCD = 1 (blocked) and the record exists in e-Procurement - then update e-Procurementrecord (field payerNumber.isLocked) to value = 1 (Please refer to note 1).

• If EALCCD = 0 insert or update the record.

Data Validation and Erroneous Record DetectionM3 Replicator program generates and executes an SSIS package, which transfers data from the M3 databaseto Stage 1 and Stage 2 and also executes the stored procedure EPR_Stage2.spValidateData . Thisprocedure checks that all the data waiting to be replicated are actually valid for use within the e-Procurementdatabases. 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 thee-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 XMLGateway was not configured correctly in the previous replication).

Currencies and Exchange RatesM3 is able to hold more than one exchange rate for each currency. Usually, these are used in conjunctionwith validation dates (valid from and valid to). e-Procurement, however, can store only one rate percurrency. If more than one rate is defined, then the most recent one will be used. The Setup Wizardprompts for a Rate Division and a Rate Type.These parameters are used to determine which exchangerates to use and which division to get these from in M3 (since M3 can hold these per division andexchange rates are global in e-Procurement). Follow the links for more information. The data validationprocedure in the Stage-2 database is responsible for selecting which rates to use in e-Procurement.

Chapter 6 Configuring and Using the InterfacedSystem – 1

40

Page 41: m 3 e Procurement

Currencies in M3 are set up with a rate to Local Currency. In e-Procurement the currencies all have arate to Euro. To calculate the correct rate for e-Procurement (the M3 rate to euro) the replication findsboth the rate to local currency, the rate between local currency and Euro, and also looks at the rate typeand 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 SQLXMLTemplate, 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 onBlank Division. The default by the Setup Wizard is to replicate the rates set up on the Division enteredin the Setup Wizard as Rate Division. To reconfigure this (for example, to Blank correct the specificcriteria 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 iserror marked (status 10 is set).

• Rate between Euro and Local currency: If no rate (CUARAT), then all currency records are errormarked (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 M3uses both KG and kg to indicate two different units, then you must change the convention used by yourM3 installation.

Quantity Unit: Quantity units are validated for duplicate entries. If multiple entries exist, all records areerror marked (set status 10). Please see the example below:

• PCS, Pcs, pcsIf 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.

Locationse-Procurement Locations are replicated from M3 Warehouses and the Address lines are replicated fromM3 Internal Addresses. In e-Procurement, address 1 and address 2 are required. Therefore a check ismade on the corresponding fields in M3 (OAADR1, OAADR2). If the fields are blank, the correspondingwarehouse 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 GroupsNo special data validation/data manipulations are carried out.

CompaniesCompanies are created by the install script. For further details, see the table in "Additional Settingsmade by the Setup Wizard" on page 102. For reconfiguration, update e-Procurement Company master(s)and re-configure the replication settings.

41Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 42: m 3 e Procurement

Also see "EPR Specific Purchase Order Series in M3" on page 16 about how to set up Order Seriescorrectly in M3 to map to e-Procurement companies and avoid purchase order number conflicts in M3.

Cost centersCost 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 blankdivision can be used in all divisions. In e-Procurement, cost centers are set up on company level (equalsM3 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 = BlankCONO = 512, DIVI = AAA

Goes to company 512_AAA in e-Procurement

Cost centers where

CONO = 512, DIVI = BlankCONO = 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 outautomatically by the replication. Also see "Dealing with Records Deleted or Deactivated in M3" on page38.

AccountsSame logic as cost centers, except that the dimension is not promoted by the Setup Wizard since thisdimension is always 1 in M3 and selection is made on Profit and Loss account only. See "Accounts" onpage 108.

Accounts is one of 3 record types where handling of blocked or not-valid records are carried outautomatically by the replication. Also see "Dealing with Records Deleted or Deactivated in M3" on page38.

UsersThe selection and validation of user records is quite complicated due to different data models in M3 ande-Procurement. Due to the impact on connector transactions in which replication is from e-Procurementto M3, it is important that users are set up correctly. For example, the warehouse must map to the correctcompany (via division and facility), otherwise the purchase may be booked in the wrong company ine-Procurement.

All users (in table CMNUSR) are replicated to EPR_Stage2. It is not yet possible to mark a user asinactive or not-used-anymore in M3, therefore the only option is to consider all users relevant fore-Procurement. The validations in the following table are hereafter applied.

Chapter 6 Configuring and Using the InterfacedSystem – 1

42

Page 43: m 3 e Procurement

Business logicField

M3 users can operate with a blank default company code (typically used ifthe user operates in multiple companies). In e-Procurement the user must beassigned to a company (since the company and the division (combined) ismapped to the e-Procurement company). If the default company code on theuser (JUDFCO) is not the same as the company code for the replication, thecompany 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 forhistoric 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 M3Company code

A user can be created without a default division in M3.This causes a problemin e-Procurement since the M3 division level equals the e-Procurementcompany 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 defaultdivision (also entered in Setup Wizard - Default Division). The default divisionvalue is kept as a parameter value <mvxUserDefaultDivision>.An e-Procurement user assigned to one e-Procurement company can makean order in another ERP company using the cross company functionality(please refer to the help text in e-Procurement Buy Center). This functionalitycan be used if the user has been assigned to the wrong e-Procurementcompany as a result of the above mentioned logic.

Division/e-ProcurementCompany

An e-Procurement user is assigned to a Location Group; this is mapped toM3 facilities. If the facility value on the user record (JUFACI) is blank or invalidfor 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 thefacility is valid for the division is carried out against table CFACIL in Stage 2db. The default location group value is kept as a parameter value<mvxUserDefaultFacility>.An e-Procurement user can change this value by accessing the user profilelink in the top menu in e-Procurement Buy Center, but note that the recordshould 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 M3Warehouses. If the warehouse value on the user record (JUWHLO) is blankor 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

43Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 44: m 3 e Procurement

Business logicField

An e-mail address is required for e-Procurement users.This e-mail is mappedto 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 addresskey equals the user ID (JUUSID - MNS150)

An e-mail address must be set up per user. If no e-mail address is found, thevalidation program will default an e-mail address using the e-mail addressprompted 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 profilelink in the top menu in e-Procurement Buy Center, but note that the recordshould 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 ismapped 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, butnot 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 foundhere, 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 whensetting up an employee record in CRS530. The record must map to the userID 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 programuses 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 (whereJUUSID = EAEMNO) then check for a value in JUDEPT. If this field is alsoblank, 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 theSupply Center. The Supply Center users are set up manually. See"Preparing e-Procurement Data after Initial Replication" on page 36.

SuppliersThe following fields on the supplier master are required or have special business:

Chapter 6 Configuring and Using the InterfacedSystem – 1

44

Page 45: m 3 e Procurement

Business logicField

The Order method selection on the e-Procurement supplier master controlswhich 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 suppliermaster. The fax no. is replicated from M3 field IDTFNO (Fax number).

• If none of the above mentioned is available the order method is set tonone. This naturally also means that it will not be possible to submitan e-mail with an order attachment to a supplier.

Order method

Suppliers should have an e-mail record in the CGTOMA field (this e-mailaddress can be set up in M3 using program CRS949).The supplier e-mailis 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 foundin conf.xml file. See "Suppliers" on page 113.

• The Media parameter (CGMEDC) must equal value *MAIL. Thisparameter value is set at the connector installation and can be foundin 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 personsmay however apply or be setup per supplier. The record with the lowesttable sequence value (IRRFID - Reference ID) is selected (same logic asM3). If no contact person is found the field is populated with N/A.

Contact name/contactperson

e-Procurement has some settings on the supplier master regarding RFQ's.The default settings by the connector is to enable RFQ and to notifypurchase manager on RFQ's above value 0 Euro. This is set up atconnector installation. See SQL-XML Templates in"Setting up the template files" on page 54.

Supplier RFQ

45Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 46: m 3 e Procurement

Business logicField

The following logic is applied when selecting the relevant supplier addressin 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 recordwith 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 addressexists, the fields Address line 1, Address line 2, Address line 3 andPostal code are not required in M3. But, these are mapped to requiredfields in e-Procurement, so if no supplier address record can be foundor if any of the mentioned fields are blank, the related supplier recordis set to status 10.

• The country field on the e-Procurement supplier master is implementedusing a special Design Center component, a static look up table; nota normal database table. This can cause the following problem: if thevalue of the record replicated from M3 does not exactly match thevalue in the static look up table, the country field on the supplier mastermay appear empty. A relevant record can be selected from the list,press update and the country will appear in the e-Procurement suppliermaster (this would however potentially be overwritten if the supplieris updated in M3). If no relevant country is in the list, please use theDesign Center to add the relevant country.

Supplier address

The supplier phone number (IDPHNO) is not required in M3 but it isrequired 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 outautomatically by the replication. See "Dealing with Records Deleted or Deactivated in M3" on page 38.

Payment termsNo special data validation/data manipulations are carried out.

Only payment terms exsiting in the default language supplied in the Setup Wizard are replicated. Theyare 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 ReceiptGoods Receipt records are selected in M3 based on the Order Series, the Status and the Transactiondate. See "EPR Specific Purchase Order Series in M3" on page 16 Records in status 50, 51 and 75are 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) (fornon-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 InterfacedSystem – 1

46

Page 47: m 3 e Procurement

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 (Receivingnumber) are the same, then mark the '75' record as error (set status to '10'), do not insert intoe-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 notinsert into e-Procurement. (51 = when the put away is carried out before quality inspection)

StatusCodeThe status code in M3 (ICOEND) determines whether the Goods Receipt has been completed ornot (value 1 or 0). This value is used for updating the Goods Receipt in e-Procurement (fieldstatusCode 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 completedLogic 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 messagesAn e-mail address for the e-mail agent must be configured manually. The e-mail agent notifies on recordserror-marked in some way.

An agent can send e-mails with errors from the TVFReplicationLog in EPR_Stage 2 database. EditMvxLogAsMailConf in the replication setup. Set up a scheduled task to run initial tasks\send logmail.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 logicBody, exampleHeader, exampleNo.

"Currencies and Exchange Rates" on page 40Currency (ATS) has no rate tolocal division currency

No header, all records are listed.1

"Currencies and Exchange Rates" on page 40Currency (USD) has no rate toeuro currency

No header, all records are listed.2

"Currencies and Exchange Rates" on page 40There are multiple currencieswith the key CSYTAB.CTSTCO= 'XXX' CSYTAB.CTSTKY ='YYY

There are 52 currencies with thesame key. 50 of the errors follownext in the log.

3

47Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 48: m 3 e Procurement

Link to validation logicBody, exampleHeader, exampleNo.

"Quantity Units (Unit of Measure)" on page 41There are multiple quantity unitswith the key hhhhhh

There are 52 quantity units withthe same key. 50 of the errorsfollow next in the log.

4

"Locations" on page 41Location (MITWHL.MWCONO:'330'), (MITWHL.MWWHLO:'170')

52 locations are missing a validaddress.The first 50 are logged.

5

"Locations" on page 41Location (MITWHL.MWCONO:'330'), (MITWHL.MWWHLO:'170')

52 locations have invalidaddress. The OAADR1 andOAADR2 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 44Supplier (CIDMAS.IDCONO:'330'), (CIDMAS.IDSUNO:'100001')

52 suppliers are missing phonenumber.The first 50 are logged.

"Suppliers" on page 44Supplier (CIDMAS.IDCONO:'330'), (CIDMAS.IDSUNO:'100001')

52 suppliers have invalidaddress. The SAADR1,SAADR3, SAPONO, andSACSCD fields are required.The first 50 are logged.

"Suppliers" on page 101Supplier (CIDMAS.IDCONO:'330'), (CIDMAS.IDSUNO:'100001')

52 suppliers have no address.The first 50 are logged.

A number of users in the batchstarting with JUUSID = '*USER'failed to be inserted in the XMLGateway. All records in thisbatch are updated with thestatus code 92 in the stage 2database. To find and correctthe record causing this failure,please see the files dumpedfrom the TransferAgent andconsult the documentation.

The message is an example(user records) of the errormessages that will be logged fore-Procurement XML Gatewaysinsertion errors.

Replication database cleanupThe 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, thedatabase 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 replicationdatabase, 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 InterfacedSystem – 1

48

Page 49: m 3 e Procurement

2. Write a stored procedure for the Stage-2 database that removes records in relevant tables olderthan the date you choose in step 1.

Monitoring and Troubleshooting Replication

Testing the SQLXML ConfigurationTo test the SQLXML interface setup and the output created by your templates, open a standard webbrowser and enter the URL that you have configured as the virtual directory for SQLXML templates, forexample:

http://localhost/EPR_Stage2/template/SupplierTemplate.xml

If the interface is working correctly, then the database server will return an XML document which willbe displayed in your browser. Of course, the Stage-2 database will be empty until you make the initialreplication (see "Preparing e-Procurement Data after Initial Replication" on page 36).

49Chapter 6 Configuring and Using the InterfacedSystem – 1

Page 50: m 3 e Procurement

Chapter 7

Customizing the Solution From M3

OverviewThis 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 acustomized solution (see "What the Wizard does" on page 26). Each time you want to configure the Connectorfor 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 theConnector, for example; if you want to replicate another business object or attribute.

Adding New Attributes for ReplicationThis section gives a short outline and an example of how to add new attributes to the replication mechanismfor transferring data from the M3 BE system to Lawson M3 e-Procurement.

Procedure Outline1. 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 replicationfrom the Stage-2 replication database to Lawson M3 e-Procurement (see "Setting up thetemplate 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 fromM3 to e-Procurement" on page 102.

5. If you are adding a new replication (gateway) method, update the converter.properties file inthe 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 tableTransferDates).

7. Update the table-change number in the Stage-2 replication database to ensure replication ofthe new field for all records.

8. Run the replication.

Chapter 7 Customizing the Solution From M350

Page 51: m 3 e Procurement

ExampleThe example below shows how to add the field IDSUTY (Supplier Type) from the table CIDMAS inthe M3 database to the Supplier business object in Lawson M3 e-Procurement. In Lawson M3e-Procurement, we will call this field SupplierCategory.

1. Add the field to Stage-1 and Stage-2 replication databases by executing the followingSQL command:

USE EPR_Stage1ALTER TABLE CIDMAS ADD IDSUTY TinyintUSE EPR_Stage2ALTER TABLE CIDMAS ADD IDSUTY Tinyint

2. Add the field to the M3-Replicator replication configuration file by adding the new columnname 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 (SupplierTemplate.xml) by adding the following SQL command to the template:

.CASEWHEN CIDMAS.status IS NULL THEN NULLELSE CIDMAS.IDSUTYENDAS [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 databaseby 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 newdatabase 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 theStage-1 replication database and the table-change number in Stage-2 replication databaseto ensure replication of the new field for all records. The following SQL command will dothis:

use EPR_Stage1update transferdates set stamp = 0 where tablename = 'cidmas'use EPR_Stage2update CIDMAS set IDCHNO = 0

8. Run the replication.

The two-stage replication databaseThough 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

51Chapter 7 Customizing the Solution From M3

Page 52: m 3 e Procurement

Replication" on page 9). This approach is used to ensure a comprehensive replication of all changedrecords 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 touchedBecause a record might be updated more than once on any given day, both of these fields must beconsidered when identifying a record that must be replicated to Lawson M3 e-Procurement.The replicationsolution, therefore, operates as follows:

1. The M3 Replicator requests all records from the ERP-system database that show a LMDTvalue that is greater than or equal to the day of the last replication. All of the found recordsare 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-2database as follows:

a. Copy all new records.

b. Update all records having matching key values, but an older LMDT value in the Stage-2database.

c. Update all records having matching key values and LMDT values, but showing a differentCHNO value in the Stage-2 database.

d. Select all of the records moved or updated by this operation in the Stage-2 database sothat 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, theoperation is done independently of the ERP-system database. The performance of this

Chapter 7 Customizing the Solution From M352

Page 53: m 3 e Procurement

operation is furthermore optimized because the Stage-1 and Stage-2 database are runningon the same server.

3. Clear the Stage-1 database.

4. The Transfer Agent will be scheduled to run periodically to request all new and updatedrecords from the Stage-2 database, replicate these to the Lawson M3 e-Procurement databaseand then update the Stage-2 database so that all replicated records are marked as such (seealso 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 systemand Lawson M3 e-Procurement. This should not present a problem, but you might consider cleaningprevious 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 LawsonM3 e-Procurement. However, this is not considered a problem because records are very rarely deletedfrom the ERP system. Instead, they are marked as deleted or cancelled.The replication system handlesthis 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 M3e-Procurement database, this must be done manually.

NOTE The replication strategy described above can, in some very rare cases, result in a failure toreplicate some types of updates in which a record is removed and then recreated in M3. The failureoccurs only when a record is recreated the same date as the previous LMDT and then changed afterwardsthat same day a number of times equaling the CHNO number stored for the matching record in theStage-2 database. This series of events is extremely unlikely.

Replication dateThe Stage-1 replication database includes a table called transferdates. This table stores a datestamp that records the day each relevant table was replicated from M3. The M3 Replicator uses thisdate when requesting new records from the ERP system. Only records that were created or modifiedon that day or later will be replicated to the Stage-1 database. Set the date to zero for each table torequest 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 replicatedrecords. For details, see "Configuring the M3 Replicator" on page 88.

Replication statusEach record stored in the Stage-2 replication database includes a field called status, which marks thestatus of the record with one of the following values:

StatusValue

The record has been successfully replicated and has not changed in the replication databasesince the last replication

<null>

Record is new in the replication database and needs to be replicated1

The record has been updated in the replication database and needs to be replicated2

The record was found to be invalid when it was added to the replication database. This istypically due to missing related records. Records marked with this status will be kept in thedatabase, 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

53Chapter 7 Customizing the Solution From M3

Page 54: m 3 e Procurement

StatusValue

This appears only in the product table (MITMAS). It marks a product that was marked asdeleted in the ERP system (MMSTAT >80) before it was ever transferred to Lawson M3 e-Procurement.

11

Several records have identical keys91

The Transfer Agent failed to send the XML request to the XML Gateway and has returneda failure update gram to the EPR_Stage2 database, typically multiple records with the samecomposite 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 theserecords will not be updated within the replication databasethey will be resident there until removed. Ifrequired, a you can create a stored procedure to clean these up on a project basis.

Setting up the template filesWhen the Transfer Agent is run, its configuration file specifies a URL that identifies a template file storedon the replication database server. A template is a valid XML document that consists of one or more SQLstatements.When a template file is specified at the URL, the SQL commands that are stored in the templatefile are executed on the database server. Output generated by the template file is returned as an XMLresponse document.

For each type of replication you wish to make, you must create a template file that establishes the necessarySQL expression and save this file on the replication database server.

Creating and modifying template filesThe template files must establish the basic form of the XML document that will be returned to the TransferAgent and include SQL statements that will retrieve the required data and format it to conform to theiXML format expected by Lawson M3 e-Procurement. See the Design Center Users Guide for completedetails about the iXML format.

The best way to learn how to create and/or customize template files is to study the examples includedwith M3 Connector (see above).

Saving the active template filesThe Web server will only execute template files that are stored in a single, specified folder. All of yourtemplates must be saved on the database server in this folder. On the Web server, this is configuredas the target of a virtual directory that allows template execution. For details, see "Setting up the SQLXMLinterface" on page 95.

The Connector Setup Wizard creates a folder intended to be used as the template folder for the SQLXMLinterface 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 worksby submitting a URL that specifies an appropriate request file on the replication database server.

Chapter 7 Customizing the Solution From M354

Page 55: m 3 e Procurement

Setting up XSL transformationsPlease refer to the Design Center Installation Guide for a description of how to install the e-CommerceExtension for MeC. During this installation, choosing e-Procurement templates makes the installer configurethe (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 GatewayThe gateway is preconfigured to receive requests from the M3 Connector. For more information, pleaserefer to Design Center Users Guide. It is recommended that you create a specific user for the gatewayrequests. The user must have the Role Gateway User and must be registered in the domain used forauthentication of Buy Center users.

Running the replicationYou can run replication manually, by calling each of the replication programs from the command line orusing 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 canbe accessed through virtual directory in the web server. Please refer to "IIS 7 Configuration" on page 98.

Order of replicationRegardless of how you execute the replication, you must transfer data in a certain order to ensure thatall 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, configurationfiles and scheduled tasks ensure that the correct replication order is followed:

1. Currencies

2. Location Groups

3. Locations

4. Cost Centers

55Chapter 7 Customizing the Solution From M3

Page 56: m 3 e Procurement

5. Account Codes

6. Quantity Units

7. Users

8. Arrival Reports

9. Terms of Payment

10. Suppliers

Calling the M3 ReplicatorTo replicate data from M3 to the replication database, you must call the M3 Replicator from the commandline 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 associatedbatch files) manually. This will call both the M3 Replicator and the Transfer Agent, thereby replicatingdata all the way from M3 to Lawson M3 e-Procurement. For details, see "Replication scheduled tasksand batch jobs" on page 57 for details.

Calling the Transfer Agent from the command lineTo 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 thedefault 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 associatedbatch files) manually. This will call both the M3 Replicator and the Transfer Agent, thereby replicatingdata all the way from M3 to Lawson M3 e-Procurement. For details, see "Replication scheduled tasksand batch jobs" on page 57.

Using the Transfer Agent consoleAs 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. (Orright-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 configurationfile 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 runone 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 M356

Page 57: m 3 e Procurement

C:\Windows\system32\LogFiles\TransferAgent

If an error is encountered, the requests will be dumped here regardless of the selection of thecheck 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 clearthe 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 jobsOnce you have finished developing and testing your solution, you will undoubtedly want data replicationto take place automatically. To do this, use the Windows Scheduled Tasks control panel to set up aschedule of executing the appropriate command using the syntax described in "Calling the TransferAgent from the command line" on page 56 and "Calling the M3 Replicator" on page 86. Usually, youwill set up several different scheduled tasks, each specifying a different set of configuration files, therebyimplementing the various required types of replication.

The M3 Connector includes several batch files, each of which calls the M3 Replication and TransferAgent, in succession, with appropriate configuration files for a given type of replication. The followingtwo batch files are provided for this purpose:

• BaseDataReplication.bat

• TransferMBM.batBy 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 controlpanel. Initially, none of these are set to run.

To schedule the replication, use the standard controls provided by the control panel.You can alsoexecute the tasks manually from here. For complete details about how to use the Scheduled Taskscontrol 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 dumpinformation to %SystemRoot%\System32\LogFiles\TransferAgent. To monitor the replicationmore closely, run the batch files from a command-prompt window; this will display all logging detailsand keep them there so you can scroll through them afterwards. If you run them from the ScheduledTasks 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 andStage-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.

57Chapter 7 Customizing the Solution From M3

Page 58: m 3 e Procurement

Chapter 8

Setting up MEC

Setting up as a Front-end to M3This 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. Thecompany number to which the user is connected is importantthis will control the M3 BE company inwhich the transactions will be created.

Interfacing with M3 MBM EnvelopesThe M3 Connector supports interfacing with both M3 11 and M3 12. However, each of these two versionsof M3 BE expects a slightly different MBM envelope to appear in incoming XML request documents. TheMBM envelope is added by the stylesheets applied to the ideal XML responses resulting from the specificideal 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 envelopeexpected by M3 Version 11. If you are using M3 Version 12, then you must modify the set of outgoingstylesheets as described below.

The following stylesheets are affected:

• TransferGoodsReceivedResponse.xsl

• TransferOrderConfirmationsResponse.xsl

• TransferPurchaseOrdersResponse.xslThe syntax change for the envelope requires only that you change the way you specify the the URI calledby each request. To support M3 12 rather than M3 11, make the text replacements specified in the tablebelow, for each of the files listed above (see "Configuring the XML Gateway" on page 55).

M3 12 SyntaxM3 11 SyntaxMessage 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">

Orderconfirmation

<env:reference uri="#EPR_OrdersReceive@1">

<env:reference uri="#MBM_OrdersReceive_IP@1">

Receipt

Chapter 8 Setting up MEC58

Page 59: m 3 e Procurement

Chapter 9

Configuring and Using the InterfacedSystem

Configuring the new ERP Field SettingsThis 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 comingfrom a given company, thereby ensuring that the orders are processed correctly in the context of the ERPsystem.

These settings are shown if the Application Property Connector/ ERP Company Information is true (you cansee this in Design Center on the Application Properties tab). To work with the new settings, use the SystemAdministration:Companies area of the Buy Center Administration site to configure each company. Most ofthe settings on this page are the same as for a stand-alone installation of Lawson M3 e-Procurement (seethe Lawson e-Procurement Deployment Guide for a complete description of these). To find the interfacesettings, scroll down until you see the group of settings in which all of the field labels start with ERP. Fill outthe ERP fields as required to work with your specific ERP system installation. See the table below for adescription of each of these new fields.

DescriptionField Name

This field is optional. Use it for keeping information for your own referenceinside the ERP system.(The e-Collaborator derives the M3 BE company number from the from, toand reference elements in the envelope.The from and to elements are definedby 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 referenceinside the ERP system.

ERP IntegrationDescription

This value is used when generating the envelope for each MBM documentsent to the ERP system (part of the MBM standard). It sets the <env:to> fieldin the envelope, which identifies the receiver of the document.

ERP Miscellaneous 1

This value is used when generating the envelope for each MBM documentsent 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 forfuture use.

ERP Miscellaneous 3

59Chapter 9 Configuring and Using the InterfacedSystem

Page 60: m 3 e Procurement

DescriptionField Name

M3 records a type for each purchase order, thereby allowing, for example,users to search for all purchase orders submitted from the e-Procurementsystem.Enter a short code (for example, EPR) which will identify purchase orders fromLawson M3 e-Procurement. Usually, you will use the same code for allcompanies.

ERP Purchase Order Type

Allowing Purchases from Unregistered SuppliersNOTE 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 fromsuppliers 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 ofLawson M3 e-Procurement.When you do this, you will ensure that requisitions will always specify a registeredsupplier (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 partof 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 ignoredfor all purchase orders that do not include them.The mechanism works by applying the standard combinationof XML request document and stylesheet as follows:

• TransferPurchaseOrders.xml: This is the request document that fetches data for the purchaseorders forwarded to M3 BE.The request is designed so that supplier details are always requestedwhetheror not they are used depends on the stylesheet.

• TransferPurchaseOrdersResponse.xsl: This is the stylesheet that formats the purchase orderbefore 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 datathat the buyer has supplied about the supplier are added to the XML document instead. See the figuresbelow 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 InterfacedSystem

60

Page 61: m 3 e Procurement

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 theSupplierName, SupplierEmail and SupplierFax fields fromLawson M3 e-Procurement, separated by commas. Thecommas 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, fieldsof Lawson M3 e-Procurement, respectively.

<AddressLine1...4>

This value is taken from the SupplierCountry, field of LawsonM3 e-Procurement.

<CountryCode>

In an actual implementation, you might choose to design the stylesheet differently than described and shownin the text and figures above.You should also modify the define-supplier form of presentation layer to makesure that buyers will enter data correctly.

To enable M3 BE to accept the extra supplier information outlined above, you must modify its API to matchthe output of your purchase-order stylesheet. One example for how this data may arrive from the defaultconfiguration 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 ControlNOTE 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 theAdmin profile.

2. Click on the Application Control:Transmission Control link in the navigator. A search filter and alist of relevant transactions (if any) appears. When there are many relevant transactions, thenyou will only see part of the list.

61Chapter 9 Configuring and Using the InterfacedSystem

Page 62: m 3 e Procurement

3. You can either browse the list or use the search filter to find a specific transaction.You can alsosort the list by clicking on the arrow at the top of the relevant column; click again to reverse thedirection (ascending/descending) of the sort. For each listed transaction, you are shown thefollowing information:

• Order number: The ID number for the order to which the transaction belongs. Click on anumber to view the actual order.

• Transaction type: Tells whether the transaction is a purchase order, order confirmation orgoods-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 ERPsystem.

• History: Provides a link to the transaction-history page, which provides extra details aboutthe 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 pendingtransaction to completed, then it will not be sent. If you change a completed transaction topending, then it will be sent again. For failed transactions, you can either change the statusto pending, if you wish to try again, or completed if you wish to leave the transactionunreplicated.

4. If you would like to see more information about a transaction, click on its number in the Historycolumn.You will then see a short overview of events that have occurred to affect your selectedtransaction.

Chapter 9 Configuring and Using the InterfacedSystem

62

Page 63: m 3 e Procurement

Chapter 10

Customizing The Solution From M3e-Procurement

Setting up Request DocumentsThis 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 aspecific database action (e.g., search or update). The documents must be formatted correctly (accordingto 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 M3e-Procurement to the M3 BE system.

A complete set of request documents required to implement the default interface scenario for M3 is installedby 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 structurecreated when you run the database utility scripts included with the M3 Connector. If you modify the databasestructure, for example by adding or removing fields or tables, you may need to modify these requestdocuments to reflect your changes.You might also choose to write new request documents to replicateother types of data from the e-Procurement system into the ERP system.

FunctionFile Name

Searches the Lawson M3 e-Procurement databasefor all goods-received notices that have changedsince the last replication.This request will return only a single record (a singleline item from an order that has been received sincethe last replication). The Transfer Agent will submitthis request several times, until no new updates existto replicate.

TransferGoodsReceived.xml

Updates the Lawson M3 e-Procurement database tonote that the attempt to replicate a specified goods-received record failed.

TransferGoodsReceivedFailed.xml

Updates the Lawson M3 e-Procurement database tonote 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

63Chapter 10 Customizing The Solution From M3e-Procurement

Page 64: m 3 e Procurement

FunctionFile Name

Same as TransferGoodsReceivedFailed.xml,but notes a failure to replicate an order-confirmationrecord.

TransferOrderConfirmations Failed.xml

Same asTransferGoodsReceivedSucceeded.xml, butnotes a success in replicating an order-confirmationrecord.

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-orderrecord.

TransferPurchaseOrdersFailed.xml

Same asTransferGoodsReceivedSucceeded.xml, butnotes a success in replicating a purchase-orderrecord.

TransferPurchaseOrders Succeeded.xml

Creating and Modifying Request DocumentsThe best way to learn how to create and/or customize request documents for the Gateway is to studythe examples included with M3 Connector. For a complete description of the XML format used by LawsonM3 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 usedwith the Connector, are discussed below.

Collaboration ParametersAll request documents designed to fetch data for the M3 BE system must be configured to requestonly one record at a time. This is because the M3 e-Collaborator is only able to process a singlerecord 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 theconnector, see "Setting up transformation to MBMs" on page 65.

Limiting Transfers by CompanyIf you would like to limit the company or companies from which orders will be replicated to the ERPsystem by a given request document, do the following:

1. Add a <Bindings> section in the request document (standard Gateway behaviorsee theDesign Center Users Guide manual for details)

2. Add the company to the associated succeeded and failed documents (e.g., change <Requestcommand="UpdateTransferStatus">to <Request command ="UpdateTransferStatus" company="BCE">

Saving the Active Request DocumentsAs described in "Using the Message Transfer Agent" on page 90, the Transfer Agent program submitsXML request documents whenever it is called with an appropriate configuration file name. The

Chapter 10 Customizing The Solution From M3e-Procurement

64

Page 65: m 3 e Procurement

configuration file contains communication settings and a list of XML request documents, which must beidentified 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 samefolder 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 sheetsAfter Lawson M3 e-Procurement has successfully updated its database, the XML Gateway returns aniXML response containing the status of the update and the IDs of the updated business objects. An OKsignal is returned back to the Transfer Agent, which then submits an XML request document to thereplication database to mark each affected record as successfully replicated. This request document iscreated by applying a style sheet to the original response document sent from the replication databaseto Lawson M3 e-Procurement. The result is an XML request (called an updategram by Microsoft) thatupdates the replication status of each record from the original response document. One style sheet isrequired 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 commandto 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 isrunning. Usually, you will use the same folder as the one containing the Transfer Agent configurationfile, or a sub-folder of this folder. For each request, you must specify a success style sheet in the TransferAgent configuration file (see "Using the Message Transfer Agent" on page 90).

Supplied style sheetsThe Connector includes a complete set of XSL documents prepared to implement the default interfacescenario.

Using the default installation settings, you can find these in:

C:\Lawson\e-Procurement\<Replication>\Stylesheets\

Transforming to MBMThe 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 datastructure internal to Lawson M3 e-Procurement, you must configure the Gateway to translate the schemabefore 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.Youwill configure the Gateway to recognize a specific communication port as requiring a specific XSLtransformation for each type of incoming request and each type of outgoing reply. For more details aboutthis issue, see "Configuring the XML Gateway" on page 67.

XSL DocumentsThe Connector includes a complete set of XSL documents prepared to implement the default interfacescenario. Using the default installation settings, you can find these in:

C:\Program Files\Lawson\M3 Connector for e-Procurement 14.1.7.2\ Replication\TransferConfigurations\Stylesheets

The contents of this folder are listed and briefly described in the table below.

65Chapter 10 Customizing The Solution From M3e-Procurement

Page 66: m 3 e Procurement

FunctionFile Name

Passes a document without making any changes.This is used for all incoming and outgoingdocuments that are not related to the M3 interface.No translation is applied.

Clone.xsl

Translates a goods-received response documentfrom iXML to MBM.

TransferGoodsReceivedResponse.xsl

Translates an order-confirm response documentfrom iXML to MBM.

TransferOrderConfirmationResponse.xsl

Translates a purchase-order response documentfrom iXML to MBM.

TransferPurchaseOrdersResponse.xsl

Removes the request-name wrapper and thenpasses the enclosed iXML document as-is (see"Creating and modifying template files" on page 54for details about why this is required).This is used for all documents that request recordsthat will be forwarded to the M3 BE system.

TransferRequest.xsl

Creating and Modifying XSL DocumentsIf you are working with a customized version of the Lawson M3 e-Procurement database and/or acustomized 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, youwill 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 Connectorfor guidance.

Saving the Active XSL DocumentsAs described in "Configuring the XML Gateway" on page 67, the Gateway must be specifically configuredif you wish to apply XSL documents when communicating over a given port. Because full path to eachXSL file is specified in the configuration file, you can save them wherever you like, provided the actuallocation of each file matches the configuration. Usually, you will want to keep them together, for examplein:

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 locationson the new server. If you must change the paths used (for example, to a new drive letter), then you mustalso update the configuration file to match.

Setting up Success/failure Requests for XML GatewayThe transfer status for the order is set by a success/failure request, which is sent to the gateway to call themethod 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 M3e-Procurement

66

Page 67: m 3 e Procurement

Configuring the XML GatewayThe XML Gateway is used by the Connector in exactly the same way as it is used in the stand-alone versionof 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 specifiedin 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 howto configure the Gateway. See also "Adding New Attributes for Replication" on page 50 for an example ofhow 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 forMeCThe name of the e-Procurement method is used to select the MBM. This is configured in the targets.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\processlist.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 replicationYou can run replication manually, by calling each of the transfer configurations from the command line orusing the Transfer Agent console, or automatically by establishing scheduled tasks in the operating system.

Order of replicationRegardless of how you execute the replication, you must transfer data in the following order to ensurethat 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 thefolder (default installation):

C:\Lawson\e-Procurement\Replication\Transfer Configurations

67Chapter 10 Customizing The Solution From M3e-Procurement

Page 68: m 3 e Procurement

Transfer AgentPlease refer to "Calling the Transfer Agent from the command line" on page 56 for a description of howto run the Transfer Agent.

Scheduled JobThe 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 scheduledjobs are set up.

Chapter 10 Customizing The Solution From M3e-Procurement

68

Page 69: m 3 e Procurement

Chapter 11

The View from M3

OverviewThis 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. Thischapter, however, is written for the ERP system developer or manager. It includes information about howto handle the data arriving from Lawson M3 e-Procurement and other details that will help you to prepareM3 BE for the interface.

The descriptions in this chapter are valid for M3 version 11RPG, 12RPG and 12Java. The interface on theM3 side is included in releases 11.6, 12.4 and 12.8. For previous versions you must install the action numberslisted is "Action Numbers V11RPG" on page 83. This section also gives an indication of how the interfacecan be installed in even earlier versions.

Interface Transactions

Create Purchase OrderPurchase 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 purchaseorder in M3 BE by the generation of MBM file. In cases when one requisition results in more than onepurchase 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 theinterface. We recommend that you reserve the order-number series interval used in Lawson M3e-Procurement in a separate number series in the ERP system. The purchase orders created in M3 BEhave reference to the corresponding requisition in Lawson M3 e-Procurement via the PO number.

Purchase Order ConfirmationWhen a purchase order is confirmed in Lawson M3 e-Procurement, the confirmation information istransferred to M3 BE as a purchase-order confirmation.

NOTE Purchase orders created in M3 BE from Lawson M3 e-Procurement should not be confirmed inM3 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 inM3 BE.

Goods ReceiptAfter goods have been reported as received in Lawson M3 e-Procurement, the receiving information istransferred to M3 BE as a PO Goods receipt. The finish mark flag can be controlled from Lawson M3e-Procurement when the received quantity is lower than the ordered quantity.

69Chapter 11 The View from M3

Page 70: m 3 e Procurement

NOTE Purchase orders created in M3 BE from Lawson M3 e-Procurement should not be goods receivedin M3 BE. The reason is that any receipt information entered in M3 BE will not update Lawson M3e-Procurement. A parameter setting in the order type (PPS098) controls if it is possible to report goodsreceipt for the order in M3 BE.

Functional Aspects

Cost Accounting of RequisitionsThe Lawson M3 e-Procurement cost-accounting functionality for assigning the accounting string for arequisition is not synchronized to the M3 BE accounting setup. The M3 BE accounting identities can bemade available for accounting in Lawson M3 e-Procurement so that selected accounting items willcorrespond to the M3 BE accounting items. The account cross-reference checks are not performed inLawson M3 e-Procurement. In cases where M3 BE identifies errors, the transactions can be checkedand corrected in Trans Work File. Restart Erroneous Jobs (GLS037).

Item Number MappingThe items used in Lawson M3 e-Procurement are selected from the various catalogs that have beenmade available in the application. Typically, not all items in Lawson M3 e-Procurement are defined asitems in M3 BE. The logic implemented in the interface uses the following hierarchy for item-numbermapping:

1. If the Lawson M3 e-Procurement EPR Supplier item number is defined as an item number inM3 BE, the EPR Supplier item number will be used for the purchase order. The Item Namefrom 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 LawsonM3 e-Procurement product group to which the Lawson M3 e-Procurement item belongs isused as the item number for the M3 BE purchase order. For reference purposes, the LawsonM3 e-Procurement item number will be stored as the Supplier item number on the createdpurchase 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 productgroup 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 purchaseorder as PO Item description.

The recommendation is to ensure that all product groups in Lawson M3 e-Procurement are defined asitem numbers in M3 BE.

Purchase Order PrintoutYou 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, thenM3 BE must be configured not to print the purchase orders.This is done for the involved order typeslisted for the Lawson M3 e-Procurement interface (PPS098). For each order type listed, there is aprint parameter for this purpose. In the MBM there is also a purchase-order process parameter thatcan 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 beconfigured not to print the purchase orders. An automatic printout functionality of the purchase orderdocument can be activated via parameter 710 Automatic printout of PO documents in PPS095.Thedocuments are printed directly after the planned PO is released and the PO is generated in M3 BE.

Chapter 11 The View from M370

Page 71: m 3 e Procurement

Considerations Due to the One-Way InterfaceThe M3 actions listed below are dangerous to use unless the action is manually synchronized in LawsonM3 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 M3When 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 itemis 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. Thisis 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. Areservation will prevent automatic generation of POs in M3 BE within the Lawson M3 e-Procurementnumber series interval. It is possible to use another No Series than I, but it must not be used by anyother order type entered in PPS095. This also has to be checked in PPS097. Series Type must be 20as it is hard-coded in the programs.

• All other non-mandatory data can be used optionally in, for example, cost accounting. This informationis 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 connectedto 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 synchronizedwith 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 synchronizedwith 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 theuser 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 inM3 BE according to the Order type.

API/Transaction description for V11RPG

PPS160MI AddIdReqThe API-transaction AddIdReq adds planned purchase orders in M3 BE. The planned purchase ordersare used as a workfile to consolidate several requisition lines into consolidated purchase orders. Once

71Chapter 11 The View from M3

Page 72: m 3 e Procurement

all lines for an order are created as planned purchase orders, they are automatically released to purchaseorders using the API-transaction CrtIdPO.

The table shows mandatory fields for AddIdReq.

DescriptionField

Set as a parameter in Lawson M3 e-ProcurementCONO

Same as Location Code in Lawson M3 e-ProcurementWHLO

Requisition number, the unique requisition in Lawson M3 e-ProcurementRQNO

Requisition Id, equivalent of M3 BE purchase order number used in Lawson M3 e-Procurement

RQID

Requisition detail number, equivalent of PO line numberRQDN

Supplier numberSUNO

Dummy item in M3 BE, product group in Lawson M3 e-ProcurementITNO

Planned quantityPPQT

Purchase order unit of measurementPUUN

Purchase pricePUPR

CurrencyCUCD

Planned delivery dateDLDT

Requisition byPURC

Supplier Item number, the ordered itemSITE

Description of the ordered itemPITD

This transaction will create a planned PO for the item number or dummy-item number with the generationreference (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 usedfor the sequencing of PO lines. Each PO line will also be created with a line number equal to theRequisition line number from Lawson M3 e-Procurement.

PPS160MI CrtIdPOThe API-transaction CrtIdPO creates purchase orders from a planned purchase order for a given POnumber.

The table shows mandatory fields for CrtIdPO.

DescriptionField

Company numberCONO

Requisition numberRQNO

This transaction will release the planned PO with the same PO number

Chapter 11 The View from M372

Page 73: m 3 e Procurement

PPS001 ConfirmIDLineThe API transaction will make a PO Confirmation for a PO line. The information possible to confirm isQuantity, Delivery date and Purchase price. Lawson M3 e-Procurement can only manage the confirmationof delivery date. The confirmed PO lines will receive status 35, Confirmed.

The table shows mandatory fields for ConfirmIDLine.

DescriptionField

CompanyCONO

Requisition identity. Will be used to find the PO in M3 BE.RQID

Requisition line number in Lawson M3 e-Procurement and purchase orderline number in M3 BE.

RQDN

PPS001MI ReceiptIDThe 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 intraditional M3 BE. Note that there is an optional finish mark-flag as an optional field. If a requisition lineis finish-marked in Lawson M3 e-Procurement without any received quantity, the transaction will closethe corresponding PO-line in M3 BE.

The table shows mandatory fields for ReceiptID.

DescriptionField

CompanyCONO

Transaction dateTRDT

ResponsibleRESP

Requisition identity. Will be used to find the PO in M3 BERQID

Line number in Lawson M3 e-Procurement and M3 BE.RQDN

QuantityRVQA

PPS001 ChgPOAdrThis API transaction will change existing addresses used for a PO. It is not possible to add addressesof 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.

DescriptionField

CompanyCONO

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 LawsonM3 e-Procurement.

PNLI

73Chapter 11 The View from M3

Page 74: m 3 e Procurement

DescriptionField

PO address type in M3 BE. Can be final address, via address or supplieraddress

POAD

Address line 1ADR1

Address line 2ADR2

Address line 3ADR3

Address line 4ADR4

PPS160 AddEPRTextThis API transaction will add a text line to an EPR requisition which has not been released, that is, itexists as a Purchase Order Proposal in M3 BE. When it is released, the text line added will be put intothe PO line.

The table shows mandatory fields for AddEPRText.

DescriptionField

CompanyCONO

Requisition number, the unique requisition in Lawson M3 e-ProcurementRQNO

Requisition Id, equivalent of M3 BE purchase order number used in LawsonM3 e-Procurement

RQID

Requisition detail number, equivalent of PO line numberRQDN

Line number of the text lineLINO

TextTX60

API/Transaction description for V12RPG

PPSEPRMI AddEPRReqThe API-transaction AddEPRReq adds planned purchase orders in M3 BE. The planned purchaseorders 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 topurchase orders using the API-transaction CrtEPRPO.

The table shows mandatory fields for AddEPRReq..

DescriptionField

Set as a parameter in Lawson M3 e-ProcurementCONO

Same as Location Code in Lawson M3 e-ProcurementWHLO

Requisition number, the unique requisition in Lawson M3 e-ProcurementRQNO

Requisition Id, equivalent of M3 BE purchase order number used in LawsonM3 e-Procurement

RQID

Chapter 11 The View from M374

Page 75: m 3 e Procurement

DescriptionField

Requisition detail number, equivalent of PO line numberRQDN

Supplier numberSUNO

Dummy item in M3 BE, product group in Lawson M3 e-ProcurementITNO

Planned quantityPPQT

Purchase order unit of measurementPUUN

Purchase pricePUPR

CurrencyCUCD

Planned delivery dateDLDT

Requisition byPURC

Supplier Item number, the ordered itemSITE

Description of the ordered itemPITD

This transaction will create a planned PO for the item number or dummy-item number with the generationreference (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 equalto the Requisition line number from Lawson M3 e-Procurement.

PPSEPRMI CrtEPRPOThe API-transaction CrtEPRPO creates purchase orders from a planned purchase order for a givenrequisition number.

The table shows mandatory fields for CrtEPRPO..

DescriptionField

Company numberCONO

Requisition numberRQNO

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 ConfirmEPRLineThe API transaction will make a PO Confirmation for a PO line. The information possible to confirm isQuantity, Delivery date and Purchase price. Lawson M3 e-Procurement can only manage the confirmationof delivery date. The confirmed PO lines will receive status 35, Confirmed.

The table shows mandatory fields for ConfirmEPRLine..

DescriptionField

CompanyCONO

Requisition identity. Will be used to find the PO in M3 BE.RQID

75Chapter 11 The View from M3

Page 76: m 3 e Procurement

DescriptionField

Requisition line number in Lawson M3 e-Procurement and purchase orderline number in M3 BE.

RQDN

PPSEPRMI ReceiptEPRThe API-transaction ReceiptEPR reports goods receipt in M3 BE triggered from Lawson M3e-Procurement.The reporting of goods receipts is performed at line-level using the same business logicas available in traditional M3 BE. Note that there is an optional finish markflag as an optional field. If arequisition line is finish-marked in Lawson M3 e-Procurement without any received quantity, thetransaction will close the corresponding PO-line in M3 BE.

The table shows mandatory fields for ReceiptEPR..

DescriptionField

CompanyCONO

Transaction dateTRDT

ResponsibleRESP

Requisition identity. Will be used to find the PO in M3 BERQID

Line number in Lawson M3 e-Procurement and M3 BE.RQDN

QuantityRVQA

PPS001 ChgPOAdrThis API transaction will change existing addresses used for a PO. It is not possible to add addressesof 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.

DescriptionField

CompanyCONO

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 LawsonM3 e-Procurement.

PNLI

PO address type in M3 BE. Can be final address, via address or supplieraddress

POAD

Address line 1ADR1

Address line 2ADR2

Address line 3ADR3

Address line 4ADR4

Chapter 11 The View from M376

Page 77: m 3 e Procurement

PPS160 AddEPRTextThis API transaction will add a text line to an EPR requisition which has not been released, that is, itexists as a Purchase Order Proposal in M3 BE. When it is released, the text line added will be put intothe PO line.

The table shows mandatory fields for AddEPRText.

DescriptionField

CompanyCONO

Requisition number, the unique requisition in Lawson M3 e-ProcurementRQNO

Requisition Id, equivalent of M3 BE purchase order number used in LawsonM3 e-Procurement

RQID

Requisition detail number, equivalent of PO line numberRQDN

Line number of the text lineLINO

TextTX60

API/Transaction description for V12Java

PPSEPRMI AddEPRReqThe API-transaction AddEPRReq adds planned purchase orders in M3 BE. The planned purchaseorders 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 topurchase orders using the API-transaction CrtEPRPO.

The table shows mandatory fields for AddEPRReq.

DescriptionField

Set as a parameter in Lawson M3 e-ProcurementCONO

Same as Location Code in Lawson M3 e-ProcurementWHLO

Requisition number, the unique requisition in Lawson M3 e-ProcurementRQNO

Requisition Id, equivalent of M3 BE purchase order number used in LawsonM3 e-Procurement

RQID

Requisition detail number, equivalent of PO line numberRQDN

Supplier numberSUNO

Dummy item in M3 BE, product group in Lawson M3 e-ProcurementITNO

Planned quantityPPQT

Purchase order unit of measurementPUUN

Purchase pricePUPR

CurrencyCUCD

77Chapter 11 The View from M3

Page 78: m 3 e Procurement

DescriptionField

Planned delivery dateDLDT

Requisition byPURC

Supplier Item number, the ordered itemSITE

Description of the ordered itemPITD

This transaction will create a planned PO for the item number or dummy-item number with the generationreference (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 equalto the Requisition line number from Lawson M3 e-Procurement.

PPSEPRMI CrtEPRPOThe API-transaction CrtEPRPO creates purchase orders from a planned purchase order for a givenrequisition number.

The table shows mandatory fields for CrtEPRPO.

DescriptionField

Company numberCONO

Requisition numberRQNO

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 ConfirmEPRLineThe API transaction will make a PO Confirmation for a PO line. The information possible to confirm isQuantity, Delivery date and Purchase price. Lawson M3 e-Procurement can only manage the confirmationof delivery date. The confirmed PO lines will receive status 35, Confirmed.

The table shows mandatory fields for ConfirmEPRLine.

DescriptionField

CompanyCONO

Requisition identity. Will be used to find the PO in M3 BE.RQID

Requisition line number in Lawson M3 e-Procurement and purchase orderline number in M3 BE.

RQDN

PPSEPRMI ReceiptEPRThe API-transaction ReceiptEPR reports goods receipt in M3 BE triggered from Lawson M3e-Procurement.The reporting of goods receipts is performed at line-level using the same business logicas available in traditional M3 BE. Note that there is an optional finish markflag as an optional field. If arequisition line is finish-marked in Lawson M3 e-Procurement without any received quantity, thetransaction will close the corresponding PO-line in M3 BE.

Chapter 11 The View from M378

Page 79: m 3 e Procurement

The table shows mandatory fields for ReceiptEPR.

DescriptionField

CompanyCONO

Transaction dateTRDT

ResponsibleRESP

Requisition identity. Will be used to find the PO in M3 BERQID

Line number in Lawson M3 e-Procurement and M3 BE.RQDN

QuantityRVQA

PPS001 ChgPOAdrThis API transaction will change existing addresses used for a PO. It is not possible to add addressesof 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.

DescriptionField

CompanyCONO

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 LawsonM3 e-Procurement.

PNLI

PO address type in M3 BE. Can be final address, via address or supplieraddress

POAD

Address line 1ADR1

Address line 2ADR2

Address line 3ADR3

Address line 4ADR4

PPS160 AddEPRTextThis API transaction will add a text line to an EPR requisition which has not been released, that is, itexists as a Purchase Order Proposal in M3 BE. When it is released, the text line added will be put intothe PO line.

The table shows mandatory fields for AddEPRText.

DescriptionField

CompanyCONO

Requisition number, the unique requisition in Lawson M3 e-ProcurementRQNO

Requisition Id, equivalent of M3 BE purchase order number used in LawsonM3 e-Procurement

RQID

79Chapter 11 The View from M3

Page 80: m 3 e Procurement

DescriptionField

Requisition detail number, equivalent of PO line numberRQDN

Line number of the text lineLINO

TextTX60

Field MappingsThis section shows how the M3 Connector maps data fields from the Lawson M3 e-Procurement databaseto 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.

NoteM3 FieldLengthFormate-Procurement Fielde-Procurement Table

Accountingdimension 1

8AlfaaccountCodeAccountCode

Note 1Company3NumMetadataCollaboration Units

Note 1Ordertype3AlfaMetadataCollaboration Units

Order number7AlfaorderNumberOrder

Requested by(Requester)

10AlfauserNameUser

Accountingdimension 6

8AlfauserNameUser

Cost center8AlfapayerNumberCostCenter

Chapter 11 The View from M380

Page 81: m 3 e Procurement

NoteM3 FieldLengthFormate-Procurement Fielde-Procurement Table

Accountingdimension 2

8AlfapayerNumberCostCenter

PO itemDescription

60AlfaproductNameProduct

Note 3Item number15AlfasupplierProductNumberProduct

Note 3Item number15AlfaproductGroupCodeProductGroup

Accountingdimension 3

8AlfaproductGroupCodeProductGroup

DeliveryAddress Line 1

36AlfadeliveryAddress1Requisition

DeliveryAddress Line 2

36AlfadeliveryAddress2Requisition

DeliveryAddress Line 3

36AlfadeliveryAddress3Requisition

DeliveryAddress Line 4

36AlfadeliveryAddress4Requisition

InvoiceAddress Line 1

36AlfainvoiceAddress1Requisition

InvoiceAddress Line 2

36AlfainvoiceAddress2Requisition

InvoiceAddress Line 3

36AlfainvoiceAddress3Requisition

InvoiceAddress Line 4

36AlfainvoiceAddress4Requisition

Warehouse3AlfalocationCodeRequisition

Requisitionnumber

AlfarequisitionNumberRequisition

Currency3AlfacurrencyCodeRequisitionDetail

Order Linenumber

3NumdetailNumberRequisitionDetail

Project number8Alfainfo1RequisitionDetail

Accountingdimension 4

8Alfainfo1RequisitionDetail

Projectelement

8Alfainfo2RequisitionDetail

Accountingdimension 5

8Alfainfo2RequisitionDetail

Accountingcontrol object

8Alfainfo3RequisitionDetail

81Chapter 11 The View from M3

Page 82: m 3 e Procurement

NoteM3 FieldLengthFormate-Procurement Fielde-Procurement Table

Accountingdimension 7

8Alfainfo3RequisitionDetail

Note 4Quantity15,6Num (1,0)quantityRequisitionDetail

Unit ofmeasure

3AlfaquantityUnitNameRequisitionDetail

Planneddelivery date

8NumrequestedDeliveryDateRequisitionDetail

Order line posttext

1000AlfasupplierCommentRequisitionDetail

Purchase price17,6Num (120,25)

unitPriceRequisitionDetail

Suppliernumber

10AlfaexternalSupplierNumberSupplier

Note 2Order Status2AlfapreferredOrderMethodCodeSupplier

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 beinserted in that item number; if it does not exist, then the Product Group value is inserted into the ItemNumber field. See also "Item Number Mapping" on page 70.

Note 4: No comma means Integer.

Modified Members

Members Modified in M3 version 11RPGThe table shows Members Modified in M3 version 11RPG.

Description of the modificationMember

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 M382

Page 83: m 3 e Procurement

Description of the modificationMember

New program Order types EPRPPS098

New transactions.PPS160MI

Handle new transaction & set GETY =40.PPS167

Allow GETY =40 and TEOR =9PPS170

New check of order types entered in PPS098PPS250

New check of order types entered in PPS098PPS300

Initiation of Buyer from CIDVENPPS912

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 31764The table shows New Fields Connected with Action Number 31764.

DescriptionField

Requisition detail number (PO line).RQDN

Requisition identity (PO)RQID

Requisition number (requisition reference).RQNO

Action Numbers V11RPG

Programs V11ThisGenAction number

MM940, MPMIDR, MPMIDR00, MPMIDR10, MPMIDR20, PPMNGREQ,PPMNGREQDS, PPS001MI, PPS160MI, PPS167, PPS170, PPS913, PPS913DS,PPS914

31764

PPS001MI, PPS25131889

PPS001MI32439

PPS001MI32869

PPS098, PPS098AP, PPS098DF33763

PPS170, PPS91433824

PPS001MI, PPS160MI33987

MPMIDR30, PPMNGREQ, PPMNGREQDS, PPS160MI33992

PPS250, PPS30034026

83Chapter 11 The View from M3

Page 84: m 3 e Procurement

Programs V11ThisGenAction number

PPFINMRK, PPFINMRKDS, PPS001MI34080

PPS001MI34225

PPS91234389

PPS001MI, PPS91434440

PPS001MI34603

PPS160MI35313

Action Numbers V12RPG

DescriptionTypeSource member

Wrk: M3 e-ProcurementRPGPPMEPRMI

Wrk: M3 e-Procurement - cpyRPGPPMEPRMI1

Wrk: M3 e-Procurement - cpyRPGPPMEPRMI2

Wrk: M3 e-Procurement - cpyRPGPPMEPRMI3

Fnc: Manage M3 e-ProcurementRPGPPMNGEPR

Fnc: Manage M3 e-ProcurementRPGPPMNGEPRDS

MF: M3 e-Procurement RequestPFMPEPRR

Key: C RQID RQDNLFMPEPRR00

Key: C RQNO RQIDLFMPEPRR10

Key: C PLPN PLPSLFMPEPRR20

Key: C RQNO RQID PLPSLFMPEPRR30

Order types EPRPFDS:DSORTY

Confirmation handlingFLDEPRC

Confirmation handlingFRFEPRC

PrintingFLDEPRP

PrintingFRFEPRP

Goods receiving handlingFLDEPRR

Goods receiving handlingFRFEPRR

Asj: Create WO/PO/DORPGMMS940

WARNING - EPR orderMSGPP_0015

Fnc: Close mark on PORPGPPFINMRK

Chapter 11 The View from M384

Page 85: m 3 e Procurement

DescriptionTypeSource member

Fnc: Close mark on POPFPPFINMRKDS

Wrk: Order type EPRRPGPPS098

Wrk: Order type EPRDSPFPPS098DF

Fnc: Dispatch materialRPGPPS167

Wrk: Purchase orderRPGPPS171

Wrk: Confirm deliveryRPGPPS250

Wrk: Goods receiptRPGPPS300

Fnc: Create PORPGPPS913

Fnc: Create POPFPPS913DS

Fnc: Create PORPGPPS914

EPR Order TypeCONPP09801

The EPR requisitionMSGPP16006

EPR order - confirmationMSGPP25037

EPR order - receiptMSGPP30067

Requisition detail numberFRFRQDN

Requisition identityFRFRQID

Requisition numberFRFRQNO

PrintingGWOWEP1B

Goods receiving handlingGWOWEP1C

Confirmation handlingGWOWEP1D

Extended planning paragraphGWOWEP10

Requisition identityGWOWRQ16

Requisition detail numberGWOWRQ17

Requisition numberGWOWRQ18

85Chapter 11 The View from M3

Page 86: m 3 e Procurement

Appendix A

M3 Connector Tools

Using the M3 ReplicatorAs illustrated in the figure in "M3 BE to Lawson M3 e-Procurement Replication" on page 9, the M3 Replicatoris responsible for retrieving data from the ERP-system database and storing in the Stage-1 replicationdatabase. 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 defaultinstallation 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 afterrunning the Setup Wizard is located in the following folder:

C:\Lawson\e-Procurement\Replication\

NOTE A version of MvxRepl.exe is also found inC:\Program Files\Lawson\m3 connector tools 14.1.7.2\SqlServer2000. This replicator is included forbackwards compatibility with SQLServer 2000 (using Data Transformation Services (DTS)).

Calling the M3 ReplicatorTo initiate the replication, the M3 Replicator must be executed either manually or by a scheduled taskby 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 thepath relative to the MVXRepl.exe program itself, but you couldalso use a full path. This is the only mandatory parameter forcalling MVXRepl.exe.

configfile

causes the reply from M3 BE to be saved as an SSIS packagewithin the named database server.The reply will not be executed.This is useful when testing and debugging, but will never be usedas 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 usedas 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 inC:\Program Files\Microsoft SQL Server\90\DTS\Packages.

Appendix A M3 Connector Tools86

Page 87: m 3 e Procurement

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 fileversion 2.0, as this will avoid calling the validate data stored procedure spValidateData more thanonce. See also "Configuring the M3 Replicator" on page 88 and "Data Validation and ErroneousRecord Detection" on page 40.

Sending replication error reports by e-mailIt is possible to send the recent entries of the replication log as an e-mail. The system requires thefollowing 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 DimacWeb site and install it on the computer where you are running theM3 Replicator.

Dimac JMail

This is a stored procedure included in the stage-2 replicationdatabase. It collects the required log records and returns themas a data set to the log-as-mail program.

Stage2.spMail

This program is included with e-Procurement. It runs theStage2.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 allof the commands that you can use with JMail.

To generate an error mail, run the following command (for example, from a Windows scheduled taskset 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. Theconfiguration 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-2replication database.

datasource

87Appendix A M3 Connector Tools

Page 88: m 3 e Procurement

Specifies the name of the stage-2 database itself (defaultEPR_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 ReplicatorCommunication parameters for accessing the ERP system and replication database are stored in theM3 Replicators configuration file, together with the full details of the set of data tables and fields to bereplicated.

The M3-Replicator configuration file is a plain-text file in XML format.You can open and edit it usingany 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 mostconvenient to store them together.

The (abbreviated) contents of a typical M3-Replicator configuration file after running the Install Wizardare 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 theconnection to the ERP system. The following attributes are always required:

Appendix A M3 Connector Tools88

Page 89: m 3 e Procurement

This assigns a name to the SSIS package created by the M3 Replicator andsaved in the Stage-1 replication database. Usually, this is immediately executed,thereby updating the database, and then deleted again. However, you mightalso choose to save the package in the database without executing or deletingit 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 istaken 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 istaken 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 valuedescribed 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 valueestablished by these two parameters is not replicated. The value must be aninteger.

expn

NOTE When the expiration parameters (expi and expn) are evaluated the actual cutoff is rounded upto the next-higher interval. For example, if these are set to one month, than records from January willbe replicated until the first of March. If the expiration parameters are not set, then the default is sixmonths.

The connection Elements

These elements hold the connection details for connecting to the ERP-system database and the replicationdatabase.Three of these are required: one for the ERP system and one for each stage of the replicationdatabase. The following attributes are always required for each of these elements:

This identifies which type of database the connection element defines. It mustbe 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) towhich 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 ifan 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-1replication database, see "Replication date" on page 53). Each must include the following attributes:

89Appendix A M3 Connector Tools

Page 90: m 3 e Procurement

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 eachrecord of the table (if any). If this is defined, then the returned records will befiltered by company ID.

cono-field

This defines the name of a field that holds a division ID associated with eachrecord of the table (if any). If this is defined, then the returned records will befiltered by division ID.

divi-field

The name of the field that holds the last-modification date.This is used to identifythe 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 thisvalue each time a record is changed.This is used to find records that have beenupdated 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 recordexpires. This is used, for example, by the previous-orders clean-up procedureto find orders that should no longer be included in the Lawson M3 e-Procurementdatabase.

expy-field

(optional): Adds extra selection criteria for the table. The M3 Replicator alwaysselects only those records that have changed on the day of the last replicationor afterwards, but you can also add extra criteria using this attribute usingstandard SQL syntax.

criteria

The column Elements

Nested below each table element is always a collection of column elements. Each of these name acolumn (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 AgentAs explained in "Interface Strategy" on page 9, the Message Transfer Agent is a program that is ableto submit an URL to the SQLXML interface of the replication database and forward the returned XMLresponse document to the Lawson M3 e-Procurement XML Gateway. The program is usually launchedby the Windows Scheduled Task Manager at regular intervals to ensure that the Lawson M3e-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 schedulingof the job(s) are maintained manually.

• When calling the Transfer Agent, you must specify the name of a descriptor (configuration) filewhose 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 Tools90

Page 91: m 3 e Procurement

1. The agent sends a URL request, which identifies a template file stored on the replicationdatabase server. The template file contains an SQL expression that retrieves the records tobe 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 XMLGateway. Depending on whether or not the transfer succeeds, the agent applies either thesuccess of failure style sheet to transform the original response from the replication databaseinto an XML request document and sends the result to another URL, which is the XML-requestinput for the replication database. This request marks the records as updated or failed.

Configuring the Transfer AgentWhen you run the Transfer Agent, you must specify a configuration file to use. This file sets up thecommunication between the replication database and the Lawson M3 e-Procurement database andalso specifies the type of replication to perform by naming a template file on the replication databaseserver.

The Connector setup program installs a configuration file: BaseData.xml.trf.This configuration supportsthe 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 orXML 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 severaldifferent configurations (as in the default scenario), each triggering a different kind of replication, andschedule each of them differently, depending on the needs of your specific solution.

91Appendix A M3 Connector Tools

Page 92: m 3 e Procurement

The contents of a typical configuration file are illustrated in the figure above. The elements and settingsshown 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 functionand 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.0for Lawson M3 e-Procurement, this will be set to SQL XML when replicating from M3BE to e-Procurement and IAS XML when replicating from EPR to M3 BE.This settingcauses 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 theSQLXML interface of the replication database. To this URL will be added the varioussuffixes defined for various purposes in the TransferRequest element. When thetype 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 providesconfiguration 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 followingattributes are required to configure this connection:

The name of the plug-in to use for the transfer. For replication from M3BE to e-Procurement, this is either file or http. For replication frome-Procurement to M3 BE, this is XML gateway.

ConnectionType

Appendix A M3 Connector Tools92

Page 93: m 3 e Procurement

Specifies where output will be sent. For the M3 Connector, this will alwaysbe 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/OKresponse.

TransferRequest Elements

There can be, and often are, several TransferRequest elements. Each of them controls the transferof a specific set of records from the replication database to Lawson M3 e-Procurement. Each elementspecifies the following attributes, some of which are optional (optional attributes must be listed, but theirvalues 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 whensubmitting the XML response returned by the replication databaseto the Gateway. The default setting for this parameter isConfigFile='GatewayPlugInConfig.xml', which names afile in the same folder as the other transfer configuration files. Thisfile holds the e-Procurement log-in and password that you specifiedwhen installing the Connector. Edit this file if you wish to changethe credentials associated with replication messages to the XMLGateway.

ConnectionParameter

(required): Specifies the name and path of a template file storedon the replication database server. The value specified here willbe appended to the base URL specified in the TransferRequestselement.This file must contain an SQL command that will generatethe contents of the response document expected back from thereplication database. For details about how to write and storetemplates, see "Setting up the template files" on page 54.

RequestURL

(required):This attribute controls which XML file will be transformedand returned to the replication database server if the Lawson M3e-Procurement XML Gateway returns an OK message. It mustalways be set to [Response] when you are using the M3Connector, thereby using the response document originally returnedfrom the replication database. For more information about thesuccess document, see"Setting up XSL transformations" on page 55.

SuccessDocument

(required): Specifies an HTTP address on the replication databaseserver to which an XML request will be sent if the Transfer Agentreceives an OK message back from the Lawson M3 e-ProcurementXML Gateway. The value specified here will be appended to thebase URL specified in the TransferRequests element.

SuccessURL

(required):This attribute controls the style sheet that will be appliedto a copy of the forwarded XML response document to create anXML request document for marking successfully replicated recordsin the replication database. For more information about the successdocument, see "Setting up XSL transformations" on page 55.

SuccessStylesheet

(required): These are similar to the success-handling settings (seeabove), except they control failure handling.

FailureDocument, FailureURL andFailureStylesheet

93Appendix A M3 Connector Tools

Page 94: m 3 e Procurement

(optional): When set to yes, this will cause the Transfer Agent torun the request repeatedly until all matching and valid records havebeen transferred (i.e., no matching records with status 1 (new) or2 (updated) remain). In the standard solution, this is used togetherwith 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 theconfiguration file itself, or absolute.

Appendix A M3 Connector Tools94

Page 95: m 3 e Procurement

Appendix B

SQLXML Interface

Setting up the SQLXML interfaceProvided that you run the Connector Install Wizard on the same computer as the Stage-2 database andSQLXML 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, theTransfer Agent will send a request to the database server to execute a specific template filethis will causethe database to return an XML file containing new and updated records. However, the system will onlyaccept 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 virtualdirectory, thereby making them available to be executed by the Transfer Agent. See also "Setting up thetemplate files" on page 54.

The procedure below explains how to configure a template virtual directory manually using the configurationprogram 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. Inmost 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 replicationdatabase and the Web site to which you will post the template-document requests (usually, thiswill be the default Web site for your selected server). The Web site you select will establish theURL 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 recommendEPR_Stage2). Avoid spaces, since this will be used as an URL. The name you enter heremust be added as a folder to the URL for your selected Web site whenever you (or, moreespecially, the Message Transfer Agent) want to access the virtual directory.

NOTE Several of the supplied configuration files and stored procedures for the Connectorassume that the virtual directory will be called by the name you supplied for the Stage 2database. 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 filesthemselves. The Connector Setup Wizard initially saves a set of default templates in the pathbelow, 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.

95Appendix B SQLXML Interface

Page 96: m 3 e Procurement

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 installedthe Stage-2 replication database. Often, this will be the local machine, inwhich case you should enter (local). To select another machine, click theellipsis button.

SQL Server

Use this drop-down list to select the name of the Stage-2 database fromyour 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 largevalue, such as 10,000.

These settings ensure that the SQLXML interface will execute template requests from the TransferAgent and also accept updategrams from the Transfer Agent, which mark successfully replicatedrecords in the Stage-2 database.

7. On the Virtual Names tab, you can configure the SQLXML to provide several different types ofservices. The only one we need for the Connector is the ability to execute templates named in aURL. We must therefore add a single virtual directory configured for this purpose. Make thefollowing settings:

Enter a name for the template virtual directory here (we recommendtemplate). Avoid spaces, since this will be used as a URL. The name youenter here must be added as a folder to the URL (after the top-level virtualdirectory name you specified on the General tab) for your selected Website 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 proceduresfor the Connector assume that this virtual directory will be called template.If you need to use a different name, then you must update the affectedfiles.

Name

Select template.Type

Enter the full path to the template folder (or click the ellipsis button toselect one using a browse window). The M3 Connector installer initiallysaves a set of default templates in the path below, which we recommend.Because this is the only feature of the SQLXML interface that we areusing, this path is the same as the path we suggested for the top-levelvirtual directory.

C:\Lawson\e-Procurement\<Configuration Name>\SQLXMLTemplates\

When you are done, click Save to add the template directory to the list atthe 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 abrowser running on the same machine as the replication database and Web server, i.e., the local host):

Appendix B SQLXML Interface96

Page 97: m 3 e Procurement

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

97Appendix B SQLXML Interface

Page 98: m 3 e Procurement

Appendix C

IIS 7 Configuration

OverviewFollow these steps to configure IIS 7 in 64-bit Windows platforms.

Configuring IIS 71. Launch Windows Server Manager.

2. Make sure that the 64-Bit server has a Web Server (IIS) role.You can add it by clicking AddRoles 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 byclicking Add Roles in the Roles page then select Application Server. Select IIS 6 ManagementCompatibility 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 Actionspane.

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 withFull control permissions.

8. Edit the permission for e-Procurement Stage 2 Virtual Directory. In the Security tab, add theuser IIS_IUSRS with Full control permissions.

9. Handler Mappings of the stage 2 database should be enabled. Click each Mapping and chooseEdit 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 areallowed to access it.

11. Find the 32-bit version of iisWASPlugin_http.dll then replace the 64-bit version found inC:\Program Files\IBM\WebSphere\Plugins\bin\IIS_webserver1.

IMPORTANT Back up the 64-bit copy of iisWASPlugin_http.dll before overwriting with the32-bit version.

12. Restart IIS 7 so that changes in the configuration will be reflected.

Appendix C IIS 7 Configuration98

Page 99: m 3 e Procurement

Appendix D

Access Permissions (Windows)

Setting access permissionsThe Connector installation assumes that the current user (in Windows) has the permissions required to runthe replication. Assigning user access permissions is described in the section below. If you wish to use SQLserver authentication, see "SQL Server Authentication" on page 100.

Windows AuthenticationAll processes running in Windows operate under a specific user account, just as though they weremanual 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 upthe system and by the scheduled tasks control panel.

The required database actions are automated by the M3 Replicator and Message Transfer Agent; theuser account associated with the database commands executed by these programs will either be yourcurrent 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 passwordto associate with the scheduled tasks created by the setup program (see "Running the Connector SetupWizard" on page 26).You can check the account configured for each task by opening the ScheduledTasks 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 serverwhere 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 boxpresented to add the required user(s); see your SQL Server documentation if you need helpdoing this. For now, simply add the user icons without making any settings other than theuser 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_ownerfor 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 thereplication, if these are not the same as your own account.

99Appendix D Access Permissions (Windows)

Page 100: m 3 e Procurement

SQL Server AuthenticationInstead of setting the system up to use Windows Authentication, is it possible to use SQL Serverauthentication for parts of the components. This can be a good idea if the database is placed on adifferent 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

Page 101: m 3 e Procurement

Appendix E

Effects of Interfacing

Maintaining Lawson M3 e-Procurement DataThough the interfaced system is typically controlled from M3 BE, data replicated from M3 BE can be modifiedusing the e-Procurement Buy Center Administrators interface. However, any changes you apply using thisinterface may be overwritten by M3 BE data at the next replication. Most replicated data is one way onlyfrom M3 BE to e-Procurement.

Only Goods Received (ArrivalReport) is replicated in both directions.To see a complete list of which businessobjects are replicated and the direction, see "Business Object Methods used for Replication" on page 102.

Data Interface Overview

Accounts and Cost CentersIn M3 BE, it is possible to set up user-specific account authorization (user-specific access to specificaccounts). Similar logic does not exist in e-Procurement and therefore this possible restriction in M3 BEis not handled in e-Procurement.

In e-Procurement, the combination of the users relation to Company and Location Group (Division andFacility in M3 BE) controls which supplier catalogs (and thereby products) the user can access. Theproduct group is assigned to the product that controls the accounts suggested, allowing the users tosee the accounts and use the accounts assigned to the products he can see.The user can also suggestanother 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 groupsand projects are relevant for e-Procurement) and to warehouses and facilities. And again, e-Procurementdoes not support these restrictions in exactly the same way. See the e-Procurement user help text forfurther information.

All accounting records can be deleted (the record is entirely removed from db), but this is not to be donewhen interfaced to e-Procurement.The block functionality must be used since this is the trigger to deletemark the record in e-Procurement.

SuppliersSome information about suppliers is not kept in M3 BE, whereas e-Procurement can hold data aboutsuppliers 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 OrderType 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 validatingthese must be modified, see "Goods Receipt" on page 46.

101Appendix E Effects of Interfacing

Page 102: m 3 e Procurement

Business Object Methods used for Replication

Replication from M3 to e-Procurement

Business Object MethodBusiness Object

GatewayUploadAccount Code

GatewayUploadArrivalReport

GatewayUploadCostCenter

GatewayUploadCurrency

GatewayUploadLocation

GatewayUploadLocationGroup

GatewayUploadQuantity

GatewayUploadSupplier

GatewayUploadTermOfPayment

GatewayUploadBuyCenterUser

Replication from e-Procurement to M3

Business Object MethodBusiness Object

GatewayTransferGoodsReceivedArrivalReport

GatewayTransferPurchaseOrdersOrder

GatewayTransferOrderConfirmationsOrder

Additional Settings made by the Setup WizardThe 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 expensetype is assigned to all e-Procurement Account codes replicated from M3 BE Accounts (the assignmentof an expense type to an account code is required in e-Procurement). The table below lists the logicused 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 BEDivision, page 1

Company code1

The Company name entered in the Setup Wizard on pageM3 BE Division, page 1

Company name2

Appendix E Effects of Interfacing102

Page 103: m 3 e Procurement

The following is inserted by the Setup Wizard:Field name:No:

Euro by defaultCurrency3

10 by defaultApprovalNotificationInterval4

10 by defaultArrivalNotificationInterval5

CONO_DIVI by defaultERP Company Number6

Same as Company nameERP Integration Description7

The Order type entered in the Setup Wizard on M3 BECompany, page 1

ERP Purchase Order Type8

10 by defaultLengthOrderNo9

9 by defaultLengthReqNo10

BlankOrderNoPostfix11

Two first numbers from M3 BE order seriesOrderNoPrefix12

0 by defaultReqNoPostfix13

R + OrderNoPrefix by defaultReqNoPrefix:14

The Setup Wizard updates the following e-Procurement Expense type attributes:

Insert:Field name:No:

As entered in Setup Wizard on first Division pageCompany code1

As entered in Setup Wizard on first Division pageExpense type code2

Defaults all languages to ProductsDanish Expense type name3

Defaults all languages to ProductsEnglish Expense type name4

Defaults all languages to ProductsSwedish Expense type name5

103Appendix E Effects of Interfacing

Page 104: m 3 e Procurement

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 aresult of this difference, duplicate entries can occur from an e-Procurement point of view for example, PCSand 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 asan error. It will instead just be seen as an update to PCS (since the database is not case sensitive it cannotsee the difference between the two records). If, after the above mentioned scenario, both records aremodified and replicated, this will be seen as two updates to the existing record.The only way to locate theseduplicate entries in this scenario is to make an SQL query directly on the Stage-2 database (or M3 BEdatabase).

If you install the e-Procurement database as case sensitive, you avoid the problem of duplicate entries.Thisrequires you to install the database on an SQL server with case-sensitive collation.

Appendix F Known Issues104

Page 105: m 3 e Procurement

Appendix G

M3 BE Database Selection Criteria

Selection criteria philosophyIn general, selection of records in the M3 BE database, to be transferred to the Stage-1 and Stage-2databases, 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, theIDSTAT field. The value of the field can be:

• 10 = Preliminary

• 20 = Approved

• 30 = Stopped

• 90 = DeactivatedIt could seem logical to only select approved suppliers (where IDSTAT = '20'), since these are the onlysuppliers that will be activated in e-Procurement. But, as you can see in this appendix, suppliers in allstatuses 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 andsupplier 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 (forsupplier A) is not transferred to Stage 1 and Stage 2 and therefore there is nothing to "trigger" an update ofthe 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 thesupplier example, for instance a supplier that has been phased out or doesn't exist anymore) will stay orbuild up in the Stage 2 database. See "Replication database cleanup" on page 48.

Selection criteriaBelow is listed the selection criteria used in the std. Connector for selection records to transfer from M3 BEdatabase to Stage 1 and Stage 2 databases.

Users

CMNUSR - User definitionKey columns

DescriptionData typeColumn name

CompanyNumberJUCONO

DivisionString(3)JUDIVI

UserString(10)JUUSID

105Appendix G M3 BE Database Selection Criteria

Page 106: m 3 e Procurement

Select "relevant attributes" where:

JUDFCO = 'CONO' or (JUCONO = "CONO" and JUDFCO = 'Blank'): All records matching the CONOvalue from parameter file

And

JUDFDI = "DIVI" or 'Blank': All records matching the DIVI (one or multiple) value(s) from parameterfile.

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 fileKey columns

DescriptionData typeColumn name

CompanyNumberEACONO

DivisionString(3)EADIVI

Employee numberString(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 employeenumber).

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 - DivisionKey columns

DescriptionData typeColumn name

CompanyNumberCCCONO

DivisionString(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 Criteria106

Page 107: m 3 e Procurement

Get attributes according to mapping document.

CEMAIL - E-mail addressKey columns

DescriptionData typeColumn name

CompanyNumberCBCONO

e-Mail typeString(2)CBEMTP

e-Mail key valueString(10)CBEMKY

e-Mail reference 3String(10)CBEMR3

e-Mail reference 4String(10)CBEMR4

e-Mail reference 5String(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 locationKey columns

DescriptionData typeColumn name

CompanyNumberMWCONO

WarehouseString(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 accountsKey columns

107Appendix G M3 BE Database Selection Criteria

Page 108: m 3 e Procurement

DescriptionData typeColumn name

CompanyNumberEACONO

DivisionString(3)EADIVI

Accounting dimensionNumberEAAITP

Accounting identityString(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 parameterfile

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 meansthat the selection on the DIVI column must be both records matching all the DIVI values from theparameter 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

AccountsSame criteria as cost centers, but EAAITP =1 (Account always in dimension 1) and EAAT02 = 1 (Profitand loss accounts).

Currencies

CSYTAB - System TableKey columns

DescriptionData typeColumn name

CompanyNumberCTCONO

DivisionString(3)CTDIVI

Appendix G M3 BE Database Selection Criteria108

Page 109: m 3 e Procurement

DescriptionData typeColumn name

Constant valueString(10)CTSTCO

Key valueString(10)CTSTKY

LanguageString(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 toEPR where currencies are set up on application level.

CCURRA - System TableKey columns

DescriptionData typeColumn name

CompanyNumberCUCONO

DivisionString(3)CUDIVI

CurrencyString(3)CUCUCD

Exchange rate typeNumberCUCRTP

Rate dateSmallintCUCUTD

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 note1 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.

109Appendix G M3 BE Database Selection Criteria

Page 110: m 3 e Procurement

NOTE

Note 1: Exchange rate, rate to euro, is on Division level in M3 BE, but globally in EPR. Therefore aspecific Division must be selected to retrieve the exchange rates from. Please note that the exchangeis 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 needsa rate to Euro. This means that the rate between the local Division currency and the localDivision Euro must be calculated and used to convert the rates of the local Divisioncurrency to the rate to euro. For this purpose the currency that represents the euro arekept 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 tableKey columns

DescriptionData typeColumn name

CompanyNumberCTCONO

DivisionString(3)CTDIVI

Constant valueString(10)CTSTCO

Key valueString(10)CTSTKY

LanguageString(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 Criteria110

Page 111: m 3 e Procurement

Quantity Units

CSYTAB - System tableKey columns

DescriptionData typeColumn name

CompanyNumberCTCONO

DivisionString(3)CTDIVI

Constant valueString(10)CTSTCO

Key valueString(10)CTSTKY

LanguageString(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 beenDescoped.)

Get attributes according to mapping document.

Locations

MITWHL - Warehouse locationKey columns

DescriptionData typeColumn name

CompanyNumberMWCONO

WarehouseString(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.

111Appendix G M3 BE Database Selection Criteria

Page 112: m 3 e Procurement

CIADDR - Internal addressKey columns

DescriptionData typeColumn name

CompanyNumberOACONO

Internal address typeNumberOAADTH

Address key 1String(10)OAADK1

Address key 2String(3)OAADK2

Address key 3String(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 GroupsThe Location Group entity will be mapped to Facility dimension in M3 BE. The Location Group entity isglobal for the EPR application (across all companies). All Facilities within one M3 BE company (acrossDivisions) is mapped to the Location Group structure (as a forest structure, the tree structure will bebuilt manually in EPR).

CFACIL - FacilitiesKey columns

DescriptionData typeColumn name

CompanyNumberCFCONO

FacilityString(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 Criteria112

Page 113: m 3 e Procurement

Get attributes according to mapping document.

Special requirement:

The CFWHLO field (main warehouse for the specific facility) will also be replicated. This field valueacts as location (warehouse) for the user if the JUWHLO field is blank. See the user section forfurther information.

Suppliers

CIDMAS - Vendor masterKey columns

DescriptionData typeColumn name

CompanyNumberIDCONO

Supplier numberString(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 addressKey columns

DescriptionData typeColumn name

CompanyNumberSACONO

Supplier numberString(10)SASUNO

Address typeNumberSAADTE

Address numberString(6)SAADID

Start dateSmallintSASTDT

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.

113Appendix G M3 BE Database Selection Criteria

Page 114: m 3 e Procurement

CSYTAB - System tableKey columns

DescriptionData typeColumn name

CompanyNumberCTCONO

DivisionString(3)CTDIVI

Constant valueString(10)CTSTCO

Key valueString(10)CTSTKY

LanguageString(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 personsKey columns

DescriptionData typeColumn name

CompanyNumberIRCONO

Supplier numberString(10)IRSUNO

Reference typeString(2)IRRFTY

ReferenceString(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 Criteria114

Page 115: m 3 e Procurement

E-mail address selection

CSYDPM - Document/Partner/MediaKey columns

DescriptionData typeColumn name

CompanyNumberCGCONO

DivisionString(3)CGDIVI

Document numberString(3)CGDONR

Document variantString(2)CGDOVA

Media profileString(2)CGMEPF

Document/media controlling object 1String(17)CGPRF1

Document/media controlling object 2String(17)CGPRF2

MediaString(10)CGMEDC

Sequence numberNumberCGSEQN

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)

115Appendix G M3 BE Database Selection Criteria

Page 116: m 3 e Procurement

Goods receipts from M3 BE

MPLINE - Purchase order, lineKey columns

DescriptionData typeColumn name

CompanyNumberIBCONO

Purchase order numberString(7)IBPUNO

Purchase order lineNumberIBPNLI

Purchase order line sub numberNumberIBPNLS

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 transactionsKey columns

DescriptionData typeColumn name

CompanyNumberICCONO

Purchase order numberString(7)ICPUNO

Purchase order lineNumberICPNLI

Purchase order line sub numberNumberICPNLS

Purchase order line suffixNumberICPNLX

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 Criteria116

Page 117: m 3 e Procurement

The field IBORQA must also be replicated to Stage1/2. For further information, see "Goods Receipt"on page 46.

117Appendix G M3 BE Database Selection Criteria