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
473
ExceptionalEventService 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 Exceptional Event.

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

  • Add a new Exceptional Event:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.ExceptionalEventService oExceptionalEventService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ExceptionalEventService);
SAPbobsCOM.ExceptionalEvent oExceptionalEvent = oExceptionalEventService.GetDataInterface(SAPbobsCOM.ExceptionalEventServiceDataInterfaces.eesExceptionalEvent);
oExceptionalEvent.Code = "16";
oExceptionalEvent.Description = "Added via DI";
oExceptionalEventService.AddExceptionalEvent(oExceptionalEvent);


  • Get and Update an existing Exceptional Event:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.ExceptionalEventService oExceptionalEventService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ExceptionalEventService);
SAPbobsCOM.ExceptionalEventParams oExceptionalEventParams = oExceptionalEventService.GetDataInterface(SAPbobsCOM.ExceptionalEventServiceDataInterfaces.eesExceptionalEventParams);
SAPbobsCOM.ExceptionalEventsParams oExceptionalEventsParams = oExceptionalEventService.GetDataInterface(SAPbobsCOM.ExceptionalEventServiceDataInterfaces.eesExceptionalEventsParams);
oExceptionalEventParams.Code = "16";
SAPbobsCOM.ExceptionalEvent oExceptionalEvent = oExceptionalEventService.GetDataInterface(SAPbobsCOM.ExceptionalEventServiceDataInterfaces.eesExceptionalEvent);
oExceptionalEvent = oExceptionalEventService.GetExceptionalEvent(oExceptionalEventParams);
oExceptionalEvent.Description = "Updated via DI";
oExceptionalEventService.UpdateExceptionalEvent(oExceptionalEvent);


  • Delete an existing Exceptional Event:


SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.ExceptionalEventService oExceptionalEventService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ExceptionalEventService);
SAPbobsCOM.ExceptionalEventParams oExceptionalEventParams = oExceptionalEventService.GetDataInterface(SAPbobsCOM.ExceptionalEventServiceDataInterfaces.eesExceptionalEventParams);
oExceptionalEventParams.Code = "16";
oExceptionalEventService.DeleteExceptionalEvent(oExceptionalEventParams);

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