<?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: Dynamic selection based on values from Ztable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714693#M1297160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;use the below logic for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;types: ty_fields type fieldname.
data: it_fields type table of ty_fields.

select fieldname from ztable into table it_fields where ... " Get the fieldnames into it_fields

select (it_fields) from dbtable into table it_tab where ... " Use table it_fields for list of fields to be fetched&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps you.&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;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2009 14:13:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-25T14:13:18Z</dc:date>
    <item>
      <title>Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714691#M1297158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My query is that i have to select the data  from the database table .But the fields to be selected from that database table is decided from the Ztable ( this Ztable contains the field name ).&lt;/P&gt;&lt;P&gt;How can this be achieved ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:06:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714691#M1297158</guid>
      <dc:creator>anuj_srivastava</dc:creator>
      <dc:date>2009-05-25T14:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714692#M1297159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select * from ztable into table twhere_clause.
...
select * from ...
  where ( twhere_clause ).
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;regards,darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:12:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714692#M1297159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714693#M1297160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;use the below logic for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;types: ty_fields type fieldname.
data: it_fields type table of ty_fields.

select fieldname from ztable into table it_fields where ... " Get the fieldnames into it_fields

select (it_fields) from dbtable into table it_tab where ... " Use table it_fields for list of fields to be fetched&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps you.&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;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714693#M1297160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714694#M1297161</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;Create the dynamic internal table using the ZTABLE fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM (DBtab) INTO CORRESPONDING FIELDS OF &amp;lt;FS_ITAB&amp;gt; WHERE Condit&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Create dynamic internal table |&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="797696"&gt;&lt;/A&gt;]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714694#M1297161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714695#M1297162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;follow the method mentined below:&lt;/P&gt;&lt;P&gt;Step1: &lt;/P&gt;&lt;P&gt;Run transaction SE16 &amp;amp; put table name as selection criteria. &lt;/P&gt;&lt;P&gt;Step2: &lt;/P&gt;&lt;P&gt;Choose the fields which will be the selection criteria for data selection from settings &amp;gt; Fields for selection&lt;/P&gt;&lt;P&gt;Put the selection criteria: &lt;/P&gt;&lt;P&gt;Step3: &lt;/P&gt;&lt;P&gt;Report will be displayed in the following format: &lt;/P&gt;&lt;P&gt;Choose the desired output fields from Settings &amp;gt; Format list &amp;gt; Choose Fields. &lt;/P&gt;&lt;P&gt;The final report will be displayed: &lt;/P&gt;&lt;P&gt;Step4: &lt;/P&gt;&lt;P&gt;Number of entries in the table can also be checked using SE16 Transaction. &lt;/P&gt;&lt;P&gt;Step5: &lt;/P&gt;&lt;P&gt;Whether the data selection is done using primary / secondary index can also be checked using transaction SE11 / ST05.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714695#M1297162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714696#M1297163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you may goto the following link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/EN/67/93b80914a911d2953c0000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/EN/67/93b80914a911d2953c0000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;prinan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714696#M1297163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic selection based on values from Ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714697#M1297164</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;Thx all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 15:08:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-selection-based-on-values-from-ztable/m-p/5714697#M1297164</guid>
      <dc:creator>anuj_srivastava</dc:creator>
      <dc:date>2009-05-25T15:08:37Z</dc:date>
    </item>
  </channel>
</rss>

