Skip to Content
Product Information
Author's profile photo ANKIT CHAUHAN

Brazil_CESTCodeService in SAP Business One SDK

CESTCodeService in SAP Business One SDK enables you to add, look up, update and remove CEST Code data.

CEST Code is a part of Nota Fiscal Eletrônica (NFe) function for Brazil localization. The CEST Code identifies material items which are subject to ST taxation and reported in the NFe file.

In SAP Business One, the CEST Code field can be found in the General tab of Item Master Data form.

Below are some samples which you might find handy when using CESTCodeService in SAP Business One SDK:

  • Add a new CEST Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.CESTCodeService oCESTCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.CESTCodeService);
SAPbobsCOM.CESTCodeData oCESTCodeData = oCESTCodeService.GetDataInterface(SAPbobsCOM.CESTCodeServiceDataInterfaces.cestcsCESTCodeData);
oCESTCodeData.Code = "29.999.00";
oCESTCodeData.Description = "Added via DI";
oCESTCodeService.Add(oCESTCodeData);
  • Update an existing CEST Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.CESTCodeService oCESTCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.CESTCodeService);
SAPbobsCOM.CESTCodeParams oCESTCodeParams = oCESTCodeService.GetDataInterface(SAPbobsCOM.CESTCodeServiceDataInterfaces.cestcsCESTCodeParams);
SAPbobsCOM.CESTCodeData oCESTCodeData;
oCESTCodeParams.AbsEntry = 984;
oCESTCodeData = oCESTCodeService.GetByParams(oCESTCodeParams);
oCESTCodeData.Description = "Updated via DI";
oCESTCodeService.Update(oCESTCodeData);
  • Delete an existing CEST Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.CESTCodeService oCESTCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.CESTCodeService);
SAPbobsCOM.CESTCodeParams oCESTCodeParams = oCESTCodeService.GetDataInterface(SAPbobsCOM.CESTCodeServiceDataInterfaces.cestcsCESTCodeParams);
oCESTCodeParams.AbsEntry = 984;
oCESTCodeService.Delete(oCESTCodeParams);

Note: In Service Layer, refer to the entity CESTCodes for the same.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.