on 2014 May 14 8:15 AM
Hello experts,
We use DI API to re-assign Batch Numbers automatically in Sales Order.
When the assignment is wrong, how to clear the assignment in Sales Order by DI-API ?
I had tried to clear it via DTW.
There are no error message and no effect.
Can someone help me ?
It would be very appreciated.
Many thanks for your time in advance.
Best regards
Sharon
Hi Sharon,
you have to set the quantity of the batchline to zero :
SAPbobsCOM.Documents oDoc = SBO_Company.GetBusinessObject(BoObjectTypes.oOrders);
if (oDoc.GetByKey(DOCENTRY))
{
oDoc.Lines.SetCurrentLine(LINE);
oDoc.Lines.BatchNumbers.SetCurrentLine(BATCHLINE);
oDoc.Lines.BatchNumbers.Quantity = 0;
if (oDoc.Update() != 0)
{
error = SBO_Company.GetLastErrorDescription();
}
}
else
error = "Document not found";
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has this issue been resolved? It is not clear from the referenced note.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here!
After upgrading to 9.1 PL11 my code to deallocate batches from sales order doesn't work anymore.
this line of code
order.Lines.BatchNumbers.Quantity = order.Lines.BatchNumbers.Quantity - qtaATT;
does nothing. No error, no subtraction.
It was working fine in 9.0
Can someone help me please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.