<?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: function Routine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937187#M1151619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where i ahve to use sy-subrc ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i am appending the value in the structure XKONV then it is working fine . Let me know is it right approach .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly do u knw any table where scale based % defiend for particular condtn in VA02 transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Dec 2008 05:46:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-19T05:46:51Z</dc:date>
    <item>
      <title>function Routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937185#M1151617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use a more meaningful subject in future&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have requierment to code  the function rountine to satisfy the condition of pricing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YVRD is a scale based group condition, so while calculating VRD system is considering the total sales order quantity, but it should exclude the line item quantity for which special base price (ZPWS,ZPPG) is applied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve this we can write a group condition routine for YVRD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have the following tables where we can fetch the required data,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TKOMP ( structure type KOMP): pricing communication item&lt;/P&gt;&lt;P&gt;TKOMK ( structure type KOMK): communication header for pricing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TKOMV : pricing communication condition records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the above tables we can get the item details (quantity) from TKOMP and pricing condition details for each line item from TKOMV.&lt;/P&gt;&lt;P&gt;With the above details we can calculate the quantity for YVRD excluding the line items quantity for which base price special (ZPPG,ZPWS) is applied.&lt;/P&gt;&lt;P&gt;The calculated quantity should further be passed to some structure to check the condition record of VRD and pass the required discount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Entire document independent of condition type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;form frm_gruppenkey_002.&lt;/P&gt;&lt;P&gt;  xvakey          = '002'.&lt;/P&gt;&lt;P&gt;  gkomv_key-kschl = '++++'.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I debuged the rountine the passed  the values in   xvakey and gkomv_key structure :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;xvakey(10) = knumh.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;xvakey10(2) = posnr like 50&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gkomv_key-ZBD1P = % amount .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;but it is not working .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how to calculate % based on  the scaling, is there any table for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Dec 19, 2008 6:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 04:40:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937185#M1151617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T04:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: function Routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937186#M1151618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shilpi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from passing the new values, you also need to set the sy-subrc to 0.&lt;/P&gt;&lt;P&gt;Have you done that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 05:39:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937186#M1151618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T05:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: function Routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937187#M1151619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where i ahve to use sy-subrc ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i am appending the value in the structure XKONV then it is working fine . Let me know is it right approach .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly do u knw any table where scale based % defiend for particular condtn in VA02 transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 05:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937187#M1151619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T05:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: function Routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937188#M1151620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Please use a more meaningful subject in future&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 05:50:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937188#M1151620</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-12-19T05:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: function Routine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937189#M1151621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:21:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-routine/m-p/4937189#M1151621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T10:21:03Z</dc:date>
    </item>
  </channel>
</rss>

