Data replication
Replication jobs are used to trigger the data synchronization from SAP Business One to LS One. The jobs have been created for you in the LS One SAP Business One Connector demo data package. But you need to do some final configuration.
Distribution location - Create a database connection string
First you need to setup a distribution location for your head office:
- In the ribbon go to Tools > Replication Settings > Distribution locations
-
Create a new location for the head office location by pressing the button
-
In the Distribution location view enter the connection details of the distribution server, this is the machine the Data Director is running on and that includes the SAP Connector is installed on.
-
Fill in the database information for your LS One head office database, the one your Site Manager is connected to.
If the Data Director and the SQL Server for the LS One database and the Site Manager are all installed on the same machine the setup could look like this:
-
You can test the connection by pressing the Test connection button in the menu on the right.
- When this is done copy the Database string you need to use it in the next step.
Data Director configuration
Activate the Data Director Scheduler.
- Open the Data Director Configuration Tool and make sure to run it as administrator.
- In the Configuration Tool open the App Config tab
- Activate the Job Scheduler Service and paste the database connection string into the Conn. String field.
- When this is done Press the Save Config button and then restart the Data Director service by using the Stop DD and Start DD buttons.
Scheduler jobs
The data package you have imported into your Site Manager includes some scheduler jobs. These jobs contain configuration for your LS One Head Office database connection and therefore you need to make sure these settings are correct for all the following jobs:
- All from SAP Business One
- Currencies from SAP Business One
- Customers from SAP Business One
- Items from SAP Business One
- Item images from SAP Business One
- Post Transactions to SAP Business One
- Prices from SAP Business One
- TaxData from SAP Business One
To configure the jobs:
- Open the list of jobs in the ribbon Tools > Jobs from the Replication category
- Edit each of the jobs to configure the settings.
All the jobs are set to run external command from the Plugin LSOne.Connectors.SAPBusinessOne.DataDirectorPlugin.dll
-
The parameters define which operation is run and which database is asking for the information. You need to take an extra close look at the parameters that are displayed in » bold below. Other settings have been set for you.
The parameters are the following:
- SyncData
- SyncCurrencies
- SyncCustomers
- SyncItems
- SyncItemsImages
- SyncPrices
- SyncTaxData
- TCP/IP
- Named pipes
- Shared memory
- true – Existing barcodes are deleted from database before retrieving the barcodes from SAP Business One
- false – Use this value to gain significant speed when importing the barcodes. Please note that, with this option, in case a barcode is removed from SAP Business One, it is not removed from LS One, which may results in discrepancies between SAP Business One and LS One data.
- true – Existing unit conversions are deleted from database before retrieving the unit conversions from SAP Business One
- false – Use this value to gain significant speed when importing the unit conversions. Please note that, with this option, in case a unit conversion is removed from SAP Business One, it is not removed from LS One, which may results in discrepancies between SAP Business One and LS One data.
-
true - Only modified data from the last time the sync job run will be synced
-
false - Full sync will be performed
- 0 – CreditNotes documents will be posted for all returns
- 1 – Negative invoice documents will be posted for all returns.
-
0 - All will be archived
-
1 - All till last week will be archived
-
2 - All till last month will be archived
-
3 - All till last year will be archived
-
When you have configured all the jobs then you should run the All data from SAP Business One job to get all the data to LS One.
Parameter name | Description |
SAPOperation |
The operation has been selected for you in the job setup. The following operations are available: |
» ServerName | The host name of the SQL Server your LS One head office database is running on. |
» DatabaseName | The name of your LS One head office database |
» DatabaseUser |
A database user name such as: sa All LS One databases have a database user called DataDir |
» DatabasePassword | The password of the database user. If you use the DataDir user the password is: DataDir.2008 |
» UserName | This is the name of the LS One user. This user should have administrative permissions. You can for an example use the initial user: admin |
» UserPassword | The password of the LS One user use selected to use. |
» DataAreaId | Use the LSR DataAreaId. |
BatchSize |
The number of records in each batch of data sent from SAP Business One. Default: 500 |
ConnectionType |
Optional. If this parameter is not set the default connection type will be used to connect to the SQL server. Add this parameter to change the connection type from the default to any of the following: Default: Shared memory |
DeleteBarcodes |
Only used for the jobs SyncData and SyncItems. If this parameter is set to: |
DeleteUnitConversions |
Only used for the jobs SyncData and SyncItems. If this parameter is set to: |
EnableDeltaSync |
Can be used in any sync job to override the global Delta sync setting. If this parameter is set to: Optional |
ReturnDocType |
Only used for the Post transaction to SAP Business One job and overrides the global Document return document format setting. If this parameter is set to: Default: 0 (Credit Notes) |
NumberDecimalSeparator |
Only used for the Post transactions to SAP Business One job and overrides the global Document decimal separator setting. This parameter defines which decimal separator is used in all numbers sent to the SAP B1if. It is normally set to . but could be changed to a , if required. Default: . (dot) |
DateFormat |
Only used for the Post transactions to SAP Business One job and overrides the global Document date format setting. This parameter defines the date format to be used when sending dates to SAP Business One. Default: yyyyMMdd |
MaxPostingRetries |
Only used for the Post transactions to SAP Business One and defines the number of times a failed transaction will be reposted. Default: 5 |
ArchiveUntil |
Only used for the Archive SAP Business One transactions job to archive the successfully posted transactions from POSTEDTRANSACTIONS table. If this parameter is set to: Default: 0 |
NumberOfRetries |
Only used for the Archive SAP Business One transactions job to select failed to be posted transactions that already reached this number of posting retries. Default: 3 |
Make sure you do this for all the jobs.
Configure your template store.
Next topic: Default store configuration