<?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: Data Deletion from Database table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927493#M940601</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  use code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA lt_tab_where TYPE TABLE OF string.

REFRESH  lt_tab_where[].

CLEAR lt_tab_where.

APPEND l_field_name     TO lt_tab_where.
APPEND '  EQ '              TO lt_tab_where.
APPEND ' '''                    TO lt_tab_where.
APPEND l_field_value      TO lt_tab_where.
APPEND ''' '                    TO lt_tab_where.

DELETE FROM (S_TABLE-LOW)
       WHERE (lt_tab_where).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA l_where(100).

CONCATENATE l_filed_name ' EQ ' '''' l_filed_value '''' INTO l_where.

DELETE FROM (S_TABLE-LOW)
       WHERE (l_where).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Pavel Parshenkov on May 30, 2008 11:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2008 07:16:26 GMT</pubDate>
    <dc:creator>pavel_parshenkov2</dc:creator>
    <dc:date>2008-05-30T07:16:26Z</dc:date>
    <item>
      <title>Data Deletion from Database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927492#M940600</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;My requirement is,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. From the selection screen, I want to get the table name and fieldname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. BAsed on that, I have delete the data from the mentioned database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the below code , in that runtime I am getting the db table name and I am deleting the data... but I want to mention the fieldname also in runtime...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZSBN_TESTDELETE .
 
TABLES : DD02L.
 
DATA : WF_TABNAME  LIKE DD02L-TABNAME.
 
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS   : S_TABLE FOR DD02L-TABNAME OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B1.
 
 
DELETE FROM (S_TABLE-LOW)
       WHERE
             J_1IBUKRS EQ '6600'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Rgds,&lt;/P&gt;&lt;P&gt;S.Barani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 07:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927492#M940600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T07:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Data Deletion from Database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927493#M940601</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  use code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA lt_tab_where TYPE TABLE OF string.

REFRESH  lt_tab_where[].

CLEAR lt_tab_where.

APPEND l_field_name     TO lt_tab_where.
APPEND '  EQ '              TO lt_tab_where.
APPEND ' '''                    TO lt_tab_where.
APPEND l_field_value      TO lt_tab_where.
APPEND ''' '                    TO lt_tab_where.

DELETE FROM (S_TABLE-LOW)
       WHERE (lt_tab_where).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA l_where(100).

CONCATENATE l_filed_name ' EQ ' '''' l_filed_value '''' INTO l_where.

DELETE FROM (S_TABLE-LOW)
       WHERE (l_where).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Pavel Parshenkov on May 30, 2008 11:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 07:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927493#M940601</guid>
      <dc:creator>pavel_parshenkov2</dc:creator>
      <dc:date>2008-05-30T07:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data Deletion from Database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927494#M940602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;creata a &amp;lt;field-symbol&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: &amp;lt;field-symbol&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE FROM &amp;lt;field-symbol&amp;gt;WHERE &amp;lt;field-symbol&amp;gt; = 'LH'       AND &lt;/P&gt;&lt;P&gt;                       &amp;lt;field-symbol&amp;gt;  = '0400'     AND &lt;/P&gt;&lt;P&gt;                        &amp;lt;field-symbol&amp;gt;  = '20010228'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ask user to enter the field name........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think this wiiill help u.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is useful    Plz Reward&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 07:18:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-deletion-from-database-table/m-p/3927494#M940602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T07:18:39Z</dc:date>
    </item>
  </channel>
</rss>

