Skip to Content
author's profile photo Former Member
Former Member

outgoing payments against journal entry-DIAPI

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2011 at 03:15 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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.