Skip to Content
0
Former Member
Jun 13, 2006 at 12:25 PM

Unable to insert into CredtCard RCT3 table

67 Views

Dim vPaymnt As SAPbobsCOM.Payments

Set vPaymnt = oCompany.GetBusinessObject(oIncomingPayments)

'Creating the Incoming Payment

vPaymnt.CardCode = "C20000" 'Card Code

vPaymnt.CardName = "Norm Thompson" 'Card name

vPaymnt.DocTypte = rCustomer

vPaymnt.DocDate = Date 'Inv data

vPaymnt.CashSum = 421.1

'Inserting first line

vPaymnt.Invoices.DocEntry = 37 'DocEntry not DocNum

vPaymnt.CashAccount = "_SYS00000000005"

vPaymnt.CreditCards.CardValidUntil = CDate("08/08/2008")

vPaymnt.CreditCards.CreditAcct = "421.1"

vPaymnt.CreditCards.CreditCard = 2

vPaymnt.CreditCards.CreditCardNumber = "4111111111111111"

vPaymnt.CreditCards.CreditSum = 421.1

vPaymnt.CreditCards.CreditType = 1

RetVal = vPaymnt.Add

If RetVal <> 0 Then

oCompany.GetLastError nErr, errMsg

MsgBox nErr & " " & errMsg

Else

MsgBox ("Succeed in payment.add")

End If

Above is the mine code its not working can anyone suggest me why?