<?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: sales order creation using bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978968#M400745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure lots of people can supply code that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then they would be doing YOUR job.  You need to work through the documentation of the function module and speak to a functional person who can help you get the data set up correctly to create an order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a start, try creating a sales order in VA01 and write down the data that you used, then transfer this to a test case in SE37 and once that works transfer it to your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Feb 2007 13:42:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-21T13:42:54Z</dc:date>
    <item>
      <title>sales order creation using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978966#M400743</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 create a sales order using bapi BAPI_SALESORDER_CREATEFROMDAT2.&lt;/P&gt;&lt;P&gt;I have created a program but its giving some errors (like please mention either sold to party or ship to party , and sales order was not &amp;lt;b&amp;gt;Changed&amp;lt;/b&amp;gt;)  .&lt;/P&gt;&lt;P&gt;can any body provide some code which is creating sales order successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 13:37:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978966#M400743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T13:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: sales order creation using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978967#M400744</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 the Item table being passed into the BAPI...&lt;/P&gt;&lt;P&gt;You need to fill&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt; ORDER_PARTNERS..: PARTN_ROLE   Partner role, SP sold-to party&lt;/P&gt;&lt;P&gt;                   PARTN_NUMB   Customer number&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = hdr
convert = 'X'
IMPORTING
SALESDOCUMENT = salesdoc
TABLES
return = ret_tbl
ORDER_ITEMS_IN = itm
ORDER_PARTNERS = prtnr
ORDER_ITEMS_inx = itmx
ORDER_CONDITIONS_IN = conds
ORDER_CONDITIONS_INX = condsx
order_schedules_in = schd_lin.

Make sure that you fill in:

* Assigning ref doc to create line item entries in VBFA.
itm-REF_DOC = i_vakgu-vbeln. "ref doc
itm-REF_DOC_IT = i_vbap-posnr. "line item of ref doc
itm-REF_DOC_CA = 'B'. "doc type of ref doc&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points accordingly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 13:41:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978967#M400744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T13:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: sales order creation using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978968#M400745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure lots of people can supply code that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then they would be doing YOUR job.  You need to work through the documentation of the function module and speak to a functional person who can help you get the data set up correctly to create an order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a start, try creating a sales order in VA01 and write down the data that you used, then transfer this to a test case in SE37 and once that works transfer it to your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 13:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978968#M400745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T13:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: sales order creation using bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978969#M400746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;//like please mention either sold to party or ship to party &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error will be the customer number which from ur code might not be a valid one for the particular sales area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see in order to rectify this error fetch the suitable customer for the sales area you are using .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search for the customer in table KNVV&lt;/P&gt;&lt;P&gt;KUNNR&lt;/P&gt;&lt;P&gt;VKORG&lt;/P&gt;&lt;P&gt;VTWEG&lt;/P&gt;&lt;P&gt;SPART&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 13:47:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-using-bapi/m-p/1978969#M400746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-21T13:47:32Z</dc:date>
    </item>
  </channel>
</rss>

