on 06-19-2017 11:24 AM
Hi All,
we have created one SAP UI5 based offline app for create Physical inventory using kapsel in SMP 3 . we are able to successfully create record in back-end.
But we are facing issue , when user is in offline mode and he has created one record in offline and then without coming online ,user want to discard/delete record from local device.
As we know ,if we call delete operation it will call delete operation in back-end. which is not useful.
Kindly advice...
Regards
Vivek
You should do the delete as normal and it would have backend interaction. Both the create and the delete is kept in the outbound request queue in the offline database and sent to HCPms/SMP and backend OData service. HCPms / SMP keeps track of converting the temporary ID of the delete action to the ID returned from the backend from the create and then do the delete operation on the correct backend ID. If this is left out, then the OData service will not be able to return the ID in the response of the create to HCPms/SMP. Therefore, HCPms/SMP will not able to map the backend created ID to the temp ID on the Delete request before sending the Delete request to the OData service. If you are looking for another solution, you should open an incident with SAP Support. Additional note, a moderator is not necessarily a technical expert in the area. Alerting a moderator on your question to get an answer is not proper.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Kevin for response..
I guess ,you are talking about POST call and after record created automatically updating the key field from backend.
This scenario working absolutely fine.
I am explaining our issue step by step below :
Step 1 : User is in offline and he has added one record using POST service call.
Step 2: User is in offline and he want to delete the record created in device. This record is still not synced.
Step 3 : User is in offline and he will delete the record using DELETE service call.
Step 4 : Now , User came online and sync started by user.
Step 5 : Now since user has deleted the record ,it should not go to backend. But in our case POST service is getting called first, which create record in backend then delete service is getting called. But since record deleted by user, it should not create any record.
In simple term , Discard record functionality in offline device store.
How, we can approach this functionality, kindly guide.
Regards
Vivek
Sorry for late response,
We are looking Offline kapsel capability which should able to delete the request/data .
Scenario :
Step 1: User created purchase Order using POST call of gateway in offline.
Step 2: User has not synced data Yet. Data present in tablet
Step 3: Now, User felt that due to some reason he don't want to create purchase order and since it is not synced he want to discard purchase order.
Step 4: If user call DELETE gateway call.
Step 5: User synced tablet in online but currently first POST call will hit backend and create purchase order and then delete call will go to backend to delete. And since created purchase order can not be completed DELETE will fail.
Currently we are doing some local work around internally but kapsel or SCP should support such scenario.
Looking for proper solution.
Regards
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Guys did you find a solution to this problem.
We are faced with a similar issue. The problem is with Measuring Documents in the backend. Let's say we create a new Measuring doc in the front end. We then delete/edit the recorded document. This will give somthing like this in the outbound request queue:
Create Measuredoc
Delete/Edit Measuredoc
The problem is that the backend can't delete the measurement document once created and the requests are processed individually.
Hope you can help me out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lau,
Sorry for the late answer. I don't receive email notification unless you create a direct comment or tagging me.
Yes, we did. As Kevin wrote it initially, you simply cannot delete from the request queue, what you have to do is to send a create then a delete. From the description you gave I'm not sure about the exact issue.
Ákos
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.