<?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: Selecting fields from a dynamic table into dynamic internal table using dynamic where Clause in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-fields-from-a-dynamic-table-into-dynamic-internal-table-using/m-p/761601#M37035</link>
    <description>&lt;P&gt;There are few ways to achive this, i have one:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(ITAB) TYPE  CHAR30
*"     REFERENCE(IWHERE) TYPE  CHAR255
*"  EXPORTING
*"     REFERENCE(ET_RESULT) TYPE REF TO  DATA
*"----------------------------------------------------------------------
  FIELD-SYMBOLS &amp;lt;table&amp;gt; TYPE STANDARD TABLE.

  DATA(comp_tab1) = CAST cl_abap_structdescr( cl_abap_typedescr=&amp;gt;describe_by_name( itab ) )-&amp;gt;get_components( ).
  DATA(struct_type) = cl_abap_structdescr=&amp;gt;create( comp_tab1 ).
  DATA(table_type) = cl_abap_tabledescr=&amp;gt;create( struct_type ).

  CREATE DATA et_result TYPE HANDLE table_type.
  ASSIGN et_result-&amp;gt;* TO &amp;lt;table&amp;gt;.

  SELECT * FROM (itab) INTO TABLE &amp;lt;table&amp;gt; WHERE (iwhere).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Jan 2019 08:11:13 GMT</pubDate>
    <dc:creator>DoanManhQuynh</dc:creator>
    <dc:date>2019-01-24T08:11:13Z</dc:date>
    <item>
      <title>Selecting fields from a dynamic table into dynamic internal table using dynamic where Clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-fields-from-a-dynamic-table-into-dynamic-internal-table-using/m-p/761600#M37034</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;
  &lt;P&gt;My method has below parameters&lt;/P&gt;
  &lt;P&gt;Importing parameters&lt;/P&gt;
  &lt;P&gt;Iv_tabname of type tabname&lt;/P&gt;
  &lt;P&gt;Is_from_rec type any&lt;/P&gt;
  &lt;P&gt;Exporting parameter&lt;/P&gt;
  &lt;P&gt;ET_details type any&lt;/P&gt;
  &lt;P&gt;Is_from_ rec has some fields matching with Iv_tabname which would be dynamic . So Now my question is how do I formulate my where clause based on is_from_rec record and then pass the result of select query to my returning parameter ET_details&lt;/P&gt;
  &lt;P&gt;Select * from (iv_tabname) into table et_details where (is_from_rec)&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 04:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-fields-from-a-dynamic-table-into-dynamic-internal-table-using/m-p/761600#M37034</guid>
      <dc:creator>swati_mishra2</dc:creator>
      <dc:date>2019-01-24T04:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting fields from a dynamic table into dynamic internal table using dynamic where Clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-fields-from-a-dynamic-table-into-dynamic-internal-table-using/m-p/761601#M37035</link>
      <description>&lt;P&gt;There are few ways to achive this, i have one:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(ITAB) TYPE  CHAR30
*"     REFERENCE(IWHERE) TYPE  CHAR255
*"  EXPORTING
*"     REFERENCE(ET_RESULT) TYPE REF TO  DATA
*"----------------------------------------------------------------------
  FIELD-SYMBOLS &amp;lt;table&amp;gt; TYPE STANDARD TABLE.

  DATA(comp_tab1) = CAST cl_abap_structdescr( cl_abap_typedescr=&amp;gt;describe_by_name( itab ) )-&amp;gt;get_components( ).
  DATA(struct_type) = cl_abap_structdescr=&amp;gt;create( comp_tab1 ).
  DATA(table_type) = cl_abap_tabledescr=&amp;gt;create( struct_type ).

  CREATE DATA et_result TYPE HANDLE table_type.
  ASSIGN et_result-&amp;gt;* TO &amp;lt;table&amp;gt;.

  SELECT * FROM (itab) INTO TABLE &amp;lt;table&amp;gt; WHERE (iwhere).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jan 2019 08:11:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-fields-from-a-dynamic-table-into-dynamic-internal-table-using/m-p/761601#M37035</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-01-24T08:11:13Z</dc:date>
    </item>
  </channel>
</rss>

