<?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 logic needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093934#M978957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i had a ztable and in that zqty(quantity field) is there. it is updated&lt;/P&gt;&lt;P&gt;when we save the sales order.it is written in the exit and through&lt;/P&gt;&lt;P&gt;xvbap structure we are updating the table.&lt;/P&gt;&lt;P&gt;one issue came for us when we are changing the qty in va02.&lt;/P&gt;&lt;P&gt;suppose the ztable has been populated with qty say 30 by 3 sales orders.&lt;/P&gt;&lt;P&gt;now i am chnaging one sales order and making the quantity 3 instead of 12(which is updated in&lt;/P&gt;&lt;P&gt;the ztable has 12) now according to my present logic it becomes 50+3=53.&lt;/P&gt;&lt;P&gt;but actually it should become  41 ( because 50-12=38 and for that&lt;/P&gt;&lt;P&gt;38 we are adding 3qty ie changed qty through va02.).&lt;/P&gt;&lt;P&gt;so how to track the old value of the sales order which is&lt;/P&gt;&lt;P&gt;going to be changed.&lt;/P&gt;&lt;P&gt;so please tell me how to write the logic for updating the ztable with&lt;/P&gt;&lt;P&gt;correct qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for all the replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jul 2008 11:37:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-03T11:37:12Z</dc:date>
    <item>
      <title>logic needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093934#M978957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i had a ztable and in that zqty(quantity field) is there. it is updated&lt;/P&gt;&lt;P&gt;when we save the sales order.it is written in the exit and through&lt;/P&gt;&lt;P&gt;xvbap structure we are updating the table.&lt;/P&gt;&lt;P&gt;one issue came for us when we are changing the qty in va02.&lt;/P&gt;&lt;P&gt;suppose the ztable has been populated with qty say 30 by 3 sales orders.&lt;/P&gt;&lt;P&gt;now i am chnaging one sales order and making the quantity 3 instead of 12(which is updated in&lt;/P&gt;&lt;P&gt;the ztable has 12) now according to my present logic it becomes 50+3=53.&lt;/P&gt;&lt;P&gt;but actually it should become  41 ( because 50-12=38 and for that&lt;/P&gt;&lt;P&gt;38 we are adding 3qty ie changed qty through va02.).&lt;/P&gt;&lt;P&gt;so how to track the old value of the sales order which is&lt;/P&gt;&lt;P&gt;going to be changed.&lt;/P&gt;&lt;P&gt;so please tell me how to write the logic for updating the ztable with&lt;/P&gt;&lt;P&gt;correct qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for all the replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 11:37:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093934#M978957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T11:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: logic needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093935#M978958</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;In the MV45AFZZ user-exit program, you have the following useful tables (before save):&lt;/P&gt;&lt;P&gt;XVBAK - new header&lt;/P&gt;&lt;P&gt;YVBAK - old header&lt;/P&gt;&lt;P&gt;XVBAP - new items&lt;/P&gt;&lt;P&gt;YVABP - old items&lt;/P&gt;&lt;P&gt;XVBEP - new items scheduling&lt;/P&gt;&lt;P&gt;YVBEP - old items scheduling&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the XV* table, there's an UPDKZ field, which can have the following states&lt;/P&gt;&lt;P&gt;- I - inserted line&lt;/P&gt;&lt;P&gt;- U - updated line (in this case, YV* table contains the old values)&lt;/P&gt;&lt;P&gt;- D - deleted line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 11:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093935#M978958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T11:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: logic needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093936#M978959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your timely help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 11:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093936#M978959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-03T11:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: logic needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093937#M978960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first place you have to differenciate between inserts and updates of quantities in VA02. You can do that like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE xvbap-updkz.
  WHEN 'I'. "insertion of line -&amp;gt; your previous logic
  WHEN 'U'. "update -&amp;gt; your new case.
  WHEN 'D'. "deletion -&amp;gt;another case you should consider.
  WHEN OTHERS.
ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, case updkz EQ 'U' or 'D' you have to check which was the old quantity. For that check structure YVBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 11:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-needed/m-p/4093937#M978960</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-07-03T11:54:22Z</dc:date>
    </item>
  </channel>
</rss>

