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