Enter the line numbers in table ACCOUNTINGDATA in ascending order


Problem

During prebook transfer in invoice history we get "Enter the line numbers in table ACCOUNTINGDATA in ascending order, Handling transactional node failed!, Operation failed" error message.


Solution

The prebook log shows this as being an error returned by SAP: "Evaluating SAP return message: E : Enter the line numbers in table ACCOUNTINGDATA in ascending order : ACCOUNTINGDATA". In the same log file look for the order and values of field SERIAL_NO. It should be 1, 10, 2, 3, etc. This means on our side SERIAL_NO is a string field containing numeric values.

Open InvoicePro_SAP_Customer_Transfer_MMTransfer_ParkAndPost.xml and search for ACCOUNTINGDATA (if cannot be found search for it in all config files). Look for SERIAL_NO field and verify to which database field it is mapped, in our case it was mapped with Invoice.A,Text7 (IA_INVOICE.TEXT7 in DB). Because SERIAL_NO holds numeric values and is stored in a text column (string) when there are more than 9 rows the sort will be 1, 10, 2, 3, 4... getting the SAP to reject our data and return the error.

The solution in our case was to add a variable in InvoicePro_SAP_Customer_Transfer.xml that will transform Invoice.A,Text7 to numeric and then sort by this variable.