cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Status Update

0 Kudos

Hi

I want to update batch status using SDK

can anyone help which object or how can I update batch status using my add-on?

Nilehs Shah

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

This can be done using the BatchNumberDetail in conjuction with the BatchNumberService objects.

Here is a sample code:


SAPbobsCOM.CompanyService oCompanyService ;  

String docentry = 1; //Put here the actual AbsEntry of the Batchnumber record

 

oCompanyService = oCompany.GetCompanyService(); 

SAPbobsCOM.BatchNumberDetailsService oBatchNumbersService ; 

oBatchNumbersService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.BatchNumberDetailsService); 


SAPbobsCOM.BatchNumberDetailParams oBatchNumberDetailParams; 

oBatchNumberDetailParams = oBatchNumbersService.GetDataInterface(SAPbobsCOM.BatchNumberDetailsServiceDataInterfaces.sndsBatchNumberDetailParams); 

oBatchNumberDetailParams.DocEntry = docentry; 


SAPbobsCOM.BatchNumberDetail oBatchNumberDetail ; 

oBatchNumberDetail = oBatchNumbersService.Get(oBatchNumberDetailParams); 


oBatchNumberDetail.Status = BoDefaultBatchStatus.dbs_Locked; //put here the status you want

oBatchNumbersService.Update(oBatchNumberDetail);

Beni.

0 Kudos


This works fine

Thanks Beni

Answers (0)