<?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: Vofm routine query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-routine-query/m-p/3871335#M930471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris,&lt;/P&gt;&lt;P&gt;your post would be more readable if you'd put &amp;amp;#123;code&amp;amp;#125; tags around your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't really think of a reason why somebody would do what you are describing, but can also not see what happens between the two conversions because of the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 May 2008 10:46:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-15T10:46:56Z</dc:date>
    <item>
      <title>Vofm routine query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-routine-query/m-p/3871334#M930470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found this code within a vofm routine formala, could someone please let me know why is the currency being changed frm foreign to local and local to foreign again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;P-Variant Discounts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;form frm_kondi_wert_019.&lt;/P&gt;&lt;P&gt;  data: xkbetr like xkomv-kbetr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;take into account active conditions only&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  check xkomv-kinak eq space.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set net price with 4 decimals&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if nettopreis is initial.&lt;/P&gt;&lt;P&gt;    nettopreis = ykbetr * 100.         "in currency YWAERS&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;prepare local XKBETR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  xkbetr = xkomv-kbetr.          "here XKBETR is in currency XKOMV-WAERS&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;convert XKBETR from XKOMV-WAERS to YWAERS in two steps&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if xkomv-krech na percental and xkomv-waers ne ywaers.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;first step: convert XKBETR from XKOMV-WAERS to KOMK-HWAER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if xkomv-waers ne komk-hwaer.&lt;/P&gt;&lt;P&gt;      call function 'CONVERT_TO_LOCAL_CURRENCY'&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;                date             = xkomv-kdatu&lt;/P&gt;&lt;P&gt;                foreign_amount   = xkbetr&lt;/P&gt;&lt;P&gt;                foreign_currency = xkomv-waers&lt;/P&gt;&lt;P&gt;                local_currency   = komk-hwaer&lt;/P&gt;&lt;P&gt;                rate             = xkomv-kkurs&lt;/P&gt;&lt;P&gt;                type_of_rate     = kurstyp&lt;/P&gt;&lt;P&gt;           importing&lt;/P&gt;&lt;P&gt;                exchange_rate    = xkomv-kkurs&lt;/P&gt;&lt;P&gt;                local_amount     = xkbetr&lt;/P&gt;&lt;P&gt;           exceptions&lt;/P&gt;&lt;P&gt;                others           = 4.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;second step: convert XKBETR from KOMK-HWAER to YWAERS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if ywaers ne komk-hwaer.&lt;/P&gt;&lt;P&gt;      call function 'CONVERT_TO_FOREIGN_CURRENCY'&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;                date             = ykdatu&lt;/P&gt;&lt;P&gt;                local_amount     = xkbetr&lt;/P&gt;&lt;P&gt;                foreign_currency = ywaers&lt;/P&gt;&lt;P&gt;                local_currency   = komk-hwaer&lt;/P&gt;&lt;P&gt;                rate             = ykkurs&lt;/P&gt;&lt;P&gt;                type_of_rate     = kurstyp&lt;/P&gt;&lt;P&gt;           importing&lt;/P&gt;&lt;P&gt;                foreign_amount   = xkbetr&lt;/P&gt;&lt;P&gt;           exceptions&lt;/P&gt;&lt;P&gt;                others           = 4.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endif.                           "now XKBETR is in currency KOMK-WAERK&lt;/P&gt;&lt;P&gt;  if xkomv-krech = 'A'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;percentages&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;actual net price&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    nettopreis = nettopreis&lt;/P&gt;&lt;P&gt;               + ( xkbetr * ykbetr ) / 1000.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;quantity dependant&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;actual net price&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  elseif xkomv-krech = 'C'.&lt;/P&gt;&lt;P&gt;    nettopreis = nettopreis&lt;/P&gt;&lt;P&gt;               + ( xkbetr * ykpein * ykumza * xkomv-kumne * 100 )&lt;/P&gt;&lt;P&gt;                 / xkomv-kumza / xkomv-kpein / ykumne.&lt;/P&gt;&lt;P&gt;  elseif xkomv-krech ca 'DEF'.&lt;/P&gt;&lt;P&gt;    if komp-mglme ne 0.&lt;/P&gt;&lt;P&gt;      nettopreis = nettopreis&lt;/P&gt;&lt;P&gt;                 + ( xkbetr * ykpein * ykumza * xkomv-kawrt * 100 )&lt;/P&gt;&lt;P&gt;                   / komp-mglme / xkomv-kpein / ykumne.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    xkomv-kinak = 'X'.&lt;/P&gt;&lt;P&gt;    komp-prsok = ' '.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 06:22:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-routine-query/m-p/3871334#M930470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T06:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Vofm routine query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-routine-query/m-p/3871335#M930471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris,&lt;/P&gt;&lt;P&gt;your post would be more readable if you'd put &amp;amp;#123;code&amp;amp;#125; tags around your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't really think of a reason why somebody would do what you are describing, but can also not see what happens between the two conversions because of the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 10:46:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-routine-query/m-p/3871335#M930471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T10:46:56Z</dc:date>
    </item>
  </channel>
</rss>

