<?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 Select from generic table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779296#M335979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an internal table containing selection parameters determined at run-time.&lt;/P&gt;&lt;P&gt;eg. it_ipak_selections contains the entries.....&lt;/P&gt;&lt;P&gt;FIELDNAME    SIGN OPT  LOW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FISCVARNT     I        EQ    K4                                                &lt;/P&gt;&lt;P&gt;FISCPER         I        EQ    2006011                                          &lt;/P&gt;&lt;P&gt;RBUKRS          I        EQ   CH15                                              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using these entries I need to retrieve entries from database table rsseldone.  &lt;/P&gt;&lt;P&gt;This (BW) table contains requests based on selection parameters.  &lt;/P&gt;&lt;P&gt;Unfortunately the table structure is generic, field Fieldname can contain any selection parameter e.g. 'BUKRS'. and for one request there can be 'N' entries, depending on the number of selection parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the table structure with an example.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;REQUEST    FIELDNAME SIGN  OPT  LOW      HIGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REQU_123   BUKRS             I     EQ    DE3 &lt;/P&gt;&lt;P&gt;REQU_123   FISCPER          I     BT     2005001  2005003   &lt;/P&gt;&lt;P&gt;REQU_987   BUKRS             I     EQ    CH15     &lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;For this reason a "Select.... for all entries" statement retrieves too much data. &lt;/P&gt;&lt;P&gt;  SELECT rnr fieldname iobjnm sign opt low high&lt;/P&gt;&lt;P&gt;        FROM rsseldone INTO CORRESPONDING FIELDS OF TABLE lt_rsseldone&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN it_ipak_selections&lt;/P&gt;&lt;P&gt;        WHERE  fieldname = it_ipak_selections-fieldname&lt;/P&gt;&lt;P&gt;         AND  iobjnm     = it_ipak_selections-iobjnm&lt;/P&gt;&lt;P&gt;         AND sign        = it_ipak_selections-sign&lt;/P&gt;&lt;P&gt;         AND opt         = it_ipak_selections-opt&lt;/P&gt;&lt;P&gt;         AND low         = it_ipak_selections-low&lt;/P&gt;&lt;P&gt;         AND high        = it_ipak_selections-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know an efficient way to select the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2006 16:42:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-06T16:42:04Z</dc:date>
    <item>
      <title>Select from generic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779296#M335979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an internal table containing selection parameters determined at run-time.&lt;/P&gt;&lt;P&gt;eg. it_ipak_selections contains the entries.....&lt;/P&gt;&lt;P&gt;FIELDNAME    SIGN OPT  LOW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FISCVARNT     I        EQ    K4                                                &lt;/P&gt;&lt;P&gt;FISCPER         I        EQ    2006011                                          &lt;/P&gt;&lt;P&gt;RBUKRS          I        EQ   CH15                                              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using these entries I need to retrieve entries from database table rsseldone.  &lt;/P&gt;&lt;P&gt;This (BW) table contains requests based on selection parameters.  &lt;/P&gt;&lt;P&gt;Unfortunately the table structure is generic, field Fieldname can contain any selection parameter e.g. 'BUKRS'. and for one request there can be 'N' entries, depending on the number of selection parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the table structure with an example.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;REQUEST    FIELDNAME SIGN  OPT  LOW      HIGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REQU_123   BUKRS             I     EQ    DE3 &lt;/P&gt;&lt;P&gt;REQU_123   FISCPER          I     BT     2005001  2005003   &lt;/P&gt;&lt;P&gt;REQU_987   BUKRS             I     EQ    CH15     &lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;For this reason a "Select.... for all entries" statement retrieves too much data. &lt;/P&gt;&lt;P&gt;  SELECT rnr fieldname iobjnm sign opt low high&lt;/P&gt;&lt;P&gt;        FROM rsseldone INTO CORRESPONDING FIELDS OF TABLE lt_rsseldone&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN it_ipak_selections&lt;/P&gt;&lt;P&gt;        WHERE  fieldname = it_ipak_selections-fieldname&lt;/P&gt;&lt;P&gt;         AND  iobjnm     = it_ipak_selections-iobjnm&lt;/P&gt;&lt;P&gt;         AND sign        = it_ipak_selections-sign&lt;/P&gt;&lt;P&gt;         AND opt         = it_ipak_selections-opt&lt;/P&gt;&lt;P&gt;         AND low         = it_ipak_selections-low&lt;/P&gt;&lt;P&gt;         AND high        = it_ipak_selections-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know an efficient way to select the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 16:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779296#M335979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T16:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select from generic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779297#M335980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Move the selection to individual ranges and do a 'in' in the where clause and remove 'for all entries'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Suman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 21:31:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779297#M335980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T21:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select from generic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779298#M335981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suman,&lt;/P&gt;&lt;P&gt;I did a quick test with what you suggested as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT rnr fieldname iobjnm sign opt low high&lt;/P&gt;&lt;P&gt;        FROM rsseldone INTO CORRESPONDING FIELDS OF table lt_rsseldone&lt;/P&gt;&lt;P&gt;        WHERE  fieldname in  r_fieldname &lt;/P&gt;&lt;P&gt;          AND low         in r_low.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I misunderstood your suggestion but as it is above, I´m afraid that won´t work since an entry with selection parameters BUKRS = CH15 will be retreived from the table but which doesn´t necessary have the date as 2006011.  I need only the entries that satisfy all the selection parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Rod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 13:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779298#M335981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T13:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select from generic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779299#M335982</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;Your code will work perfectly. Please do the following modification?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If it_ipak_selections[] is not initial.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT rnr fieldname iobjnm sign opt low high&lt;/P&gt;&lt;P&gt;FROM rsseldone INTO TABLE lt_rsseldone&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_ipak_selections&lt;/P&gt;&lt;P&gt;WHERE fieldname = it_ipak_selections-fieldname&lt;/P&gt;&lt;P&gt;AND iobjnm = it_ipak_selections-iobjnm&lt;/P&gt;&lt;P&gt;AND sign = it_ipak_selections-sign&lt;/P&gt;&lt;P&gt;AND opt = it_ipak_selections-opt&lt;/P&gt;&lt;P&gt;AND low = it_ipak_selections-low&lt;/P&gt;&lt;P&gt;AND high = it_ipak_selections-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If still not working please let me know. I will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CORRESPONDING FIELDS clause won't work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bhupal Reddy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Bhupal Reddy Vendidandi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 13:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-from-generic-table/m-p/1779299#M335982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T13:29:38Z</dc:date>
    </item>
  </channel>
</rss>

