on 12-30-2008 5:20 PM
Hi everyone
I want to apply Incoming Payment on account via DI API and C#, but i get the next error
-5002 Amount to be paid does not match existing transactions
The question is how can I acces to the Payments Means via DI API?
This is my code:
SAPbobsCOM.Payments oPmt;
oPmt = ((SAPbobsCOM.Payments)(oCompany.GetBusinessObject SAPbobsCOM.BoObjectTypes.oIncomingPayments)));
oPmt.DocDate = DateTime.Now;
oPmt.DocTypte = SAPbobsCOM.BoRcptTypes.rAccount;
oPmt.AccountPayments.AccountCode = "_SYS00000000026";
oPmt.AccountPayments.SumPaid = 100;
oPmt.AccountPayments.Add();
lRetCode = oPmt.Add();
if (lRetCode != 0)
{
oCompany.GetLastError(out lErrCode, out sErrMsg);
Console.Write(lErrCode + " " + sErrMsg); // Display error message
}
else
{
Console.Write("Payment aplied");
}
Thank's
David
I fix the problem
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.