<?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 dynamic SELECT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153804#M454854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dynamic SELECT with different fields in the WHERE-clause. But in some tables on which the SELECT operates,  the field mentioned in the WHERE-clause is not part of it and a DUMP is the result.&lt;/P&gt;&lt;P&gt;So is there a way to check, if all fields of the WHERE-clause are part of the table, before execute the SELECT-statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2007 14:50:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-18T14:50:32Z</dc:date>
    <item>
      <title>dynamic SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153804#M454854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dynamic SELECT with different fields in the WHERE-clause. But in some tables on which the SELECT operates,  the field mentioned in the WHERE-clause is not part of it and a DUMP is the result.&lt;/P&gt;&lt;P&gt;So is there a way to check, if all fields of the WHERE-clause are part of the table, before execute the SELECT-statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 14:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153804#M454854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T14:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153805#M454855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, you can come up with some logic and check the field names using the table DD03L.  This table will give you the field names for the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich HEilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 14:55:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153805#M454855</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-04-18T14:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153806#M454856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you could use the RTTS services to retreive the names of the fields of a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

type-pools: abap.

data : idetails type abap_compdescr_tab,
       xdetails type abap_compdescr.

data : ref_descr type ref to cl_abap_structdescr.

selection-screen begin of block b1 with frame title text .
parameters: p_table(30) type c.
selection-screen end of block b1.


* Get the structure of the table.
ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_table ).
idetails[] = ref_descr-&amp;gt;components[].

loop at idetails into xdetails.
  write:/ xdetails-name.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 14:58:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-select/m-p/2153806#M454856</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-04-18T14:58:46Z</dc:date>
    </item>
  </channel>
</rss>

