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

EmploymentCategoryService in SAP Business One SDK

EmploymentCategoryService in SAP Business One SDK, is specific to Certificazione Unica for Italy localization.

For details about Certificazione Unica, refer to the following blog: Italy_Certificazione Unica related objects and properties in SAP Business One SDK.

Navigation path in SAP Business One: Business Partner Master Data → Accounting → Tax, select the checkbox Subject to Withholding Tax and go to the field Employment Category.

Below are some samples which you might find useful when using EmploymentCategoryService in SAP Business One DI API:

  • Add a new Employment Category:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EmploymentCategoryService oEmploymentCategoryService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EmploymentCategoryService);
SAPbobsCOM.EmploymentCategory oEmploymentCategory = oEmploymentCategoryService.GetDataInterface(SAPbobsCOM.EmploymentCategoryServiceDataInterfaces.ecsEmploymentCategory);
oEmploymentCategory.Code = "Z5";
oEmploymentCategory.Description = "Added via DI";
oEmploymentCategoryService.AddEmploymentCategory(oEmploymentCategory);
  • Get and Update an existing Employment Category:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EmploymentCategoryService oEmploymentCategoryService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EmploymentCategoryService);
SAPbobsCOM.EmploymentCategoryParams oEmploymentCategoryParams = oEmploymentCategoryService.GetDataInterface(SAPbobsCOM.EmploymentCategoryServiceDataInterfaces.ecsEmploymentCategoryParams);
SAPbobsCOM.EmploymentCategorysParams oEmploymentCategorysParams = oEmploymentCategoryService.GetDataInterface(SAPbobsCOM.EmploymentCategoryServiceDataInterfaces.ecsEmploymentCategorysParams);
oEmploymentCategoryParams.Code = "Z5";
SAPbobsCOM.EmploymentCategory oEmploymentCategory = oEmploymentCategoryService.GetDataInterface(SAPbobsCOM.EmploymentCategoryServiceDataInterfaces.ecsEmploymentCategory);
oEmploymentCategory = oEmploymentCategoryService.GetEmploymentCategory(oEmploymentCategoryParams);
oEmploymentCategory.Description = "Updated via DI";
oEmploymentCategoryService.UpdateEmploymentCategory(oEmploymentCategory);
  • Get list of all the Employment Category:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.EmploymentCategoryService oEmploymentCategoryService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.EmploymentCategoryService);
SAPbobsCOM.EmploymentCategoryParams oEmploymentCategoryParams = oEmploymentCategoryService.GetDataInterface(SAPbobsCOM.EmploymentCategoryServiceDataInterfaces.ecsEmploymentCategoryParams);
SAPbobsCOM.EmploymentCategorysParams oEmploymentCategorysParams = oEmploymentCategoryService.GetDataInterface(SAPbobsCOM.EmploymentCategoryServiceDataInterfaces.ecsEmploymentCategorysParams);
oEmploymentCategorysParams = oEmploymentCategoryService.GetEmploymentCategoryList();

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

Assigned Tags

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