<?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: SELECT .... INTO CORRESPONDING  - Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749633#M639396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the answer ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF equi_rec,&lt;/P&gt;&lt;P&gt;equnr, " Registration&lt;/P&gt;&lt;P&gt;herst, " Make&lt;/P&gt;&lt;P&gt;typbz, " Model&lt;/P&gt;&lt;P&gt;zzdept, " Department&lt;/P&gt;&lt;P&gt;zzoperator, " Operator&lt;/P&gt;&lt;P&gt;zzregdate, " Registration Date&lt;/P&gt;&lt;P&gt;END OF equi_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you declare like above, then all the fields will have Charecter type and length is 1, so the EQUNR, HERST and all other fields is charecter type then it is storing the first charecter in this Internal table, but the ZZREGDATE is the date field and it will not store the first charecter from the date field, because if you use the MOVE-CORRESPONDING then you need to write the same type, so that it is giving the dump ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after writing the TYPE for ZZREGDATE then the program will run properly, but all the fields will store only the first charecter from the table values, &lt;/P&gt;&lt;P&gt;you need to give the correct TYPE to all the fields from the data dictionary inorder to store the total value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for all the helpful answers&lt;/P&gt;&lt;P&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2007 14:38:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-17T14:38:09Z</dc:date>
    <item>
      <title>SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749625#M639388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following work areas and internal table defintion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF equi_rec,&lt;/P&gt;&lt;P&gt;           equnr,                  " Registration&lt;/P&gt;&lt;P&gt;           herst,                  " Make&lt;/P&gt;&lt;P&gt;           typbz,                  " Model&lt;/P&gt;&lt;P&gt;           zzdept,                 " Department&lt;/P&gt;&lt;P&gt;           zzoperator,             " Operator&lt;/P&gt;&lt;P&gt;           zzregdate,              " Registration Date&lt;/P&gt;&lt;P&gt;        END OF equi_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  equi_wa                   TYPE          equi_rec,&lt;/P&gt;&lt;P&gt;       equi_tab                  TYPE TABLE OF equi_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT *&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE equi_tab&lt;/P&gt;&lt;P&gt;    FROM&lt;/P&gt;&lt;P&gt;         equi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP is falling over at runtime. I have since found out that if&lt;/P&gt;&lt;P&gt;I comment out the ZZREGDATE in the EQUI_REC above, the program works. &lt;/P&gt;&lt;P&gt;The ZZREGDATE is defined as a date in the dicionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me why the program is falling over when I am trying to&lt;/P&gt;&lt;P&gt;move the date field??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much apprectaied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749625#M639388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749626#M639389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it shud work. check for the declaration and is the declaration valid in table aswell?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:12:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749626#M639389</guid>
      <dc:creator>prabhu_s2</dc:creator>
      <dc:date>2007-09-17T14:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749627#M639390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to assign the data dictonary types to the Internal table fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF equi_rec,&lt;/P&gt;&lt;P&gt;equnr type EQUNR, " Registration   " Here i assigned the EQUNR data element&lt;/P&gt;&lt;P&gt;herst, " Make&lt;/P&gt;&lt;P&gt;typbz, " Model&lt;/P&gt;&lt;P&gt;zzdept, " Department&lt;/P&gt;&lt;P&gt;zzoperator, " Operator&lt;/P&gt;&lt;P&gt;zzregdate, " Registration Date&lt;/P&gt;&lt;P&gt;END OF equi_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way, attach to all the fields&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:16:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749627#M639390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749628#M639391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u please paste ur code so that i can help u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;maheedhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749628#M639391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749629#M639392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In you types definition how are you defining zzregdate (i.e. TYPE, LIKE) ? Is it defined or referenced to a date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:18:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749629#M639392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749630#M639393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you specify the type of the fields in your table equi_rec?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
equinr      type table-equinr,
zzregdate type table-date
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And instead of using into corresponding field of table .... identify the fields you want to select which is more faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try your program again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:20:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749630#M639393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749631#M639394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for replying everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The strange thing is that I have a similar piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF viqmel_rec,&lt;/P&gt;&lt;P&gt;           aufnr,&lt;/P&gt;&lt;P&gt;           equnr,&lt;/P&gt;&lt;P&gt;           qmtxt,&lt;/P&gt;&lt;P&gt;           kunum,&lt;/P&gt;&lt;P&gt;       END OF viqmel_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  viqmel_wa                   TYPE          viqmel_rec,&lt;/P&gt;&lt;P&gt;       viqmel_tab                  TYPE TABLE OF viqmel_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if I write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT *&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE viqmel_tab&lt;/P&gt;&lt;P&gt;    FROM&lt;/P&gt;&lt;P&gt;         viqmel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now since found out that the problem is ZZREGDATE if I comment&lt;/P&gt;&lt;P&gt;out this in the table delcaration the program works. Why shoud it fail&lt;/P&gt;&lt;P&gt;on a date field??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749631#M639394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749632#M639395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ignore my last response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the solution by having to declare the field as a date&lt;/P&gt;&lt;P&gt;i.e.     ZZREGDATE     like equi-zzregdate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question now is Why do you have to define the date fields&lt;/P&gt;&lt;P&gt;and not the other fields???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:32:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749632#M639395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749633#M639396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the answer ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF equi_rec,&lt;/P&gt;&lt;P&gt;equnr, " Registration&lt;/P&gt;&lt;P&gt;herst, " Make&lt;/P&gt;&lt;P&gt;typbz, " Model&lt;/P&gt;&lt;P&gt;zzdept, " Department&lt;/P&gt;&lt;P&gt;zzoperator, " Operator&lt;/P&gt;&lt;P&gt;zzregdate, " Registration Date&lt;/P&gt;&lt;P&gt;END OF equi_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you declare like above, then all the fields will have Charecter type and length is 1, so the EQUNR, HERST and all other fields is charecter type then it is storing the first charecter in this Internal table, but the ZZREGDATE is the date field and it will not store the first charecter from the date field, because if you use the MOVE-CORRESPONDING then you need to write the same type, so that it is giving the dump ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after writing the TYPE for ZZREGDATE then the program will run properly, but all the fields will store only the first charecter from the table values, &lt;/P&gt;&lt;P&gt;you need to give the correct TYPE to all the fields from the data dictionary inorder to store the total value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for all the helpful answers&lt;/P&gt;&lt;P&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749633#M639396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT .... INTO CORRESPONDING  - Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749634#M639397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Top man Sudheer, many thanks for the explantion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2007 14:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-corresponding-internal-table/m-p/2749634#M639397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-17T14:42:04Z</dc:date>
    </item>
  </channel>
</rss>

