Problem Note 44379: "Run-time error '-2146233086 (80131502)': Automation error" or "Out of memory" when hierarchy.ShowMemberSelectionDialog submitted
You might encounter errors if you submit the SAS® Financial Management Add-In API for Microsoft Excel's 'ShowMemberSelectionDialog' call. Specifically, this call might result in errors similar to the following if the D74002 hot fix has been applied to your system:
Microsoft Visual Basic for Applications
Run-time error '-2146233086 (80131502)': Automation error
or
Microsoft Visual Basic for Applications
Out of memory
The AMO log might also show:
FMHierarchy: Members Property error. Invalid item: Null. Returning Null.
- For a user who has been assigned the role <Financial Management: Process Administrator>, the API call runs without error.
- For a non-Administrator user who is granted Read permissions to two or more members in the hierarchy, the API call also runs without error.
- For a non-Administrator user who is granted Read permissions to just one member in the hierarchy, submitting the 'ShowMemberSelectionDialog' API call might result in the above errors.
For an example and description of the Visual Basic for Applications (VBA) code that might result in this issue, please refer to the 'Full Code' tab, above.
For more information about the D74002 hot fix, please refer to the SAS Financial Management Add-in for Microsoft Excel 5.2 Hot Fix Downloads page.
For information about enabling the AMO log, please refer to SAS Note 19846.
For more information about the SAS Financial Management Add-In API for Microsoft Excel, please refer to the SAS Solutions Services Customization Guide.
For more information about assigning user roles, please refer to the SAS Solutions Services System Administration Guide.
For more information about granting or denying permissions in a SAS Financial Management hierarchy, please refer to the SAS Financial Management User's Guide.
Please note that this documentation is intended for use only by existing SAS Financial Management customers.
Please contact SAS Technical Support if you need User name or Password information to access any of this documentation.
Operating System and Release Information
SAS System | SAS Financial Management | Windows Vista for x64 | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Windows Vista | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2008 for x64 | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 for x64 | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
Microsoft® Windows® for x64 | 5.1 | 5.2_M1 | 9.2 TS2M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
This program is an EXAMPLE of VBA code that includes the API call that results in the errors described in this note.
Please note: At a minimum, you need to supply valid values for {Macro Name}, {Model Name}, and {Dimension Name} before submitting this code.
When this program executes, given the conditions described in content of this note, the code fails at the step:
"Set member = hierarchy.ShowMemberSelectionDialog(hierarchy.Members(memcode),
exclude, fmDisplayMode_CodeAndDescription)"
In this example, there is a read metadata
deny done at the top-level parent member. An explicit read metadata
grant for the individual user(s) is then done at the specific leaf nodes in the dimension.
Dim conn As Connect
Dim addin As FMAddIn
Dim cube As FMCube
Dim hierarchy As FMHierarchy
Dim member As FMMember
Dim memcode As String
Dim exclude As FMMembersCollection
Public Sub {Macro Name}()
Set conn = Application.COMAddIns.Item("SASSESExcelAddIn.Connect").Object
Set addin = conn.FMAddIn
' Exit if not logged in
If addin.IsLoggedIn = False Then
MsgBox "Please log on to the SAS Financial Management Add-In for Microsoft Excel to enable this functionality."
Exit Sub
End If
Set cube = addin.Cubes("{Model Name}")
Set hierarchy = cube.ServerHierarchies("{Dimension Name}")
Set member = hierarchy.ShowMemberSelectionDialog(hierarchy.Members(memcode),
exclude, fmDisplayMode_CodeAndDescription)
If member Is Nothing Then
'Do Nothing
Else
ActiveCell.Value = member.Code
End If
End Sub
SAS® Financial Management Add-In API for Microsoft Excel calls might result in the above Microsoft Visual Basic for Applications errors being returned. This occurs after production hot fix D74002 is applied to a SAS Financial Management 5.2_M1 system.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2012-02-06 13:57:56 |
Date Created: | 2011-09-22 09:31:03 |