on 2020 Apr 21 11:28 AM
Hi,
I am currently developing web service for update inbound delivery from external system (web application).
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
I created 3 RFC Function module and create web service from it :
1. Web service to lock SAP Inbound delivery which call FM ENQUEUE_EVVBLKE
2. Web service to update delivery which call FM BAPI_OUTB_DELIVERY_CHANGE
3. Web service to Unlock SAP Inbound delivery which call FM DEQUEUE_EVVBLKE
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).
It looks like the second web service (update delivery) is creating new session/LUW even though we are using the same SAP ID.
when I check user session in SM04, session from the first execution of web service (to lock delivery) is still there.
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.
Does anyone have experience in developing this kind of development? Please share your thoughts
Request clarification before answering.
Hi Mahesh,
Thank you for your reply.
one service call is not an option, because the 3rd party app will have functionality to display and change delivery like vl02n in SAP.
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.
is there any option to reuse those session in the next call of web service?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
For this reason, the first webservice call created the lock and
the second service call, while calling the lock FM, it will obviously gives error an error as this is second session.
You scenario works well in GUI and webdynpro but not here.
So better to change you approach and include all locking inside one service call.
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.
Else you can do it using ETAG as well. but this is not pessimistic locking, it will come under optimistic locking.
Regards,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
11 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.