Skip to Content

Adding Outgoing Payments with Check

Dec 12, 2017 at 01:13 AM


avatar image

Hi friends,

I am having problem while adding Outgoing Payments through DI API using check payment. whatever I set bank code, that always use default bank to create Outgoing Payments.

Thank you in advance,


var messages = new Dictionary<string, string>();

foreach (var o in OutgoingPaymentsParams) {
	var outgoing = (Payments)company.GetBusinessObject(BoObjectTypes.oVendorPayments);

	outgoing.CardCode = o.CardCode;
	outgoing.DocDate = o.DocDate;
	outgoing.VatDate = o.DocDate;
	outgoing.DocType = o.DocType;
	outgoing.Reference2 = o.Reference;
	outgoing.CounterReference = o.Reference;
	outgoing.JournalRemarks = $"Outgoing: {o.Reference} - {o.CardCode}";

	outgoing.Invoices.InvoiceType = o.InvoiceType;
	outgoing.Invoices.DocEntry = o.DocEntry;
	outgoing.Invoices.SumApplied = (double)o.SumApplied;

	outgoing.Checks.BankCode = o.CheckBankCode;
	outgoing.Checks.CheckAccount = o.BankAccount;

	outgoing.Checks.CheckSum = (double)o.SumApplied;
	outgoing.Checks.DueDate = o.DocDate;

	if (outgoing.Add() == Projects.SAP.ActionSuccessCode) {
		messages.Add(o.CardCode, "Succes");

	int errorCode;
	string errorMessage;
	company.GetLastError(out errorCode, out errorMessage);
	messages.Add(o.CardCode, $"{errorCode}: {errorMessage}");
10 |10000 characters needed characters left characters exceeded

What is the error message?


Hi Danilo,

Thank you for your reply.

No any error, that outgoing payment created with check, but wrong bank.

For example,

Two bank and bank code 1. Bank-A, 2. Bank-B, and in Company Details -> Basic Initialization tab, the default house bank is 'Bank-A',

and above code snippet use outgoing.Checks.BankCode = "Bank-B"; but it still use Bank-A for that check.

Thank you in advance,


* Please Login or Register to Answer, Follow or Comment.

1 Answer

Bryan Gomez Dec 14, 2017 at 04:41 PM

Just add your Country code + Bank code. For example "US^BOA" something like that.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Bryan Gomez,

Thank you for your reply.

Do you meaning set it for bank code field?

Thank you in advance,

outgoing.Checks.BankCode = "US^BOA";

Yes, you could try that and make sure that the bank code is existing.