Bar Codes:

A barcode is an optical, machine-readable, representation of data; the data usually describes something about the object that carries the barcode.

In SAP Business One, you can use the Bar Codes window (Inventory → Bar Codes) to define Bar Codes for your items. Multiple bar codes are allowed for each single UoM of an item.

For more information on Bar Codes in SAP Business One, you can refer to following link:

https://help.sap.com/saphelp_sbo92/helpdata/en/e4/356617d8614e70a8fa4a1e204a0bb3/content.htm?frameset=/en/44/c4c1cd7ca22e17e10000000a114a6b/frameset.htm&current_toc=/en/b1/8fe14910cf46b9b2ff2de2f315e5a2/plain.htm&node_id=1492&show_children=false

Using Bar Code in SAP Business One SDK:

Bar Code is exposed a Service Type Object (BarCodesService) in SAP Business One SDK. You can use it following ways using DI API:

Create a Bar Code for an Item using DI API:

SAPbobsCOM.ICompanyService oCompanyService = (SAPbobsCOM.ICompanyService)oCompany.GetCompanyService(); SAPbobsCOM.BarCodesService oBarCodesService = (SAPbobsCOM.BarCodesService)oCompanyService.GetBusinessServiceSAPbobsCOM.ServiceTypes.BarCodesService); SAPbobsCOM.BarCode oBarCode = (SAPbobsCOM.BarCode)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCode); SAPbobsCOM.BarCodeParams oBarCodeParams; oBarCode.ItemNo = "A00002"; oBarCode.BarCode = "BA0002"; oBarCode.FreeText = "BarCode creation Using DI API"; oBarCode.UoMEntry = 3; //You need to provide 'UomEntry' from 'OUOM' table. oBarCodesService.Add(oBarCode);

Update a Bar Code for an Item using DI API:

SAPbobsCOM.ICompanyService oCompanyService = (SAPbobsCOM.ICompanyService)oCompany.GetCompanyService(); SAPbobsCOM.BarCodesService oBarCodesService = (SAPbobsCOM.BarCodesService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.BarCodesService); SAPbobsCOM.BarCode oBarCode = (SAPbobsCOM.BarCode)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCode); SAPbobsCOM.BarCodeParams oBarCodeParams; oBarCodeParams = (SAPbobsCOM.BarCodeParams)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCodeParams); oBarCode = (SAPbobsCOM.BarCode)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCode); oBarCodeParams.AbsEntry = 11; oBarCode = oBarCodesService.Get(oBarCodeParams); oBarCode.ItemNo = "A00002"; oBarCode.BarCode = "BA0002"; oBarCode.UoMEntry = 3; //You need to provide 'UomEntry' from 'OUOM' table. oBarCode.FreeText = ""; oBarCodesService.Update(oBarCode);

Delete a Bar Code using DI API:

SAPbobsCOM.ICompanyService oCompanyService = (SAPbobsCOM.ICompanyService)oCompany.GetCompanyService(); SAPbobsCOM.BarCodesService oBarCodesService = (SAPbobsCOM.BarCodesService)oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.BarCodesService); SAPbobsCOM.BarCode oBarCode = (SAPbobsCOM.BarCode)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCode); SAPbobsCOM.BarCodeParams oBarCodeParams; oBarCodeParams = (SAPbobsCOM.BarCodeParams)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCodeParams); oBarCode = (SAPbobsCOM.BarCode)oBarCodesService.GetDataInterface(BarCodesServiceDataInterfaces.bsBarCode); oBarCodeParams.AbsEntry = 11; //You need to provide 'BcdEntry' from 'OBCD' table. oBarCodesService.Delete(oBarCodeParams);

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !