<?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 Table Select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210585#M133375</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 declared a Field symbol &amp;lt;compare_field&amp;gt; type c.&lt;/P&gt;&lt;P&gt;I have then assigned a char(10) input field to this&lt;/P&gt;&lt;P&gt;field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am now facing is I am trying to select&lt;/P&gt;&lt;P&gt;from the table KNA1 for the matching customer no.&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;  SELECT SINGLE *&lt;/P&gt;&lt;P&gt;    FROM&lt;/P&gt;&lt;P&gt;         kna1&lt;/P&gt;&lt;P&gt;   WHERE&lt;/P&gt;&lt;P&gt;         kunnr = &amp;lt;compare_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. Customer No held on KNA1 Table is '0002000001'&lt;/P&gt;&lt;P&gt;My &amp;lt;compare_field&amp;gt; doesn't contain leading zeroes, it&lt;/P&gt;&lt;P&gt;has '2000001' stored in it. As a consequence it is saying&lt;/P&gt;&lt;P&gt;that the customer does not exists in the above statement, &lt;/P&gt;&lt;P&gt;when it clearly does. But if through SE11 I enter 2000001&lt;/P&gt;&lt;P&gt;the customer appears.&lt;/P&gt;&lt;P&gt;Can anyone explain this to me.&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, 13 Mar 2006 14:34:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-13T14:34:58Z</dc:date>
    <item>
      <title>Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210585#M133375</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 declared a Field symbol &amp;lt;compare_field&amp;gt; type c.&lt;/P&gt;&lt;P&gt;I have then assigned a char(10) input field to this&lt;/P&gt;&lt;P&gt;field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am now facing is I am trying to select&lt;/P&gt;&lt;P&gt;from the table KNA1 for the matching customer no.&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;  SELECT SINGLE *&lt;/P&gt;&lt;P&gt;    FROM&lt;/P&gt;&lt;P&gt;         kna1&lt;/P&gt;&lt;P&gt;   WHERE&lt;/P&gt;&lt;P&gt;         kunnr = &amp;lt;compare_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. Customer No held on KNA1 Table is '0002000001'&lt;/P&gt;&lt;P&gt;My &amp;lt;compare_field&amp;gt; doesn't contain leading zeroes, it&lt;/P&gt;&lt;P&gt;has '2000001' stored in it. As a consequence it is saying&lt;/P&gt;&lt;P&gt;that the customer does not exists in the above statement, &lt;/P&gt;&lt;P&gt;when it clearly does. But if through SE11 I enter 2000001&lt;/P&gt;&lt;P&gt;the customer appears.&lt;/P&gt;&lt;P&gt;Can anyone explain this to me.&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, 13 Mar 2006 14:34:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210585#M133375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T14:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210586#M133376</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;KUNNR is a CHAR length 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and '   2000001' is different from '0002000001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so declare your field-symbols as type CHAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgd&lt;/P&gt;&lt;P&gt;Frédéric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 14:37:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210586#M133376</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2006-03-13T14:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210587#M133377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Andy,&lt;/P&gt;&lt;P&gt; Use the fm CONVERSION_EXIT_ALPHA_INPUT before you use that var in the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;     exporting input = &amp;lt;compare_field&amp;gt;&lt;/P&gt;&lt;P&gt;     importing output = &amp;lt;compare_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;kna1&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;kunnr = &amp;lt;compare_field&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 14:37:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210587#M133377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T14:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210588#M133378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Automatic conversion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The reason is the field which is ASSIGNED to field symbol&lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;is declared as type c,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  hence, automatic conversion&lt;/P&gt;&lt;P&gt;  (ie. adding zeroes to the left when fetching from sql)&lt;/P&gt;&lt;P&gt;   does not happen AUTOMATICALLY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. so that EXACT MATCH is not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&amp;lt;b&amp;gt; If the original field is declared&lt;/P&gt;&lt;P&gt;   like KNA1-KUNNR,&lt;/P&gt;&lt;P&gt;  THEN IT WILL WORK FANTASTIC.&lt;/P&gt;&lt;P&gt;  &amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*------- SEE THIS CODE - JUST COPY PASTE AND TRY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : a LIKE kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*PARAMETERS : a(10) TYPE C. "&amp;lt;---- WON'T WORK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : kna1 LIKE TABLE OF kna1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;abc&amp;gt; LIKE kna1-kunnr.&lt;/P&gt;&lt;P&gt;ASSIGN a TO &amp;lt;abc&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM kna1&lt;/P&gt;&lt;P&gt;INTO TABLE&lt;/P&gt;&lt;P&gt;kna1 WHERE kunnr = &amp;lt;abc&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Amit Mittal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 14:38:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210588#M133378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T14:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210589#M133379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did u try casting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign char to &amp;lt;compare_field&amp;gt; casting .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 14:39:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210589#M133379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T14:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210590#M133380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;  Before going to select,pass the feld symbol value to the FM CONVERSION_EXIT_ALPHA_INPUT,which will add the leading zeros to the field value.&lt;/P&gt;&lt;P&gt;The reason why the table selects the values in SE11 if you enter without zeros is it has the conversion inbuilt.You can see that if you go to the DOMAIN of the KUNNR.If you see the definition of the domain,there exists a Conversion routine field which has value as ALPHA.If you double click you will know the FM used in the background when you check for the values in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phani Kiran Nudurupati&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 14:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210590#M133380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T14:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210591#M133381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could use the function module 'CONVERSION_EXIT_ALPHA_INPUT'. Should solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Wolfgang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 14:39:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210591#M133381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table Select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210592#M133382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys for you help, much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the FM 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;as suggested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2006 15:13:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-select/m-p/1210592#M133382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-13T15:13:52Z</dc:date>
    </item>
  </channel>
</rss>

