<?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: bapi for different order types in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229435#M138900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a problem like yours so I created a copy of BAPi BAPI_SALESORDER_CREATEFROMDAT2 where I determined&lt;/P&gt;&lt;P&gt;the correct business object by fm SD_OBJECT_TYPE_DETERMINE and transfered it (instead of BUS2032) to fm SD_SALESDOCUMENT_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function Zbapi_salesorder_createfromdat2.&lt;/P&gt;&lt;P&gt; .................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TVAK WHERE AUART = order_header_in-DOC_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'SD_OBJECT_TYPE_DETERMINE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            i_document_type        = tvak-vbtyp&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            e_business_object      = business_object&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            others                 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;  ...............&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;       business_object         = 'BUS2032' &amp;lt;------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;            business_object         = business_object &lt;/P&gt;&lt;P&gt;  ....................&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Mar 2006 23:23:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-30T23:23:55Z</dc:date>
    <item>
      <title>bapi for different order types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229431#M138896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using bapi SD_SALESDOCUMENT_CREATE for creating orders. A bit doubtful about what are all the order types that i can use this for. can i use this for creating&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns&lt;/P&gt;&lt;P&gt;return replacement&lt;/P&gt;&lt;P&gt;order replacements&lt;/P&gt;&lt;P&gt;credit-value&lt;/P&gt;&lt;P&gt;credit -coop&lt;/P&gt;&lt;P&gt;credit - price prot.&lt;/P&gt;&lt;P&gt;credit stock&lt;/P&gt;&lt;P&gt;debit value&lt;/P&gt;&lt;P&gt;invoice correction&lt;/P&gt;&lt;P&gt;foc customer coop&lt;/P&gt;&lt;P&gt;FOC - Marketing     &lt;/P&gt;&lt;P&gt;FOC - Overheads     &lt;/P&gt;&lt;P&gt;FOC - Price Protect.&lt;/P&gt;&lt;P&gt;Consignment Pick-up &lt;/P&gt;&lt;P&gt;Consignment Fill-up &lt;/P&gt;&lt;P&gt;Consignment Issue   &lt;/P&gt;&lt;P&gt;Consignment Returns &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could somebody help me with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2006 17:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229431#M138896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-30T17:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: bapi for different order types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229432#M138897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why you are NOT using the BAPI - BAPI_SALESORDER_CREATEFROMDAT2 Which will also have ORDER type (DOC_TYPE) so you should not have a problem which order type you want to create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like your function SD_SALESDOCUMENT_CREATE  also has similar input parameters, so it depends on what order type you are passing.&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;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2006 17:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229432#M138897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-30T17:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: bapi for different order types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229433#M138898</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 think you can create all order types by that fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2006 17:49:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229433#M138898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-30T17:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: bapi for different order types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229434#M138899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ive tried with the fm first. but its not happy with returns and causing some problems. bcoz the business bus2032 is hard coded in that fm and cant process returns stuff etc.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max i will be happy if it creates all order types with that fm. i am using that fm in the ale program and the idoc created is of status 51 sales document was not changed..is there something wrong with my program mate...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2006 17:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229434#M138899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-30T17:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: bapi for different order types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229435#M138900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a problem like yours so I created a copy of BAPi BAPI_SALESORDER_CREATEFROMDAT2 where I determined&lt;/P&gt;&lt;P&gt;the correct business object by fm SD_OBJECT_TYPE_DETERMINE and transfered it (instead of BUS2032) to fm SD_SALESDOCUMENT_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function Zbapi_salesorder_createfromdat2.&lt;/P&gt;&lt;P&gt; .................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TVAK WHERE AUART = order_header_in-DOC_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'SD_OBJECT_TYPE_DETERMINE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            i_document_type        = tvak-vbtyp&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            e_business_object      = business_object&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            others                 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;  ...............&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;       business_object         = 'BUS2032' &amp;lt;------------------&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;            business_object         = business_object &lt;/P&gt;&lt;P&gt;  ....................&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2006 23:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-different-order-types/m-p/1229435#M138900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-30T23:23:55Z</dc:date>
    </item>
  </channel>
</rss>

