<?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>Question Re: Lock object using web service in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaa-p/12131792#M4533552</link>
    <description>&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;one service call is not an option, because the 3rd party app will have functionality to display and change delivery like vl02n in SAP.&lt;/P&gt;&lt;P&gt;1 thing i notice is that after web service is called from 3rd party app, the session still remain in SAP and can be viewed in SM04.&lt;/P&gt;&lt;P&gt;is there any option to reuse those session in the next call of web service?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2020 04:13:53 GMT</pubDate>
    <dc:creator>former_member673801</dc:creator>
    <dc:date>2020-04-29T04:13:53Z</dc:date>
    <item>
      <title>Lock object using web service</title>
      <link>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaq-p/12131790</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I am currently developing web service for update inbound delivery from external system (web application).&lt;/P&gt;
  &lt;P&gt;The external application will have functionality to display and update SAP inbound delivery. During edit mode in the application, Inbound delivery should be locked in SAP&lt;/P&gt;
  &lt;P&gt;I created 3 RFC Function module and create web service from it :&lt;/P&gt;
  &lt;P&gt;1. Web service to lock SAP Inbound delivery which call FM ENQUEUE_EVVBLKE&lt;/P&gt;
  &lt;P&gt;2. Web service to update delivery which call FM BAPI_OUTB_DELIVERY_CHANGE&lt;/P&gt;
  &lt;P&gt;3. Web service to Unlock SAP Inbound delivery which call FM DEQUEUE_EVVBLKE&lt;/P&gt;
  &lt;P&gt;In my testing using SOAPUI, I run the web service sequentially but I found issue when web service to Update delivery is called. SAP throw error message said that the delivery is locked (same user ID). &lt;/P&gt;
  &lt;P&gt;It looks like the second web service (update delivery) is creating new session/LUW even though we are using the same SAP ID.&lt;/P&gt;
  &lt;P&gt;when I check user session in SM04, session from the first execution of web service (to lock delivery) is still there. &lt;/P&gt;
  &lt;P&gt;I also tried to call FM DEQUEUE_EVVBLKE before calling FM BAPI_OUTB_DELIVERY_CHANGE, but the lock entry in SM12 is still there. it happen because the session from locking delivery and to update delivery is different.&lt;/P&gt;
  &lt;P&gt;Does anyone have experience in developing this kind of development? Please share your thoughts&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 10:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaq-p/12131790</guid>
      <dc:creator>former_member673801</dc:creator>
      <dc:date>2020-04-21T10:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object using web service</title>
      <link>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaa-p/12131791#M4533551</link>
      <description>&lt;P&gt;It's because they are not running in single session. When you call a webservice, it will open a session and does it's work there and closes the session and show the data.&lt;/P&gt;&lt;P&gt;For this reason, the first webservice call created the lock and &lt;/P&gt;&lt;P&gt;the second service call, while calling the lock FM, it will obviously gives error an error as this is second session.&lt;/P&gt;&lt;P&gt;You scenario works well in GUI and webdynpro but not here.&lt;/P&gt;&lt;P&gt;So better to change you approach and include all locking inside one service call.&lt;/P&gt;&lt;P&gt;If you want a way to do this, then have a look at SAP OData services soft state, with which you can achieve this kind of functionality. &lt;/P&gt;&lt;P&gt;Else you can do it using ETAG as well. but this is not pessimistic locking, it will come under optimistic locking.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 15:41:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaa-p/12131791#M4533551</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2020-04-21T15:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lock object using web service</title>
      <link>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaa-p/12131792#M4533552</link>
      <description>&lt;P&gt;Hi Mahesh,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;one service call is not an option, because the 3rd party app will have functionality to display and change delivery like vl02n in SAP.&lt;/P&gt;&lt;P&gt;1 thing i notice is that after web service is called from 3rd party app, the session still remain in SAP and can be viewed in SM04.&lt;/P&gt;&lt;P&gt;is there any option to reuse those session in the next call of web service?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 04:13:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/lock-object-using-web-service/qaa-p/12131792#M4533552</guid>
      <dc:creator>former_member673801</dc:creator>
      <dc:date>2020-04-29T04:13:53Z</dc:date>
    </item>
  </channel>
</rss>

