<?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: ALV Currency problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057377#M1353447</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;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wrtite to ..Currency Stmt for all currency fileds and then populate into your final internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:         l_v_ansal TYPE ansal_15,         "  Annual salary
                 l_v_ansal1 TYPE char17,
                 l_v_ansal2 TYPE char17.

*Annual Salary-ANSAL
        l_v_ansal1        = l_wa_final-ansal.                             " Final Table currency filed
        WRITE l_v_ansal1 TO l_v_ansal2 LEFT-JUSTIFIED
        NO-GAP NO-GROUPING CURRENCY l_wa_final-ancur.     " Ancur is the Currency key for corresponding country
        MOVE l_v_ansal2 TO l_v_ansal.        " Annual salary
       l_wa_final-ansal = l_v_ansal.
       Append l_wa_final to i_final.
        CLEAR: l_v_ansal1, l_v_ansal2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be helpfull to you. I will support all country currency key. I used this in some of my developments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Babu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2009 15:16:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-10T15:16:38Z</dc:date>
    <item>
      <title>ALV Currency problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057374#M1353444</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 report which displays currency with the document no's in different currency formats based on the company code.&lt;/P&gt;&lt;P&gt;If i give Korean company code...i should not get the decimals in currency,&lt;/P&gt;&lt;P&gt;and if i give US company code,i should get the decimals in currency value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one suggest how can i go ahead to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 13:59:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057374#M1353444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-10T13:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Currency problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057375#M1353445</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;Take two fields one for decimal and other one for non-decimal in the declaration of final internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if country_code eq korean.&lt;/P&gt;&lt;P&gt;make field catalog with non decimal field&lt;/P&gt;&lt;P&gt;if country_code eq us&lt;/P&gt;&lt;P&gt;make field catlog with decimal field&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;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 14:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057375#M1353445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-10T14:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Currency problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057376#M1353446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashant , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is possible and can be achived as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get all the resultant data in internal table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you make the field catalog for display , there is one field for currency and currency key in catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to pass these field based on your comapny code , when you make catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the decimals will be adjusted automatically as per currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 15:13:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057376#M1353446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-10T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Currency problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057377#M1353447</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;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wrtite to ..Currency Stmt for all currency fileds and then populate into your final internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:         l_v_ansal TYPE ansal_15,         "  Annual salary
                 l_v_ansal1 TYPE char17,
                 l_v_ansal2 TYPE char17.

*Annual Salary-ANSAL
        l_v_ansal1        = l_wa_final-ansal.                             " Final Table currency filed
        WRITE l_v_ansal1 TO l_v_ansal2 LEFT-JUSTIFIED
        NO-GAP NO-GROUPING CURRENCY l_wa_final-ancur.     " Ancur is the Currency key for corresponding country
        MOVE l_v_ansal2 TO l_v_ansal.        " Annual salary
       l_wa_final-ansal = l_v_ansal.
       Append l_wa_final to i_final.
        CLEAR: l_v_ansal1, l_v_ansal2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be helpfull to you. I will support all country currency key. I used this in some of my developments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Babu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 15:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057377#M1353447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-10T15:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Currency problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057378#M1353448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prashant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be taken care of when populating the ALV fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But prior to this remember you need to have the currency field in your Final ALV display table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While passing any amount field you need to pass the Currency fieldname to CFIELDNAME like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: 
L_WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

* Amount in doc. Curr
  CLEAR L_WA_FIELDCAT.
  L_WA_FIELDCAT-COL_POS = 5.
  L_WA_FIELDCAT-SELTEXT_L = TEXT-006.    "Amount in doc. Curr
  L_WA_FIELDCAT-FIELDNAME = 'WRBTR'.    "Fieldname of the Amount in the table IT_FINAL
  L_WA_FIELDCAT-CFIELDNAME = 'WAERS'.  "Fieldname of the Curr. in the table IT_FINAL
  L_WA_FIELDCAT-TABNAME = 'IT_FINAL'. "Table you pass to the ALV FM

  APPEND L_WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR L_WA_FIELDCAT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i am clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 15:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-currency-problem/m-p/6057378#M1353448</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-09-10T15:22:08Z</dc:date>
    </item>
  </channel>
</rss>

