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.
User | Count |
---|---|
103 | |
6 | |
6 | |
6 | |
5 | |
5 | |
3 | |
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.