<?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 Through BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874684#M367950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Uwe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 10:59:34 GMT</pubDate>
    <dc:creator>bruno_esperanca</dc:creator>
    <dc:date>2011-07-13T10:59:34Z</dc:date>
    <item>
      <title>Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874677#M367943</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 New Sales Order using BAPI: BAPI_SALESORDER_CREATEFROMDAT2. I am populating the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_IN : DOC_TYPE     Sales document type&lt;/P&gt;&lt;P&gt;                   SALES_ORG    Sales organization&lt;/P&gt;&lt;P&gt;                   DISTR_CHAN   Distribution channel&lt;/P&gt;&lt;P&gt;                   DIVISION     Division&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_HEADER_INX : UPDATEFLAG  as 'I' and the above fields as 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_PARTNERS..: PARTN_ROLE   Partner role, SP sold-to party&lt;/P&gt;&lt;P&gt;                   PARTN_NUMB   Customer number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_ITEMS_IN..: MATERIAL     Material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_ITEMS_INX..: &lt;/P&gt;&lt;P&gt;UPDATEFLAG  as 'I' and the above fields as 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER_SCHEDULES_IN ::Sales document number POSNR ITM_NUMBER &lt;/P&gt;&lt;P&gt;Order quantity KWMENG   REQ_QTY .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I getting the following error message :&lt;/P&gt;&lt;P&gt;"Unpermitted combination of business object BUS2032 and sales doc. category H"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me where the problem is?&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;Tanmay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 07:30:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874677#M367943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T07:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874678#M367944</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;Check what have you given in &amp;lt;b&amp;gt;ORDER_HEADER_IN-SD_DOC_CAT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 07:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874678#M367944</guid>
      <dc:creator>graghavendra_sharma</dc:creator>
      <dc:date>2007-01-17T07:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874679#M367945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tanmay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a shortcoming of this BAPI. If you look into the coding you will see that it call SD_SALESORDER_CREATE with restriction to business object 'BUS2032'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
       EXPORTING
...
            BUSINESS_OBJECT         = 'BUS2032'
 ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you look into SD_SALESORDER_CREATE you will find the following routine call where the function module checks the valid combination of business object and sales document type (DOC_TYPE): &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*
  if business_object ne space.
     perform i_check_type tables return
                          using sales_header_in
                                business_object.
  endif.
*
  if not return is initial.
     exit.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the routine you will find the function module that makes the check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...
* 3. determine the businessobject                                      *
     CALL FUNCTION 'SD_OBJECT_TYPE_DETERMINE'
          EXPORTING
               I_DOCUMENT_TYPE        = TVAK-VBTYP
          IMPORTING
               E_BUSINESS_OBJECT      = US_OBJTYPE
          EXCEPTIONS
               OTHERS                 = 1.

     IF US_OBJTYPE NE BUSINESS_OBJECT.

        PERFORM ERROR_PROCESSING TABLES US_RETURN
                                 USING  'E'
                                        'V1'
                                        '761'
                                        BUSINESS_OBJECT
                                        TVAK-VBTYP
                                        SPACE
                                        SPACE.

     ENDIF.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you call this function module with I_DOCUMENT_TYPE = 'H' it will return 'BUS2102' as allowed business object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome the problem with BAPI_SALESORDER_CREATEFROMDAT2 simply call the (RFC-enabled) function module &amp;lt;b&amp;gt;SD_SALESORDER_CREATE directly.&amp;lt;/b&amp;gt;. Leave the IMPORTING parameter BUSINESS_OBJECT empty since it it optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 08:41:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874679#M367945</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-01-17T08:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874680#M367946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheak wether u r giveing right combination sale area i.e.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SALES_ORG Sales organization&lt;/P&gt;&lt;P&gt;DISTR_CHAN Distribution channel&lt;/P&gt;&lt;P&gt;DIVISION Division&amp;lt;/b&amp;gt; check in the table TVTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 08:55:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874680#M367946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T08:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874681#M367947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uwe ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your valuable reply.It solves my problem.&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;Tanmay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 09:21:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874681#M367947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T09:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874682#M367948</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;Probobly you are creating  a sales order for the REturn order &lt;/P&gt;&lt;P&gt;BAPI_SALESORDER_CREATEFROMDAT2 will not work for return orders may be the reason as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for return orders use this BAPI &amp;lt;b&amp;gt;BAPI_CUSTOMERRETURN_CREATE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 09:40:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874682#M367948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T09:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874683#M367949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is great, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 10:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874683#M367949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-27T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874684#M367950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Uwe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 10:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874684#M367950</guid>
      <dc:creator>bruno_esperanca</dc:creator>
      <dc:date>2011-07-13T10:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sales Order Creation Through BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874685#M367951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Naresh. Your comment helped me a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 09:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sales-order-creation-through-bapi/m-p/1874685#M367951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-20T09:04:58Z</dc:date>
    </item>
  </channel>
</rss>

