Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
7,570
About Inventory Posting:

Inventory Posting is used to reconcile the item quantities with the Inventory Counting results.

After creating an Inventory Counting document to record the counting results, you must post the inventory changes to effect the adjustments in the system. For this, you need to create an Inventory Posting document based on the Inventory Counting document.

To access this window, from the SAP Business One Main Menu, choose  Inventory  Inventory Transactions Inventory Counting Transactions  Inventory Posting

For more details on Inventory Posting, you can refer to following link:

https://help.sap.com/saphelp_sbo92/helpdata/en/2f/ca149512334ee58fd95c1c9b3af841/content.htm

Using Inventory Posting in SAP Business One SDK:


Inventory Posting is exposed as a service type Object (InventoryPostingsService) in SAP Business One SDK.

Add an Inventory Posting Document using DI API:
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);

Update an Inventory Posting Document using DI API:
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);
18 Comments