cancel
Showing results for 
Search instead for 
Did you mean: 

How to use HTTP Post method in SAP Gateway Client using JSON format?

bigflatfoot
Discoverer
0 Kudos
209

I was trying to update a custom table using the HTTP METHOD POST in SAP Gateway Client. Here's the JSON format that I've used. The fields ZBANDNAME, ZESTDATE, ZMEMBERS are key fields while the ZSTATUS is not and I'm trying to update it.

{
 "ZBANDNAME" : "ONE DIRECTION",
 "ZESTDATE" : "2010",
 "ZMEMBERS" : "FOUR",
 "ZSTATUS"  : "DISBANDED"
}

Upon trying to update the value of a field ZSTATUS in SAP GW Client, I encountered an error message: "The key value is already in use. Please enter a different one."  

How can I avoid this issue and proceed with the update?

Accepted Solutions (0)

Answers (1)

Answers (1)

ArunJacob
Active Participant
0 Kudos

Hi,

Which is the key filed in this?

The error suggests that you're trying to update an existing record. Apart from the key field, can you please modify the values of other properties and try?

PATCH or PUT instead of CREATE you can try, also please ensure the correct Url.

Thanks