cancel
Showing results for 
Search instead for 
Did you mean: 

how to call a odata with method patch

mark_fryu
Participant
0 Kudos
4,806

hi, I'm calling an odata service with patch method.

API_PRODUCTION_ORDER_2_SRV

resource path: A_ProductionOrder_2('ManufacturingOrder')

if I use the Odata adapter I get the error "Bad Request : 400 : HTTP/1.1"

while if I use the http adapter I receive the error: "Name or service not known"

can you help me to call a service with patch method?

thank you

View Entire Topic
dharamverma
Explorer

You can not update each field, so send only field which you want to update

dharamverma
Explorer
0 Kudos

And there are some fields which can not be updated that is why you getting 400 error

mark_fryu
Participant
0 Kudos

I tried only with quantity, but I get the same error:

I didn't know what to feel anymore

mark_fryu
Participant
0 Kudos

I found the problem.

this is how it goes wrong:

A_ProductionOrder_2(ManufacturingOrder='${property.ProductionOrder}')

while this works correctly:

A_ProductionOrder_2('61333')


but I need a way to pass it as a variable

dharamverma
Explorer
0 Kudos

A_ProductionOrder_2('61333') will work fine with http adapter but not with OData adapter

With OData, A_ProductionOrder_2(ManufacturingOrder='${property.ProductionOrder}') or A_ProductionOrder_2(ManufacturingOrder='61333') will work