cancel
Showing results for 
Search instead for 
Did you mean: 

cancellation of purchase invoice by service layer

eyal_be
Explorer
0 Kudos

Dear Experts,

We are trying to post a cancellation to a purchase invoice.

When we post /PurchaseInvocie(id)/Cancel we receive the following response

{ "error": { "code": -5006, "message": { "lang": "en-us", "value": "The requested action is not supported for this object." } } }

According to the service layer API documentation (SAP 9.3 PL3) this function should be supported -

The steps we are doing -

1. Post /PurchaseDeliveryNotes

{ "CardCode": "VO_Main", "DocDate": "2018-06-20", "DocDueDate": "2018-07-20", "DocumentLines": [ { "ItemCode": "SP234325", "Quantity": "100", "UnitPrice": "30" } ] }

Response - 201 Created

{ "odata.metadata": "https://.....:50000/b1s/v1/$metadata#PurchaseDeliveryNotes/@Element", "DocEntry": 460, "DocNum": 436,


2. Post /PurchaseInvoices

{ "CardCode": "VO_Main", "DocDate": "2018-06-25", "DocDueDate": "2018-07-25", "DocumentLines": [ { "BaseType": 20, "BaseEntry": 460, "BaseLine": 0 } ] }

Response - 201 Created

{ "odata.metadata": "https://......:50000/b1s/v1/$metadata#PurchaseInvoices/@Element", "DocEntry": 457, "DocNum": 424, "DocType": "dDocument_Items", "HandWritten": "tNO",


3. Post /b1s/v1/PurchaseInvoices(457)/Cancel

Response - 400 Bad Request

{ "error": { "code": -5006, "message": { "lang": "en-us", "value": "The requested action is not supported for this object." } } }

Accepted Solutions (0)

Answers (2)

Answers (2)

eyal_be
Explorer
0 Kudos

Thanks

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Eyal,

Seems like the issue has been detected and documented in the following note:

https://launchpad.support.sap.com/#/notes/2635592

Unfortunately there is no PL details to know in which version it will be fixed.

Please stay tunned here, I'll share the info as soon as updated.

Regards,
Trinidad.