1.In Fiori UI APP-Tasks
I create a task using description "Sara test 20150909" and guid'3440B5B1-72DE-1ED5-95DB-3B2C4244BC62'.
2.In SAP Gateway Client.
Step 1. First, we will use Get method to read this task.
Http method: Get
Request URI: /sap/opu/odata/sap/CRM_TASK/Tasks(guid'3440B5B1-72DE-1ED5-95DB-3B2C4244BC62')
Protocol: HTTP
Do action: Hit F8
Result:
HTTP Respond Code:200
And got the information of this request.
Step 2. Then, Once I get the response, I click on “Use as Request” button, which will populate the request body same as the current response.
Result:
Step 3. Now add the values in the request header.
NOTE1: For update, we need to add If-Match in header.
The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource.
NOTE2: The value in is: W/"'【Etag】'".
For 【Etag】(One property of Entity) is the only field which can distinguish version.
Result:
Step 4. Now change the values in the request body as you think.
In this case, I will change description from <d:Description>Sara test 20150909</d:Description> to
<d:Description>Sara test 20150909 Updated Here</d:Description>.
when Merge
<d:Description>Merge</d:Description>.
Result:
Step 5.
Http method: PUT
Request URI: /sap/opu/odata/sap/CRM_TASK/Tasks(guid'3440B5B1-72DE-1ED5-95DB-3B2C4244BC62')
Protocol: HTTP
Do action: Hit F8
Result:
HTTP Respond Code:204 (204: The server successfully processed the request, but is not returning any content.)
For update, you can also use HTTP method: Merge
Http method: Merge
Step 6. Do double check in DB.
When Merge:
Step 7. Do double check in UI.
Finish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
7 | |
7 | |
6 |