<?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 BAPI: Error while updating same material in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905531#M683465</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'm updating the same material with different values each time.&lt;/P&gt;&lt;P&gt;I get an error which basically states that I'm currently in change mode/locking  material '111' and that i can't update the last 2 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way of ensuring that i only process/update the next record after the record/update lock has been removed from the material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could use the statement "wait up to 2 seconds"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"internal table rec.
Matnr   Week      Value
111       200701    12
111       200702    12
111       200703    12
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2007 06:55:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-10T06:55:54Z</dc:date>
    <item>
      <title>BAPI: Error while updating same material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905531#M683465</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'm updating the same material with different values each time.&lt;/P&gt;&lt;P&gt;I get an error which basically states that I'm currently in change mode/locking  material '111' and that i can't update the last 2 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way of ensuring that i only process/update the next record after the record/update lock has been removed from the material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could use the statement "wait up to 2 seconds"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"internal table rec.
Matnr   Week      Value
111       200701    12
111       200702    12
111       200703    12
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 06:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905531#M683465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T06:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI: Error while updating same material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905532#M683466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use fm :BAPI_TRANSACTION_COMMIT after bapi call&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 07:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905532#M683466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T07:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI: Error while updating same material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905533#M683467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sreejith&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using it. When i execute the job in the background, i still get record locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at rec.

perform populate_requirements_item.
perform populate_requirements_schedule.

call function 'BAPI_REQUIREMENTS_CREATE'
  exporting
    requirements_item            = w_bapisitemr
    requirement_param            = param
  tables
    requirements_schedule_in     = i_requirements_schedule_in
    return                       = i_bapireturn1.


call function 'BAPI_TRANSACTION_COMMIT'
 exporting
   wait          = 'X'.
                                                                                wait up to 2 seconds.

endloop. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 07:20:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-while-updating-same-material/m-p/2905533#M683467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T07:20:35Z</dc:date>
    </item>
  </channel>
</rss>

