on 09-07-2011 3:47 PM
Hai All,
I add one outgoing payments against Journal Entry using DIAPI...but it shows a error
"Base Document card and targer document card do not match [VPM2.Docline] [line:1]"
My coding,
Dim OP As SAPbobsCOM.Payments
OP = objAddOn.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oVendorPayments)
OP.DocType = SAPbobsCOM.BoRcptTypes.rCustomer
OP.CardCode = "C0000002"
OP.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_JournalEntry
OP.Invoices.DocEntry = 149
OP.CashAccount = "161000"
OP.CashSum = 9686344.75
OP.Invoices.SumApplied = 9686344.75
OP.Invoices.Add()
lretcode = OP.Add
If lretcode <> 0 Then
MsgBox(objAddOn.objCompany.GetLastErrorDescription)
'MsgBox("Error : " & objAddOn.objCompany.GetLastErrorDescription, MsgBoxStyle.Information, MIPL_Msgbox_Title1)
Exit Sub
Else
MsgBox("Added successfully")
End
Please Help me immediately...its urgent
Edited by: praveenkumar.e29 on Sep 7, 2011 4:48 PM
Edited by: praveenkumar.e29 on Sep 7, 2011 4:49 PM
Hi,
OP.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_JournalEntry may not be correct if you want to pay customer.
Try manually create the same outgoing payment and check VPM2 table in test environment.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.