<?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: Problem with BAPI_SALESORDER_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796604#M1466736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not feasible to update the sales order at the same time as updating the delivery. The delivery locks the sales order as a preceding document (becaus it needs to update the statuses and stuff) and no updates may be carried forward. Even if there was no error, you wouldn't be able to update anything. This has been discussed in the forums before - use search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the known ways to work around this is to use the delivery output and a link it to a program. The output is generated after the updates, so the lock has been released by then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Mar 2010 20:56:13 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2010-03-26T20:56:13Z</dc:date>
    <item>
      <title>Problem with BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796602#M1466734</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 am facing a problem with the BAPI_SALESORDER_CHANGE.  I am using it in a user exit to update sales order upon creation of delivery and I am getting the error message' Enter a document number'.  The problem is that I have passed the document number to the BAPI.  When I use the BAPI in SE37 with the same parameters, there is no error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have debugged to check where the eroor message is coming from.  It is from the subroutine BELEG_LESEN of the program MV45AF0B_BELEG_LESEN (line 36):&lt;/P&gt;&lt;P&gt;  if vbak-vbeln is initial.&lt;/P&gt;&lt;P&gt;    message e045.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This routine is called in the FM SD_SALES_DOCUMENT_READ (line 61) just after the statement VBAK-VBELN = DOCUMENT_NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also debugged both calls and found a difference as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In SE37, when the statement VBAK-VBELN = DOCUMENT_NUMBER is executed, both (SAPLV45A)VBAK-VBELN and (SAPMV45A)VBAK-VBELN are assigned the order number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When i debug the call in the user exit, only the (SAPLV45A)VBAK-VBELN  is assigned the order number and (SAPMV45A)VBAK-VBELN remains initial and that is why i am getting the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody please tell me why the (SAPMV45A)VBAK-VBELN is not assigned the order number same as when I test in SE37?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution for this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vitz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 13:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796602#M1466734</guid>
      <dc:creator>former_member239066</dc:creator>
      <dc:date>2010-03-26T13:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796603#M1466735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   As you said, it works in Se37, but fails in the userexit. I would suggest to check the import paramaters and tables data you are passing to the BAPI in the user exit. There should be some data field missed to populate. Ask a reviewer (different pair of eyes) to check the code.&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>Fri, 26 Mar 2010 19:09:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796603#M1466735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-26T19:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796604#M1466736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not feasible to update the sales order at the same time as updating the delivery. The delivery locks the sales order as a preceding document (becaus it needs to update the statuses and stuff) and no updates may be carried forward. Even if there was no error, you wouldn't be able to update anything. This has been discussed in the forums before - use search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the known ways to work around this is to use the delivery output and a link it to a program. The output is generated after the updates, so the lock has been released by then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 20:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796604#M1466736</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2010-03-26T20:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796605#M1466737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jelena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to do the update at the same time.  The solution is to create a function module to do the update and call that function module using the addition STARTING NEW TASK.  Call the BAPI BAPI_SALESORDER_CHANGE in the function module created and the sales order will be updated at the same time the delivery is created / updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vitz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 09:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796605#M1466737</guid>
      <dc:creator>former_member239066</dc:creator>
      <dc:date>2010-04-13T09:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796606#M1466738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And where exactly would you put this function module? Keep in mind that STARTING NEW TASK will create a new LUW, so you might end up with the sales order updated and delivery update failed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 13:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796606#M1466738</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2010-04-13T13:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796607#M1466739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jelena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, iit does not fail.  the update on the sales order is committed and the delivery updated/created perfectly.  I have called the function module in the user exit userexit_save_document_prepare of the program MV50AFZ1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vitz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 09:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-bapi-salesorder-change/m-p/6796607#M1466739</guid>
      <dc:creator>former_member239066</dc:creator>
      <dc:date>2010-04-16T09:53:39Z</dc:date>
    </item>
  </channel>
</rss>

