<?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: NETWR Length Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973322#M1339595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First let us knowIis SAP dividing the value by 100 or 1000 or any other value in your case?&lt;/P&gt;&lt;P&gt;Than we can put the logic to get the original value by simply multipying DB Value with that number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get the original value do any further calculation on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: mayank verdia on Aug 6, 2009 10:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2009 20:37:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-06T20:37:25Z</dc:date>
    <item>
      <title>NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973320#M1339593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with a VBRK-NETWR field. There are some currencies that SAP divides them by 100 or 1000 because they are too big to store in DB. When I retrieve those amounts, I have to make some calculations, lets say amount = netwr / exchange rate. &lt;/P&gt;&lt;P&gt;The problem is that I am using the value from the DB (the one that is divided by 100) and I need to use the original one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to retrieve the number, convert it to the original number (not dividing it by 100 or 1000 hardcoding it on the code) and use it for calculations? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do so with the WRITE amount CURRENCY cur statement, but this is useless for calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope my explanation is clear, if not, I will try to explain it in another way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks, &lt;/P&gt;&lt;P&gt;Ernesto Caballero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 14:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973320#M1339593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T14:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973321#M1339594</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 problem is that u must use write and the currency or if u use a ALV u must pass the currency in the amount value. u must not divide or multiply, that it not how it works. I'm working in Chile and the amounts value, such as netwr are stored in the table as divide by 100, but when i use those values in ALV or smartforms i must use the correct currency to show it.&lt;/P&gt;&lt;P&gt;so, dont worry about calculation, just at the moment to show the value, use the currency.&lt;/P&gt;&lt;P&gt;in alv use sth like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname       = 'AMOUNT_S'.
  ls_fieldcat-just = 'R'.
  ls_fieldcat-outputlen = '13'.
  ls_fieldcat-emphasize = 'C900'.
  ls_fieldcat-cfieldname = 'HWAER'.    " this contains the value of CLP
  ls_fieldcat-datatype = 'CURR'.
  ls_fieldcat-seltext_l = 'Debe'.
  ls_fieldcat-seltext_m = text-719.
  ls_fieldcat-seltext_s = text-720.
*  LS_FIELDCAT-REPTEXT_DDIC  = TEXT-440.
  ls_fieldcat-col_pos  = '9'.
  ls_fieldcat-row_pos = '1'.
  APPEND ls_fieldcat TO lt_fieldcat.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in smartforms&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
write wa_tabla-saldo_end to lv_saldo_end currency 'CLP'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 15:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973321#M1339594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T15:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973322#M1339595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First let us knowIis SAP dividing the value by 100 or 1000 or any other value in your case?&lt;/P&gt;&lt;P&gt;Than we can put the logic to get the original value by simply multipying DB Value with that number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get the original value do any further calculation on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: mayank verdia on Aug 6, 2009 10:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 20:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973322#M1339595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973323#M1339596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hell Miguel, thanks for your answer, however it is not working that way. Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amount         Doc Curr.      Exch. Rate       Local Curr in Euros    Valor that is in DB&lt;/P&gt;&lt;P&gt;100                 EUR                    1.0                          100                                  100&lt;/P&gt;&lt;P&gt;200                 EUR                    1.0                          200                                  200&lt;/P&gt;&lt;P&gt;62,745,470     HUF                  279.1185                 224,799                        2247.99&lt;/P&gt;&lt;P&gt;1000                EUR                    1.0                         1000                                1000&lt;/P&gt;&lt;P&gt;                                                                           -&lt;/P&gt;&lt;HR originaltext="-----------------------------------------" /&gt;&lt;P&gt;                                                           TOTAL =      226099                          3547.99&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the WRITE statement the value 224799 with currency HUF is shown correctly but when I want to calculate the total in Euros, it is using the values of the last column. those values are the ones stored in DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it is clear enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ernesto Caballero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 10:28:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973323#M1339596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T10:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973324#M1339597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Ernesto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U must be developing a smartform or a ALV report.&lt;/P&gt;&lt;P&gt;For smartform u have to declare the internal table field (NETWR) as a currency field under global definition--&lt;DEL&gt;&amp;gt;Currency/Quant.Fields.  with a refrence field which is a currency field (declared in global definition&lt;/DEL&gt;--&amp;gt;Global Data).&lt;/P&gt;&lt;P&gt;For ALV u have to declare the field as Currency in the field catalog i.e t_fieldcat-datatype = 'CURR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akash Rana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 11:50:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973324#M1339597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T11:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973325#M1339598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Akash, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not an ALV or Smartform, is a simple report with WRITE statemen which was not working and I received it. Because of what you say, I think the best option is do it again with ALV right? If doing so, you say this issue is going to be solved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ernesto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 11:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973325#M1339598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T11:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973326#M1339599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Ernesto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u r using a classical report or a alv then the value of netwr field will be printed as in the database if u do not perform any calculation, but if u use any currency or quantity field in smartform u have to declare the same as QTY or Currency which ever it belongs or in the output, numberof decimal place shifts 1 or 2 points in right.&lt;/P&gt;&lt;P&gt;For Classical report or ALV  the value of Netwr will be printed as it is in the database ( IF No calculation is done).&lt;/P&gt;&lt;P&gt;even in smartform if netwr field is declared as a currency field it will get printed same as in database in u will not declare the same decimal points will shift to right i.e if the value of netwr = 1233.14 it will show like 12331.40.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So finally i will advice you to do the same calculation which u were doing earlier because there is no such way to retrieve any data from database, because its already stored as a currency field in the database ( Refer to table VBRK, Data element NETWR Domain WERTV8 which shows that NETWR field is a currency field in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if u have any kind of such requirement to do some calculations on the Netwr you have to do the same, there is no other way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Dont go for an ALV report because u will get the same output as in the classical.&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;Akash Rana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 12:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973326#M1339599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T12:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973327#M1339600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the data type  WERTV13 instead of CURR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 08:38:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973327#M1339600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-08T08:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: NETWR Length Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973328#M1339601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody, thanks for all your approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found the solution. I used BAPI_CURRENCY_CONV_TO_EXTERNAL and it returns the correct value I need to do the calculations. As I said, I solved the issue with the WRITE statement but I needed this to calculate the total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ernesto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 15:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/netwr-length-issue/m-p/5973328#M1339601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-10T15:37:42Z</dc:date>
    </item>
  </channel>
</rss>

