<?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_SALESORDER_CREATEFROMDAT2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103446#M981291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe you can solve your problem if you use the export parameter WAIT in FM BAPI_TRANSACTION_COMMIT (see coding below). This parameter causes that the FM realy waits until the commit is successfully done. In this case the word area return is empty.&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;      IMPORTING&lt;/P&gt;&lt;P&gt;        return = wa_return2.&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;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jul 2008 08:04:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-02T08:04:46Z</dc:date>
    <item>
      <title>BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103440#M981285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I met a problem about Function 'BAPI_SALESORDER_CREATEFROMDAT2'.&lt;/P&gt;&lt;P&gt;The same input parameters, if I use this function in a report , that's ok, A new sales order is created.But if I use this function is a custom-function( eg, 'ZORDER_CREATE), the return messages of BAPI_SALESORDER_CREATEFROMDAT2 are successfully.At this time, I use t-code 'VA02' to display this generated order.occurs a error message 'SD document 18180 is not in the database or has been archived'&lt;/P&gt;&lt;P&gt;Who can you tell me why happen this scenarios?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kelvin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 05:41:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103440#M981285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T05:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103441#M981286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to execute the function module BAPI_TRANSACTION_COMMIT after you executed the BAPI_SALESORDER_CREATEFROMDAT2. After executing the BAPI_SALESORDER_CREATEFROMDAT2 a commit must be given.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 05:49:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103441#M981286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T05:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103442#M981287</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;i think COMMIT work  is missing from ur program .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should be like this .&lt;/P&gt;&lt;P&gt;Call 'BAPI'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if return[] is initial.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;endif.&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;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 05:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103442#M981287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T05:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103443#M981288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Problem is related to commit .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try calling BAPI_transaction_commit after the function in your custome function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 05:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103443#M981288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T05:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103444#M981289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Ater I executed the BAPI_SALESORDER_CREATEFROMDAT2,To execute the function module BAPI_TRANSACTION_COMMIT looks well. Please see my coding below:&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      = W_HEAD&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      SALESDOCUMENT        = ZONC_ORDER_NUMBER&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      RETURN               = T_RETURN&lt;/P&gt;&lt;P&gt;      ORDER_ITEMS_IN       = T_LINE&lt;/P&gt;&lt;P&gt;      ORDER_ITEMS_INX      = T_LINEX&lt;/P&gt;&lt;P&gt;      ORDER_PARTNERS       = T_PARTNER&lt;/P&gt;&lt;P&gt;      ORDER_CONDITIONS_IN  = T_COND&lt;/P&gt;&lt;P&gt;      ORDER_CONDITIONS_INX = T_CONDX&lt;/P&gt;&lt;P&gt;      ORDER_CCARD          = T_CCARD&lt;/P&gt;&lt;P&gt;      ORDER_TEXT           = T_TEXT&lt;/P&gt;&lt;P&gt;      EXTENSIONIN          = T_EXTEN.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Why this select can't be implement(I need use related data).How to implement below function?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  SELECT SINGLE *&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF LW_VBAK&lt;/P&gt;&lt;P&gt;    FROM VBAK&lt;/P&gt;&lt;P&gt;   WHERE VBELN = ZONC_ORDER_NUMBER&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 08:54:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103444#M981289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T08:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103445#M981290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin,&lt;/P&gt;&lt;P&gt;                 Your code looks perfect. Looks like the Sales order not yet saved immediatey to the database. So after commit bapi use a &lt;STRONG&gt;wait statement for 3 seconds&lt;/STRONG&gt; and check your results. It will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this answers your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greetson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 12:21:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103445#M981290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T12:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CREATEFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103446#M981291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe you can solve your problem if you use the export parameter WAIT in FM BAPI_TRANSACTION_COMMIT (see coding below). This parameter causes that the FM realy waits until the commit is successfully done. In this case the word area return is empty.&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;      IMPORTING&lt;/P&gt;&lt;P&gt;        return = wa_return2.&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;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2008 08:04:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-createfromdat2/m-p/4103446#M981291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-02T08:04:46Z</dc:date>
    </item>
  </channel>
</rss>

