on 08-10-2018 4:03 PM
Hello,
I have an Excel application that I want to display the SAP object from a data table that I filled.
I'M using SAP B1 9.20.170 PL 07 and Microsoft Excel 2013.
In the code below, I replaced the variable with the real values.
49324 is an AR Invoice (OINV.DocNum) in my database. When I execute the code, my SAP client is opened.
After the OpenForm statement gets executed in Excel VBA (I put in breakpoints), I see in my SAP the following message "No Matching records found 'A/R Invoice' (OINV) (ODBC -2028) [Message 131-183]"
Any clues to what I am missing ?
Thank you.
Dim oSboGuiApi As New SAPbouiCOM.SboGuiApi
Dim oSBO_App As SAPbouiCOM.Application
Dim oForm As SAPbouiCOM.Form
oSboGuiApi.Connect ("0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056")
Set oSBO_App = oSboGuiApi.GetApplication(0)
Set oForm = oSBO_App.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_Invoice, "", "49324")
Hi there,
Are you sure you have an invoice with DocEntry (please note that it is DocEntry not DocNum) 49324?
This code should work fine if you specify the correct object key.
If you want to open a blank form you can specify the empty string:
oSBO_App.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_Invoice, "", "")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.