<?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: ADD DATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729682#M317832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  The following procedure is always followed when a table is updated using an ABAP report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1.&amp;lt;/b&amp;gt;  Check whether the user has authorization to perform the database updates. If the user is not authorised, then raise an exception.&lt;/P&gt;&lt;P&gt;Click the link below to know more about Authorization Concept in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Checking Authorizations&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ba5358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ba5358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Checking User Authorizations.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbacbe35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbacbe35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.&amp;lt;/b&amp;gt; First of the table is locked. Each table in SAP can have lock. Before updating the table table should be locked. This allows the user to have complete/ exclusive access to the table. Click the link below to know more about Locks in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;3.&amp;lt;/b&amp;gt;  Use Database update commands INSERT, MODIFY or UPDATE to add entries in the table. Click the links below to know more about these commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;INSERT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;UPDATE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MODIFY&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;4.&amp;lt;/b&amp;gt; Check the SY-SUBRC after above statements. If the data is inserted successfully, then the database should be committed. for COMMIT WORK command is used. If the database update is unsuccessful, the ROLLBACK the update by using ROLLBACK command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Clikc the link below for more information.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b64358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b64358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;5.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;After the database is updated unlock the table.&lt;/P&gt;&lt;P&gt;Click the link to know about Database locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Structrure of Locks&amp;lt;/b&amp;gt; &lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LOCK MODE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eeb2446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eeb2446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Function module for Locks&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Lock Mechanism&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eed9446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eed9446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Examples of LOCK Objects&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;It is always a good practice to follow the above mentioned steps.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below sample code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&amp;lt;b&amp;gt;Start-of-selection.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Check Authorization&amp;gt; - Step 1&lt;/P&gt;&lt;P&gt;if success&lt;/P&gt;&lt;P&gt;&amp;lt; process the records&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;end-of-selection.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if authoriszation is successful.&lt;/P&gt;&lt;P&gt;&amp;lt;lock the table&amp;gt; - step 2.&lt;/P&gt;&lt;P&gt;&amp;lt;update database&amp;gt; - step 3.&lt;/P&gt;&lt;P&gt;&amp;lt;commit/ rollback&amp;gt; - step 4.&lt;/P&gt;&lt;P&gt;&amp;lt;unlock the table &amp;gt; - step 5.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this gives you a clear picture of database updates using reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Dec 2006 17:10:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-26T17:10:35Z</dc:date>
    <item>
      <title>ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729675#M317825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've created ZTABLE....&lt;/P&gt;&lt;P&gt;How do I append data to that tables thru 1)Report and using 2)Std Transaction....Waiting for your reply...Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 04:41:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729675#M317825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T04:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729676#M317826</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;1) REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: ZTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZTABLE-MANDT = SY-MANDT.&lt;/P&gt;&lt;P&gt;ZTABLE-KEY_FIELD = 'TEST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT ZTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 04:43:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729676#M317826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T04:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729677#M317827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u cant append data to the tables thru any &amp;lt;b&amp;gt;standard transaction&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u need to generate table maintenance for the table.&lt;/P&gt;&lt;P&gt;follow these steps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. you need generate the table maintenance using the Menu Utilities-&amp;gt;Table maintenance generator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. give the authorization group, package, function group, overview screen number etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.create the table maintenance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. now go to se93&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. give custom tcode and say create &lt;/P&gt;&lt;P&gt;then enter description , and then &lt;/P&gt;&lt;P&gt;choose the radio button Transaction with parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. now enter tcode as SM30 and check the check box skip intial screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. Check all gui support buttons&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. now go down and enter VIEWNAME from F4 help and value as table name&lt;/P&gt;&lt;P&gt;9. and add UPDATE(choose it from F4) and value as 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VIEWNAME ZTABLE&lt;/P&gt;&lt;P&gt;UPDATE X&lt;/P&gt;&lt;P&gt;and save it, now check the Tcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 04:45:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729677#M317827</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2006-12-26T04:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729678#M317828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) REPORT&lt;/P&gt;&lt;P&gt;TABLES: ZTABLE.&lt;/P&gt;&lt;P&gt;ZTABLE-MANDT = SY-MANDT.&lt;/P&gt;&lt;P&gt;ZTABLE-KEY_FIELD = 'TEST'.&lt;/P&gt;&lt;P&gt;INSERT ZTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Inserting using standard transaction. U need to take help of Functional people. In configuration, there is a method where u can attach the Ztable. So, when the transaction is saved, the contents of the Ztable gets automatically populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 05:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729678#M317828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T05:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729679#M317829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx there for helpful answers...Could you explain in detail what we are doin in the report..as  I am novice to ABAP...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 05:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729679#M317829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T05:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729680#M317830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx there for helpful answers...Could you explain in detail what we are doin in the report..as I am novice to ABAP...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 15:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729680#M317830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T15:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729681#M317831</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;REPORT AD_DATA         " Report name&lt;/P&gt;&lt;P&gt;TABLES: ZTABLE.&lt;/P&gt;&lt;P&gt;ZTABLE-MANDT = SY-MANDT.&lt;/P&gt;&lt;P&gt;ZTABLE-FIELD1 = 'TEST'.&lt;/P&gt;&lt;P&gt;INSERT ZTABLE.                 " Inserting the values to the Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZTABLE-MANDT = SY-MANDT.&lt;/P&gt;&lt;P&gt;ZTABLE-FIELD2 = 'TEST1'.&lt;/P&gt;&lt;P&gt;INSERT ZTABLE.                " Inserting the values to the Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to add the records through a transaction code, then follow the steps as GOPI described in the above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 16:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729681#M317831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T16:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: ADD DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729682#M317832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  The following procedure is always followed when a table is updated using an ABAP report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1.&amp;lt;/b&amp;gt;  Check whether the user has authorization to perform the database updates. If the user is not authorised, then raise an exception.&lt;/P&gt;&lt;P&gt;Click the link below to know more about Authorization Concept in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Checking Authorizations&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ba5358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ba5358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Checking User Authorizations.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbacbe35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbacbe35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2.&amp;lt;/b&amp;gt; First of the table is locked. Each table in SAP can have lock. Before updating the table table should be locked. This allows the user to have complete/ exclusive access to the table. Click the link below to know more about Locks in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;3.&amp;lt;/b&amp;gt;  Use Database update commands INSERT, MODIFY or UPDATE to add entries in the table. Click the links below to know more about these commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;INSERT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;UPDATE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MODIFY&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;4.&amp;lt;/b&amp;gt; Check the SY-SUBRC after above statements. If the data is inserted successfully, then the database should be committed. for COMMIT WORK command is used. If the database update is unsuccessful, the ROLLBACK the update by using ROLLBACK command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Clikc the link below for more information.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b64358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b64358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;5.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;After the database is updated unlock the table.&lt;/P&gt;&lt;P&gt;Click the link to know about Database locks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Structrure of Locks&amp;lt;/b&amp;gt; &lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LOCK MODE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eeb2446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eeb2446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Function module for Locks&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Lock Mechanism&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eed9446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/cf/21eed9446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Examples of LOCK Objects&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;It is always a good practice to follow the above mentioned steps.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below sample code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&amp;lt;b&amp;gt;Start-of-selection.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Check Authorization&amp;gt; - Step 1&lt;/P&gt;&lt;P&gt;if success&lt;/P&gt;&lt;P&gt;&amp;lt; process the records&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;end-of-selection.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if authoriszation is successful.&lt;/P&gt;&lt;P&gt;&amp;lt;lock the table&amp;gt; - step 2.&lt;/P&gt;&lt;P&gt;&amp;lt;update database&amp;gt; - step 3.&lt;/P&gt;&lt;P&gt;&amp;lt;commit/ rollback&amp;gt; - step 4.&lt;/P&gt;&lt;P&gt;&amp;lt;unlock the table &amp;gt; - step 5.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this gives you a clear picture of database updates using reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Dec 2006 17:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-data/m-p/1729682#M317832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-26T17:10:35Z</dc:date>
    </item>
  </channel>
</rss>

