<?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: Curency conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182953#M1624441</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;You have to know that currency amounts are always stored right-aligned in packed fields, whatever the number of real digits after the decimal point. For instance, 1000 JPY (Japanese Yen) is stored technically 10,00 in WRBTR !!! (WRBTR has technically 2 digits after the decimal point, while JPY has 0 decimals defined in table T005X). But when the amount is output, as it must always be related to a currency code field, SAP moves the decimal point to output "1000".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information, see : [SAP note 153707 (Currency translation miscalculates by 100, 1000..)|https://service.sap.com/sap/support/notes/153707], WRITE ... CURRENCY ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm not aware of any currency code with 6 digits after the decimal point. Does it really exist?, I thought the max was 3 or 4? even BAPIs are built for 4 maximum. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2011 08:37:31 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2011-08-19T08:37:31Z</dc:date>
    <item>
      <title>Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182949#M1624437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I need to convert a currency filed with 6 digits say 124.565127 to a Packed Decimal field, I am not able  to get the desired output for instance if I have variablelike:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: V_VAR TYPE WRBTR VALUE u2018124.565127u2019.,&lt;/P&gt;&lt;P&gt;          V_VAR1(4)  TYPE P DECIMALS 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to move the V_VAR to V_VAR1 i.e. the V_VAR1 is getting rounded Like 124.57.Also I need the currency field  to be converted to packed decimal filed with 6 decimal places and  then I need to round off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Meenakshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 14:48:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182949#M1624437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T14:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182950#M1624438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WRBTR is defined as having only 2 decimal places so your value is rounded up there and maintains that rounded value when you move it to a field with 6 decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 15:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182950#M1624438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182951#M1624439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you mean V_VAR1(4) TYPE P DECIMALS 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_VAR(15) type &lt;STRONG&gt;p decimals 6&lt;/STRONG&gt; value  u2018124.565127u2019,&lt;/P&gt;&lt;P&gt; V_VAR1(15) type p decimals 6,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_var1 = v_var will give you 124.565127.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you define v_var1 as (15) type p decimals 2, &lt;/P&gt;&lt;P&gt;v_var1 = v_var should give you 124.57.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: DaveL on Aug 18, 2011 6:23 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 16:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182951#M1624439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-18T16:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182952#M1624440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply, but i need a curency field to be moved to pakced field like the one below.Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_var1 type wrbtr value '14.235645'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Meenakshi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 08:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182952#M1624440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-19T08:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182953#M1624441</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;You have to know that currency amounts are always stored right-aligned in packed fields, whatever the number of real digits after the decimal point. For instance, 1000 JPY (Japanese Yen) is stored technically 10,00 in WRBTR !!! (WRBTR has technically 2 digits after the decimal point, while JPY has 0 decimals defined in table T005X). But when the amount is output, as it must always be related to a currency code field, SAP moves the decimal point to output "1000".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information, see : [SAP note 153707 (Currency translation miscalculates by 100, 1000..)|https://service.sap.com/sap/support/notes/153707], WRITE ... CURRENCY ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm not aware of any currency code with 6 digits after the decimal point. Does it really exist?, I thought the max was 3 or 4? even BAPIs are built for 4 maximum. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 08:37:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182953#M1624441</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-08-19T08:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182954#M1624442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sandra,  but we do have some currency fields(Values) where it is geetting displayed to 6 decimals for USD,like 14.2564417 and that needs to be rounded off to the nearest decimal place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Meenakshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 14:17:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182954#M1624442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-19T14:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Curency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182955#M1624443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Meenakshi,&lt;/P&gt;&lt;P&gt;I can understand what you say, but your first post has misleaded everybody (of course the amount is rounded off to 2 decimals if you store your number in a 2 decimals field)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14.2564417 and that needs to be rounded off to the nearest decimal place&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Could you update the following example and tell us what you want exactly?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA source TYPE p LENGTH 6 DECIMALS 7 value '14.2564417'.
DATA target TYPE p LENGTH 6 DECIMALS 6.
target = source. "half-up rounding to 6 decimals
WRITE target. "writes 14.256442
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 15:50:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/curency-conversion/m-p/8182955#M1624443</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-08-19T15:50:15Z</dc:date>
    </item>
  </channel>
</rss>

