Try this.
Dim oOutgoingPayment As SAPbobsCOM.Payments
oOutgoingPayment = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oVendorPayments)
If oOutgoingPayment.GetByKey("1") Then
oOutgoingPayment.Invoices.DocEntry = "2" '<--- AP Invoice
oOutgoingPayment.Invoices.UserFields.Fields.Item("U_").Value = "NEW VALUE"
If Not oOutgoingPayment.Update = 0 Then
MsgBox(oCompany.GetLastErrorDescription)
End If
End If