We’re writing an application that will allow us to use oData and the HANA Service Layer to perform CRUD operations on Stock Transfer Requests. Thus far we have been able to Add and Amend individual Stock Transfer Requests and Lines. However, Remove doesn't have any affect on StockTransferLines, i.e., if I "Remove" a specific line within the StockTransferLines collection within the StockTransferRequest, this is ignored and the line is retained when the StockTransferRequest is updated.
I've included a code snippet below that comments the bits that work / don't work:
stockTransferRequestUpdate = currentOdataService.GetStockTransferRequest(1044);
// Add Line - WORKS with no issue
stl_11.Quantity = 1;
stl_11.UnitPrice = 2;
StockTransferLine stl = stockTransferRequestUpdate.StockTransferLines.Where(tl => tl.LineNum == 1).Single();
// Amending Existing line works
stl.Quantity = 10;
stl.ItemCode = "100";
// Remove Line - Doesn't work, and doesn't throw any error that I can see
// Update the StockTransferRequest with either Add / Amend / Remove options above
boolupdateSTR = currentOdataService.UpdateStockTransferRequest(stockTransferRequestUpdate);
I’m connecting as B1ADMIN user with full rights to CRUD on the Database.
Given that Adding a line; and amending existing lines works without issue. I'm thinking that either I've missed something blindingly obvious or maybe the Remove method requires additional permissions to be explicitly allowed somewhere else other than on the User or maybe the Remove method is dependent on other operations/amendments.
Can anyone help point me in the right direction, please?
Thanks & regards,