<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with Database Commit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006920#M1607309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share your code, to have a look..Also which userexit you are using "USEREXIT_SAVE_DOCUMENT".For each oder the exit will be called right.what ever data is there it takes that and updates the ztable right.Both the orders should be updated to ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2011 07:00:42 GMT</pubDate>
    <dc:creator>former_member404244</dc:creator>
    <dc:date>2011-06-06T07:00:42Z</dc:date>
    <item>
      <title>Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006917#M1607306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two include in my user exit of the sales order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In one include I am doing some validation on the Order quantity of the sales order depending upon the order quantity in one of my Z table. If every validation is OK then I am exporting this order quantity to memory ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second include I am importing this Order Quantity and updating this Quantity in my database in my same Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I process one order at a time then everything is working fine but when I try to create two sales order at the same time then only second order is getting validated and order quantity is getting updated whereas for the first order no validation is performed and also order quantity is not getting updated in the Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really do not know is this issue related to database commit or something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin yadav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 05:50:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006917#M1607306</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T05:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006918#M1607307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand why you are importing the quantity in other other include and update the ztable.I believe you can do it in the same include..I might be wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think for two sales orders processing at the same time, you might be getting two different records in any temporary SAP internal table like XVBAK .. So instead of sending one variable, you can send internal table to memory-id and read the internal table from memory id, this way you can get multiple records..Please give a try and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 06:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006918#M1607307</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-06T06:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006919#M1607308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sending the internal table to memory id not the variable as it contains the order Quantity of the line itmes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also even if I use to same include then while fetching the data from this Ztable to perform the validation on the Quantity I will not get the correct data because I am processing the two orders at the same time and both the code are executed at the same time so the Quantities are not updated in the Ztable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So even if I write the code in same include then also only one order quantity (i.e second order Quantity) will be updated in the Ztable while processing the two sales orders at same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin Yadav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 06:48:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006919#M1607308</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T06:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006920#M1607309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share your code, to have a look..Also which userexit you are using "USEREXIT_SAVE_DOCUMENT".For each oder the exit will be called right.what ever data is there it takes that and updates the ztable right.Both the orders should be updated to ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 07:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006920#M1607309</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-06T07:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006921#M1607310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin Yadav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Along with the code it might be of more help if you provide the Z Table structure too with details like the key fields in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am processing the two orders at the same time and both the code are executed at the same time so the Quantities are not updated in the Ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, didn't quite get what you meant by the above sentence, what/how do you mean by "Processing two orders at the same time and both code are updated at the same time"...provide more information on the actual scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 07:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006921#M1607310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-06T07:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006922#M1607311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Include are present in the USEREXIT_SAVE_DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Table which I am updating is  ZDSQTA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields of the tables are as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZMANDT    Client            (Key)&lt;/P&gt;&lt;P&gt;ZVKORG Sales Organization (Key)&lt;/P&gt;&lt;P&gt;ZSCYC1 Sales Cycle 1 (Start Period) (Key)&lt;/P&gt;&lt;P&gt;ZSCYC2 Sales Cycle 2 (End Period) (Key)&lt;/P&gt;&lt;P&gt;ZBZIRK  Sales district  (Key)&lt;/P&gt;&lt;P&gt;ZVKBUR Sales Office (Key)&lt;/P&gt;&lt;P&gt;ZMATNR  Material Number (Key)&lt;/P&gt;&lt;P&gt;ZQTANO Quota Number  (Key)&lt;/P&gt;&lt;P&gt;ZGRQTY  Allocated Quantity. (Non Key)&lt;/P&gt;&lt;P&gt;ZALQTY  Allocated Quantity. (Non Key)&lt;/P&gt;&lt;P&gt;ZSHQTY Shipped Quantity. (Non Key)&lt;/P&gt;&lt;P&gt;ZORQTY Ordered Quantity. (Non Key)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the code as below :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz revert back in case you need further details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jun 8, 2011 3:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 08:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006922#M1607311</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T08:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006923#M1607312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want i can send you code  plz share your id.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 08:57:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006923#M1607312</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T08:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006924#M1607313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By processing two order at same time mean I am saving two sales order at the almost same time with same details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I debug these two order by putting breakpoint and saving at the same time I realizes that the data is selected from the Z table in both the orders at same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where as as per my requirement data should be selected for the second order after processing is done for the first order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 09:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006924#M1607313</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T09:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006925#M1607314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't paste entire code only paste the code which is needed (example ztable update, ztable data retrieval). Also paste in read able format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 09:09:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006925#M1607314</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-06T09:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006926#M1607315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nagaraj,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; If you want i can send you code  plz share your id.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Do not exchange email addresses on these forums&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 09:41:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006926#M1607315</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2011-06-06T09:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006927#M1607316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 10:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006927#M1607316</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T10:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006928#M1607317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still not sure on what you are trying to achieve, &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Include are present in the USEREXIT_SAVE_DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do you mean both of your includes are present in the above exit? If yes, then why do you have your code in two separate includes, why not have it in one, also why do you want to export and import the values?&lt;/P&gt;&lt;P&gt;Or if you mean only one of the include is called in save_doc where is the other include?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where as as per my requirement data should be selected for the second order after processing is done for the first order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How do you know that the data is not processes for the first order, i ask this because the key fields in your Z table is not order specific?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ZMANDT Client (Key) 
