<?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 BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610223#M1278378</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;I am using BAPI_SALESORDER_CREATEFROMDAT2 function module to create sales order with multiple material. If more than one BOM materials are passed to the FM,this FM is giving error and not creating sales order. I have to pass multiple BOM to the FM and it should create sales order and expand the BOM to its components also. &lt;/P&gt;&lt;P&gt;Can anybody help on this.&lt;/P&gt;&lt;P&gt;An example will be good.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pls help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sanchari g on May 13, 2009 11:05 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 May 2009 14:33:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-12T14:33:19Z</dc:date>
    <item>
      <title>BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610223#M1278378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;I am using BAPI_SALESORDER_CREATEFROMDAT2 function module to create sales order with multiple material. If more than one BOM materials are passed to the FM,this FM is giving error and not creating sales order. I have to pass multiple BOM to the FM and it should create sales order and expand the BOM to its components also. &lt;/P&gt;&lt;P&gt;Can anybody help on this.&lt;/P&gt;&lt;P&gt;An example will be good.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pls help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sanchari g on May 13, 2009 11:05 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 14:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610223#M1278378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T14:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610224#M1278379</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;We can achieve the above definitely through this FM,&lt;/P&gt;&lt;P&gt;The functionality would be like for a single customer for different materials ,it should create sales order.Am i Right?&lt;/P&gt;&lt;P&gt;So U give this FM in a loop where the header level will be of the customer and give input of multiple materials in itab and pass it to the BAPI_SALESORDER_CREATEFROMDAT2 &lt;/P&gt;&lt;P&gt;The input should be of the following in the bapi:&lt;/P&gt;&lt;P&gt;loop1 at below&lt;/P&gt;&lt;P&gt;  A)TO i_order_header_in.&lt;/P&gt;&lt;P&gt; 1)doc_type = vbak-auart.&lt;/P&gt;&lt;P&gt;  2)sales_org = vbak-vkorg.&lt;/P&gt;&lt;P&gt;  3)distr_chan = vbak-vtweg.&lt;/P&gt;&lt;P&gt; 4)division = vbak-spart.&lt;/P&gt;&lt;P&gt; 5)purch_no_c = wa_sales_push1-po_no.(purchase order number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B)TO  i_order_partners.&lt;/P&gt;&lt;P&gt;1) sold to party/ship to party&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP2now loop at the below and append all the materials related to the above header purchase order number or sold to party(customer)&lt;/P&gt;&lt;P&gt;C)TO i_order_items_in.&lt;/P&gt;&lt;P&gt;1)material&lt;/P&gt;&lt;P&gt;2)quantity&lt;/P&gt;&lt;P&gt;3)batch.....etc&lt;/P&gt;&lt;P&gt;D) i_order_schedules_in.&lt;/P&gt;&lt;P&gt;1)Item number-check for this thing in particular.Item number will be important to disntiguish between multiple materials.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SALESDOCUMENTIN               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        order_header_in           = i_order_header_in&lt;/P&gt;&lt;P&gt;   ORDER_HEADER_INX              =  i_order_header_inx&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      salesdocument                 = i_salesdocument&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      return                        = i_return&lt;/P&gt;&lt;P&gt;        order_items_in              = i_order_items_in&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_ITEMS_INX               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        order_partners              = i_order_partners&lt;/P&gt;&lt;P&gt;        order_schedules_in            = i_order_schedules_in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt; so by doin the above for single header level of customer(say),we have appened multiple materials and we are gping to pass into the bapi.&lt;/P&gt;&lt;P&gt;The key is ,pass the header level itab and corresponding item level multiple materials itab in one go.&lt;/P&gt;&lt;P&gt;Hope it is clear.If anything specfic,plz mention.i will reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SanthoshSivanathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 11:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610224#M1278379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T11:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610225#M1278380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanchari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_salesheader INTO wa_salesheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR wa_order_header_in.&lt;/P&gt;&lt;P&gt;    CLEAR wa_order_header_inx.&lt;/P&gt;&lt;P&gt;    CLEAR wa_order_partners.&lt;/P&gt;&lt;P&gt;    CLEAR wa_bapicond.&lt;/P&gt;&lt;P&gt;    CLEAR wa_bapicondx.&lt;/P&gt;&lt;P&gt;    REFRESH it_order_items_in.&lt;/P&gt;&lt;P&gt;    REFRESH it_order_items_inx.&lt;/P&gt;&lt;P&gt;    REFRESH it_order_partners.&lt;/P&gt;&lt;P&gt;    REFRESH it_order_schedules_in.&lt;/P&gt;&lt;P&gt;    REFRESH it_order_schedules_inx.&lt;/P&gt;&lt;P&gt;    REFRESH it_bapicond.&lt;/P&gt;&lt;P&gt;    REFRESH it_bapicondx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_order_header_in-doc_type   = wa_salesheader-auart.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-sales_org  = wa_salesheader-vkorg.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-distr_chan = wa_salesheader-vtweg.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-division   = '00'.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-purch_no_c = wa_salesheader-bstnk.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-purch_date = wa_salesheader-bstdk.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-ref_1      = wa_salesheader-vbeln.&lt;/P&gt;&lt;P&gt;    wa_order_header_in-price_date = wa_salesheader-prsdt.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    LOOP AT it_salesitem INTO wa_salesitem WHERE vbeln = wa_salesheader-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_order_items_in-itm_number  = posnr_temp.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-material    = wa_salesitem-matnr.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-plant       = wa_salesitem-werks.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-target_qty  = wa_salesitem-kwmeng.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-ref_doc     = wa_salesitem-vbeln.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-ref_doc_it  = wa_salesitem-posnr.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-ref_1_s     = wa_salesitem-vbeln1.&lt;/P&gt;&lt;P&gt;      wa_order_items_in-poitm_no_s  = wa_salesitem-posnn.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;      APPEND wa_order_items_in TO it_order_items_in.&lt;/P&gt;&lt;P&gt;   ENDLOOP.     "loop for line item which contains all BOMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        order_header_in               = wa_order_header_in&lt;/P&gt;&lt;P&gt;        order_header_inx              = wa_order_header_inx&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       testrun                       = testrun&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       salesdocument                  = v_salesdocument&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;       return                        = it_return&lt;/P&gt;&lt;P&gt;       order_items_in                = it_order_items_in&lt;/P&gt;&lt;P&gt;       order_items_inx               = it_order_items_inx&lt;/P&gt;&lt;P&gt;        order_partners               = it_order_partners&lt;/P&gt;&lt;P&gt;       order_schedules_in            = it_order_schedules_in&lt;/P&gt;&lt;P&gt;       order_schedules_inx           = it_order_schedules_inx&lt;/P&gt;&lt;P&gt;       order_conditions_in           = it_bapicond.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       wait          = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.   "loop for the header data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arnab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 11:23:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610225#M1278380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T11:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610226#M1278381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhos-&lt;/P&gt;&lt;P&gt;It is right that the customer is same.. But i need to create single sales order with multiple BOM and it should expand in the created sales order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 14:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610226#M1278381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610227#M1278382</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;CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SALESDOCUMENTIN =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;order_header_in = i_order_header_in&lt;/P&gt;&lt;P&gt;ORDER_HEADER_INX = i_order_header_inx&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument = i_salesdocument&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = i_return&lt;/P&gt;&lt;P&gt;order_items_in = i_order_items_in&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ORDER_ITEMS_INX =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;order_partners = i_order_partners&lt;/P&gt;&lt;P&gt;order_schedules_in = i_order_schedules_in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we pass item number for multiple BOM in  i_order_items_in,at the time of expansion, in sales order item number will be changed and the function module will not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 14:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610227#M1278382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T14:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2 - not working for multiple  BOM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610228#M1278383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanchari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the import parameter int_number_assignment. &lt;/P&gt;&lt;P&gt;If you put in an X  SAP will number the positions for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martijn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 08:09:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2-not-working-for-multiple-bom/m-p/5610228#M1278383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-08T08:09:07Z</dc:date>
    </item>
  </channel>
</rss>

