<?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: Commit Work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142825#M990487</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;Check the link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/7849b8bec911d4b2e80050dadfb92b/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/7849b8bec911d4b2e80050dadfb92b/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jul 2008 05:14:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-21T05:14:09Z</dc:date>
    <item>
      <title>Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142822#M990484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should do the error handling for commit work.  &lt;/P&gt;&lt;P&gt;These are the statements used in my program. &lt;/P&gt;&lt;P&gt;Could you please suggest how to handle this for commit work &lt;/P&gt;&lt;P&gt;error handling or exeception. Put your valuable suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_header INTO wa_header WHERE va_load EQ  space.&lt;/P&gt;&lt;P&gt;          MOVE-CORRESPONDING wa_header TO wa_header1.&lt;/P&gt;&lt;P&gt;          wa_header1-va_load = co_on.&lt;/P&gt;&lt;P&gt;          READ TABLE it_purord INTO wa_purord&lt;/P&gt;&lt;P&gt;                               WITH KEY object_id = wa_header-object_id.&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'BBP_PD_PO_UPDATE'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              i_header  = wa_header1&lt;/P&gt;&lt;P&gt;              i_save    = co_on&lt;/P&gt;&lt;P&gt;            IMPORTING&lt;/P&gt;&lt;P&gt;              es_header = wa_header.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the download status in the header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'BBP_PD_PO_SAVE'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              iv_header_guid = wa_purord-guid.&lt;/P&gt;&lt;P&gt;          COMMIT WORK.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142822#M990484</guid>
      <dc:creator>UmaArjunan</dc:creator>
      <dc:date>2008-07-21T04:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142823#M990485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;before writing commit work..check if sy-subrc eq 0. then write commit work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 05:03:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142823#M990485</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-07-21T05:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142824#M990486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;commit work is used mainly in case of database changes...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if in the report at certain point you want to make chages to databasethen you can use commit work....to update changes to your database.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Commit work is a default process what would happen whenever you try to update the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest you to use the sy-subrc before the function module to check the status of the commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 05:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142824#M990486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T05:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142825#M990487</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;Check the link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/7849b8bec911d4b2e80050dadfb92b/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/7849b8bec911d4b2e80050dadfb92b/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 05:14:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142825#M990487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T05:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142826#M990488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens if the commit work fails . how to handle that exeception. or in other words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use commit work or any other related commit work statments in my program , i have to handle that exception if its failed to commit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also the following code which uses commit work .  i want to handle exclusively for the commit work statment alone....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT prxy.&lt;/P&gt;&lt;P&gt;     TRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   do asynchronous client proxy call&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         CALL METHOD prxy-&amp;gt;execute_asynchronous&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;             output = it_grinfo.&lt;/P&gt;&lt;P&gt;         COMMIT WORK.&lt;/P&gt;&lt;P&gt;         MESSAGE i015(zebp).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Error handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       CATCH cx_ai_system_fault INTO fault.&lt;/P&gt;&lt;P&gt;         CREATE OBJECT fault.&lt;/P&gt;&lt;P&gt;         lv_msg_text = fault-&amp;gt;get_text( ).&lt;/P&gt;&lt;P&gt;         MESSAGE i012(zebp) WITH lv_msg_text.&lt;/P&gt;&lt;P&gt;         RETURN.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       WRITE:/ fault-&amp;gt;errortext.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     ENDTRY.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt; ENDFORM.                    "USER_COMMAND&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 05:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142826#M990488</guid>
      <dc:creator>UmaArjunan</dc:creator>
      <dc:date>2008-07-21T05:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142827#M990489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also  let me know how to use commit work and wait&lt;/P&gt;&lt;P&gt;and the corresponding exception / error handling for this statmement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 06:46:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142827#M990489</guid>
      <dc:creator>UmaArjunan</dc:creator>
      <dc:date>2008-07-21T06:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142828#M990490</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;You can take the help of below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;UPDATE zo9_user_status
                SET  sub_date = sy-datum
                     sub_time = sy-uzeit
                     status = g_wa_outtab-status
                WHERE  representative = g_wa_outtab-representative AND
                       selection_id = g_wa_outtab-selection_id AND
                       sub_date = g_wa_outtab-sub_date AND
                       sub_time = g_wa_outtab-sub_time AND
                       superior = g_wa_outtab-superior.

        IF sy-subrc EQ 0.
          COMMIT WORK.
          l_error = 'X1'.

        ELSE.
          l_error = 'X2'.
          CLEAR l_error.
          ROLLBACK WORK.
        ENDIF.

IF l_error = 'X2'.
      MESSAGE e031.
      CLEAR l_error.

    ELSEIF l_error = 'X1'.
      MESSAGE s022.
      CLEAR l_error.

    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;dhanashri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 06:54:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142828#M990490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T06:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142829#M990491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can we use commit work inside a try catch statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so how do use that inside a try catch . Please give an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Useful answers will sure be rewarded&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 07:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work/m-p/4142829#M990491</guid>
      <dc:creator>UmaArjunan</dc:creator>
      <dc:date>2008-07-21T07:04:58Z</dc:date>
    </item>
  </channel>
</rss>