ZVKORG Sales Organization (Key) 
ZSCYC1 Sales Cycle 1 (Start Period) (Key) 
ZSCYC2 Sales Cycle 2 (End Period) (Key) 
ZBZIRK Sales district (Key) 
ZVKBUR Sales Office (Key) 
ZMATNR Material Number (Key) 
ZQTANO Quota Number (Key) 
ZGRQTY Allocated Quantity. (Non Key) 
ZALQTY Allocated Quantity. (Non Key) 
ZSHQTY Shipped Quantity. (Non Key) 
ZORQTY Ordered Quantity. (Non Key)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provide a brief description of your requirement for getting helpful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 10:17:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006928#M1607317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-06T10:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006929#M1607318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer the below link, how to paste your code in SCN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1170968"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I would suggest create a lock object for the entire table when the update is going on and release it once the update is complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call the lock object in a loop, so that every time you keep on checking if the lock is there or not, if yes you will not get sy-subrc eq 0. if no then sy-subrc eq 0. based on this you can update the ztable at one for one document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chen is correct with his question there is no order number, item number in your ztable and also you can put your code in one include as he and me suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 10:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006929#M1607318</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-06T10:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006930#M1607319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean both of your includes are present in the above exit?&lt;/P&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, then why do you have your code in two separate includes, why not have it in one, also why do you want to export and import the values?&lt;/P&gt;&lt;P&gt;Actually I am working on the maintenance issue so the codes are already in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you mean only one of the include is called in save_doc where is the other include?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USEREXIT_SAVE_DOCUMENT_PREPARE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include for the validation and preparing the data for Z table and then exporting data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;userexit_save_document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include to update the Z table in the Data base table by importing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you know that the data is not processes for the first order, i ask this because the key fields in your Z table is not order specific?&lt;/P&gt;&lt;P&gt;I put the breakpoint in the user exit and saved both the order  at same time and in debug found that the data from the Z table is selected at same time into the internal table for both the orders. So before updating the data for first order in the Z table the data for second order is getting selected  as i am saving both the order at almost same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 10:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006930#M1607319</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T10:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006931#M1607320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use lock object concept as i suggested above. Also if the data is same then you will get the same data for the two sales orders, if different then you will get different. Please share you data base select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 11:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006931#M1607320</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-06T11:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006932#M1607321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to perform my validation depending upon the Quantity in the order and Quantity in the Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am saving two orders at almost same time only second order is considered for the validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I checked in the debug by saving these two order at same time I found that the data from the Z table is selected before the processing is done for the first order and quantity in the Ztable is updated for the first order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to perform the validation for all the order as  these two order are created at same time the validation is done for only one order as both the order are selecting the data from the Z table at same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 11:02:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006932#M1607321</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T11:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006933#M1607322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is fine you want to validate for both the records. At run time you will have the sap data stored in temp tables. You can very well use them to select the data. This will be different for both the orders .the ztable should have both the reocrds that you are validating on screen. While updating the data please use lock object and save once at one time , once it is complete then save the other one. if there is one record in the data base table for two orders then you will get one record only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open two sessions go to VA01 for both, put a break-point in the program. First session input the values and press save button, then do the same thing for other order and press save button. the data available on screen should be different . I hope this is what you are doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 11:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006933#M1607322</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-06T11:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006934#M1607323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT * FROM ZDSQTA INTO TABLE XZDSQTA FOR ALL ENTRIES IN TABLE2
  WHERE ZVKORG EQ TABLE2-VKORG
  AND   ZSCYC1 LE TABLE2-ERDAT
  AND   ZSCYC2 GE TABLE2-ERDAT
  AND   ZBZIRK EQ BZIRK
  AND   ZVKBUR EQ VBAK-VKBUR
  AND   ZMATNR EQ TABLE2-MATNR.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that I do not have the order number or the line item number in my z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In validation I am modify the records in the Ztable as well I mean to say for each order created I am updating the Quantity in my Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for the next order the validation should be done depending upon the new order quantity not the old order quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean to say for the first order the validation should be done depending upon the old Qty and for the second order validation should be done by new order Qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am saving the two order at same time validation on both the  order is done by old qyt bcoz new oder Qty from the first  order is not yet upadated in the database when second order try to fetch the data from the Z table as i am saving both the order at same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope now i am bit clear now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 11:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006934#M1607323</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-06T11:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006935#M1607324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if i understand your requirement correctly. You  are saying for each order you are saving the quantity in the ztable.Now next time you are passing new value to the existing quantity in the ztable to update the new quantity for that order.So for each order you may be changing the qunatity or no change to the quantity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didnot get the below points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

I mean to say for the first order the validation should be done depending upon the old Qty and for the second order validation should be done by new order Qty.

When I am saving the two order at same time validation on both the order is done by old qyt bcoz new oder Qty from the first order is not yet upadated in the database when second order try to fetch the data from the Z table as i am saving both the order at same time.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you give a try with lock object??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 06:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006935#M1607324</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-06-07T06:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Database Commit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006936#M1607325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am validating my order qty with the qty stored in the table and after validation i am modifying the Qty in Z table with order Qty + Qty in Z table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the "Exclusive but not cumulative lock" on my table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it will lock the entire table and there will be many order created at same time so there will be bit delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are confirming with the user are they Ok with that bit delay if many oders are created at same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 06:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-database-commit/m-p/8006936#M1607325</guid>
      <dc:creator>sachin_yadav3</dc:creator>
      <dc:date>2011-06-07T06:52:18Z</dc:date>
    </item>
  </channel>
</rss>

