Main Menu, choose →
Inventory→
Inventory Transactions→
Inventory Counting Transactions→
Inventory Posting
Using Inventory Posting in SAP Business One SDK:
SAPbobsCOM.CompanyService oCS = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
SAPbobsCOM.InventoryPostingsService oInventoryPostingsService = oCS.GetBusinessService(SAPbobsCOM.ServiceTypes.InventoryPostingsService);
SAPbobsCOM.InventoryPosting oInventoryPosting = oInventoryPostingsService.GetDataInterface(SAPbobsCOM.InventoryPostingsServiceDataInterfaces.ipsInventoryPosting);
oInventoryPosting.CountDate = DateTime.Now;
SAPbobsCOM.InventoryPostingLines oInventoryPostingLines = oInventoryPosting.InventoryPostingLines;
SAPbobsCOM.InventoryPostingLine oInventoryPostingLine = oInventoryPostingLines.Add();
oInventoryPostingLine.ItemCode = "B10000";
oInventoryPostingLine.CountedQuantity = 13;
oInventoryPostingLine.WarehouseCode = "05";
oInventoryPostingLine.BinEntry = 2;
oInventoryPostingLine.Price = 58;
oInventoryPostingLine.UoMCode = "Carton";
oInventoryPostingLine.UoMCountedQuantity = 12;
SAPbobsCOM.InventoryPostingBatchNumber oInventoryPostingBatchNumber = oInventoryPostingLine.InventoryPostingBatchNumbers.Add();
oInventoryPostingBatchNumber.BatchNumber = "B-B1234";
oInventoryPostingBatchNumber.Quantity = 288;
SAPbobsCOM.InventoryPostingParams oInventoryPostingParams = oInventoryPostingsService.Add(oInventoryPosting);
SAPbobsCOM.CompanyService oCS = (SAPbobsCOM.CompanyService)oCompany.GetCompanyService();
SAPbobsCOM.InventoryPostingsService oInventoryPostingsService = oCS.GetBusinessService(SAPbobsCOM.ServiceTypes.InventoryPostingsService);
SAPbobsCOM.InventoryPostingParams oInventoryPostingParams = (SAPbobsCOM.InventoryPostingParams)oInventoryPostingsService.GetDataInterface(SAPbobsCOM.InventoryPostingsServiceDataInterfaces.ipsInventoryPostingParams);
oInventoryPostingParams.DocumentEntry = 1;
SAPbobsCOM.InventoryPosting oInventoryPosting = oInventoryPostingsService.Get(oInventoryPostingParams);
oInventoryPosting.Remarks = "TEST DI API";
oInventoryPostingsService.Update(oInventoryPosting);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |