<?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 condition value calculation issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996759#M406044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are changin the value in your routine based on formula,once you changed the value and it will go some other program and there it is modifying the value so,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep watch point for ur field and try&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2007 20:07:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-22T20:07:54Z</dc:date>
    <item>
      <title>VOFM condition value calculation issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996757#M406042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a strange kind of issue. I have a requirement of calculating a condition type value based upon one more available condition type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case the condition value to find out is 'ZWTH' and the condition value from find out is 'ZWHC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the routine is assigned to pricing procedure with condition type 'ZWTH' and it calculates fine on screen. But as soon as I save document it calculates the values wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody have any idea, what is the exact problem and what goes wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : L_KOMV        LIKE XKOMV,&lt;/P&gt;&lt;P&gt;       LV_ZWHC_VALUE TYPE KWERT,&lt;/P&gt;&lt;P&gt;       LV_ZWTH_KBETR TYPE KBETR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR : L_KOMV,&lt;/P&gt;&lt;P&gt;        LV_ZWHC_VALUE,&lt;/P&gt;&lt;P&gt;        LV_ZWTH_KBETR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE XKOMV INTO L_KOMV WITH KEY KPOSN = XKOMV-KPOSN&lt;/P&gt;&lt;P&gt;                                      KSCHL = 'ZWHC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LV_ZWHC_VALUE = L_KOMV-KWERT.&lt;/P&gt;&lt;P&gt;  LV_ZWTH_KBETR = XKOMV-KBETR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF LV_ZWHC_VALUE NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     PERFORM CALCULATE_XKWERT IN PROGRAM ZRV64A903_ROUTINES&lt;/P&gt;&lt;P&gt;                        USING LV_ZWHC_VALUE&lt;/P&gt;&lt;P&gt;                              LV_ZWTH_KBETR&lt;/P&gt;&lt;P&gt;                     CHANGING XKWERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  CALCULATE_XKWERT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM calculate_xkwert  USING    p_zwhc_value TYPE kwert&lt;/P&gt;&lt;P&gt;                                p_zwth_kbetr TYPE kbetr&lt;/P&gt;&lt;P&gt;                       CHANGING p_xkwert     TYPE kwert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_xkwert = p_zwhc_value * ( p_zwth_kbetr / 1000 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " CALCULATE_XKWERT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 21:49:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996757#M406042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T21:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: VOFM condition value calculation issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996758#M406043</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;For one thing, you are changing the value of the XKOMV workarea.&lt;/P&gt;&lt;P&gt;I would recommend you add :&lt;/P&gt;&lt;P&gt;  DATA : lt_xkomv TYPE STANDARD TABLE OF indexed_komv.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local copy&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      lt_xkomv[] = xkomv[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then did the read of  lt_xkomv rather than xkomv.&lt;/P&gt;&lt;P&gt;Also, did you define ZRV64A903_ROUTINES to work with fixed-point arithmetic ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 19:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996758#M406043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T19:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: VOFM condition value calculation issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996759#M406044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are changin the value in your routine based on formula,once you changed the value and it will go some other program and there it is modifying the value so,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep watch point for ur field and try&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 20:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996759#M406044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T20:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: VOFM condition value calculation issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996760#M406045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;   What is the exact problem you are facing? Can you check once, there might be a problem while you are performing calculations on KBETR and KWERT, because they are of different data types, one is of decimals 3 and another of decimals 2. If that is the case, use unpack fields logic so that the calculated value is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Reward points if the suggestion is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From,&lt;/P&gt;&lt;P&gt;Adithya K&lt;/P&gt;&lt;P&gt;askSAP@googlegroups.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 00:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/1996760#M406045</guid>
      <dc:creator>former_member186078</dc:creator>
      <dc:date>2007-05-23T00:17:53Z</dc:date>
    </item>
  </channel>
</rss>

