Different IDOC merges variables values

Hi all,

We are using webMethods 6 with SAP Adapter to get it, process and store IDOCs in one folder, using the same service and depending of the SNDPOR field value in the IDOC control segment, we store the IDOC in two different folders, these folders and the entire configuration parameters are stored in memory. We have defined the SAP listener with 6 threads.

The process that we do when one IDOC arrives is split it in several subidocs and for each subidoc we create a file into one folder. The folder on which the IDOC is placed depends of the two possible values of SNDPOR field value.

The problem we have is that if we receive one IDOC with one of the possible SNDPOR field values, we start to split and store the subidocs in the corresponding folder, but if while the first IDOC is been processed a new IDOC which belongs to the other SNDPOR field value arrives, the second subidocs files are stored on the folder of the first IDOC.

The IDOCs which produce this error are sent by a SAP batch process but if both are sent manually no error is raised.

What can we do? It is a thread problem? Help us please.

Hi
Yes it seems to be a thread problem. You can invoke your service in a different threads. There is one java service in webMethods which you can use…I guess the service is Service.Invoke().

Ajay Arora

Hi Ajay,

Thanks for your answer. Please correct me if I’m wrong but I thought that webMethods Listener throws one service thread for each IDOC. Isn’t it?

Thanks again.