<?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: updating database table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098774#M1183244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ideally it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you written this code in a user exit or it is a stand alone program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Jan 22, 2009 4:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2009 15:15:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-22T15:15:03Z</dc:date>
    <item>
      <title>updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098764#M1183234</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 done an append structure in the database EBAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i am doing an update in the table EBAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE EBAN SET ZFLAG = 'X'&lt;/P&gt;&lt;P&gt;WHERE using all the primary condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The row that i am trying to update exist in the table Eban. The problem that i am having is that sometimes the update is done sometimes not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check in debug for the data that is done updating properly and in debug the update is done. But not when executing the program without debug. I've tried COMMIT statement after UPDATE but it didn't work.  how can i solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 12:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098764#M1183234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T12:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098765#M1183235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deniz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;    FROM EBAN&lt;/P&gt;&lt;P&gt;    INTO WA_EBAN&lt;/P&gt;&lt;P&gt;  WHERE &amp;lt;primary conditions which you are giving in UPDATE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;wa_eban-zfalg = 'X'.&lt;/P&gt;&lt;P&gt;update eban from wa_eban.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Jyothi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 12:58:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098765#M1183235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T12:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098766#M1183236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Jyothi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the quick answer. i've tried your suggestion but it didn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098766#M1183236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T13:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098767#M1183237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check sy-subrc after your update. its not necessary to do a select before update as suggested before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098767#M1183237</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-01-22T13:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098768#M1183238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after commit. jus try using the WAIT statement and check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098768#M1183238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T13:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098769#M1183239</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;My intention there is whether the record is existing in the system or not. What is the sy-subrc value. Did you check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if that is zero then it must work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure that it is zero and then remove the select. It is just for checking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Jyothi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098769#M1183239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T13:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098770#M1183240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you added field in standard strcture in EABN , for this you can find any exit  you have to appned the strcture in exit level  that will update the standard table automatically...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:44:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098770#M1183240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T13:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098771#M1183241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; the select. It is just for checking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its more then superfluous&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:45:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098771#M1183241</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-01-22T13:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098772#M1183242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Lock the record before you update and unlock it after the update is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the lock object EMEBANE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ENQUEUE_EMEBANE'  " for locking, pass the necessary parameters

IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

UPDATE EBAN SET ZFLAG = 'X'
WHERE using all the primary condition.

if sy-subrc = 0.
 " Update successfull !
else.
 " Update unsuccessfull !
endif.

call function DEQUEUE_EMEBANE      " For unlocking. Pass the necessary parameters 

IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 13:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098772#M1183242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T13:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098773#M1183243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Advait,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've tried your suggestion but it didn't work. like before when i check in debug mode the field is updated but when i execute the program without debug it doesn't work (i got error message: "Object requested is currently locked by user "). i want to know the differance between running program with debug mode and without debug mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 15:08:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098773#M1183243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T15:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098774#M1183244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ideally it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you written this code in a user exit or it is a stand alone program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Jan 22, 2009 4:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 15:15:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098774#M1183244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T15:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: updating database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098775#M1183245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've written code in a function module i wrote.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 15:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-database-table/m-p/5098775#M1183245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T15:22:15Z</dc:date>
    </item>
  </channel>
</rss>

