Skip to Content
0
Oct 24, 2013 at 12:19 PM

How to Auto select Batch Through SDK Code ?

472 Views

Hi Experts,

How to Auto select Batch Through SDK Code ? my stock is managed by batch i need to set autoselect batch while Issue from production.

SAPbobsCOM.Documents oIssue;

oIssue = clsAddOn.LDNA_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit);

oIssue.Lines.SetCurrentLine(0);

oIssue.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items;

while (!ldna_Rec.EoF)

{

if (ldna_Rec.Fields.Item("ItemCode").Value == oMat3.Columns.Item("V1").Cells.Item(i).Specific.value)

{

BubbleEvent = false;

VaccQnty = Convert.ToDouble(oMat3.Columns.Item("V5").Cells.Item(i).Specific.value);

oIssue.Lines.BaseEntry = ldna_Rec.Fields.Item("DocEntry").Value;

oIssue.Lines.BaseType = 202;

oIssue.Lines.BaseLine = ldna_Rec.Fields.Item("LineNum").Value;

oIssue.Lines.Quantity = VaccQnty;

oIssue.Lines.Add();

break;

}

ldna_Rec.MoveNext();

}

oIssue.Add()

- Thanks and regards

Vikas