<?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: Error in collect statement(non-key fields must be numeric)... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414957#M1048920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of my non-key fields are of type ANBTR which is a currency datatype. I declared my field-symbols as the work area for my internal table(LIKE LINE OF ITAB).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2008 04:18:32 GMT</pubDate>
    <dc:creator>aris_hidalgo</dc:creator>
    <dc:date>2008-09-16T04:18:32Z</dc:date>
    <item>
      <title>Error in collect statement(non-key fields must be numeric)...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414955#M1048918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Error in collect statement(non-key fields must be numeric)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created an internal table based from a ztable. The structure of the ztable is&lt;/P&gt;&lt;P&gt;as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. MANDT -&amp;gt; PRIMARY KEY&lt;/P&gt;&lt;P&gt;2. BUKRS -&amp;gt; PRIMARY KEY&lt;/P&gt;&lt;P&gt;3. TXK50 -&amp;gt; PRIMARY KEY&lt;/P&gt;&lt;P&gt;4. ANLKL -&amp;gt; PRIMARY KEY&lt;/P&gt;&lt;P&gt;5. KTANSW -&amp;gt; PRIMARY KEY&lt;/P&gt;&lt;P&gt;6. KOSTL  -&amp;gt; PRIMARY KEY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the remainder of the fields(around 8 fields) are currency data types(ANBTR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An error is showing saying 'You can only use the collect command in a table if all of its non-key&lt;/P&gt;&lt;P&gt;fields are numeric(type I,P or F).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched the forum and it said that non-keys must be numeric in order for the&lt;/P&gt;&lt;P&gt;collect command to work. But all of my primary keys are non-numeric. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS-DATA: gt_output_acq TYPE hashed TABLE OF zsd_output_acq
                              WITH UNIQUE KEY bukrs txk50 anlkl
                                              ktansw kostl,
                gt_output_ret LIKE gt_output_acq,
                wa_output_gen LIKE LINE OF gt_output_acq,
                gt_output_net TYPE HASHED TABLE OF zsd_output_net
                              WITH UNIQUE KEY bukrs txk50 anlkl
                                              ktansw kostl,
                wa_output_net LIKE LINE OF gt_output_net,
                gt_sort_crit  TYPE SORTED TABLE OF t_sort_crit
                              WITH NON-UNIQUE KEY bukrs kostl,
                wa_sort_crit  LIKE LINE OF gt_sort_crit.

FIELD-SYMBOLS: &amp;lt;fs_output_acq&amp;gt; LIKE LINE OF gt_output_acq,
                   &amp;lt;fs_output_ret&amp;gt; LIKE LINE OF gt_output_ret,
                   &amp;lt;fs_output_net&amp;gt; LIKE LINE OF gt_output_net.

COLLECT &amp;lt;fs_output_acq&amp;gt; INTO gt_output_acq.	"Here is the error
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2008 04:03:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414955#M1048918</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2008-09-16T04:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error in collect statement(non-key fields must be numeric)...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414956#M1048919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is not with the key fields. it is with the non keyfields which are numeric one.&lt;/P&gt;&lt;P&gt;since you are using field-symbols it is giving that error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it depends on how you defined the field-symbols.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2008 04:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414956#M1048919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-16T04:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error in collect statement(non-key fields must be numeric)...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414957#M1048920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of my non-key fields are of type ANBTR which is a currency datatype. I declared my field-symbols as the work area for my internal table(LIKE LINE OF ITAB).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2008 04:18:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414957#M1048920</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2008-09-16T04:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error in collect statement(non-key fields must be numeric)...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414958#M1048921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how you defined the internal table..?&lt;/P&gt;&lt;P&gt;can you show that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2008 04:26:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414958#M1048921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-16T04:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error in collect statement(non-key fields must be numeric)...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414959#M1048922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS-DATA: gt_output_acq TYPE hashed TABLE OF zsd_output_acq
                              WITH unique KEY bukrs txk50 anlkl
                                              ktansw kostl,
                gt_output_ret LIKE gt_output_acq,
                wa_output_gen LIKE LINE OF gt_output_acq,
                gt_output_net TYPE hashed TABLE OF zsd_output_net
                              WITH unique KEY bukrs txk50 anlkl
                                              ktansw kostl,
                wa_output_net LIKE LINE OF gt_output_net,
                gt_sort_crit  TYPE SORTED TABLE OF t_sort_crit
                              WITH NON-UNIQUE KEY bukrs kostl,
                wa_sort_crit  LIKE LINE OF gt_sort_crit.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2008 04:33:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-collect-statement-non-key-fields-must-be-numeric/m-p/4414959#M1048922</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2008-09-16T04:33:51Z</dc:date>
    </item>
  </channel>
</rss>

