Skip to Content
0

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

Nov 17, 2017 at 12:47 PM

93

avatar image

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
  }
 ]
}
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Joseph BERTHE Nov 22, 2017 at 05:25 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Alberto Silva Nov 29, 2017 at 11:01 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded