on 06-13-2014 9:39 AM
Hi Folks,
My requirement:
To Lock the document number from OData URI.
Locking concept is common everywhere. I already applied enqueue/dequeue mechanism in my back end logic and the document number is getting locked in the backend and as well as from oData URI, but here once I got the response from the OData URI, the lock is getting released for my document number where I did not applied the dequeue logic for this.
Questions:
1) Y the Lock is getting released?
2) is there anything related to eTag concept for this Lock Mechanism.
3) when I execute the OData URI, the lock should not be released, as I did not write the dequeue Logic, any suggestions?
4) From the back end its working as expected.
Please guide me and provide your inputs from gateway point of view.
Thanks & Regards,
Vijay Vegesana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashwin/Chandrasekhar,
Need some clarification.
Suppose, if I checked as eTag for my document number, I will be getting one eTag number as a response for my document number., now I am updating same document details provided in the header with this eTag key and at the same time how can I restrict the same document number from the SAP GUI..
As per my knowledge, same document should number be changed in two different places at the same time.
what exactly this meant by...
In order to write your service to provide an optimistic locking version in the ETag header, you first have to track the version number of the resource. Usually, this means adding another column to the database to hold this value. Then the client/server interaction goes like this:
How to get the version number of the server when I send a request to the server and how do I pass the same in the return..
Any suggestions?
Thanks.
Hello Vijay,
You need not to get any Version number explicitly when you fire your GET.
Once you define your property as etag , GW itself will send back you the etag value which is to be sent when you fire your any modifying request like update/delete by putting the obtained etag in the if-match header.
If this version number which you have sent in if-match is matching, then GW allows to modify or else it will reject.
I have not done anything like adding a new column in DB to maintain version and all.
I have just set that property as etag and using it during update/delete and its working fine for me.
As per my knowledge that is all to be done to implement this lock.
For this question i am not able to think solution for now ... i am still thinking will this really happen ... however i am not sure of this... '
Suppose, if I checked as eTag for my document number, I will be getting one eTag number as a response for my document number., now I am updating same document details provided in the header with this eTag key and at the same time how can I restrict the same document number from the SAP GUI..
As per my knowledge, same document should number be changed in two different places at the same time. '
Regards,
Ashwin
Thanks Ashwin for the detail explanation.
Even for me it is working, when i set as etag, but I got confused, if i want to edit the same document number from GUI, how i need to restrict, am still not able to find the solution for this.
Anyway thanks for every one.
Please post your inputs, if you face these kind of issues.
Thanks & Regards,
Vijay V
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.