<?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 order reason in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428182#M1410522</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; I want to poulate item catagory which is there In vbap-pstyv field based on order reason. these order reason will keep on changing while creating the order or changing based on this the corresponding item catagory should display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Please suggest any user exits or badi's or others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex : if the order reason = 'shiipping'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         vbap-pstyv = 'ZOR'.&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;I have written the code in sales order user exit MV45AFZZ  ( Move_filds_vbap ) It is not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 17:59:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-03T17:59:50Z</dc:date>
    <item>
      <title>order reason</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428182#M1410522</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; I want to poulate item catagory which is there In vbap-pstyv field based on order reason. these order reason will keep on changing while creating the order or changing based on this the corresponding item catagory should display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Please suggest any user exits or badi's or others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex : if the order reason = 'shiipping'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         vbap-pstyv = 'ZOR'.&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;I have written the code in sales order user exit MV45AFZZ  ( Move_filds_vbap ) It is not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 17:59:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428182#M1410522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-03T17:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: order reason</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428183#M1410523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;been a while since I did this, but I think you need SAVE_DOCUMENT_PREPARE subroutine....there I'd modify the contents of VBAP or XVBAP...I've forgotten which SAP supplies at that point.  If XVBAP, YVBAP would contain prior to changes data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 20:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428183#M1410523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-03T20:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: order reason</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428184#M1410524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you should not use USEREXIT_SAVE_DOCUMENT_PREPARE for switching item categories or any other field that affects pricing or other item critical processes.  There is no re-pricing determination at that point (or re-determination of other critical values) unless you stop the process and force it manually.  You should also not change values of fields that are critical to the document behind-the-scenes because the user never knows that it happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for using order reason to determine item category, it's not a very good idea unless you restrict the changing/setting of the value and then use USEREXIT_SOURCE_DETERMINATION to set the value as the line items are entered.  This user exit is specifically provided for complex planta and item category determination logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand why the order reason would change during the creation of the document and as line items are entered - the order reason value should be constant and known by the user before entering the document.  I would look into using a different order type which drives the item category determination via configuration, use the user exit above (only after the order reason has been finalized), or use a front-end to make all determinations beforehand and then create the order via the BAPI call.  This is a common approach for complex order entry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 23:44:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-reason/m-p/6428184#M1410524</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2009-12-03T23:44:57Z</dc:date>
    </item>
  </channel>
</rss>

