<?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: Update the database table inside an user exit. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090508#M1181665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wish other users to be able to read the stored values &lt;STRONG&gt;before&lt;/STRONG&gt; a database commit has been done, you should also store them in shared memory and read from there instead. You might want to take a look at this instruction about Shared Object Memory:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900e3d9d-559e-2910-9dae-b132157a220f" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900e3d9d-559e-2910-9dae-b132157a220f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2009 10:55:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-03T10:55:17Z</dc:date>
    <item>
      <title>Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090504#M1181661</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;I have a issue where i have to update a custom table in an User exit.&lt;/P&gt;&lt;P&gt;I am using Lock object for ENQUE/DEQUE.&lt;/P&gt;&lt;P&gt;I have tried to use statements like UPDATE/MODIFY inside the user exit.&lt;/P&gt;&lt;P&gt;But the problem is that it's not updating the database table at the same time.&lt;/P&gt;&lt;P&gt;I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The real issue is that this custom table is read for batch creation at the same time for different users.&lt;/P&gt;&lt;P&gt;Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..&lt;/P&gt;&lt;P&gt;While requirement is to create a different/unique batch numbers.&lt;/P&gt;&lt;P&gt;Program is updating the table but it's taking time..so in between other users are creating the same batch number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me what would be the best solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Kumar Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 10:06:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090504#M1181661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T10:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090505#M1181662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may I ask the specific fields you have on your customized table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 10:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090505#M1181662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T10:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090506#M1181663</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;Seems you want to create new batch for material inside a user exit. What i did not get is why you need to update a database table? It is anyways not advisable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please collect necessary data and pass it to BAPI_BATCH_CREATE. It will automatically solve your update problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Vivekanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 10:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090506#M1181663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T10:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090507#M1181664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your quick reply.&lt;/P&gt;&lt;P&gt;My actually requirement is like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create a Process Order using tcode COR1.&lt;/P&gt;&lt;P&gt;After passing some input value it goes inside an User Exit.&lt;/P&gt;&lt;P&gt;There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.&lt;/P&gt;&lt;P&gt;The new batch number is created using the combination of these table fields.&lt;/P&gt;&lt;P&gt;Once a new batch number is created it increment the numeric key field number by one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i am not able to update the database table inside this User Exit.&lt;/P&gt;&lt;P&gt;Table is geeting updated but after some time and out of this User Exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest what's required in that case?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Kumar Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Amit  Singh on Feb 3, 2009 11:33 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 10:31:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090507#M1181664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T10:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090508#M1181665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wish other users to be able to read the stored values &lt;STRONG&gt;before&lt;/STRONG&gt; a database commit has been done, you should also store them in shared memory and read from there instead. You might want to take a look at this instruction about Shared Object Memory:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900e3d9d-559e-2910-9dae-b132157a220f" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900e3d9d-559e-2910-9dae-b132157a220f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 10:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090508#M1181665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T10:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090509#M1181666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can wrap your database update and commit work in a function module and then call this function module with the addition starting new task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function call will then start asynchornously in another task and the calling program will continue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the function module should be a remote enabled function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details see F1 help for calling a function module starting new task.&lt;/P&gt;&lt;P&gt;&lt;/P&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>Tue, 03 Feb 2009 11:00:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090509#M1181666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T11:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update the database table inside an user exit.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090510#M1181667</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;Thanks for your quick response.&lt;/P&gt;&lt;P&gt;Now my issue has been resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;To update a database table in an User exit I used the select statement as given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE FOR UPDATE * FROM Ztable&lt;/P&gt;&lt;P&gt;where test conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using this it's locks the database table until it gets updated.&lt;/P&gt;&lt;P&gt;So there is no use of using ABAP Lock Objects like ENQUE/DEQUE.&lt;/P&gt;&lt;P&gt;It allows to read and update the database table for a single user at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Amit  Singh on Feb 7, 2009 6:13 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 05:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-the-database-table-inside-an-user-exit/m-p/5090510#M1181667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T05:13:18Z</dc:date>
    </item>
  </channel>
</rss>

