<?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: Delete modify  in table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071970#M973556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out the following Links which are helpful....&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/79/c5547fb3dc11d5993800508b6b8b11/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/79/c5547fb3dc11d5993800508b6b8b11/frameset.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/a4/35ff395ef548e5add909b73ca12878/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/a4/35ff395ef548e5add909b73ca12878/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 12:44:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T12:44:40Z</dc:date>
    <item>
      <title>Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071967#M973553</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;how can we insert delete and modify in database table using an internal table in programming codes .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the internal table is same like as table s225 in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks jayant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:37:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071967#M973553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T12:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071968#M973554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY dbtab FROM TABLE itab.or&lt;/P&gt;&lt;P&gt; MODIFY (dbtabname) FROM TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Mass modify: Inserts new lines or updates existing lines of a database table. The primary keys for identifying the lines to be inserted or updated and the relevant values are taken from the internal table itab. The lines of the internal table itab must satisfy the same conditions as the work area wa in addition 1 to variant 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT dbtab [CLIENT SPECIFIED] FROM TABLE itab. or INSERT (dbtabname) [CLIENT SPECIFIED] FROM TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: ... ACCEPTING DUPLICATE KEYS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Mass insert: Inserts all lines of table itab in a single operation. The lines of itab must satisfy the same condition as the work area wa in variant 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statement has been executed, the system field SY-DBCNT contains the number of lines inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;All lines inserted successfully. Any other situation causes a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the internal table itab is empty, SY-SUBRC and SY-DBCNT are both 0 after the call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE dbtab FROM TABLE itab. &lt;/P&gt;&lt;P&gt;DELETE (dbtabname) FROM TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Mass deletion: Deletes all database table lines for which the internal table itab contains values for the primary key fields. The lines of the internal table itab must satisfy the same condition as the work area wa in addition 1 to variant 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system field SY-DBCNT contains the number of deleted lines, i.e. the number of lines of the internal table itab for whose key values there were lines in the database table dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;All lines from itab could be used to delete lines from dbtab. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;For at least one line of the internal table in the database table, there was no line with the same primary key. All found lines are deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0. &lt;/P&gt;&lt;P&gt;&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;Sachin M M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071968#M973554</guid>
      <dc:creator>sachin_mathapati</dc:creator>
      <dc:date>2008-06-30T12:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071969#M973555</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;&lt;/P&gt;&lt;P&gt;   To delete the database table use this code.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; parameter: p_f1 like &amp;lt;db-f1&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt; SELECT * FROM &amp;lt;.dbtable&amp;gt; INTO TABLE ITAB WHERE &amp;lt;db-f1&amp;gt; IN p_f1.&lt;/P&gt;&lt;P&gt;&amp;gt;        DELETE FROM &amp;lt;dbtable&amp;gt; WHERE WHERE &amp;lt;db-f1&amp;gt; IN p_f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And to modify the database table use this code.....&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; select * from &amp;lt;.dbtable&amp;gt; into table itab.      &lt;/P&gt;&lt;P&gt;&amp;gt;        LOOP AT Itab.&lt;/P&gt;&lt;P&gt;&amp;gt;          itab-f1 = 'N'.&lt;/P&gt;&lt;P&gt;&amp;gt;            MODIFY &amp;lt;.dbtable&amp;gt; FROM itab.&lt;/P&gt;&lt;P&gt;&amp;gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naveen Inuganti on Jun 30, 2008 6:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:42:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071969#M973555</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-06-30T12:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071970#M973556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out the following Links which are helpful....&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/79/c5547fb3dc11d5993800508b6b8b11/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/79/c5547fb3dc11d5993800508b6b8b11/frameset.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/a4/35ff395ef548e5add909b73ca12878/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/a4/35ff395ef548e5add909b73ca12878/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:44:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071970#M973556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T12:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071971#M973557</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 this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : zgm_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_data type standard table of zgm_table,&lt;/P&gt;&lt;P&gt;       wa_data type zgm_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options : s_name for zgm_table-name,&lt;/P&gt;&lt;P&gt;                 s_city for zgm_table-city,&lt;/P&gt;&lt;P&gt;                 s_role for zgm_table-role.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*wa_data-name = 'ABC'.&lt;/P&gt;&lt;P&gt;*wa_data-city = 'JAPAN'.&lt;/P&gt;&lt;P&gt;*wa_data-role = 'ASSOCIATE'.&lt;/P&gt;&lt;P&gt;*wa_data-salary = 26000.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*append wa_data to it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*insert zgm_table from table it_data.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MESSAGE 'records created succesfully' TYPE 'S'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*modify zgm_table from table it_data.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MESSAGE 'records created succesfully' TYPE 'S'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*DELETE FROM zgm_table WHERE name in s_name.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MESSAGE 'records deleted succesfully' TYPE 'S'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_data-name = 'ABC'.&lt;/P&gt;&lt;P&gt;wa_data-city = 'JAPAN'.&lt;/P&gt;&lt;P&gt;wa_data-role = 'ASSOCIATE'.&lt;/P&gt;&lt;P&gt;wa_data-salary = 38000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_data to it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update zgm_table from table it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use these statements depending on ur requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071971#M973557</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-06-30T12:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071972#M973558</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;Lets take&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_s225 TYPE TABLE OF s225.&lt;/P&gt;&lt;P&gt;DATA: wa_s225 LIKE LINE OF it_s225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First we fetch the data from s225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM s225 INTO TABLE it_s225 WHERE ssour = &amp;lt;some_value&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now down the line in the program you need to delete records corresponding to specific value of sptag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE it_s225 WHERE sptag = &amp;lt;some_date&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete the records from database table, you use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE s225 FROM TABLE it_s225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose you need to set the value of the field WERKS to 'w001' for all records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_s225 INTO wa_s225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_s225-werks = 'w001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY it_s225 FROM wa_s225 TRANSPORTING werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR wa_s225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To change the value of werks in database table use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY s225 FROM TABLE it_s225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prosenjit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071972#M973558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T12:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Delete modify  in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071973#M973559</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;Please try it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*lock the table before updating&lt;/P&gt;&lt;P&gt; if it successful , delete the record&lt;/P&gt;&lt;P&gt;      DELETE zhtm_intf_log FROM wa_zhtm_intf_log.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        COMMIT WORK.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To modify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   MODIFY zhtm_intf_log from wa_zhtm_intf_log.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      COMMIT WORK.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Unlock the table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 12:50:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-modify-in-table/m-p/4071973#M973559</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2008-06-30T12:50:39Z</dc:date>
    </item>
  </channel>
</rss>

