<?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: Problem while reading the data from Selection Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319239#M1536669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;erm, not that i dont want to help you, but you know that this is higly risky what you are trying to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving someone a possibility to delete database records of certain tables isnt good.&lt;/P&gt;&lt;P&gt;People can then delete MARA records while leaving MARC recods in system etc. tell your consultant that this task is a NO-GO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Sep 2010 09:11:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-07T09:11:30Z</dc:date>
    <item>
      <title>Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319238#M1536668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank You very much for reading this query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have designed a selection Screen which contains 2 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First field is field in which user has to give table name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second field is a field in which user has to give field name from that data base table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to write a logic that I should delete the data from given data base table where given field = to-day'date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My selection-Screen code i s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     p_table TYPE rsdodso-odsobject OBLIGATORY,&lt;/P&gt;&lt;P&gt;     p_field(20) OBLIGATORY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written query like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete from table (p_table) where (p_field) = sy-datum which is giving error message saying that (p_field) doesnot exist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one advise me on this how to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank and Regards,&lt;/P&gt;&lt;P&gt;K.krishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 09:05:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319238#M1536668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T09:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319239#M1536669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;erm, not that i dont want to help you, but you know that this is higly risky what you are trying to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving someone a possibility to delete database records of certain tables isnt good.&lt;/P&gt;&lt;P&gt;People can then delete MARA records while leaving MARC recods in system etc. tell your consultant that this task is a NO-GO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 09:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319239#M1536669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T09:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319240#M1536670</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;This option is only for Z tables.So its not a ploblem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: KRISHNA CHAITANYA on Sep 7, 2010 2:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 09:28:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319240#M1536670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T09:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319241#M1536671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure you can delete the entries or not.  Please find below sample code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data : v1 type string,
       v2 type string.

     v1 = p_table.
  concatenate p_field ' = ' sy-datum into v2 SEPARATED BY space.
  delete from (v1) where (v2).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 10:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319241#M1536671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T10:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319242#M1536672</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;We can't have a dynamic condition in where condition for delete table. you can find the same in SCN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 10:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319242#M1536672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T10:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319243#M1536673</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; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; This option is only for Z tables.So its not a ploblem.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Edited by: KRISHNA CHAITANYA on Sep 7, 2010 2:58 PM&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And who's to say that a user will only use a Z-table? Already i'm imagining the next thread 'A user deleted some records from standard SAP table.. how do i get the records back?'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 10:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319243#M1536673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T10:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319244#M1536674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try this way...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 START-of-selection.
    tables : dd03l.
data : w_char(30). 
PARAMETERS : p_table TYPE dd02l-tabname OBLIGATORY,
                     p_field  TYPE dd03l-fieldname OBLIGATORY.

at selection-screen.
    select single * from dd03l where TABNAME = p_table
                                              and fieldname      = p_field
                                              and datatype       = 'DATS'.
   If sy-subrc ne 0.
        "combination is not valid.
   ENDIF.
START-OF-SELECTION.
CONCATENATE p_field 'eq' sy-datum INTO w_char SEPARATED BY space.
  DELETE FROM (p_table) WHERE (w_char).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 11:02:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319244#M1536674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T11:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319245#M1536675</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;Thank You very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did same thing but it is deleting all the records....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: KRISHNA CHAITANYA on Sep 7, 2010 5:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 12:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319245#M1536675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T12:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319246#M1536676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prabhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using Open SQL statements involving dynamic token make sure to keep it in a TRY ... CATCH block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lcx_sql_error TYPE REF TO cx_sy_dynamic_osql_semantics,
      v_msg TYPE string.

TRY .
    DELETE FROM (p_table) WHERE (w_char).
  CATCH cx_sy_dynamic_osql_semantics INTO lcx_sql_error.
    v_msg = lcx_sql_error-&amp;gt;get_text( ).
ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: No need to check against the table DD03L to check if the field is in the table or rather&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 12:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319246#M1536676</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-09-07T12:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319247#M1536677</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; I did same thing but it is deleting all the records....&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You're playing with fire. I'd stop right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 13:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319247#M1536677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T13:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319248#M1536678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;+ 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 13:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319248#M1536678</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-09-07T13:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while reading the data from Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319249#M1536679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oh if it was just fire &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Playing with fire you may get hurt/burned. But playing with a customers SAP system, may get you to a situation where you rather would had gotten burnt &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 13:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-reading-the-data-from-selection-screen/m-p/7319249#M1536679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T13:27:48Z</dc:date>
    </item>
  </channel>
</rss>

