<?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: value conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758015#M328239</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;Goto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;system-&amp;gt;user profile-&amp;gt;own data-&amp;gt; dafault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you choose the decimal notation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Navneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2007 14:48:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-02T14:48:29Z</dc:date>
    <item>
      <title>value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758010#M328234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a problem with net price conversion &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;b&amp;gt;v_per = ( v_bpumz1 / v_bpumn1 ) * ( v_netpr1 / v_peinh1 ).&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;the value v_netpr1 is getting 1000 instead of 10,00 so the caluculation is getting wrong, its printing up 500 instead of 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_netpr(80) type c,&lt;/P&gt;&lt;P&gt;        v_peinh(80) type c,&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;        v_bpumz(80) type c,&lt;/P&gt;&lt;P&gt;        v_bpumn(80) type c,&lt;/P&gt;&lt;P&gt;*End of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;        v_netpr1(13) type p decimals 2,&lt;/P&gt;&lt;P&gt;        v_peinh1(13) type n,&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;        v_bpumz1(13) type n,&lt;/P&gt;&lt;P&gt;        v_bpumn1(13) type n,&lt;/P&gt;&lt;P&gt;*End of changes GGUPTA.&lt;/P&gt;&lt;P&gt;        v_per(13) type p decimals 2.&lt;/P&gt;&lt;P&gt;  constants: c_usd(3) type c value 'USD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: v_netpr, v_peinh,v_per.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Net Price&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  READ TABLE in_par INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     v_netpr = in_par-value.&lt;/P&gt;&lt;P&gt;*remove the commas&lt;/P&gt;&lt;P&gt;     REPLACE ALL OCCURRENCES OF ',' IN v_netpr WITH ''.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Per&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  READ TABLE in_par INDEX 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    v_peinh = in_par-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;  READ TABLE in_par INDEX 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    v_bpumz = in_par-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE in_par INDEX 4.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    v_bpumn = in_par-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;*End of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  condense: v_netpr, v_peinh,&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;            v_bpumz, v_bpumn.&lt;/P&gt;&lt;P&gt;*End of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write v_netpr to v_netpr1.&lt;/P&gt;&lt;P&gt;  write v_peinh to v_peinh1.&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;  write v_bpumz to v_bpumz1.&lt;/P&gt;&lt;P&gt;  write v_bpumn to v_bpumn1.&lt;/P&gt;&lt;P&gt;*End of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;v_per = v_netpr1 / v_peinh1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  v_per = ( v_bpumz1 / v_bpumn1 ) * ( v_netpr1 / v_peinh1 ).&lt;/P&gt;&lt;P&gt;*End of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending Per info back&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  READ TABLE out_par  INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*Begin of changes by GGUPTA.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRITE v_PER currency c_usd left-justified TO out_par-value.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE v_PER currency c_usd left-justified TO out_par-value.&lt;/P&gt;&lt;P&gt;*End of changes by GGUPTA.&lt;/P&gt;&lt;P&gt;    MODIFY out_par INDEX 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758010#M328234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758011#M328235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out if &amp;lt;b&amp;gt;Fixed Point Arithmetic&amp;lt;/b&amp;gt;  check box is  checked in the program attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto Se38--Program name --&amp;gt;display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the menu&lt;DEL&gt;&amp;gt;attributes&lt;/DEL&gt;&amp;gt;Fixed Point Arithmetic  checkbox&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mark this checkbox, all caluculations in the program will use fixed point arithmetic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not, packed numbers (ABAP/4 type P, Dictionary types CURR, DEC or QUAN) will be treated as integers when they are used in assignments, comparisons and calculations, irrespective of the number of decimal places defined. Intermediate results in arithmetic calculations will also be rounded to the next whole number. The number of decimal places defined is only taken into account when you output the answer using the WRITE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Chandrasekhar Jagarlamudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:35:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758011#M328235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758012#M328236</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;Check the line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURRENCES OF ',' IN v_netpr WITH ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here 10,00(Ten) gets converted to 10 00 and after condensing it, the value becomes 1000(Thousand) and not 10(Ten).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you are moving the value to v_netpr1, you are sending one thousand and not ten.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Navneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:37:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758012#M328236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758013#M328237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi naveent know i am getting proper output as 5,00 but i need output as 5.00 can u help me out in this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758013#M328237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758014#M328238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Chaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the data declaration area, please don't use direct types like N, C instead declare like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  V_NETPR   LIKE    EKPO-NETPR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all the variables do it this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a particular field always goto SE11 --&amp;gt; Enter Table Name : EKPO ---&amp;gt; &lt;/P&gt;&lt;P&gt;Search the field for e.g. NETPR ---&amp;gt; Goto the data element : BPREI&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&amp;gt; Goto the Domain : WERT11 --&amp;gt; Double Click on it ---&amp;gt; You'll see the Output Length is 14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats why its always recommended to keep it the same as used by SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Don't forget to award Points *&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="36" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758014#M328238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758015#M328239</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;Goto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;system-&amp;gt;user profile-&amp;gt;own data-&amp;gt; dafault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you choose the decimal notation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Navneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758015#M328239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: value conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758016#M328240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am getting properly in abap debugging as 5.00,when its moving to sap script while displaying its converting to 5,00&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 14:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/value-conversion/m-p/1758016#M328240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T14:59:43Z</dc:date>
    </item>
  </channel>
</rss>

