on 04-13-2006 2:00 PM
Hi,
I want to find an invoice using DI-Api.
I use getbykey(invoicenumber) but there is no invoice found, but the invoice exists in SBO.
Does anyone have a working example?
Hi,
Yes, example (in VB.NET):
Dim rs As SAPbobsCOM.Recordset
Dim query As String
Dim docnum As Integer
Try
query = "SELECT DocEntry FROM OINV WHERE DocNum = 20050001"
rs = oCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
rs.DoQuery(query)
Console.WriteLine("aantal regels ", rs.RecordCount) If rs.RecordCount > 0 Then Console.WriteLine("DocEntry: ", rs.Fields.Item(0).Value)
End If
Catch e As Exception
Dim message As String = _
e.[GetType].ToString + ":" + vbCrLf + _
e.Message + vbCrLf + _
e.StackTrace
Console.Error.WriteLine(message)
MsgBox(message, MsgBoxStyle.Critical)
End Try
Regards,
Jacco
Message was edited by: J. Moolenaar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I only know the invoicenumber.
Does this mean I should do a query on DocNum.
Does anyone have a working example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The invoicenumber you are using is probably the DocNum of the invoice. In the function getbykey you should use the DocEntry of the invoice.
Hope this helps,
Jacco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.