<?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 Using SAP LUW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608784#M1569112</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 have a requiremnt where in RFC contains many standard FM calls which writes values to database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to commit work only if all the FM are executed succesfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue here used ws_reverse_goods_issue FM and didnot commit and had values in SAP LUW&lt;/P&gt;&lt;P&gt;after that tried exceuting BAPI_GOODSMVT_CREATE which is giving error MB_GOODSMVT_CREATE FM cannot be executed..&lt;/P&gt;&lt;P&gt;If commit its working fine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan to commit work finally and not in between..&lt;/P&gt;&lt;P&gt;Please advice..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Phani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jan 2011 10:32:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-01-17T10:32:48Z</dc:date>
    <item>
      <title>Using SAP LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608784#M1569112</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 have a requiremnt where in RFC contains many standard FM calls which writes values to database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to commit work only if all the FM are executed succesfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue here used ws_reverse_goods_issue FM and didnot commit and had values in SAP LUW&lt;/P&gt;&lt;P&gt;after that tried exceuting BAPI_GOODSMVT_CREATE which is giving error MB_GOODSMVT_CREATE FM cannot be executed..&lt;/P&gt;&lt;P&gt;If commit its working fine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan to commit work finally and not in between..&lt;/P&gt;&lt;P&gt;Please advice..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Phani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 10:32:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608784#M1569112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-17T10:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAP LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608785#M1569113</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;Have you tried wrapping your code in an fm using 'in update task'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/23/edae617ba64e85bd4997f25c77eb1f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/23/edae617ba64e85bd4997f25c77eb1f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 10:55:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608785#M1569113</guid>
      <dc:creator>former_member201275</dc:creator>
      <dc:date>2011-01-17T10:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAP LUW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608786#M1569114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi phanisreedhar lakamsani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that a COMMIT WORK is not the same as the implicit database commit that will happen automatically after an RFC function call is finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK will&lt;/P&gt;&lt;P&gt;  - finally freeze all database changes done by update/insert/modify statements&lt;/P&gt;&lt;P&gt;  - trigger the execution of all PERFORM ON COMMIT routines (frequently used in BAPI)&lt;/P&gt;&lt;P&gt;  - trigger the execution of all function modules registered with CALL FUNCTION .. IN UPDATE TASK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possibility is as Gemini Twin recommends the wrapping into one function called in UPDATE TASK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that means if any errors are raised in update task, you will get an express mail notifying of the failure. &lt;/P&gt;&lt;P&gt;The update task should be used if you do not expect any errors to occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything should be fine if, after calling BAPI_GOODSMVT_CREATE, you check for error in RETURN table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT RETURN WHERE type CA 'EAX' "severe error of type E, A, or X occured
  TRANSPORTING NO FIELDS.
ENDLOOP.
IF SY-SUBRC = 0.
  CALL FUNCTION BAPI_TRANSACTION_ROLLBACK.
ELSE.
  CALL FUNCTION BAPI_TRANSACTION_COMMIT.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code should be at the end of the RFC call. You should take action for error situatio, i.e. record the errors in application log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jan 2011 11:31:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-luw/m-p/7608786#M1569114</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-01-17T11:31:12Z</dc:date>
    </item>
  </channel>
</rss>

