<?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: Call transaction and commit work problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647815#M610080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As per you query you are saying it is wokring fine in QAS or other systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check your it_bdc table , how records created in that? any duplicates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not find OSS for this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2007 04:37:27 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2007-08-09T04:37:27Z</dc:date>
    <item>
      <title>Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647808#M610073</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;  I have written one program to call FB01 to create a document.&lt;/P&gt;&lt;P&gt;  here is the logic (pseudo code)&lt;/P&gt;&lt;P&gt;  call transaction 'FB01' mode 'N' using it_bdc message it_message.&lt;/P&gt;&lt;P&gt;  read it_message with msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    rollback work.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I tested the file that I upload in development and quality system and it works fine. 1 record create 1 document. However, when it was transported to production, the program creates 2 documents for one record with the same time in document header and the same data in document items. It happened when the server has low memory and it happened only one day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Could anyone tell me why it happen? because I use call transaction and commit work then LUW has commit twice with the same information?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Rewarded if it is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Phon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 03:50:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647808#M610073</guid>
      <dc:creator>chaiphon</dc:creator>
      <dc:date>2007-08-09T03:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647809#M610074</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 your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transaction 'FB01' mode 'N' using it_bdc message it_message.&lt;/P&gt;&lt;P&gt;read it_message with msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;rollback work.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you are trying to Rollback the transaction if there is an error message.&lt;/P&gt;&lt;P&gt;This is not Required as the Trasaction will not be commited when there is an Error message. So there is no need of COMMIT or ROLLBACK here.&lt;/P&gt;&lt;P&gt;You can modify like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;call transaction 'FB01' &lt;/P&gt;&lt;P&gt;           mode 'N' &lt;/P&gt;&lt;P&gt;           using it_bdc&lt;/P&gt;&lt;P&gt;           message it_message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.   "Transation unsuccessful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read it_message with msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&amp;lt;/b&amp;gt;write:/ it_message-msgty, &lt;/P&gt;&lt;P&gt;         it_message-msgnr,&lt;/P&gt;&lt;P&gt;         it_message-msgid, &lt;/P&gt;&lt;P&gt;         it_message-msgv1,&lt;/P&gt;&lt;P&gt;         it_message-msgv2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hint: you can use the FM   FORMAT_MESSAGE to Get the message based on the Message attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:03:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647809#M610074</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-09T04:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647810#M610075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaiphon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont understand why you do a rollback when no data is committed. Just do a Commit work if the read statement returns sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yogesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647810#M610075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T04:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647811#M610076</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;Try to use&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
call transaction 'FB01' mode 'L' using it_bdc message it_message.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647811#M610076</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-08-09T04:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647812#M610077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will take out commit work and rollback work but I still wonder wht the document was posted twice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647812#M610077</guid>
      <dc:creator>chaiphon</dc:creator>
      <dc:date>2007-08-09T04:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647813#M610078</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;Try to use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647813#M610078</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-08-09T04:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647814#M610079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestion. I want to know the reason because I code the same for many programa and SAP should not post the same document twice even thought I commit work after call transaction. is there any OSS note for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647814#M610079</guid>
      <dc:creator>chaiphon</dc:creator>
      <dc:date>2007-08-09T04:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647815#M610080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As per you query you are saying it is wokring fine in QAS or other systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check your it_bdc table , how records created in that? any duplicates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not find OSS for this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:37:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647815#M610080</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-08-09T04:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647816#M610081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks aRs, I search from SAP OSS as well but I cannot find any note that is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the problem occurs I use the same file that user upload in production and upload it in Quality system. the record is about 1000+ records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In production the message will be&lt;/P&gt;&lt;P&gt;document 1 has been created&lt;/P&gt;&lt;P&gt;document 3 has been created&lt;/P&gt;&lt;P&gt;document 5 has been created&lt;/P&gt;&lt;P&gt;document 7 has been created&lt;/P&gt;&lt;P&gt;document 8 has been created (Sometimes it created only one document).&lt;/P&gt;&lt;P&gt;document 10 has been created&lt;/P&gt;&lt;P&gt;document 13 has been created&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;However, if you go into the system and look for document 2, the data will be exactly the same as document 1 including the posting time(in the same second).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in quality system the message will be &lt;/P&gt;&lt;P&gt;document 1 has been created&lt;/P&gt;&lt;P&gt;document 2 has been created&lt;/P&gt;&lt;P&gt;document 3 has been created&lt;/P&gt;&lt;P&gt;document 4 has been created&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I have to create program to reverse all the duplicate documents and I will post to OSS tomorrow. Any other idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647816#M610081</guid>
      <dc:creator>chaiphon</dc:creator>
      <dc:date>2007-08-09T04:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Call transaction and commit work problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647817#M610082</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;After seeing these production records i got doubt to use wait command after commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;document 1 has been created&lt;/P&gt;&lt;P&gt;document 3 has been created&lt;/P&gt;&lt;P&gt;document 5 has been created&lt;/P&gt;&lt;P&gt;document 7 has been created&lt;/P&gt;&lt;P&gt;document 8 has been created (Sometimes it created only one document).&lt;/P&gt;&lt;P&gt;document 10 has been created&lt;/P&gt;&lt;P&gt;document 13 has been created&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transaction 'FB01' mode 'N' using it_bdc message it_message.&lt;/P&gt;&lt;P&gt;read it_message with msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;rollback work.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; use here any below mentioned wait command &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This 3 command can be used after an update.  Usually after a COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Delay for 4 seconds. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.     WAIT UP TO 4 Seconds. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.     call function 'ENQUE_SLEEP' &lt;/P&gt;&lt;P&gt;                    exporting &lt;/P&gt;&lt;P&gt;                                    seconds              =        4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.     CALL FUNCTION 'FMCT_WAIT_FOR_UPDATE' &lt;/P&gt;&lt;P&gt;                            EXPORTING &lt;/P&gt;&lt;P&gt;                                                  I_SEC = 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 04:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction-and-commit-work-problem/m-p/2647817#M610082</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-08-09T04:55:51Z</dc:date>
    </item>
  </channel>
</rss>

