<?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: abt char to numeric conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564854#M857923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what i want , for example ,&lt;/P&gt;&lt;P&gt;we ahve inserted  1 then 12 then 3 &lt;/P&gt;&lt;P&gt;so value will be 1 , 12 , 3 , n when we are selecting by selection screen from 1 to 12 dat will show only 1 to 12 , 3 will not there i want 3 should also be there based on selection.&lt;/P&gt;&lt;P&gt;reply plz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2008 13:39:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-31T13:39:33Z</dc:date>
    <item>
      <title>abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564853#M857922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a field named bcode in data base that is of char length 3 , i want 1 to 10 insert in dat field, is it possible , i know yes , so tell me dat field is behaving like character when i m selecting values from selection screen , what i want when i m entering 1 to 7 it should show only then as a numeric field do , how we can do dat? tell me in details?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:27:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564853#M857922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564854#M857923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what i want , for example ,&lt;/P&gt;&lt;P&gt;we ahve inserted  1 then 12 then 3 &lt;/P&gt;&lt;P&gt;so value will be 1 , 12 , 3 , n when we are selecting by selection screen from 1 to 12 dat will show only 1 to 12 , 3 will not there i want 3 should also be there based on selection.&lt;/P&gt;&lt;P&gt;reply plz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 13:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564854#M857923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T13:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564855#M857924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;reply plzzzzzzzzzz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 14:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564855#M857924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T14:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564856#M857925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd be delighted to help, but I do not understand what you are asking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 14:30:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564856#M857925</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-03-31T14:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564857#M857926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then sort them before selecting so that u can get 3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 14:32:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564857#M857926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T14:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564858#M857927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DAT FIELD IS CHARACTER SO SORTING CANT HELP THERE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 15:16:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564858#M857927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T15:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564859#M857928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI I M REPEATING MY QUESTION , HERE DAT , I HAVE A FIELD OF CHAR LENGTH 3 ,&lt;/P&gt;&lt;P&gt;NOW I HAVE ADDED 3 VALUES 1 , 12, 3 TO DAT FIELD IN THE DATABASE, &lt;/P&gt;&lt;P&gt;NOW I M SELECTING VALUE THROUGH THE SELECTION SCREEN N &lt;/P&gt;&lt;P&gt;I M SELECTING ALL THE VALUES BETWEEN 1 TO 12 , SO &lt;/P&gt;&lt;P&gt;IT SHOULD ALSO SHOW 3 INSIDE THE VALUSE ,&lt;/P&gt;&lt;P&gt;BUT DAT IS NOT HAPPENING , BCOZ IT WAS A CHARACTER FIELD SO IT IS SHOWING 1 N 12 ,&lt;/P&gt;&lt;P&gt;SO I WANT TO KNOW HOW CAN WE SOLVE DAT PRB , &lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 15:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564859#M857928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T15:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564860#M857929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;reply plz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 08:55:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564860#M857929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T08:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564861#M857930</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 have a data type Character in database.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:  t_test(12) type c,
         n(10) type n.
         n = t_test.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can assign character to numerical value.&lt;/P&gt;&lt;P&gt;Create one internal table with a single field &lt;/P&gt;&lt;P&gt;n(10) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at the database table and insert all the values of the character field from the database table to the character field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then select based on the other internal table . Give condition like \&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your database table field name = internal table field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandipan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 09:11:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564861#M857930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T09:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564862#M857931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I understand now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;SO IT SHOULD ALSO SHOW 3 INSIDE THE VALUSE ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, it shouldn't.  You're data types are wrong.  The problem you've got is the sort order of your data - it is alpha sorting, not numeric.  It's the same as if you'd put A, AB and C into the database.  If you then select A to AB, you won't get C. ( 1 to 12, you won't get 3 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine you have something like this for your selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: num TYPE c LENGTH 3.

SELECT-OPTIONS s_num FOR num.

AT SELECTION-SCREEN ON s_num.

  IF s_num CN ' 0123456789'.
    MESSAGE e000(s1) WITH 'Numerics only'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best course of action is change your datatypes in the database, to match the data being held. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 09:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564862#M857931</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-04-01T09:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564863#M857932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI MAtt, thanks for ur suggestion , i got ur point but problem is not solved , the database we cant change that is the requirement , so we will have to take character s only , so tell me any other solution , u got right same is happening its taking alpha numeric sorting , so solve plz if possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 09:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564863#M857932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T09:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: abt char to numeric conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564864#M857933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then follow Sandipan Ghosh's suggestion above.  Read the database table into an internal table, convert the character numeric data to integer.  Change your select option to be integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a table, e.g. z_numtab, with two fields - CH3 type CHAR 3, and INT type INT1.  Populate it with all the numbers 0-999.  Then use it to convert the select option to a series of equalities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: num TYPE c LENGTH 3,
      int TYPE i.

DATA: lt_numtab TYPE STANDARD TABLE OF z_numtab.

SELECT-OPTIONS: s_num FOR num.

RANGES: r_num FOR i.

FIELD-SYMBOLS: &amp;lt;ls_numtab&amp;gt; TYPE z_numtab.

AT SELECTION-SCREEN..

  LOOP AT s_num.
    IF s_num-low CN ' 0123456789' OR s_num-high CN ' 0123456789'.
      MESSAGE e000(s1) WITH 'Numerics only'.
    ENDIF.
  ENDLOOP.

START-OF-SELECTION.

  LOOP AT s_num.
    r_num-option = s_num-option.
    r_num-sign   = s_num-sign.
    r_num-low    = s_num-low.
    r_num-high   = s_num-high.
    APPEND r_num.
  ENDLOOP.

  SELECT * FROM z_numtab INTO TABLE lt_numtab WHERE int IN r_num.

  REFRESH s_num.

  s_num-sign = 'I'.
  s_num-option = 'EQ'.
  LOOP AT lt_numtab ASSIGNING &amp;lt;ls_numtab&amp;gt;.
    s_num-low = &amp;lt;ls_numtab&amp;gt;-ch3.
  ENDLOOP.

  SELECT * FROM dbtab INTO TABLE lt_dbtab WHERE bcode IN s_num.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 09:36:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abt-char-to-numeric-conversion/m-p/3564864#M857933</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-04-01T09:36:14Z</dc:date>
    </item>
  </channel>
</rss>

