<?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: Regarding BAPI_SALESORDER_SIMULATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381287#M528537</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 have filled required input parameters in BAPI_SALESORDER_SIMULATE.&lt;/P&gt;&lt;P&gt;When i executed the FM getting message as 'EV1515No authorization for maintaining sales documents in HHTD 02 01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Skumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2007 10:50:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-19T10:50:24Z</dc:date>
    <item>
      <title>Regarding BAPI_SALESORDER_SIMULATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381284#M528534</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 have to get the price using 'BAPI_SALESORDER_SIMULATE'.What are the required parameters in ORDER_HEADER_IN,ORDER_ITEMS_IN&lt;/P&gt;&lt;P&gt;and ORDER_PARTNERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Skumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 09:23:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381284#M528534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T09:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_SALESORDER_SIMULATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381285#M528535</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;&lt;/P&gt;&lt;P&gt;Most of the BAPIs will be documented in the SE37 transaction itself. If you do not have the system access, here it is:&lt;/P&gt;&lt;P&gt;"Short Text &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales Order: Simulate Sales Order &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Functionality &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method has the same interface definition as the &lt;/P&gt;&lt;P&gt;BAPI_SALESORDER_CREATEFROMDAT1 function but differs from it in that here&lt;/P&gt;&lt;P&gt;the sales order is not updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can determine availability and pricing. This data is displayed &lt;/P&gt;&lt;P&gt;in the ORDER_ITEMS_OUT table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. For 46A, the following enhancements have been made: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) New output tables: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_SCHEDULE_IN Schedule line data input &lt;/P&gt;&lt;P&gt;ORDER_CCARD_EX Credit card data output &lt;/P&gt;&lt;P&gt;ORDER_SCHEDULE_EX Schedule line data output &lt;/P&gt;&lt;P&gt;ORDER_CONDITION_EX Conditions output &lt;/P&gt;&lt;P&gt;MESSAGETABLE Warning table (XVBFS) &lt;/P&gt;&lt;P&gt;b) Sales area determination &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) Order entry with ship-to party &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If no sales area is entered in the sales order header, then the system &lt;/P&gt;&lt;P&gt;creates the sales area from the sold-to party or ship-to party, who has &lt;/P&gt;&lt;P&gt;been entered in the partner table. If no clear sales area can be &lt;/P&gt;&lt;P&gt;created, you will receive a system message, and the sales order will not &lt;/P&gt;&lt;P&gt;be created. "&lt;/P&gt;&lt;P&gt;REPORT z_salesorder_simulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: order_header_in LIKE bapisdhead,&lt;/P&gt;&lt;P&gt;order_items_in LIKE TABLE OF bapiitemin,&lt;/P&gt;&lt;P&gt;return LIKE bapireturn,&lt;/P&gt;&lt;P&gt;wa_order_items_in LIKE LINE OF order_items_in,&lt;/P&gt;&lt;P&gt;order_partners LIKE TABLE OF bapipartnr,&lt;/P&gt;&lt;P&gt;wa_order_partners LIKE LINE OF order_partners,&lt;/P&gt;&lt;P&gt;order_items_out LIKE TABLE OF bapiitemex,&lt;/P&gt;&lt;P&gt;wa_order_items_out LIKE LINE OF order_items_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill order_header_in&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;order_header_in-doc_type = 'TA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill order_items_in&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wa_order_items_in-material = '000000000000000001'.&lt;/P&gt;&lt;P&gt;wa_order_items_in-req_qty = '1000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_order_items_in TO order_items_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill order_items_in&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wa_order_partners-partn_role = 'AG'.&lt;/P&gt;&lt;P&gt;wa_order_partners-partn_numb = '0000000001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_order_partners TO order_partners.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Execute Function Module BAPI_SALESORDER_SIMULATE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;order_header_in = order_header_in&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;order_items_in = order_items_in&lt;/P&gt;&lt;P&gt;order_partners = order_partners&lt;/P&gt;&lt;P&gt;order_items_out = order_items_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The return structure gives any error messages&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WRITE: return-message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Print out the order items&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT order_items_out INTO wa_order_items_out.&lt;/P&gt;&lt;P&gt;WRITE: wa_order_items_out-material,&lt;/P&gt;&lt;P&gt;wa_order_items_out-short_text,&lt;/P&gt;&lt;P&gt;wa_order_items_out-subtotal_2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;______________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extend the example above with this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_vbapvb LIKE TABLE OF vbapvb,&lt;/P&gt;&lt;P&gt;wa_vbapvb LIKE LINE OF it_vbapvb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill it_VBAPVB&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wa_vbapvb-matnr = '000000000000000001'.&lt;/P&gt;&lt;P&gt;wa_vbapvb-zmeng = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_vbapvb TO it_vbapvb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill order_items_in&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT it_vbapvb INTO wa_vbapvb.&lt;/P&gt;&lt;P&gt;wa_order_items_in-material = wa_vbapvb-matnr.&lt;/P&gt;&lt;P&gt;wa_order_items_in-req_qty = wa_vbapvb-zmeng * 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_order_items_in TO order_items_in.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;___________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPI does not return the line items with the price. YOu will have to work around this a little. This is what I have done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. BAPI_SALESORDER_CREATEFROMDAT2 calls SD_SALESDOCUMENT_CREATE. Instead of creating a copy of the BAPI, i have created a copy of SD_SALESDOCUMENT_CREATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Create a table SALES_ITEMS_OUT type VBAP in the tables parameter for this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Then use EXPORT to memory to store the TESTRUN flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. in User Exit USEREXIT_CHECK_VBAP; EXPORT TESTRUN flag from memory and check if it set. (which means you are simulating the order creation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. If TESTRUN is set, move contents of VBAP to internal table. Export the table to memory. So for every line item at this user exit level, the prices are calculated and you are storing them in an internal table in memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Finally in the copy of SD_SALESDOCUMENT_CREATE, at the end, import the internal table from memory and pass this to sales_items_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;____________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some one is actually changing a Condition Value Pricing Formuala (You will find it in transaction VOFM, in the menu Formulas-&amp;gt;Condition value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact the routine number is 932. You can check the source code from VOFM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are pricing related formulas which are used for determining a pricing condition value during Sales Document Create/Change and are integrated into Pricing function group coding (SAPLV61A).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can ask the corresponding user to correct his code.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;______________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two possibilities,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to SE38 and enter program name RV64A932 and hit change, if the other user SZPAK is not locking it then you should be able to change the code. Just correct the syntax error, save and activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or goto VOFM, Formulas-&amp;gt;condition value,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto 932 routine, hit change and correct the syntax error, save and activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try intimating the user who changed it if it is not allowing you to change it or is asking for a change request..&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;Also if you are able to change it then put a comment for the other user so that he will know that you have corrected the syntax error..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 09:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381285#M528535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T09:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_SALESORDER_SIMULATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381286#M528536</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;ORDER_HEADER_IN is contains data for the sales document header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_ITEMS_IN is contains the item input data for the sales order.Since a Header Data Contains Multiple Item,we have to pass a Internal table for this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_PARTNERS Contains Partners, such as sold-to party, ship-to party.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 09:29:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381286#M528536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T09:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_SALESORDER_SIMULATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381287#M528537</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 have filled required input parameters in BAPI_SALESORDER_SIMULATE.&lt;/P&gt;&lt;P&gt;When i executed the FM getting message as 'EV1515No authorization for maintaining sales documents in HHTD 02 01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Skumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 10:50:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-salesorder-simulate/m-p/2381287#M528537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T10:50:24Z</dc:date>
    </item>
  </channel>
</rss>

