Skip to Content
Product Information
Author's profile photo ANKIT CHAUHAN

PaymentReasonCodeService in SAP Business One SDK

PaymentReasonCodeService 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 1 in SAP Business One: Administration → Setup → Financial → Tax → Withholding Tax, and go to the column Payment Reason Code.

Navigation path 2 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 Payment Reason Code.

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

  • Add a new Payment Reason Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.PaymentReasonCodeService oPaymentReasonCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.PaymentReasonCodeService);
SAPbobsCOM.PaymentReasonCode oPaymentReasonCode = oPaymentReasonCodeService.GetDataInterface(SAPbobsCOM.PaymentReasonCodeServiceDataInterfaces.prcsPaymentReasonCode);
oPaymentReasonCode.Code = "TT";
oPaymentReasonCodeService.AddPaymentReasonCode(oPaymentReasonCode);
  • Get an existing Payment Reason Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.PaymentReasonCodeService oPaymentReasonCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.PaymentReasonCodeService);
SAPbobsCOM.PaymentReasonCodeParams oPaymentReasonCodeParams = oPaymentReasonCodeService.GetDataInterface(SAPbobsCOM.PaymentReasonCodeServiceDataInterfaces.prcsPaymentReasonCodeParams);
SAPbobsCOM.PaymentReasonCodesParams oPaymentReasonCodesParams = oPaymentReasonCodeService.GetDataInterface(SAPbobsCOM.PaymentReasonCodeServiceDataInterfaces.prcsPaymentReasonCodesParams);
oPaymentReasonCodeParams.Code = "A";
SAPbobsCOM.PaymentReasonCode oPaymentReasonCode = oPaymentReasonCodeService.GetDataInterface(SAPbobsCOM.PaymentReasonCodeServiceDataInterfaces.prcsPaymentReasonCode);
oPaymentReasonCode = oPaymentReasonCodeService.GetPaymentReasonCode(oPaymentReasonCodeParams);
  • Delete an existing Payment Reason Code:
SAPbobsCOM.CompanyService oCompanyService = oCompany.GetCompanyService();
SAPbobsCOM.PaymentReasonCodeService oPaymentReasonCodeService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.PaymentReasonCodeService);
SAPbobsCOM.PaymentReasonCodeParams oPaymentReasonCodeParams = oPaymentReasonCodeService.GetDataInterface(SAPbobsCOM.PaymentReasonCodeServiceDataInterfaces.prcsPaymentReasonCodeParams);
oPaymentReasonCodeParams.Code = "Z1";
oPaymentReasonCodeService.DeletePaymentReasonCode(oPaymentReasonCodeParams);

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

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.