<?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: conversion overflow: quan and string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506153#M233899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to decide what value you want to end up in the quantity field.  How many decimals places, if any.  Then we can look for a way to handle it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2006 13:42:05 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-08-14T13:42:05Z</dc:date>
    <item>
      <title>conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506148#M233894</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 have a method with an exporting parameter of type QUAN, lenghth 9. How do i store the value of a local variable of type STRING into the export parameter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rachita.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506148#M233894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T13:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506149#M233895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the PACK command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PACK lstr to lquant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:10:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506149#M233895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T13:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506150#M233896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can just move it.  But there must only be numeric values in the string.  What is the value in the string when you are moving to the other field when you are getting the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:13:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506150#M233896</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-14T13:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506151#M233897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value in the local variable of type string is 2151521545.33333333333333. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rachita.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506151#M233897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T13:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506152#M233898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt; the value given by you is a 10 digit numeric &amp;amp; morethan 10 as decimals. if you move this to a 9digit numeric, definitely values will be trucated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so try to redefine your export parameter length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use CEIL or FLOOR command, to round off the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:33:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506152#M233898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T13:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506153#M233899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to decide what value you want to end up in the quantity field.  How many decimals places, if any.  Then we can look for a way to handle it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:42:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506153#M233899</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-14T13:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506154#M233900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, if you want just the whole number with no decimals, the your quantity field must be at least a length of 6 TYPE P field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001.

data: q(6) type p.
data: str type string.

str = '2151521545.33333333333333'.

clear q.
q =  str .

write:/ q.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output here is ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2151521545    &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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:45:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506154#M233900</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-14T13:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: conversion overflow: quan and string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506155#M233901</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;Since my exp variable is of type QUAN of length 9 only, I want max first 9 difits to be populated from the local variable of string type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did the following:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: q(6) type p,&lt;/P&gt;&lt;P&gt;      ex type &amp;lt;data_element QUAN (9)&amp;gt;.&lt;/P&gt;&lt;P&gt;data: str type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str = '2151521545.33333333333333'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear q.&lt;/P&gt;&lt;P&gt;q =  str(9).&lt;/P&gt;&lt;P&gt;ex = q.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this raises an exception RANGE OUT OF BOUNDS if the value in str is 0. How do I just pick up the first 9 digits whatever be the length or any no of decimal places?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rachita.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 14:35:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-overflow-quan-and-string/m-p/1506155#M233901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T14:35:17Z</dc:date>
    </item>
  </channel>
</rss>

