on 09-20-2013 8:40 PM
Hi Gurus,
We are facing a problem while trying to call a function module from Excel. We are pretty standard VBA code in our application however for one particular function module RSEC_CREATE_AUTHORIZATION_API, I am getting an error "Object Variable or With block variable not set " on the last line of the code copied below. Any inputs will be greatly appreciated as I have no clue about the problem with this particular function module. Thanks...
I have tested the FM in ABAP and it works as it should.
Dim objBAPIControl As Object 'Function Control (Collection object)
Dim objAuthList As Object ' Function Object
'Create the Logon Control & Function Controls
Set objBAPIControl = CreateObject("SAP.Functions")
Set objAuthList = objBAPIControl.Add("RSEC_CREATE_AUTHORIZATION_API")
'Get a connection object
Set oConnection = objBAPIControl.Connection
'Try to connect to the R/3 System
If oConnection.Logon(1, False) = False Then
MsgBox "R/3 connection failed"
Exit Sub
End If
'Declare the structure parameters
Dim exportCollection As Object
Dim authValue As Object
Set exportCollection = objAuthList.Exports
Hi Aninda:
we have ERP 6.00 (no EHPs installed yet) and that FM doesn't exist. What version of ERP do you have? I tried your code with FM RSEC_GET_PROPERTIES and it works fine, so I understand the problem isn't your code but the FM which may not exist in your system.
Cheers,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Its a newer FM certainly, certainly and the I was actually excited to find a RFC enabled function module to do the job its suppossed to do. Its a BI specific function module and I am on BI7.3. However, I did find the function module in SE37 and could test it from there as well.
Thanks,
Aninda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.