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