<?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: Question about  a Select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825634#M1470757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, Why dont you define the type columns as d &amp;amp; e, and use the keyword "MOVE CORRESPONDING FIELDS OT &amp;lt;ITAB&amp;gt; in select statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Apr 2010 11:30:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-07T11:30:53Z</dc:date>
    <item>
      <title>Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825632#M1470755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lets supose I have an internal table (itab) with this structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a Type c&lt;/P&gt;&lt;P&gt;b Type c&lt;/P&gt;&lt;P&gt;c Type c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then I want to make this select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT d e FROM example
           INTO table itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but supose the &lt;STRONG&gt;a&lt;/STRONG&gt; field corresponds to &lt;STRONG&gt;d&lt;/STRONG&gt; and &lt;STRONG&gt;c&lt;/STRONG&gt; corresponds to &lt;STRONG&gt;e&lt;/STRONG&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there anyway to do something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT d blank e FROM example
           INTO table itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that my internal table stays correctly filled?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825632#M1470755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825633#M1470756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well since type is same for a b c so cant use corresponding fields either so i dont think u hv any option&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:28:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825633#M1470756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825634#M1470757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, Why dont you define the type columns as d &amp;amp; e, and use the keyword "MOVE CORRESPONDING FIELDS OT &amp;lt;ITAB&amp;gt; in select statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:30:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825634#M1470757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825635#M1470758</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;i think we cant give black in between,&lt;/P&gt;&lt;P&gt;but use corresponing field and i think that should work if both a and d (and c and e) have same data element.&lt;/P&gt;&lt;P&gt;SELECT d  e FROM example&lt;/P&gt;&lt;P&gt;           INTO corresponding field of table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;tanmaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:31:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825635#M1470758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825636#M1470759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An array fetch (into table itab) will fill the first two rows.  Why build an internal table that doesn't match what you're selecting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825636#M1470759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825637#M1470760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my problem is because the &lt;STRONG&gt;a&lt;/STRONG&gt; and &lt;STRONG&gt;b&lt;/STRONG&gt; fields have the same name in their originating tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but have diferent meanings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:34:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825637#M1470760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825638#M1470761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What vinod says is correct, create a proper internal table with the fields you are selecting, that would be simple. &lt;/P&gt;&lt;P&gt;Anothe solution is given by Kartik here you need to be little intelligent, here you wont get any error as data field type and size is same but problem occur for b as e will be stored in b. So you need to handel it properly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825638#M1470761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825639#M1470762</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;One option is to use a work area. Something like;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT d e FROM example
             INTO (wa_itab-a, wa_itab-c).
append wa_itab to itab.
ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825639#M1470762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T11:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Question about  a Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825640#M1470763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this last answer solves it, but is not very optimized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tryed to make 2 different internal tables so that i could use the TO CORRESPONDENT FIELDS thingy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but then I cant dinamicaly change the table of my Control table, or can I ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ive made this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
  MODULE status_0200.
*
  MODULE select_tabelas.

  LOOP AT (tab) INTO (wa_tab) WITH CONTROL tcon.
    MODULE actualiza_tc.
  ENDLOOP.

PROCESS AFTER INPUT.

  LOOP AT (tab).
    MODULE actualiza_tabi.
  ENDLOOP.
  MODULE user_command_0200.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE select_tabelas OUTPUT.

  IF r1 = 'X'.
    tab = 'tabi'.
    wa_tab = 'wa_tabi'.
  ELSEIF r2 = 'X'.
    tab = 'tabi2'.
    wa_tab = 'wa_tabi2'.
  ENDIF.

ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and got this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Error analysis                                                                  &lt;/P&gt;&lt;P&gt;     Program "ZSL_EX_3" was terminated.                                                                                &lt;/P&gt;&lt;P&gt;The following error occurred: (short text of error cause)                   &lt;/P&gt;&lt;P&gt;     "FX097: Internal table undefined."                                                                                &lt;/P&gt;&lt;P&gt;Affected:                                                                   &lt;/P&gt;&lt;P&gt;     Screen name..............."ZSL_EX_3"                                        &lt;/P&gt;&lt;P&gt;     Screen number.............0200                                                                                &lt;/P&gt;&lt;P&gt;This is an error that occurred during processing of an internal table in    &lt;/P&gt;&lt;P&gt;      conjunction with field or variable "(WA_TAB)".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 12:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-about-a-select/m-p/6825640#M1470763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-07T12:00:48Z</dc:date>
    </item>
  </channel>
</rss>

