cancel
Showing results for 
Search instead for 
Did you mean: 

Possible delay of inbound file-read?

Former Member
0 Kudos

Hi Experts,


I have a scenario which reads xml order files from external order system into Sales Orders in SAP Business One when xml file exists.


Mostly it works perfect, but some time i fails (Result message: B1out or BOM/BO or BS segment missing in receiver payload (handover to B1 not

possible)), and most content in the messagelog is unreadable. I suppose the problem can be caused by reading the xml file before writing has finished, as reading and removing process acts very fast when an xml file is written to in folder.


Any proposal for possible delay of the read and remove process to eliminate that reason for failure?


Regards

Steen Pedersen

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi anyone who's interested,

If the above solution does not work, try this:

1. Set the scenario step inbound channel as timer;

2. Add [DIR File System Info] atom to get a list of file in the file system which contains the attribute timestamp

3. Add an xform to get the latest timestamp in the list and set it to a variable

4. Define which files you want to be consumed by B1if, e.g. with attribute timestamp earlier than the latest timestamp, and next round triggered by timer, B1i will get the doc list older than this timestamp

5. Add [Download File from File System] atom to retrieve and delete the file from file system.

Regards,

Qiaoli

Former Member
0 Kudos

Hello Steen,

Could it be a workaround as below?? :

The sender system will transfer the file in the directory A and meanwhile store a token file with the same file identifier in directory B. B1i is listening to directory B. Once a token is created, the scenario step is triggered to read file from directory A. The token will hand over the identifier (file name and timestamp) to the step. In this case, you can add "read file from file system" atom during processing phase to read and delete the file from directory A according to the identifier.

Regards,

Qiaoli