Skip to Content
Former Member
May 20, 2008 at 03:59 PM

Adding a Document of type Payment to Payment lines


Hia all, was wondering if anyone could help me with the following issue:

I'm attempting to create Outgoing payments through the DI API with various document types in the lines.

The documents to be included in the outgoing payment are Invoices, Credit Notes, Journal Entries, and past Outgoing Payments.

The only one causing me a headache is the Outgoing Payments to be included. I saw that SBO includes previous payments as Journal Entries so I tried this but get the following error:

Error Code: -10

Error Description: Base document Card and Target Document Card do not match.

I try and add the past payments as follows:

oPay.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_JournalEntry

oRc = oComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oRc.DoQuery("Select TransID from OVPM where DocEntry = '" & PayData(i).DocEntry & "'")

oPay.Invoices.DocEntry = oRc.Fields.Item(0).Value

If anyone could help me it would be greatly appreciated.

Thanx guys.