cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update sales order UDF field through DI API in case order closed

0 Kudos
1,804

Hi,

I am trying to update sales order through DI API and getting error below error.

Error Code : -5002
Error Description: You cannot modify a freight charges row that is already closed [RDR3.Stock][line: 0]

below code used for update sales order.

Documents oDocuments = (Documents)oCompany.GetBusinessObject(BoObjectTypes.oOrders); 
oDocuments.GetByKey(417);
oDocuments.UserFields.Fields.Item("U_Shipping").Value = "UPS";
int ret = oDocuments.Update();

Same operation I can do from SAP UI.

Please let me know, is there any way to update sales order in case order closed.

Thanks,

View Entire Topic
former_member201156
Participant
0 Kudos

You can only modify Sales Order Header fields.

the Freight object (child object of the Sales Order) cannot be modified when the Sales Order has status closed

regards, Sotos Soteriou