Product Information
WTaxTypeCodeService in SAP Business One SDK
WTaxTypeCodeService 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, choose the browser button next to the Specific WTax Amounts Setup field, and go to the column WTax Type Code.
Below are some samples which you might find useful when using WTaxTypeCodeService in SAP Business One DI API:
- Add a new WTax Type Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.WTaxTypeCodeService oWTaxTypeCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.WTaxTypeCodeService);
SAPbobsCOM.WTaxTypeCodeParams oWTaxTypeCodeParams = oWTaxTypeCodeService.GetDataInterface(SAPbobsCOM.WTaxTypeCodeServiceDataInterfaces.wttcsWTaxTypeCodeParams);
SAPbobsCOM.WTaxTypeCode oWTaxTypeCode = oWTaxTypeCodeService.GetDataInterface(SAPbobsCOM.WTaxTypeCodeServiceDataInterfaces.wttcsWTaxTypeCode);
oWTaxTypeCode.Code = 20;
oWTaxTypeCode.Description = "Added via DI";
oWTaxTypeCodeService.AddWTaxTypeCode(oWTaxTypeCode);
- Update an existing WTax Type Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.WTaxTypeCodeService oWTaxTypeCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.WTaxTypeCodeService);
SAPbobsCOM.WTaxTypeCodeParams oWTaxTypeCodeParams = oWTaxTypeCodeService.GetDataInterface(SAPbobsCOM.WTaxTypeCodeServiceDataInterfaces.wttcsWTaxTypeCodeParams);
SAPbobsCOM.WTaxTypeCode oWTaxTypeCode;
oWTaxTypeCodeParams.Code = 1;
oWTaxTypeCode = oWTaxTypeCodeService.GetWTaxTypeCode(oWTaxTypeCodeParams);
oWTaxTypeCode.Description = "Updated via DI";
oWTaxTypeCodeService.UpdateWTaxTypeCode(oWTaxTypeCode);
- Delete an existing WTax Type Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.WTaxTypeCodeService oWTaxTypeCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.WTaxTypeCodeService);
SAPbobsCOM.WTaxTypeCodeParams oWTaxTypeCodeParams = oWTaxTypeCodeService.GetDataInterface(SAPbobsCOM.WTaxTypeCodeServiceDataInterfaces.wttcsWTaxTypeCodeParams);
SAPbobsCOM.WTaxTypeCode oWTaxTypeCode;
oWTaxTypeCodeParams.Code = 1;
oWTaxTypeCodeService.DeleteWTaxTypeCode(oWTaxTypeCodeParams);
Note: In Service Layer, refer to the entity WTaxTypeCodes for the same.
Be the first to leave a comment
You must be Logged on to comment or reply to a post.