<?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 Problem in lock Sales order create with BAPI BAPI_SALESORDER_CREATEFROMDAT2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856555#M1592502</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have the z program to create the sales order with reff  quotation in SD With BAPI BAPI_SALESORDER_CREATEFROMDAT2.&lt;/P&gt;&lt;P&gt;this program will  excute every 30 mins . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: Some times if i excute the program in background it is taking morethan 30mins so second batch excution also gets starting to create the sales order for same quotation then it is creating 2 sales orders at atime with 1 quotation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i am getting duplicate sales orders so i want to lock the creation of duplicate sales order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 11:02:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-06T11:02:25Z</dc:date>
    <item>
      <title>Problem in lock Sales order create with BAPI BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856555#M1592502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have the z program to create the sales order with reff  quotation in SD With BAPI BAPI_SALESORDER_CREATEFROMDAT2.&lt;/P&gt;&lt;P&gt;this program will  excute every 30 mins . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: Some times if i excute the program in background it is taking morethan 30mins so second batch excution also gets starting to create the sales order for same quotation then it is creating 2 sales orders at atime with 1 quotation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i am getting duplicate sales orders so i want to lock the creation of duplicate sales order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 11:02:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856555#M1592502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-06T11:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in lock Sales order create with BAPI BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856556#M1592503</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;How you are fetching the Quotation which should will be passed to the BAPI to create the Sales Order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is based on the creation date and time of quotation, then always fetch the quotation which are created 30 mins back to the start of the background processing of your Z report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 11:10:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856556#M1592503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-06T11:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in lock Sales order create with BAPI BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856557#M1592504</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;thanks for reply. I am fetching like that only but not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way to lock the sales order creation if already processing to create sales order for same quotation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 11:23:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856557#M1592504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-06T11:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in lock Sales order create with BAPI BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856558#M1592505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some solutions&lt;/P&gt;&lt;P&gt;- Just lock (ENQUEUE) any object at the start of the job(*), if not locked, you can exit or wait in a loop, will be released at end of job (use a _SCOPE '3' so commit work wont release the lock)&lt;/P&gt;&lt;P&gt;-&amp;gt; This will insure the job runs only once at a time&lt;/P&gt;&lt;P&gt;- Lock the quotation before calling the BAPI, will be released by the COMMIT_WORK (from where do you fetch the quotation, if it is a customer Z_table, you can use the lock object that you have surely created ?) (use a _scope '2')&lt;/P&gt;&lt;P&gt;-&amp;gt; This will insure that at most one job will convert a quotation (i suppose you set a "done" flag or status  in the quotation record)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read [SAP Locks |http://help.sap.com/abapdocu_70/en/ABENSAP_LOCK.htm] if you are not familiar with the concept of lock in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) E_TABLEE for table, E_TRDIR for program, anything not required by another process&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 11:36:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-lock-sales-order-create-with-bapi-bapi-salesorder-createfromdat2/m-p/7856558#M1592505</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-05-06T11:36:45Z</dc:date>
    </item>
  </channel>
</rss>

