cancel
Showing results for 
Search instead for 
Did you mean: 

How to Update with BatchNumbers

Former Member
0 Kudos

I try to update the BatchNumbers Object. It turns out nothing.

Function Update() returns 0.

SAPbobsCOM.Documents doc = 

(SAPbobsCOM.Documents)Git_DIApi.VCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes);
					if (doc.GetByKey(1))
					{
						doc.Comments = "*test*";					

					
						
						doc.Lines.BatchNumbers.Add();
						doc.Lines.BatchNumbers.SetCurrentLine(0);
						
						doc.Lines.BatchNumbers.Quantity = 1;
						doc.Lines.BatchNumbers.BatchNumber = "1";
						doc.Lines.BatchNumbers.Notes = "Test";
												
						
						int iErr = doc.Update();
						if (iErr != 0)
						{
							

Git_UIApi.MessageBox(Git_DIApi.GetErrorMessage(Git_DIApi.VCmp, out iErr));
						}
					}

So how to work with this BatchNumbers Object?

Please, help me.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I am having a similar problem. Is there any way of updating the additional fields stored against a batch without linking it to a document? Im trying to achieve the same functionality as in the menu option

Inventory Management -> Item Management -> Batches -> Batch Management

Currently running SBO 2007A SP00 PL47. I have tried to find if this feature has been added recently by seatching the Notes but I can find it mentioned.

Former Member
0 Kudos

you can't update a purchasedeliverynote after added