cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Patch Action in Build Process Automation (If-Match missing)

AFaro
Explorer
0 Kudos

For SAP Build Process Automation, I'm trying to create a patch action to update an equipment using standard S4 API API_EQUIPMENT. I'm able to get an entityset and a single entity, but unable to use the patch. It comes back with the following error "Precondition required for entity CDS~A_EQUIPMENT (If-Match missing)". 

I understand that when I do a get single, I will receive an etag that I should be able to use for the patch. When making the update call, I don't see any option to add it. I tried adding it in the parameters as a custom entry, but it keeps returning with the same error. In the backend /iwfnd/gw_client TCODE I'm able to do this call as I can add the If-Match to the header.




Does anybody know how to incorporate the If-Match in a SAP Build Patch Action?

View Entire Topic
DineshSingh
Advisor
Advisor

You have to add the If Match as a Key to the parameters as shown below in the Patch method in action definition:

DineshSingh_0-1708665893734.png

Also you will need to read the etag using Get Action and pass the etag to the Patch Action in the process.

To read etag, you need to modify the Get Action as below:

DineshSingh_1-1708666066752.png

Hope this helps.

AFaro
Explorer
0 Kudos

Thanks Dinesh! I was close, but made a small mistake in adding the parameter. Your screenshots helped me to get it to work 🙂