3

WTaxTypeCodeService in SAP Business One SDK

 1 year ago
source link: https://blogs.sap.com/2023/01/23/wtaxtypecodeservice-in-sap-business-one-sdk/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
January 23, 2023 Less than a 1 minute read

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK