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
908
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.