cancel
Showing results for 
Search instead for 
Did you mean: 

"502 Proxy Error" while submitting a PurchaseDeliveryNote to the OData Service Layer as draft

albertosilva
Explorer
0 Kudos

When submitting a new Purchase Delivery Note to be saved as a draft to the OData Service Layer, I get a "502 Proxy Error". However, if I submit the same request to the service layer to the PurchaseDeliveryNotes entity instead of the Drafts entity, the document is correctly saved.

The request being submitted is as follows:

POST /b1s/v1/Drafts HTTP/1.1
Host: hanab1.xxxxxxxx.local:50000
Cookie: B1SESSION=xxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxx; ROUTEID=.node1
Content-Type: application/json
Cache-Control: no-cache
{
 "DocEntry": 0,
 "HandWritten": 0,
 "DocDate": "2017-11-17T00:00:00+00:00",
 "CardCode": "FI00003",
 "NumAtCard": "88888",
 "Series": 0,
 "DocObjectCode": "20",
 "OpeningRemarks": "",
 "DocumentLines": [{
   "ItemCode": "HTHT14D",
   "Quantity": 2.0,
   "Price": 0.0,
   "WarehouseCode": "01",
   "BaseType": 22,
   "BaseEntry": 66,
   "BaseLine": 2,
   "DocEntry": 0
  }, {
   "ItemCode": "HTHT9012",
   "Quantity": 2.0,
   "Price": 0.0,
   "WarehouseCode": "01",
   "BaseType": 22,
   "BaseEntry": 66,
   "BaseLine": 1,
   "DocEntry": 0
  }
 ]
}

Accepted Solutions (0)

Answers (2)

Answers (2)

albertosilva
Explorer
0 Kudos

Thanks Joseph. The problem was solved after a SAP update, there was nothing wrong with the request itself.

Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

Check the properties type from the both EntityType. Sometime this error appears when you want to set a string value in numeric type.

If it is not that, try to do a Read query from PurchaseDeliveryNotes and compare the response with your body. They should be more or less identically.

Regards,

Joseph