Skip to Content

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

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
  }
 ]
}
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 22, 2017 at 05:25 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 29, 2017 at 11:01 AM

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

    Add comment
    10|10000 characters needed characters exceeded