Some transactions are not posted to SAP

When posting transactions from LS One to SAP B1, some transactions might not be sent successfully. Your Data Director Scheduler log might show an error like this:

To find the transactions that were not posted, you can run the following query on your LS One database:

Copy
select * from postedtransactions
where documentid = -1

When a transaction is posted successfully to SAP B1, it will get a document ID that is corresponding to the document in SAP. If the transaction was not posted successfully the document ID will be set as -1 and you will have and error message from SAP in the ERRORMESSAGE column. Your database entry might look something like this:

TRANSACTIONID TERMINALID STOREID DOCUMENTID POSTEDDATE ERROR ERRORMESSAGE RETRYCOUNTER
0000000002 T0001 S0001 -1 2020-10-20 10:16:33.573 1 Error posting invoice: 1250000103 - Row without tax was found 4

You can also check the full execution log in SAP B1 message log by following these steps:

  1. Log into SAP B1if and go to Monitoring > Message Log

  2. Click on the Display/Refresh button and in the tables displayed look for the failed step/scenario

  3. Click on the corresponding Display Message icon in the Actions column.

Common errors

Posting Date deviates from the defined range

The full message in the SAP B1 message log is:

DI Error: (-5002) 10000156 - Posting Date deviates from the defined range. To complete the operation, define the posting period to match the entered Posting Date.-The di call #1 did fail.

To fix this error you need to create a posting period for the transaction by log into SAP B1 client and change due date in Administration > System Initialization > Posting Periods

Item cost not found for one or more items

The full message in the SAP B1 message log is:

DI Error: (-10) 10001287 - Item cost not found for one or more items.-The di call #1 did fail.

Quantity falls into negative inventory

The full message in the SAP B1 message log is:

DI Error: (-10) Quantity falls into negative inventory [INV1.ItemCode][line: 1]-The di call #1 did fail.

To fix this error you can log into SAP B1 client and search for the Inventory Counting menu. Create a new stock counting for the item(s) and warehouse in the transaction. Go to Inventory Posting and post the previous stock counting.

Row witout tax was found

The transaction was most likely created with store tax group that does not exist in SAP B1.

In Site Manager, go to Sites > Stores > [your store] > Price/tax calculation and check if you have the setting "Use tax group from" set to customer or store.

If you have the setting set to customer, you should check your default customer (or the customer that was on the transaction that failed), and if it has a tax group assigned to it. that exists in SAP.

If you have the setting set to store, you need to check your store settings and if its sales tax group exists in SAP.

You've fixed the issue but the transaction was still not posted

Each transaction has a retry counter in the POSTEDTRANSACTIONS table, which indicates how many times the job will try to post the transaction before the job skips it. To make sure the job picks up the transaction you can either raise the "MaxPostingRetries" parameter on the job, or lower the retry value of the transaction in the database table.

Other issues

Version LS One 2019 doesn't cover all scenarios for posting transactions. Because of this, some transactions may fail to get into SAP Business One with the error "Unbalanced Transaction". This error can be found in the SAP B1 Integration Framework. If this happens, most likely that transaction fails into that uncovered scenario. In order to get it into SAP B1, run the following script on the LS One database:

UPDATE RBOTRANSACTIONTABLE SET ISNETAMOUNTWITHTAXROUNDED = IIF(ABS(GROSSAMOUNT) - ABS(AMOUNTTOACCOUNT) = 0, 1, 0) WHERE ISNETAMOUNTWITHTAXROUNDED IS NULL AND AMOUNTTOACCOUNT <> 0

Note: we recommend to narrow the scope of the update as much as possible to avoid affecting other transactions.