title: XML file locks sequence file SAP PI
body: <p>This is SAP PI requirement,   </p>
  
  <ul>
  <li>Source System: XY_Client</li>
  <li>Middleware: PI System  </li>
  <li>Target system : SAP  </li>
  </ul>
  
  <p>The XML files are received to the PI system, for each XML file an internal file is generated to keep track of store_number, and count of xml files.   </p>
  
  <p><strong>How it works</strong>: suppose if XML_FILE_1 reaches PI, internal file called sequence_gen is created. the file contains the store number present in XML file and count will be initialized to 1.<br>
  so first time, </p>
  
  <pre><code>sequence_gen file contains Store: 1001 Count:1
  </code></pre>
  
  <p>after some time interval XML_FILE_2 reaches PI   </p>
  
  <pre><code> sequence_gen file contains Store: 1001 Count:2 
  </code></pre>
  
  <p>My question is : If 'n' number of files come at the same time to PI system, the 1st file will lock the sequence_gen file. so how will the 2nd file update the value to the sequence_gen file? So how to tackle this problem?  </p>