<?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 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/2028759#M416117</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>Tue, 27 Mar 2007 14:44:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-27T14:44:57Z</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/2028759#M416117</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>Tue, 27 Mar 2007 14:44:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/2028759#M416117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T14:44:57Z</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/2028760#M416118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Please check inside properties if there is floating calculation inside these procedure. I've seen a few procedure without floating point calculation.&lt;/P&gt;&lt;P&gt;\&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Wojciech&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 14:56:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/2028760#M416118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T14:56:51Z</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/2028761#M416119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wojciech,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain me in detail???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sagar V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 15:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/2028761#M416119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T15:02:27Z</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/2028762#M416120</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;&lt;/P&gt;&lt;P&gt;I think to find out the exact issue, you need to debug the routine after saving the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my experience, the conditions and values are different before the document is saved and after the save button is clicked. Upon saving, the whole pricing is carried out again. So I would suggest to debug and analyze after saving the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shahu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 16:07:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vofm-condition-value-calculation-issue/m-p/2028762#M416120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T16:07:59Z</dc:date>
    </item>
  </channel>
</rss>

