API
-
Upload
mhenley8059 -
Category
Documents
-
view
25 -
download
0
Transcript of API
Hyperion® Enterprise®
API Reference
RELEASE 6.5.1.1.000
Hyperion Enterprise API Reference, 6.5.1.1.000
Copyright © 1991, 2011, Oracle and/or its affiliates. All rights reserved.
Authors: EPM Information Development Team
This software and related documentation are provided under a license agreement containing restrictions on use anddisclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement orallowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit,perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilationof this software, unless required by law for interoperability, is prohibited. The information contained herein is subject tochange without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S.Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS:Programs, software, databases, and related documentation and technical data delivered to U.S. Government customersare "commercial computer software" or "commercial technical data" pursuant to the applicable Federal AcquisitionRegulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, andadaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, tothe extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, CommercialComputer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software is developed for general use in a variety of information management applications. It is not developed orintended for use in any inherently dangerous applications, including applications which may create a risk of personalinjury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe,backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliatesdisclaim any liability for any damages caused by use of this software in dangerous applications.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of theirrespective owners.
This software and documentation may provide access to or information on content, products, and services from thirdparties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind withrespect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for anyloss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
Contents
Chapter 1. About Hyperion Enterprise API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Hyperion Enterprise API Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
How to Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Languages Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Visual Basic Programming Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Function Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Passing Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Callback Functions in Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Using an apiStruct Structure in Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Modify Non-Visual Basic Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Linking Programs to an Import Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Return Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Frequencies and Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Hyperion Enterprise Frequencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Reporting Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 2. Spreadsheet Add-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Overview of Spreadsheet Add-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Single Application Management Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Multiple Application Management Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Selection Dialog Box Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Data Retrieval Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Consolidation Detail Values with Spread Sheet Add In Function . . . . . . . . . . . . . . . . 25
Data Update Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Alphabetical Function Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
HypAcctAsk( ) - Select Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
HypAcctListAskEx( ) - Select Account List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
HypCatAskEx( ) - Select Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
HypConstruct( ) - Open an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Contents iii
HypConstructEx( ) - Open an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
HypDestruct( ) - Close an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
HypFreqAsk( ) - Select Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
HypGetDefJour( ) - Get Default Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
HypGetDefJourCat( ) - Get Default Journal Category . . . . . . . . . . . . . . . . . . . . . . . . 33
HypGetDefJourPer( ) - Get Default Journal Period . . . . . . . . . . . . . . . . . . . . . . . . . . 34
HypHPACC( ) - Get Account or Subaccount ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
HypHPBET( ) - Calculate Better or Worse Value . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
HypHPCAD( ) - Get Currency Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
HypHPCAL( ) - Is Account Calculated? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
HypHPCDE( ) - Get Category Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
HypHPCommit2( ) - Write Data Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
HypHPCUREx( ) - Get Component Currency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
HypHPDRV( ) - Calculate Derived Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
HypHPECO( ) - Get Entity Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
HypHPFlush( ) - Flush Data Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
HypHPFLW( ) - Is Account a Flow Account? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
HypHPFRE( ) - Get Category Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
HypHPFUL( ) - Get Component Full Entity Description . . . . . . . . . . . . . . . . . . . . . . 44
HypHPHEA( ) - Get Account Heading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
HypHPINC( ) - Is Account an Income Account? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
HypHPINP( ) - Is Account an Input Account? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
HypHPJOUR( ) - Get Journal Detail Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
HypHPKEYEx( ) - Get Default Entity, Category, Account, or Period . . . . . . . . . . . . . 50
HypHPLNK( ) - Store Data Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
HypHPNAM( ) - Get Entity ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
HypHPOWN( ) - Get Shares Owned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
HypHPPBE( ) - Calculate Percent Better or Worse . . . . . . . . . . . . . . . . . . . . . . . . . . 55
HypHPPCH( ) - Calculate Percent Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
HypHPSCA( ) - Get Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
HypHPVAL( ) - Retrieve Normal Account Value . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
HypHPVAL2( ) - Retrieve Normal Account Value . . . . . . . . . . . . . . . . . . . . . . . . . . 59
HypHPVALEx( ) - Retrieve Special Account Value . . . . . . . . . . . . . . . . . . . . . . . . . . 60
HypJourAsk( ) - Select Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
HypJourDetAsk( ) - Select Journal Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
HypMultiAsk( ) - Select Default Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
HypMultiDefault( ) - Get Default Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
HypMultiDeinit( ) - Log off Multiple Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 64
HypMultiEnum( ) - Enumerate Open Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 65
iv Contents
HypMultiGet( ) - Get Application Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
HypMultiInit( ) - Log on to Multiple Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 66
HypNamAskEx( ) - Select Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
HypNameListAskEx( ) - Select Entity List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
HypPerAsk( ) - Select Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
HypSetDefJour( ) - Set Default Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
HypSetDefJourCat( ) - Set Default Journal Category . . . . . . . . . . . . . . . . . . . . . . . . . 69
HypSetDefJourPer - Set Default Journal Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
HypSetMVMode( ) - Set HypVal Return Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . 71
HypSetProgramName( ) - Set Text for Users in Application Report . . . . . . . . . . . . . . 71
HypValidateLnkParams( ) - Check Link Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 72
HypValidateParams( ) - Check Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
HypValidateParamsEx( ) - Check Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
HypValReturn( ) - Return Status of Last Value Retrieval . . . . . . . . . . . . . . . . . . . . . . 75
Chapter 3. Table Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Table Functions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Select and Deselect Tables Using Hyp...( ) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using Tables with Hyp...( ) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Related Tables and Hyp...( ) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Organization Structures and Hyp...( ) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Table Functions Alphabetical Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
DateConv( ) - Date Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
HypCatGetNumPeriodsEx( ) - Calculate Number of Periods in a Category . . . . . . . . . 83
HypCatGetPerShortEx( ) - Get Period ID in Category Frequency . . . . . . . . . . . . . . . . 84
HypCatMapPeriodEx( ) - Map Period into Frequency . . . . . . . . . . . . . . . . . . . . . . . . 84
HypEnumAcctListEntriesEx( ) - Enumerate Accounts in Account List . . . . . . . . . . . . 85
HypEnumApplications( ) - Enumerate Applications . . . . . . . . . . . . . . . . . . . . . . . . . 87
HypEnumEx( ) - Enumerate Records in a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
HypEnumNameListEntriesEx( ) - Enumerate Entities in an Entity List . . . . . . . . . . . . 90
HypEnumOrgNames( ) - Enumerate Nodes in an Organization . . . . . . . . . . . . . . . . . 91
HypEnumSubAcctSig( ) - Enumerate Subaccount Signatures . . . . . . . . . . . . . . . . . . . 92
HypFindEx( ) - Find Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
HypFindNameInOrgEx( ) - Find Node ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
HypGetCatPerFreq( ) - Get Period Number and Frequency in Category . . . . . . . . . . . 96
HypGetChild( ) - Get Child Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
HypGetNameSig( ) - Get Entity Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
HypGetOrgLevel( ) - Get Level in Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
HypGetPerViewEx( ) - Get Frequency and View . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Contents v
HypGetSibling( ) - Get Sibling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
HypGetTopNodeEx( ) - Get Top Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
HypIsNameParentEx( ) - Check If Entity Is a Parent . . . . . . . . . . . . . . . . . . . . . . . . 102
HypLockEx( ) - Select a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
HypQryRptFreqEx( ) - Query Reporting Frequency . . . . . . . . . . . . . . . . . . . . . . . . 104
HypQueryEx( ) - Query Hyperion Enterprise Tables . . . . . . . . . . . . . . . . . . . . . . . . 105
HypUnLockEx( ) - Deselect a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Chapter 4. Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Advanced Functions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Opening an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Tables and Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Using an apiStruct Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Select and Deselect Tables using Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . 111
Selection Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Using Tables with Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Related Tables and Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Combining Spreadsheet Add-in Functions with Advanced Functions . . . . . . . . . . . . . . 113
Selection Dialog Box Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Working with Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Updating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Consolidation Detail Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Organization Structures and Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Setting the Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Server Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Hyperion Enterprise INI File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
API Functions for Hyperion Enterprise Security . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Replacing Obsolete Ent...( ) Functions with New Ent...( ) Functions . . . . . . . . . . . . . . . . 125
Advanced Functions Alphabetical Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
EntAcctAsk( ) - Select Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
EntAcctListAsk( ) - Select Account List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
EntAcctSplit( ) - Split Account Signature into Parts . . . . . . . . . . . . . . . . . . . . . . . . . 127
EntAppendToCBChain( ) - Append to Callback Chain . . . . . . . . . . . . . . . . . . . . . . 128
EntAppExtract( ) - Extract Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
EntAppExtractVB( ) - Extract Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
EntAppLoad( ) - Load Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
EntAppLoadVB( ) - Load Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
vi Contents
EntAsciiToDouble( ) - Convert String to Double . . . . . . . . . . . . . . . . . . . . . . . . . . 137
EntCatAsk( ) - Change Category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
EntCatGetNumPeriods( ) - Calculate Number of Periods in a Category . . . . . . . . . . 138
EntCatGetPerShort( ) - Get Period Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
EntCatMapPeriod( ) - Map Period into Frequency . . . . . . . . . . . . . . . . . . . . . . . . . 140
EntCloseApplication( ) - Close Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
EntConsolidate( ) - Consolidate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
EntCreateApplication( ) - Create Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
EntDataExtract( ) - Extract Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
EntDataExtractVB2( ) - Extract Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
EntDataFileOpen( ) - Open Datafile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
EntDateConv( ) - Date Conversion and Calculate Period Number . . . . . . . . . . . . . . 153
EntDeleteFromCBChain( ) - Delete from Callback Chain . . . . . . . . . . . . . . . . . . . . 154
EntDiscardChanges( ) - Discard Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
EntDiscardDefault( ) - Discard Default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
EntDSMDataExtract( ) - Extract DSM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
EntDSMDataExtractVB( ) - Extract DSM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
EntEntityAsk( ) - Select Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
EntEntityListAsk( ) - Select Entity List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
EntEntityListLock( ) - Lock Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
EntEntityListUnLock( ) - Unlock Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
EntEnum( ) - Enumerate Records in a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
EntEnumApplications( ) - Enumerate Applications . . . . . . . . . . . . . . . . . . . . . . . . . 178
EntEnumOrgEntities( ) - Enumerate Nodes in an Organization . . . . . . . . . . . . . . . . 178
EntEnumSubAcctSig( ) - Enumerate Subaccounts . . . . . . . . . . . . . . . . . . . . . . . . . . 180
EntEnumUsersOnSystem( ) - Enumerate Users on System . . . . . . . . . . . . . . . . . . . 181
EntFind( ) - Find Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
EntFindEntityInOrg( ) - Find Node ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
EntFormatNumber2( ) - Format Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
EntFreqAsk( ) - Select Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
EntGetAccountsInputType( ) - Get Account Type . . . . . . . . . . . . . . . . . . . . . . . . . . 189
EntGetActiveModule( ) - Get Program Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
EntGetAppProfileLong( ) - Get Application Profile Long . . . . . . . . . . . . . . . . . . . . . 191
EntGetAppProfileString( ) - Get Application Profile String . . . . . . . . . . . . . . . . . . . 192
EntGetCatPerFreq( ) - Get Period Number and Frequency in Category . . . . . . . . . . 193
EntGetChild( ) - Get Child Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
EntGetEntitySig( ) - Get Entity Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
EntGetHappFromSelect( ) - Get the Application Handle . . . . . . . . . . . . . . . . . . . . . 196
EntGetLastError( ) - Get Last Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Contents vii
EntGetLastErrorByHApp( ) - Get Last Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
EntGetOrgLevel( ) - Get Level in Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
EntGetPerView( ) - Get Frequency and View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
EntGetProfileLong( ) - Get Hyperion Profile Long . . . . . . . . . . . . . . . . . . . . . . . . . 200
EntGetProfileString( ) - Get Hyperion Profile String . . . . . . . . . . . . . . . . . . . . . . . . 201
EntGetRightsToTask( ) - Get Rights to Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
EntGetSibling( ) - Get Sibling Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
EntGetVarAddr( ) - Get Variable's Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
EntInitApiStruct( ) - Initialize API Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
EntIsAccountInput( ) - Check if an Account is an Input Account . . . . . . . . . . . . . . . 205
EntIsEntityParent( ) - Check if an Entity is a Parent . . . . . . . . . . . . . . . . . . . . . . . . 205
EntIsModified( ) - Is Table Modified? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
EntIsSelected( ) - Is Table Selected? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
EntJournalExtract( ) - Extract Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
EntJournalExtractVB( ) - Extract Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
EntJournalLoad( ) - Load Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
EntJournalLoadVB( ) - Load Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
EntLogicAttach( ) - Attach Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
EntLogicCompile( ) - Compile Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
EntLogicDetach( ) - Detach Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
EntLogicDiscard() Discard Logic Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
EntLogicExport( ) - Export Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
EntLogicExportVB( ) - Export Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
EntLogicImport( ) - Import Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
EntLogicImportVB( ) - Import Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
EntMessage( ) - Display a Message Box and Write the Message to the Error Log . . . . 231
EntMessageVB( ) - Display a Message Box and Write the Message to the ErrorLog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
EntMsgLogTaskEndTime( ) - Write the End Time and Task to the Error Log . . . . . . 233
EntMsgLogTaskStartTime( ) - Write the Start Time and Task to the Error Log . . . . . 234
EntMsgLogTime( ) - Write the Time and Event to the Log File . . . . . . . . . . . . . . . . 235
EntMsgLogTimeVB( ) - Write the Time and Event to the Log File . . . . . . . . . . . . . . 236
EntOpenApplication( ) - Open Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
EntOpenServerApplication( ) - Open Server Application . . . . . . . . . . . . . . . . . . . . . 237
EntPgeExtract( ) - Extract Page Format and Setup Information . . . . . . . . . . . . . . . . 238
EntPgeLoad( ) - Load Page Format and Setup Information . . . . . . . . . . . . . . . . . . . 239
EntPerAsk( ) - Select Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
EntQryRptFreq( ) - Query Reporting Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
EntQueryEx( ) - Query Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
viii Contents
EntQueryDefault( ) - Query Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
EntRegisterMsgBox( ) - Register Alternate MessageBox( ) Routine . . . . . . . . . . . . . . 244
EntRunRollover( ) - Run Rollover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
EntSave( ) - Save Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
EntSaveDefault( ) - Save Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
EntSecurityExtract( ) - Extract Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
EntSecurityExtractVB( ) - Extract Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
EntSecurityLoad( ) - Load Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
EntSecurityLoadVB( ) - Load Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
EntSelect( ) - Select a Table for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
EntSelectAdd( ) - Select an Additional Table for Use . . . . . . . . . . . . . . . . . . . . . . . . 254
EntSelectTable( ) - Select a Table for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
EntSelectTableAdd( ) - Select an Additional Table for Use . . . . . . . . . . . . . . . . . . . . 256
EntSetActiveModule( ) - Set Active Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
EntSharesExtract( ) - Shares Extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
EntSharesExtractVB( ) - Shares Extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
EntSharesLoad( ) - Shares Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
EntSharesLoadVB( ) - Shares Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
EntUNCDataLoad( ) - Load Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
EntUNCDataLoadVB( ) - Load Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
EntUnSelect( ) - Deselecting Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
EntUpdate( ) - Update Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
EntUpdateDefault( ) - Update Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
EntWriteAppProfileLong( ) - Write Application Profile Long Integer . . . . . . . . . . . . 272
EntWriteAppProfileString( ) - Write Application Profile String . . . . . . . . . . . . . . . . 273
EntWriteProfileLong( ) - Write Hyperion Profile Long Integer . . . . . . . . . . . . . . . . 274
EntWriteProfileString( ) - Write Hyperion Profile String . . . . . . . . . . . . . . . . . . . . . 274
EntVBGetCStrLen( ) - Get Length of C-string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
EntVBCopyData( ) - Copy Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
EntVBCopyStr( ) - Copy String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
HypGethApp( ) - Get Application Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
HypGethSelect( ) - Get Table Selections Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
HypSethSelect( ) - Set Table Selections Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Chapter 5. Converting from Hyperion Enterprise SE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Hyperion Enterprise SE Conversion Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Include Files for Hyperion Enterprise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Function Classifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Supported Spreadsheet Add-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Contents ix
Other Supported Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
New Ent...( ) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Unsupported Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Upgrading Hyperion Enterprise SE Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Redefine Application Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Converting 16-bit Programs to 32-bit Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Replacing Obsolete Functions with New Hyp...( ) Functions . . . . . . . . . . . . . . . . . . 284
Replacing Obsolete Functions with New Ent...( ) Functions . . . . . . . . . . . . . . . . . . . 286
Upgrading Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Upgrade HypLock( ) and HypUnLock( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Upgrade HypFind( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Upgrade HypQuery( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Upgrade HypQuerySig( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Upgrade HypQryNode( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Upgrade HypQryAcctListEntry( ) and HypQryNameListEntry( ) . . . . . . . . . . . . . . . 295
Replacing Split 32-bit Account and Entity Signatures . . . . . . . . . . . . . . . . . . . . . . . 297
Changes to Hyperion Enterprise Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Renamed Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Changes to the Intercompany Detail Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Changes to the Nodes Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Changes to the Rollovers Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Obsolete Security Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Changes to the Security Group Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Changes to the Security Users Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Chapter 6. Callback Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Callback Functions Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Callback Function Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
CALLBACK12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
CALLBACKAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
CALLBACKAPP (or CALLBACK6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
CALLBACKCREATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
CALLBACKDBENUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
CALLBACKDBLOAD - For EntAppExtract( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
CALLBACKDBLOAD - For EntAppLoad( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
CALLBACKDBLOAD - For EntDataExtract( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
CALLBACKDBLOAD - For EntUNCDataLoad( ) . . . . . . . . . . . . . . . . . . . . . . . . . . 314
CALLBACKJOUREXTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
CALLBACKJOURLOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
x Contents
CALLBACKLOGIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
CALLBACKSECLOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
CALLBACKSEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
CALLBACKSHARES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
CALLBACKSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
CALLBACKUSERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
CALLBACKVB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
DWCALLBACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
CALLBACKVBNET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Chapter 7. Specific Functions for Microsoft Visual Basic.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Hyperion Enterprise API's for Microsoft Visual Basic.NET . . . . . . . . . . . . . . . . . . . . . . 329
EntDataExtractVB2( ) - Extract Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
EntDSMDataExtractVB( ) - Extract DSM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
EntGetVarAddr( ) - Get Variable's Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
EntJournalExtractVB( ) - Extract Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
EntJournalLoadVB( ) - Load Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
EntQueryDefault( ) - Query Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
EntQueryEx( ) - Query Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
EntSecurityExtractVB( ) - Extract Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
EntSecurityLoadVB( ) - Load Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
EntUpdate( ) - Update Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
EntUpdateDefault( ) - Update Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
EntVBCopyData( ) - Copy Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
HypHPJOUR( ) - Get Journal Detail Information . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Appendix A. Table IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Table Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Tables of Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Associated Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Related Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Appendix B. Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Query Attributes Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Default Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Nondefault Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
ID_ACCOUNTS (Accounts Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . 367
ID_ACCTCONVERT (Account Conversion Table) Query Attributes . . . . . . . . . . . . 370
ID_ACCTCVTLIST (Account Conversion List Table) Query Attributes . . . . . . . . . . 370
ID_ACCTLIST (Account List Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . 370
Contents xi
ID_ACCTLISTENTRY (Account List Entry Table) Query Attributes . . . . . . . . . . . . 371
ID_APPDEFAULT (Application Defaults Table) Query Attributes . . . . . . . . . . . . . . 372
ID_BOOK_ENTRIES (Book Entries Table) Query Attributes . . . . . . . . . . . . . . . . . . 374
ID_BOOK_SETS (Book Sets Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . 375
ID_BOOKS (Books Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
ID_CATEGORY (Categories Table) Query Attribute . . . . . . . . . . . . . . . . . . . . . . . . 375
ID_CATEGORY_LINKS (Category Links Table) Query Attributes . . . . . . . . . . . . . . 378
ID_CODES (Codes Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
ID_CURRENCY (Currencies Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . 378
ID_DATAFILE (Datafile Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 378
ID_FORMATS (Formats Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 380
ID_FORMULAS (Formulas Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . 381
ID_FREQUENCY (Frequencies Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . 381
ID_GROUP (Account Groups Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . 382
ID_HAPP (Application Information Table) Query Attributes . . . . . . . . . . . . . . . . . 383
ID_ICSET (Intercompany Matching Sets Table) Query Attributes . . . . . . . . . . . . . . 383
ID_INTCODET (Intercompany Detail Table) Query Attributes . . . . . . . . . . . . . . . . 384
ID_JOURNAL_DETAIL (Journals Detail Table) Query Attributes . . . . . . . . . . . . . . 384
ID_JOURNAL_HISTORY (Journals History Table) Query Attributes . . . . . . . . . . . 385
ID_JOURNAL_HISTORY_DETAIL (Journals History Detail Table) QueryAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
ID_JOURNAL_PERIOD_INFO (Journal Period Information Table) QueryAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
ID_JOURNAL_TEMPLATES (Journal Templates Table) Query Attributes . . . . . . . . 389
ID_JOURNAL_TEMPLATES_DETAIL (Journal Templates Detail Table) QueryAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
ID_JOURNALS (Journals Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . 391
ID_LOGIC (Methods Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
ID_LOGIC_CAT_ATTRIB (Logic Category Attributes Table) Query Attributes . . . . 394
ID_NAMECONVERT (Entity Conversion Table) Query Attributes . . . . . . . . . . . . . 394
ID_NAMECVTLIST (Entity Conversion Table) Query Attributes . . . . . . . . . . . . . . 394
ID_NAMELIST (Entity Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
ID_NAMELISTENTRY (Entity List Entry Table) Query Attributes . . . . . . . . . . . . . . 395
ID_NAMES (Entities Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
ID_NODES (Nodes Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
ID_ORGANIZATION (Organizations Table) Query Attributes . . . . . . . . . . . . . . . . 401
ID_PERIOD (Periods Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
ID_PRINT (Printing Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
ID_PSFDATA (PSF Data Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 402
ID_REPORT_ENTRIES (Report Entries Table) Query Attributes . . . . . . . . . . . . . . . 403
xii Contents
ID_REPORT_SETS (Report Sets Table) Query Attributes . . . . . . . . . . . . . . . . . . . . 403
ID_REPORTS (Reports Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
ID_ROLLOVER (Rollovers Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . 404
ID_ROLLSET (Rollover Sets Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . 404
ID_RPTFREQ (Reporting Frequencies Table) Query Attributes . . . . . . . . . . . . . . . . 404
ID_RPTVIEW (Reporting Views Table) Query Attributes . . . . . . . . . . . . . . . . . . . . 405
ID_RULES (Update Rules Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . 405
ID_RULESEXP (Update Rules Expressions Table) Query Attributes . . . . . . . . . . . . . 406
ID_RULESVAR (Rules Variables Table) Query Attributes . . . . . . . . . . . . . . . . . . . . 406
ID_SCHEDULES (Schedules Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . 407
ID_SECCLASS (Security Class Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . 407
ID_SECGRPTAB (Security Group Table) Query Attributes . . . . . . . . . . . . . . . . . . . 408
ID_SECRIGHTS (Security Rights Table) Query Attributes . . . . . . . . . . . . . . . . . . . . 408
ID_SECTASK (Security Task Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . 409
ID_SECTASKFILTER (Security Task Filter Table) Query Attributes . . . . . . . . . . . . . 409
ID_SECUSERTAB (Security Users Table) Query Attributes . . . . . . . . . . . . . . . . . . . 409
ID_SERVER (Server Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
ID_SHARES (Shares Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
ID_SUBACCTDET (Subaccount Detail Table) Query Attributes . . . . . . . . . . . . . . . 411
ID_SUBACCTHDR (Subaccount Header Table) Query Attributes . . . . . . . . . . . . . . 412
ID_SUBNAME (Subentities Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . 412
ID_SUBSTRUCTURE (Substructures Table) Query Attributes . . . . . . . . . . . . . . . . 413
ID_SUGGEST_OWN (Suggest Consolidation Method and Percentage Table) QueryAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
ID_USE_METHODS (Used Methods Table) Query Attributes . . . . . . . . . . . . . . . . . 414
ID_USERDEFAULT (User Defaults Table) Query Attributes . . . . . . . . . . . . . . . . . . 414
ID_USERDEFFUNC (Custom Functions Table) Query Attributes . . . . . . . . . . . . . . 417
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Contents xiii
xiv Contents
1About Hyperion Enterprise API
In This Chapter
Hyperion Enterprise API Overview ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
How to Use This Guide ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
Languages Supported ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Visual Basic Programming Notes ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Modify Non-Visual Basic Programs... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Include Files .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Linking Programs to an Import Library .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Return Codes ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Frequencies and Views ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
About Oracle's Hyperion® Enterprise® API provides general information about the HyperionEnterprise Application Programing Interface (API) and its use.
Hyperion Enterprise API OverviewThe Hyperion Enterprise API functions give you high-level access to Hyperion Enterprise datafrom any program. The Hyperion Enterprise API functions are contained in theHEACCESS.DLL file.
This guide is written primarily for Visual Basic programmers. It describes how to use the availableAPI functions for Hyperion Enterprise, and includes sample code for each function and Cequivalents of each function. It also describes how to convert your Hyperion Enterprise SEHEACCESS programs for use in Hyperion Enterprise.
How to Use This GuideIn this guide, the Hyperion Enterprise API functions are classified into the following groups:
l Spreadsheet add-in functions that are optimized for use with applications such asspreadsheets. These functions are the easiest to use. They all take the form Hyp...( ). Formore information, see Chapter 2, “Spreadsheet Add-in Functions”
l Table functions that are optimized for use with applications such as spreadsheets. Thesefunctions are the easiest to use. They all take the form Hyp...( ). For more information, see
Hyperion Enterprise API Overview 15
Chapter 2, “Spreadsheet Add-in Functions” These functions are alternatives to the advancedfunctions and all take the form Hyp...( ). For more information, see Chapter 3, “TableFunctions”
l Advanced functions that use the full power of the underlying Hyperion Enterprise APIfunctions. These functions generally call the Hyperion Enterprise API functions directly.They all take the form Ent...( ). For more information, see Chapter 4, “Advanced Functions”
l Hyperion Enterprise SE functions that you need to update for use with Hyperion Enterprise.For more information on converting these functions, see Chapter 5, “Converting fromHyperion Enterprise SE”
In general, you should start with the spreadsheet add-in functions and basic functions forworking with tables, because these functions are easy to use and have relatively little impact onsystem data.
In addition to the groups of functions listed, this guide also includes information in theappendixes about Table IDs and Query Attributes.
Languages SupportedThe Hyperion Enterprise API supports programming languages that can interact with WindowsDLL files. The following programming languages are supported:
l Visual Basic
l C
l C++
l Basic
l Fortran
l Pascal
We provide include files that work with Microsoft Visual Basic Release 5.0 and Microsoft VisualC++ Version 5.0. Other Basic and C compilers should work but might require minor changesto the include files or examples. Other languages require you to make your own include file.
Visual Basic Programming NotesChapters are divided into basic sections, some of which apply to Visual Basic programmers.Refer to the following sections of the chapter when programming in Visual Basic:
l Function Declarations
l Constants
l Strings
l Passing Addresses
l Callback Functions in Visual Basic
16 About Hyperion Enterprise API
l Using an apiStruct Structure in Visual Basic
Function DeclarationsInclude the TOOLKIT.BAS file in your program, not the TOOLKIT.H file. You can avoid memoryproblems by copying only the declarations you need instead of including the whole file.
Note: The TOOLKIT.BAS file contains both 32-bit and 16-bit function declarations. The 16-bit functions are no longer supported. You should use the 32-bit function declarationsonly. The 32-bit declarations use Lib HACCESS32.DLL. The obsolete 16-bit functionsuse Lib HACESS.DLL.
Constants Many constants are preceded with HYP_ in the TOOLKIT.BAS file. For example, useHYP_NONE instead of NONE. If you cannot find a constant in TOOLKIT.BAS, locate it in theTOOLKIT.H or TOOLINC.H files, then clone its definition.
Table IDs are identified in this guide in their C form, such as ID_TABLENAME. If you are usingVisual Basic, insert HYP_ at the beginning of all table IDs. The correct Visual Basic form for atable ID, as shown in the TOOLKIT.BAS file, is HYP_ID_TABLENAME.
The constants TRUE and FALSE in this manual refer to their standard C definitions, 1 and 0respectively, not the usual Visual Basic definitions -1 and 0.
Tip: You can avoid memory problems by copying only the definitions you need instead ofincluding the entire TOOLKIT.BAS file.
StringsStrings are returned as C-style strings. Visual Basic programmers should first allocate a stringlarge enough for the value to be returned, then pass the string address to the API function. Onreturn, search for the zero character in the string. This marks the end of the string. Truncate thestring at the zero character. You can also write a function to search for the zero character becauseyou will need to do it frequently.
Here is an example:
'Function to convert C string to Visual Basic stringPrivate Function CToBStr(szStr$) As StringDim p%p% = InStr (szStr$, Chr$(0))If p% Then szStr$ = Left (szStr$, p% -1)CToBStr$ = szStr$End Function
Some functions take an argument of any type, declared as Any in the function declaration. It iseasiest to create a custom clone of the declaration to use when the argument is a string. Pass the
Visual Basic Programming Notes 17
string argument by value (ByVal) to get Visual Basic to pass the address of the string. Passing astring by reference (the default) causes Visual Basic to pass the address of BASIC's string structure(sometimes called a BString) instead of the address of the string itself.
Visual Basic defines the constant vbNullString, which you can use whenever you need to passNULL as the address of a string.
Passing AddressesFunction declarations usually handle the passing of addresses automatically. For moreinformation, see “EntGetVarAddr( ) - Get Variable's Address” on page 203. This function isuseful when you need set the value of a field in a structure to an address.
Callback Functions in Visual BasicA number of the Hyperion Enterprise API functions use callback functions. One argument tothe API function is the address of a function that you want the API to call. You provide thefunction and pass its address to the Hyperion Enterprise API function. Enumeration functions,in particular, use callback functions. For every record enumerated, for example, theHypEnumEx( ) function, will call the function you specified, so that you can do whatever youneed to do with the record.
Visual Basic version 5.0 supports callback functions. Use Visual Basic’s Address of function topass the address of your callback function to the Hyperion Enterprise API function. If one ofthe arguments in your callback function is the address of a C-style string, you can useEntVBGetCStrLen( ) and EntVBCopyData( ) to copy the C-style string into a typical Visual Basicstring.
Visual Basic Version 4.0 does not handle callback functions. It will not give you the address ofa function or pass it to another function. Other products allow you to use callback functions inVisual Basic. One such product is SpyWorks, made by Desaware, Inc.
SpyWorks provides a control for callback functions. You simply add one of these controls toyour program. One of the properties of the control is the function type. You set this property tothe appropriate function type that you need, depending on what type arguments and returnvalues you need for your callback function. You customize the function provided for thatfunction type. Another property, the ProcAddress property, gives you the function address thatyou pass to the Hyperion Enterprise API function.
The functions EntVBCopyData( ) and EntVBGetCStrLen( ) can be used to convert the SpyWorkscallback function arguments to their proper type. For more information, see the example in“EntDataExtractVB2( ) - Extract Data ” on page 148.
Using an apiStruct Structure in Visual BasicMany of the advanced functions for working with tables have an argument that is a structurecalled an apiStruct. This structure is defined in the TOOLKIT.BAS file and is used to pass moreinformation to the function than can be handled in the rest of the arguments. Usually, you do
18 About Hyperion Enterprise API
not need to use an apiStruct. In these cases, just pass a zero (or NULL) for the apiStruct argument.Visual Basic, however, does not support passing a zero (or NULL) for the apiStruct argument.You can work around this by cloning a declaration of the function to redefine the apiStructargument. You can define the argument as a long (ByVal nullStruct As Long) and pass a zero,or as a string (ByVal nullStruct As String) and pass the constant vbNullString. You might wantto write a function to do this so you can force the argument to be zero or Null when it is notactually an apiStruct.
If you use a callback function that receives an apiStruct as an argument and your callbackfunction declares the argument as type long instead of type APISTRUCT, you can use theEntVBCopyData function to convert your argument to an apiStruct. Make sure the argumentis not zero before you call EntVBCopyData.
Modify Non-Visual Basic ProgramsYou must modify any non-Visual Basic (VB) programs to initialize COM at the beginning ofyour program before calling any Hyperion Enterprise API functions. You do this by callingMicrosoft's CoInitialize () function in Microsoft's OLE32.DLL. In addition, call CoUninitialize() at the end of your program.
Include FilesHyperion Enterprise provides two include files:
l TOOLKIT.BAS, for working with Microsoft Visual Basic
l TOOLKIT.H, for working with C and C++
TOOLKIT.H was developed and used with Microsoft Visual C++. TOOLKIT.H includesTOOLINC.H, with which Hyperion Enterprise was built.
Many of the Hyperion Enterprise API functions use symbolic constants as masks, parameters,table IDs, and return codes. For example, the function HypGetRptFreq( ) uses symbolicconstants, such as FREQ_DAY, FREQ_WEEK, and FREQ_MONTH, to represent systemfrequencies.
The include files, TOOLKIT.BAS, TOOLKIT.H, and TOOLINC.H, list all symbolic constants, theirvalues, and a description. Here is an example of the type of information in TOOLKIT.BAS:
Global Const HYP_ID_ORGANIZATION = 0 OrganizationGlobal Const HYP_ID_CATEGORY = 1 CategoryGlobal Const HYP_ID_FREQUENCY = 2 FrequencyGlobal Const HYP_ID_ACCOUNTS = 3 Accounts
Here is an example of the type of information in TOOLKIT.H and TOOLINC.H:
#define ORGANIZATION 0 //Organization#define ID_CATEGORY 1 //Category#define ID_FREQUENCY 2 //Frequency#define ID_ACCOUNTS 3 //Accounts
Modify Non-Visual Basic Programs 19
The include files also contain function declarations.
Linking Programs to an Import LibraryTo use the Hyperion Enterprise functions, you must link your programs to the HEACCESS.LIBimport library file.
Return CodesIn general, Hyperion Enterprise API functions return a zero if successful and a non-zero (NONE)if an error occurs. Parameters for functions in the API are not changed; the library operates onlocal copies of parameters. The only exception to this rule is when a pointer is specificallyintended for the return of a value, as is commonly the case with the final parameter in a function.
Note: NONE is defined in TOOLINC.H as -1. Visual Basic programmers should use HYP_NONE,defined in TOOLKIT.BAS as -1. Some functions return more specific error codes, whichare also defined in the TOOLKIT.BAS and TOOLKIT.H files or in theTOOLINC.H file.
Frequencies and ViewsMany functions described in this guide use Hyperion Enterprise frequencies, reportingfrequencies, and reporting views as inputs or outputs.
Hyperion Enterprise FrequenciesTable 1 lists the frequencies that come from the LOAD.PER file you use when you install and setup applications in Hyperion Enterprise. For more information, see the Setting Up Applicationschapter in the Hyperion Enterprise Administrator’s Guide.
Table 1 Hyperion Enterprise Frequencies
Frequency Description
D Daily
W Weekly
M Monthly
Q Quarterly
T Trimester
H Half-yearly
Y Yearly
20 About Hyperion Enterprise API
Table 2 lists the reporting frequencies that you can use in Hyperion Enterprise API functions.
Table 2 Reporting Frequencies
Frequency Description
DAI Daily periodic
DAY Daily
DYDT Daily category-to-date
WEE Weekly periodic
WYTD Weekly category-to-date
MON Monthly periodic
YTD Monthly category-to-date
QUA Quarterly periodic
QYTD Quarterly category-to-date
TRI Trimester periodic
TYTD Trimester category-to-date
HAL Half-yearly periodic
HYTD Half-yearly category-to-date
YEA Yearly
Reporting ViewsTable 3 lists the reporting views that you can use in Hyperion Enterprise API functions.
Table 3 Reporting Views
View Description
PER Periodic
WTD Week to date
MTD Month to date
QTD Quarter to date
TTD Trimester to date
HTD Half-year to date
CTD Category to date
Frequencies and Views 21
View Description
YTD Year to date
22 About Hyperion Enterprise API
2Spreadsheet Add-in Functions
In This Chapter
Overview of Spreadsheet Add-in Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Single Application Management Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Multiple Application Management Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Selection Dialog Box Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Data Retrieval Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Data Update Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Alphabetical Function Reference ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
This chapter provides information that you need to use spreadsheet add-in functions, includingsyntax and examples.
Overview of Spreadsheet Add-in FunctionsSpreadsheet add-in functions are the most commonly used functions in the Hyperion EnterpriseAPI system. They are optimized for spreadsheet applications, such as Hyperion EnterpriseRetrieve, which gives them added value over the underlying Hyperion Enterprise API functions.Most of these functions are read-only, although you can also write data values. The spreadsheetadd-in functions are the safest functions to use because they have relatively little impact on yoursystem data. All of these functions take the form Hyp...( ).
Virtually all of the spreadsheet add-in functions require an argument, which is a HyperionEnterprise Retrieve application handle (type HRETRIEVEAPP for C programmers). HyperionEnterprise Retrieve is Hyperion Enterprise's spreadsheet add-in product. You get this handle bycalling HypConstruct( ) to open and initialize the application, or by calling HypMultiGet( ) orHypMultiDefault( ).
Single Application Management FunctionsYou use single application management functions to open and close individual HyperionEnterprise applications.
Table 4 lists the single application management functions.
Overview of Spreadsheet Add-in Functions 23
Table 4 Single Application Management Functions
Function Description
HypConstruct( ) Opens an application before you can call any other functions for that application.
HypDestruct( ) Closes an application when you are finished using it before the program ends.
HypConstruct( ) gives you a value that uniquely identifies the application for the current session.You pass this value to any other functions you want to use. In C, this value is defined as typeHRETRIEVEAPP, a handle to a Hyperion Enterprise Retrieve application. You can open amaximum of 20 (MAX_OPEN_APPS) applications at one time.
Multiple Application Management FunctionsYou use multiple application management functions to work with multiple applications andperform tasks such as logging on to multiple applications or retrieving application handles.Table 5 lists the multiple application management functions.
Table 5 Multiple Application Management Functions
Function Description
HypMultiAsk( ) Used to select an application from the list of open applications and make it the default application.
HypMultiDefault( ) Gets the handle of the default application.
HypMultiDeinit( ) Closes multiple applications when you are finished using them before the program ends.
HypMultiEnum( ) Enumerates applications.
HypMultiGet( ) Gets the Hyperion Enterprise Retrieve application handle.
HypMultiInit( ) Opens multiple applications simultaneously, as listed in a file.
Selection Dialog Box FunctionsYou use selection dialog box functions to access the API standard selection dialog boxes. Thesedialog boxes allow you to select accounts, account lists, categories, frequencies, entities, andperiods. Selection dialog box functions work only if you open an application usingHypConstruct( ) or HypMultiInit( ). Table 6lists the Selection dialog box functions.
Table 6 Selection Dialog Box Functions
Function Description
HypAcctAsk( ) Used to select an account.
HypAcctListAskEx( ) Used to select an account list.
HypCatAskEx( ) Used to select a category.
24 Spreadsheet Add-in Functions
Function Description
HypFreqAsk( ) Used to select a frequency.
HypJourAsk( ) Used to select a journal.
HypJourDetAsk( ) Used to select a journal detail.
HypNamAskEx( ) Used to select an entity.
HypNameListAskEx( ) Used to select an entity list.
HypPerAsk( ) Used to select a period.
Data Retrieval FunctionsYou use data retrieval functions to retrieve data values from the Hyperion Enterprise database.Table 7 lists the data retrieval functions.
Note: Use HypHPVAL( ) to retrieve a regular value. Use HypHPVALEx( ) to get special valuessuch as contribution, proportional, adjustment, or currency translation values. You canalso use HypHPVAL2 in either case.
Table 7 Data Retrieval Functions
Function Description
HypHPVAL( ) Retrieves a data value from the Hyperion Enterprise database.
HypHPVAL2( ) Retrieves a data value from the Hyperion Enterprise database.
HypHPVALEx( ) Retrieves a specific value from the Hyperion Enterprise database.
HypSetMVMode( ) Sets HypValReturn( ) behavior.
HypValidateParams( ) Validates parameters for HypHPVAL( ).
HypValidateParamsEx( ) Validates parameters for HypHPVALEx( ).
HypValReturn( ) Determines the status of the last data retrieval.
Consolidation Detail Values with Spread Sheet Add InFunctionHyperion Enterprise applications can store consolidation detail, such as eliminations,adjustments, currency-translated values, or the amounts that an entity contributed to its parententity during consolidation. You might see this feature referred to in the header files as theDetailed Storage Model (DSM.)
Data Retrieval Functions 25
ID_TRANSLATION_FORCE is similar to ID_TRANSLATION with the exception that it is valideven when the parent and child entities use the same currency. When the currencies are thesame, the data is not translated and a translation datafile table does not exist. In this case, if youuse ID_TRANSLATION, you get an error code, because a translation datafile table does notexist. If you use ID_TRANSLATION_FORCE instead, then it will access the regular data (typeID_REGULAR) when the parent and child use the same currency, instead of returning an errorcode.
Warning: Do not select the ID_TRANSLATION_FORCE type of datafile table if there is apossibility that the ID_REGULAR datafile table may already be selected for the specified categoryand entity. Similarly, do not select the ID_REGULAR type of datafile table if theID_TRANSLATION_FORCE type may already be selected.
To read these consolidation detail values, follow the instructions in “Data Retrieval Functions”on page 25 with the exceptions listed in Table 8:
Table 8 wType Codes
Code Description
ID_ADJUSTMENT Parent adjustment values
ID_CONTRIBUTION Contribution values
ID_ELIMINATION Elimination values
ID_PROPORTIONAL Proportion values
ID_TRANSLATION Translation values
ID_TRANSLATION_FORCE Translation or child if same currency
Note: Do not try to update any consolidation detail values. These values are read-only. Thesevalues are written by Hyperion Enterprise during consolidation as a record of how theconsolidated numbers were calculated.
Data Update FunctionsYou use data update functions to update Hyperion Enterprise data. Table 9 lists the data updatefunctions.
Table 9 Data Update Functions
Function Description
HypHPCommit2( ) Writes data buffers (save to disk) without calculating formulas.
HypHPFlush( ) Clears data buffers.
HypHPLNK( ) Stores data values into buffers (in memory).
HypValidateLnkParams( ) Checks HypHPLNK( ) parameters.
26 Spreadsheet Add-in Functions
Generally, you can update Hyperion Enterprise data by performing these tasks:
l Call HypHPFlush( ) to clear the data buffers.
l Call HypHPLNK( ) for each data value you want to write. HypHPLNK( ) writes the data tothe buffers only.
l Call HypHPCommit2( ) to write the data in the buffers to disk when you are finished.HypHPCommit2( ) sorts the data before writing it to disk.
If you call HypHPLNK( ) to update data values, then decide that you do not want to save to disk,call HypHPFlush( ) to clear the buffers. Clearing the buffers prevents you from accidently savingdata with a later call to HypHPCommit2( ).
Alphabetical Function ReferenceThis topic includes a list of all spreadsheet add-in functions in alphabetical order.
HypAcctAsk( ) - Select AccountThis function calls the Hyperion Enterprise Select Account dialog box and retrieves the accountyou select. If you select Cancel, no account is retrieved.
Use this format:
Declare Function HypAcctAsk Lib “heaccess.dll” Alias “_HypAcctAsk@8” (ByVal hRApp AsInteger, ByVal szAcct As String) As Long
Variable Description
hRApp A non-zero Hyperion Enterprise Retrieve application handle from HypMultiGet( ) or HypConstruct( )
szAcct The pointer to the buffer to return the account ID. The buffer should be large enough for at least HYP_SIZEFULLACCT+1 characters(or SIZEFULLACCT+1 in C)
Return Codes
Code Meaning
0 Successful
None Error occurred
Example:
szAcct$ = SPACE (HYP_SIZEFULLACCT+1)ret& = HypAcctAsk(hRApp%, szAcct$)If ret& = 0 Then szAcct$ = CToBStr(szAcct$)
Use this format for C:
short WINAPI HypAcctAsk( HRETRIEVEAPP hRApp, LPSTR szAcct )
Alphabetical Function Reference 27
HypAcctListAskEx( ) - Select Account ListThis function displays a dialog box that you use to select an account list. HypAcctListAskEx( )returns the ID of the selected account list at the return buffer (szRetbuf), or an empty string ifyou select Cancel. This function locks and unlocks the Account List table temporarily(ID_ACCTLIST).
Use this format:
Declare Function HypAcctListAskEx Lib “heaccess.dll” Alias “_HypAcctListAskEx@8”(ByValhRApp As Integer, ByVal szAcctList As String) As Integer
Variable Description
hRApp An application handle from HypConstruct( )
szAcctList The pointer to the buffer to return the selected account list. The buffer should be large enough for at least HYP_SIZELABEL+1characters (or SIZENAME+1 in C).
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szAcctList$ = SPACE (HYP_SIZELABEL+1)ret$ = HypAcctListAskEx(hRApp%, szAcctList$)If ret$ = 0 Then szAcctList$ = CToBStr(szAcctList$)
Use this format for C:
short WINAPI HypAcctListAskEx(HRETRIEVEAPP hRApp, LPSTR szAcctList)
HypCatAskEx( ) - Select CategoryThis function calls the Hyperion Enterprise Select Category dialog box and retrieves the categoryyou select. If you select Cancel, no category is retrieved.
Use this format:
Declare Function HypCatAskEx Lib “heaccess.dll” Alias “_HypCatAskEx@8”(ByVal hRAppAs Integer, ByVal szCat As String) As Integer
Variable Description
hRApp A nonzero Hyperion Enterprise Retrieve application handle from HypMultiGet( ), HypConstruct( ), or HypMultiDefault( )
szCat The pointer to the buffer to return the category ID. The buffer should be large enough for at least HYP_SIZELABEL+1 characters (orSIZECAT+1 in C).
28 Spreadsheet Add-in Functions
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szCat$ = SPACE (HYP_SIZELABEL+1)ret$ = HypCatAskEx(hRApp%, szCat$)If ret$ = 0 Then szCat$ = CToBStr(szCat$)
Use this format for C:
short WINAPI HypCatAskEx( HRETRIEVEAPP hRApp,LPSTR szCat)
HypConstruct( ) - Open an ApplicationThis function opens the named Hyperion Enterprise application. The Hyperion Enterpriseapplication ID must appear in the HYPENT.INI file. If the system returns a zero, then hRAppcontains a non-zero Hyperion Enterprise Retrieve application handle that you can use to accessapplication information with other spreadsheet function calls. A maximum of 20(MAX_OPEN_APPS) applications can be open at one time. Call HypDestruct( ) to close theapplication when you are finished using it, before the program ends.
If the application you open with HypConstruct( ) is the application specified in HYPENT.INIwith the parameter AppID = , the default is set to this application. HypMultiDefault( ) returnsthis application until you select a different one in HypMultiAsk( ).
Use this format:
Declare Function HypConstruct Lib “heaccess.dll” Alias “_HypConstruct@16”(hRApp AsInteger, ByVal szApp As String, ByVal szUser As String, ByVal szPassword As String) As Long
Variable Description
hRApp The address for the Hyperion Enterprise Retrieve application handle. The handle will be placed here by the function
szApp The name of the application to open
szUser The user ID to use for logging onto the application
szPassword The password to use for logging on to the application
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Alphabetical Function Reference 29
Code Meaning
HACC_BAD_CODE Invalid argument
HACC_BAD_PASSWORD Invalid password
HACC_BAD_USERID Invalid user ID
HACC_ERROR_USER_LOCKED User ID is locked
HACC_ERROR_SELECT_FAILED Error selecting table
HACC_BAD_OPENAPP (16) Error opening application
HACC_TOOMANY_APPS (15) Too many applications open
HACC_BAD_CODE Invalid argument
Example:
'Open the TAX applicationret& = HypConstruct(hRApp%, "TAX", "MARY","secret")If ret& = 0 Then ret2% = MsgBox("Successful logon", vbOKOnly, "")
Use this format for C:
int WINAPI HypConstruct(HRETRIEVEAPP * pRApp, LPSTR szApp, LPSTR szUser, LPSTRszPassword )
HypConstructEx( ) - Open an ApplicationThis function opens the named Hyperion Enterprise application. The Hyperion Enterpriseapplication name must appear in the HYPENT.INI file. HypConstructEx( ) is an extension ofHypConstruct( ), and contains an extra argument that indicates whether the program is runningon a server or on a client computer.
Use this format:
Declare Function HypConstructEx Lib “heaccess.dll” Alias “_HypConstructEx@20”(hRAppAs Integer, ByVal szApp As String, ByVal szUser As String, ByVal szPassword As String, szServerFlagAs Long) As Long
Variable Description
hRApp The address for the Hyperion Enterprise Retrieve application handle. The handle will be placed here by the function.
szApp The name of the application to open
szUser The user ID to use for logging on to the application
szPassword The password to use for logging on to the application
fxServerFlag Flag that identifies the program as running on a server (True) or client (False)
Return Codes:
30 Spreadsheet Add-in Functions
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_CODE Invalid argument
HACC_BAD_OPENAPP Error opening application
HACC_BAD_PASSWORD Invalid password
HACC_BAD_USERID Invalid user ID
HACC_ERROR_USER_LOCKED User ID is locked
HACC_ERROR_SELECT_FAILED Error selecting table
HACC_TOOMANY_APPS To many applications open
Example:
'Open the TAX applicationret& = HypConstructEx(hRApp%, "TAX", "MARY","secret",False)If ret& = 0 Then ret2% = MsgBox("Successful logon", vbOKOnly, "")
Use this format for C:
int WINAPI HypConstructEx(HRETRIEVEAPP FAR * phRApp, LPSTR szApp, LPSTR szUser,LPSTR szPassword, BOOL fServerFlag)
HypDestruct( ) - Close an ApplicationThis function closes any application you opened using HypConstruct( ) or HypMultiInit( ).
Use this format:
Declare Function HypDestruct Lib “heaccess.dll” Alias “_HypDestruct@4”(ByVal hRApp AsInteger) As Long
Where hRApp is the non-zero Hyperion Enterprise Retrieve application handle fromHypConstruct( ).
Return Codes:
Code Meaning
0 Successful
Example:
Public Sub DestructApp( )Dim rc&If hRApp% <> 0 Then rc& = HypDestruct(hRApp%)If rc& <> 0 Then ret% = MsgBox("Logoff failed", vbOKonly, "Error")
Alphabetical Function Reference 31
hRApp% = 0End IfEnd Sub
Use this format for C:
int WINAPI HypDestruct( HRETRIEVEAPP hRApp)
HypFreqAsk( ) - Select Frequency This function calls the Hyperion Enterprise Select Frequency dialog box and retrieves thefrequency you select. If you select Cancel, no frequency is retrieved.
The frequency is returned as freq.view, where freq is the frequency ID and view is the data view.For example, M.YTD is monthly frequency using the year-to-date data view. The view is thereporting view, not the Hyperion Enterprise view. Reporting views are: PER (Periodic), WTD(week to date), MTD (month to date), QTD (quarter to date), TTD (trimester to date), HTD(half-year to date), CTD (category to date), and YTD (year to date). For more information aboutfrequencies and views, see “Frequencies and Views” on page 20.
Use this format:
Declare Function HypFreqAsk Lib “heaccess.dll” Alias “_HypFreqAsk@8”(ByVal hRApp AsInteger, ByVal szFreq As String) As Long
Variable Description
hRApp A nonzero Hyperion Enterprise Retrieve application handle from HypMultiGet( ) or HypConstruct( )
szFreq The pointer to the buffer to return the frequency code. The buffer should be large enough for 18 characters (or [2x(OLDSIZENAME+1)] in C)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szFreqView$ = SPACE(18)ret& = HypFreqAsk(hRApp%, szFreqView$)If ret$ = 0 Then szFreqView$ = CToBStr(szFreqView$)
Use this format for C:
int WINAPI HypFreqAsk( HRETRIEVEAPP hRApp, LPSTR szFreq)
HypGetDefJour( ) - Get Default JournalThis function gets the signature of the default journal. This default is normally selected in theJournal selection box. The actual journal signature returned by HypGetDefJour() is the journal
32 Spreadsheet Add-in Functions
signature combined, through the OR operator, with a bit flag to indicate which journals tablethe journal is in. You can use the JOUR_ENTRIES constant to test if the bit flag is set. If theJOUR_ENTRIES bit flag is set, then the journal is in the regular journals table, otherwise it is inthe journals templates table. For more information, see “HypJourAsk( ) - Select Journal” onpage 62.
Example:
sigJour& = HypGetDefJour(hRApp%)If (sigJour& And JOUR_ENTRIES) <> 0 ThenwTableID% = HYP_ID_JOURNAL_ENTRIESsigJour& = sigJour& And (Not JOUR_ENTRIES)ElsewTableID% = HYP_ID_JOURNAL_TEMPLATESEnd If
Use this format:
Declare Function HypGetDefJour Lib “heaccess.dll” Alias “_HypGetDefJour@4”(ByValhRApp As Integer) As Long
Where hRApp is the non-zero Hyperion Enterprise Retrieve application handle fromHypConstruct( ).
Return Codes:
Code Meaning
Signature of the default journal Successful
NONE Error occurred
Use this format for C:
SIGNA WINAPI HypGetDefJour( HRETRIEVEAPP hRApp)
HypGetDefJourCat( ) - Get Default Journal CategoryThis function gets the signatures of the default journal category. This default is normally selectedin the Journal selection box. For more information, see “HypJourAsk( ) - Select Journal” onpage 62.
Use this format:
Declare Function HypGetDefJourCat Lib “heaccess.dll” Alias “_HypGetDefJourCat@4”(ByVal hRApp As Integer) As Long
Where hRApp is the non-zero Hyperion Enterprise Retrieve application handle fromHypConstruct( ).
Return Codes:
Alphabetical Function Reference 33
Code Meaning
Signature of the default journal category Successful
NONE Error occurred
Use this format for C:
SIGNA WINAPI HypGetDefJourCat( HRETRIEVEAPP hRApp)
HypGetDefJourPer( ) - Get Default Journal PeriodThis function gets the signatures of the default journal period. This default is normally selectedin the Journal selection box. For more information, see “HypJourAsk( ) - Select Journal” onpage 62.
Use this format:
Declare Function HypGetDefJourPer Lib “heaccess.dll” Alias “_HypGetDefJourPer@4”(ByVal hRApp As Integer) As Long
Where hRApp is the non-zero Hyperion Enterprise Retrieve application handle fromHypConstruct( ).
Return Codes:
Code Meaning
Signature of the default journal period Successful
NONE Error occurred
Use this format for C:
SIGNA WINAPI HypGetDefJourPer( HRETRIEVEAPP hRApp)
HypHPACC( ) - Get Account or Subaccount IDThis function retrieves the account or sub-account ID, based on the codes in Table 10.
Table 10 HypHPACC( ) Account and Subaccount Label Return Codes
Code ID Returned
ACC_ACC Full account ID.
ACC_AMJ Major account ID.
ACC_AS1 First-level sub-account ID.
ACC_AS2 Second-level sub-account label heading.
Use this format:
34 Spreadsheet Add-in Functions
Declare Function HypHPACC Lib “heaccess.dll” Alias “_HypHPACC@16”(ByVal hRApp AsInteger, ByVal szAcct As String, ByVal code As Long, ByVal retbuf As String) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( ).
szAcct The ID of the account.
code One of the following retrieval codes:
ACC_ACC
ACC_AMJ
ACC_AS1
ACC_AS2
retbuf The pointer to the buffer to return the account ID. The buffer must be at least HYP_SIZEDESC characters long (SIZEDESC in C).
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
Example:
szAcct$ = SPACE (HYP_SIZEDESC)ret& = HypHPACC(hRApp, "SALES", ACC_ACC, szAcct$)If ret& = 0 Then szAcct$ = CToBStr(szAcct$)
Use this format for C:
int WINAPI HypHPACC(HRETRIEVEAPP hRApp, LPCSTR szAcct, int iCode, LPSTR retbuf)
HypHPBET( ) - Calculate Better or Worse ValueGiven two values for an account, this function calculates the difference between the two valueswhere the amount that value two is better or worse than value one. The sign of the better orworse value is based on whether the supplied account is an expense, asset, income, or liabilityaccount.
Use this format:
Declare Function HypHPBET Lib “heaccess.dll” Alias “_HypHPBET@20”(ByVal hRApp AsInteger, ByVal szAcct As String, value2 As Double, value1 As Double, dretval As Double) As Long
Alphabetical Function Reference 35
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szAcct The ID of the account to use
value2 The later time period value
value1 The earlier time period value
dretval The buffer in which the result is returned
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
Example:
ret& = HypHPBET(hRApp%, "INCOME", 200.0, 100.0, amtBetter#)
Use this format for C:
int WINAPI HypHPBET( HRETRIEVEAPP hRApp, LPCSTR szAcct, const double FAR *pdValue2, const double FAR * pdValue1, double FAR * pdRetval)
HypHPCAD( ) - Get Currency DescriptionThis function retrieves the currency description for a specified entity.
Use this format:
Declare Function HypHPCAD Lib “heaccess.dll” Alias “_HypHPCAD@12”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szRetbuf AsString) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szRetbuf The buffer to return the currency description. The buffer must be at least HYP_SIZEDESC+1 characters long (SIZEDESC+1 in C)
Return Codes:
Code Meaning
0 Successful
36 Spreadsheet Add-in Functions
Code Meaning
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
Example:
szCurrency$ = SPACE (HYP_SIZEDESC+1)ret& = HypHPCAD(hRApp%, "CANADA", szCurrency$)If ret& = 0 Then szCurrency$ = CToBStr(szCurrency$)
Use this format for C:
int WINAPI HypHPCAD( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPSTR szRetbuf)
HypHPCAL( ) - Is Account Calculated?This function determines whether a specified account is a calculated account.
Use this format:
Declare Function HypHPCAL Lib “heaccess.dll” Alias “_HypHPCAL@20”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, wCal As Integer)As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szAcct The account ID
wCal The buffer in which the result is returned
Return Codes:
Code Meaning
0 Successful
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
NONE Error opening data file
On return, the value of wCal is a value shown in Table 11.
Alphabetical Function Reference 37
Table 11 Possible Values of wCal
Value Description
HPCAL_CALC_CALC_ACCT (1) Specifies whether the account is a calculated account.
HPCAL_NOT_CALC_ACCT (-1) Specifies whether the account is not a calculated account.
0 Specifies whether an error occurred.
Example:
ret& = HypHPcal(hRApp%, “France”, “Actual”, “Sales”, wTync%)If ret&=0 And wType% =HPCAL_CALC_CALC_ACCT Then ret%=MsgBox (“Calculated Account”)
Use this format for C:
int WINAPI HypHPCAL( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat,LPCSTR szAcct, short FAR * pwCal)
HypHPCDE( ) - Get Category DescriptionThis function retrieves the full category description of the specified category.
Use this format:
Declare Function HypHPCDE Lib “heaccess.dll” Alias “_HypHPCDE@12”(ByVal hRApp AsInteger, ByVal szCat As String, ByVal szRetbuf As String) As Long
Value Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szCat The ID of the category
szRetbuf The buffer to return the category description. The buffer must be at least HYP_SIZEDESC characters long (SIZEDESC in C).
Return Codes:
Code Meaning
0 Successful
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_SELECT Error occurred
Example:
szCat$ = SPACE (HYP_SIZEDESC)ret& = HypHPCDE(hRApp%, "ACTUAL", szCat$)If ret& = 0 Then szCat$ = CToBStr(szCat$)
Use this format for C:
38 Spreadsheet Add-in Functions
short WINAPI HypHPCDE( HRETRIEVEAPP hRApp, LPCSTR szCat, LPSTR szRetbuf)
HypHPCommit2( ) - Write Data BuffersThis function commits (saves) all changes made using the HypHPLNK( ) function call sinceeither the last commit or the last flush of the write buffers. HypHPCommit2( ) writes data tothe database that was submitted using the HypHPLNK( ) call, and includes arguments to executelogic and check security. When the argument fCheckSecurity is set to TRUE (1), theHypHPCommit2( ) function will commit changes only if the current user has the security rightto export data from Hyperion Enterprise Retrieve. All data is cleared from the buffer once it iscommitted.
Use this format:
Declare Function HypHPCommit2 Lib “heaccess.dll” Alias “_HypHPCommit2@12”(ByValhRApp As Integer, ByVal fDoLogic As Long, ByVal fCheckSecurity As Long) As Integer
Value Description
hRApp The non-zero Hyperion Enterprise Retrieve application handle from HypConstruct( ) or HypMultiGet( )
fDoLogic TRUE (1) to execute logic, otherwise FALSE (0)
fCheckSecurity TRUE (1) to check security, otherwise FALSE (0)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Note: When an error occurs, part of the data submitted by HypHPLNK( ) might be written tothe database.
Example:
If SetHypValue$ <> "" Then Exit Functionrc& = HypHPCommit2(hRApp%, 1, 1)If rc& <> 0 Then SetHypValue$ = "Error in HypHPCommit2 - " & Str$(rc&) Exit FunctionEnd IfEnd Function
Use this format for C:
int WINAPI HypHPCommit2(HRETRIEVEAPP hRApp, BOOL fDoLogic, BOOLfCheckSecurity)
Alphabetical Function Reference 39
HypHPCUREx( ) - Get Component CurrencyThis function retrieves the ID of the currency for the supplied entity.
Use this format:
Declare Function HypHPCUREx Lib “heaccess.dll” Alias “_HypHPCUREx@12”(ByValhRApp As Integer, ByVal szEntity As String, ByVal szRetbuf As String) As Integer
Value Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The ID of the entity.
szRetbuf The buffer to return the currency ID. The buffer should be large enough for at least HYP_SIZELABEL+1 characters (or SIZENAME+1in C)
Return Codes:
Code Meaning
0 Successful
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
Example:
Public Function GetEntityCurrency(Entity As String) As StringDim rc As IntegerDim RetBuffer As StringRetBuffer$ = SPACE (HYP_SIZELABEL+1)rc% = HypHPCUREx(hRApp%, Entity$, RetBuffer$)If rc% = -1 Then GetEntityCurrency$ = "Error in HypHPCUREx"Else GetEntityCurrency$ = CToBStr(RetBuffer$)End IfEnd Function
Use this format for C:
short WINAPI HypHPCUREx( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPSTR szRetbuf)
HypHPDRV( ) - Calculate Derived ValueGiven two values for an account, this function returns the derived value. For flow accounts, thetwo values are added together. For balance accounts, the later time period value is returned.
Use this format:
Declare Function HypHPDRV Lib “heaccess.dll” Alias “_HypHPDRV@20” (ByVal hRApp AsInteger, ByVal szAcct As String, value2 As Double, value1 As Double, dretval As Double) AsLong
40 Spreadsheet Add-in Functions
Value Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szAcct The ID of the account that value1 and value2 represent
value2 The later time period value
value1 The earlier time period value
dretval The buffer to return the floating point value
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
Example:
ret& = HypHPDRV(hRApp%, "INCOME", 200.0, 100.0, retVal#)
Use this format for C:
int WINAPI HypHPDRV( HRETRIEVEAPP hRApp, LPCSTR szAcct, const double FAR *pdValue, const double FAR * pdValue, double FAR * pdRetval)
HypHPECO( ) - Get Entity CodeThis function returns the code associated with an entity for a specified category and period.
Use this format:
Declare Function HypHPECO Lib “heaccess.dll” Alias “_HypHPECO@24”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szPerName As String, ByValwLen As Integer, ByVal szCode As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szPerNam The period date ("02/28/03"), or the period ID ("Feb 03"), or the period number ("2")
wLen The length of the szCode buffer
szCode The buffer to return to the code
Alphabetical Function Reference 41
Return Codes:
Code Meaning
0 Successful
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_SELECT Error occurred
Use this format for C:
short pascal HypHPECO( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat,LPCSTR szPerNam, WORD wLen, LPSTR szCode)
HypHPFlush( ) - Flush Data BuffersThis function clears the internal Hyperion Enterprise read-access or write-access buffers.HypHPFlush( ) discards any data submitted by HypHPLNK( ) that is not yet committed. Youcan also use this function to force a reload from the disk of the read-access data buffers. It is notnecessary to issue a flush after a commit because both sets of buffers are automatically flushed.
Use this format:
Declare Function HypHPFlush Lib “heaccess.dll” Alias “_HypHPFlush@8”(ByVal hRApp AsInteger, ByVal wMask As Integer) As Long
Value Description
hRApp An application handle from HypConstruct( )
wMask The buffer to flush, which might be a combination of HACC_FLUSH_READ (to flush read buffers) and HACC_FLUSH_WRITE (to flushwrite buffers)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
wMask% = HACC_FLUSH_WRITErc& = HypHPFlush(hRApp%, wMask%)
Use this format for C:
int WINAPI HypHPFlush(HRETRIEVEAPP hRApp, WORD wMask)
42 Spreadsheet Add-in Functions
HypHPFLW( ) - Is Account a Flow Account?This function determines whether a specified account is a flow account. If the account is not aflow account, it is a balance account.
Use this format:
Declare Function HypHPFLW Lib “heaccess.dll” Alias “_HypHPFLW@12”(ByVal hRApp AsInteger, ByVal szAcct As String, iFlag As Long) As Long
Value Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( ).
szAcct The account ID
iFlag The buffer to return the result
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
On return, the value of iFlag is a value shown in Table 12.
Table 12 Possible Values of iFlag
Value Description
1 Specifies whether the account is a flow account.
-1 Specifies whether the account is not a flow account.
0 Specifies whether an error occurred.
Example:
ret& = HypHPFLW(hRApp%, "SALES", isFlow&)
Use this format for C:
int WINAPI HypHPFLW( HRETRIEVEAPP hRApp, LPCSTR szAcct, int FAR * piFlag)
HypHPFRE( ) - Get Category FrequencyThis function retrieves the default reporting frequency of the specified category. For a list ofreporting frequencies, see “Frequencies and Views” on page 20.
Use this format:
Alphabetical Function Reference 43
Declare Function HypHPFRE Lib “heaccess.dll” Alias “_HypHPFRE@12”(ByVal hRApp AsInteger, ByVal szCat As String, ByVal szRetbuf As String) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( ).
szCat The category ID.
szRetbuf The buffer to return the reporting frequency. The buffer must be large enough for at least HYP_SIZERPTFREQ+1 characters(SIZERPTFREQ+1 in C).
Return Codes:
Code Meaning
0 Successful
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_SELECT Error occurred
Example:
szRptFreq$ = SPACE (HYP_SIZERPTFREQ+1)ret& = HypHPFRE(hRApp%, "BUDGET", szRptFreq$)If ret& = 0 Then szRptFreq$ = CToBStr(szRptFreq$)
Use this format for C:
int WINAPI HypHPFRE( HRETRIEVEAPP hRApp, LPCSTR szCat, LPSTR szRetbuf)
HypHPFUL( ) - Get Component Full Entity DescriptionThis function retrieves the description of the specified entity. You can specify these codes toretrieve various forms of this description:
l FUL_FUL returns the fully qualified entity.sub-entity description.
l FUL_FNA returns the major entity description only.
l FUL_FSN returns the sub-entity description only.
Use this format:
Declare Function HypHPFUL Lib “heaccess.dll” Alias “_HypHPFUL@16”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal iCode As Long, ByVal szRetbuf As String) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
44 Spreadsheet Add-in Functions
Variable Description
iCode One of the following retrieval codes:
FUL_FUL
FUL_FNA
FUL_FSN
szRetbuf The buffer to return the full entity description. The buffer must be at least HYP_SIZEDESC characters long (SIZEDESC in C).
Return Codes:
Code Meaning
0 Successful
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
Example:
szDesc$ = SPACE (HYP_SIZEDESC+1)ret& = HypHPFUL(hRApp%, "CANADA", FUL_FUL, szDesc$)If ret& = 0 Then szDesc$ = CToBStr(szDesc$)
Use this format for C:
int WINAPI HypHPFUL( HRETRIEVEAPP hRApp, LPCSTR szEntity, int iCode, LPSTRszRetbuf)
HypHPHEA( ) - Get Account HeadingThis function retrieves the description for a specified account. You can specify one of the retrievalcodes in Table 13.
Table 13 HypHPHEA( ) Account Codes
Code Description
HEA_HEA Retrieves the full description, including first-level and second-level subaccounts.
HEA_HMJ Retrieves the major account heading only.
HEA_HS1 Retrieves the first-level sub-account heading only.
HEA_HS2 Retrieves the second-level sub-account heading only.
Use this format:
Declare Function HypHPHEA Lib “heaccess.dll” Alias “_HypHPHEA@16”(ByVal hRApp AsInteger, ByVal szAcct As String, ByVal iCode As Long, ByVal szRetbuf As String) As Long
Alphabetical Function Reference 45
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szAcct The account ID
iCode One of the following retrieval codes:
HEA_HEA
HEA_HMJ
HEA_HS1
HEA_HS2
szRetbuf The buffer to return the account heading. The buffer must be large enough for at least HYP_SIZEDESC+1 characters (SIZEDESC+1in C).
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
Example:
szDesc$ = SPACE (HYP_SIZEDESC+1)ret& = HypHPHEA(hRApp%, "SALES", HEA_HEA, szDesc$)If ret& = 0 Then szDesc$ = CToBStr(szDesc$)
Use this format for C:
int WINAPI HypHPHEA( HRETRIEVEAPP hRApp, LPCSTR szAcct, int iCode, LPSTRszRetbuf)
HypHPINC( ) - Is Account an Income Account?This function determines if a specified account is an income account.
Use this format:
Declare Function HypHPINC Lib “heaccess.dll” Alias “_HypHPINC@12”(ByVal hRApp AsInteger, ByVal szAcct As String, iFlag As Long) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szAcct The account ID
iFlag The buffer to return the result
46 Spreadsheet Add-in Functions
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
On return, the value of iFlag is a value shown in Table 14.
Table 14 Possible Values of iFlag
Value Description
1 Specify whether the account is an income account.
-1 Specifies whether the account is not an income account.
0 Specifies whether an error occurred.
Example:
ret& = HypHPINC(hRApp%, "SALES", isIncome&)
Use this format for C:
int WINAPI HypHPINC( HRETRIEVEAPP hRApp, LPCSTR szAcct, int FAR * piFlag)
HypHPINP( ) - Is Account an Input Account?This function determines if a specified account is an input account.
Use this format:
Declare Function HypHPINP Lib “heaccess.dll” Alias “_HypHPINP@20”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, wFlag AsInteger) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( ).
szEntity The pointer to the entity ID
szCat The pointer to the category ID
szAcct The pointer to the account ID
wFlag The pointer to the buffer to return the result
Return Codes:
Alphabetical Function Reference 47
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_ACCOUNT Error occurred, invalid szAcc
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
On return, the value of wFlag is value shown in Table 15.
Table 15 Possible Values of wFlag
Value Description
HPINP_INPUT_ACCT (1) Specifies whether the account is an input account.
HPINP_NOT_INPUT_ACCT (-1) Specifies whether the account is not an input account.
0 Specifies whether an error occurred.
Example:
'Codes used by HypHPINP( )Global Const HPINP_INPUT_ACCT = 1Global Const HPINP_NOT_INPUT_ACCT = -1
Use this format for C:
int WINAPI HypHPINP( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat,LPCSTR szAcct, short FAR * pwFlag)
HypHPJOUR( ) - Get Journal Detail InformationThis function retrieves information about a journal detail record.
Use this format:
Declare Function HypHPJOUR Lib “heaccess.dll” Alias “_HypHPJOUR@36”(ByVal hRAppAs Integer, ByVal wAttr As Integer, ByVal szJourName As String, ByVal sigJourDet As Long,ByVal sTableID As Integer, ByVal szCat As String, ByVal szPerName As String, ByVal wLen AsInteger, pzBuf As Any) As Integer
Variable Description
hRApp A non-zero retrieve Hyperion Enterprise Retrieve application handle
wAttr A short integer specifying which journal attribute you want returned
48 Spreadsheet Add-in Functions
Variable Description
szJourName The journal ID
sigJourDet The signature of the journal detail row from HypJourDetAsk( )
sTableID The ID of the table data is retrieved from, either ID_JOURNAL_ENTRIES or ID_JOURNAL_TEMPLATES
szCat The category ID.
szPerName A period string in the form mm/dd/yy, or a period number, such as “2,” or a period ID such as “Feb 0"
wLen The length of the pzBuf buffer
pzBuf The buffer to return the value requested
You must allocate the buffer (pzBuf argument) to the correct size before calling HypHPJOUR( ).Table 16 lists the valid journal attributes and their correct types and sizes.
Table 16 Journal Attributes
Attribute Description Type/String Size
JOUR_NO Journal number, or NONE (-1) as the journal number if there is no journal number. Long
JOUR_ST Journal status Integer (short in C)
JOUR_DS Journal description String SIZEJOURDESC+1
JOUR_EN Journal detail entity String SIZEFULLNAME+1
JOUR_AC Journal detail account String SIZEFULLACT+1
JOUR_DB Journal detail debit Double
JOUR_CR Journal detail credit Double
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_CODE Error occurred, invalid wAttr
HACC_BAD_JOURNAL Error occurred, invalid szJourName
HACC_BAD_PERIOD Error occurred, invalid szPerName
HACC_BAD_SELECT Error occurred
HACC_BAD_TABLE Error occurred, invalid sTableID
Alphabetical Function Reference 49
Use this format for C:
short pascal HypHPJOUR( HRETRIEVEAPP hRApp, short wAttr, LPSTR szJourName,SIGNA sigJourDet, short sTableId, LPCSTR szCat, LPCSTR szPerName, short wLen, void *pzBuf)
HypHPKEYEx( ) - Get Default Entity, Category, Account, orPeriodThis function returns the ID of the default entity, category, account, or period from the specifiedapplication.
Use this format:
Declare Function HypHPKEYEx Lib “heaccess.dll” Alias “_HypHPKEYEx@12”(ByVal hRAppAs Integer, ByVal szKey As String, ByVal szRetbuf As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szKey One of the following dimensions to indicate which value you want to retrieve:
“ENTITY”
“NAME”
“CATEGORY”
“ACCOUNT”
“PERIOD”
“ORGANIZATION”
szRetbuf The pointer to the buffer to return the default dimension value
The size of the buffer depends on the dimension you want to retrieve, as shown in Table 17.
Table 17 Keys and Buffer Size
Key Buffer Size
“ENTITY” or “NAME” HYP_SIZEFULLNAME+1 or SIZEFULLNAME+1 in C
“CATEGORY” HYP_SIZELABEL+1 or SIZECAT+1 in C
“ACCOUNT” HYP_SIZEFULLACCT+1 or SIZEFULLACCT+1 in C
“PERIOD” HYP_SIZEDESC or SIZEDESC in C
“ORGANIZATION” long or SIZEOF(SIGNA) in C
Return Codes:
50 Spreadsheet Add-in Functions
Code Meaning
0 Successful
NONE Error occurred
Example:
Public Sub GetHyperionDefaults(Entity As String, Category As String, Account As String, Period As String)Dim rc%Dim RetBuffer As String * 127rc% = HypHPKEYEx(hRApp%, "ENTITY", RetBuffer$)Entity$ = CToBStr(RetBuffer$)rc% = HypHPKEYEx(hRApp%, "CATEGORY", RetBuffer$)Category$ = CToBStr(RetBuffer$)rc% = HypHPKEYEx(hRApp%, "ACCOUNT", RetBuffer$)Account$ = CToBStr(RetBuffer$)rc% = HypHPKEYEx(hRApp%, "PERIOD", RetBuffer$)Period$ = CToBStr(RetBuffer$)End Sub
Use this format for C:
short WINAPI HypHPKEYEx( HRETRIEVEAPP hRApp, LPCSTR szKey, LPSTR szRetbuf)
HypHPLNK( ) - Store Data ValuesThis function stores data values for the specified input criteria. The value is stored in an internaldata buffer and not in the actual data file until a HypHPCommit2( ) call is made. This meansthat a subsequent HypHPVAL( ) call for the same value will not return the value in the buffer,but the value that is in the data file.
Use this format:
Declare Function HypHPLNK Lib “heaccess.dll” Alias “_HypHPLNK@36”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriodAs String, ByVal szFreq As String, ByVal fScale As Long, ByVal dp As Double) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szAcct The account ID
szPeriod Either a period date (“02/08/03”), a period label (“Feb 03"), or a period number (“2”)
szFreq A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (“M”, “Q” and so on), andview is a reporting view. For more information about frequencies, see “Frequencies and Views” on page 20
Alphabetical Function Reference 51
Variable Description
fScale Not used (pass zero)
dp The floating point number being submitted
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
DFERR_BADPERIOD Error occurred
Example:
rc& = HypHPLNK(hRApp%, Entity$, Cat$, Acct$, Per$, “M.PER”, 0, TheValue#)If rc& <> 0 ThenSetHypValue = "Error in HypHPLNK - " & Str$(rc&)Exit FunctionEnd If
Use this format for C:
int WINAPI HypHPLNK( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat,LPCSTR szAcct, LPCSTR szPeriod, LPCSTR szFreq, BOOL fScale, double dp)
HypHPNAM( ) - Get Entity IDThis function retrieves the ID of the specified entity, based on a retrieval code shown inTable 18.
Table 18 HypHPNAM( ) Entity Retrieval Codes
Code Entities Retrieved
NAM_NAM The major entity and sub-entity (Entity.Subentity)
NAM_NNA Only the major entity
NAM_NSN Only the sub-entity
52 Spreadsheet Add-in Functions
Use this format:
Declare Function HypHPNAM Lib “heaccess.dll” Alias “_HypHPNAM@16”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal iCode As Long, ByVal szRetbuf As String) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The pointer to the entity ID
iCode One of the following retrieval codes: NAM_NAM NAM_NNA NAM_NSN
szRetbuf The buffer to return the entity ID. The buffer must be large enough for at least HYP_SIZEDESC characters (SIZEDESC in C)
Return Codes:
Code Meaning
0 Successful
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
Example:
szMajor$ = SPACE (HYP_SIZEDESC)ret& = HypHPNAM(hRApp%, szEntity$, NAM_NNA, szMajor$)If ret& = 0 Then szMajor$ = CToBStr(szMajor$)
Use this format for C:
int WINAPI HypHPNAM( HRETRIEVEAPP hRApp, LPCSTR szEntity, int iCode, LPSTRszRetbuf)
HypHPOWN( ) - Get Shares OwnedThis function retrieves information on shares and ownership of companies, such as the totalshares issued, or how much a company owns of another company, either directly or indirectly.
Use this format:
Declare Function HypHPOWN Lib “heaccess.dll” Alias “_HypHPOWN@28”(ByVal hRAppAs Integer, ByVal szParent As String, ByVal szChild As String, ByVal szCat As String, ByValszPeriod As String, ByVal wCode As Integer, dretval As Double) As Integer
Variable Description
hRApp A nonzero Hyperion Enterprise Retrieve application handle returned by HypConstruct( )
szParent The parent entity
szChild The child entity
Alphabetical Function Reference 53
Variable Description
szCat The category ID
szPeriod A period date (“02/08/03”), a period ID (“Feb 03"), or a period number (“2”)
wCode The code for the information you want to retrieve. For more information, see the wCode Ultimate Ownership Values table.
dretval The pointer to the buffer to return the information
Use the wCode values in Table 19 to retrieve the parent entity's ultimate ownership of thespecified child entity. These include shares directly owned and shares indirectly owned, whichare owned by other companies that the parent partly or wholly owns.
Table 19 wCode Ultimate Ownership Values
Value Information Retrieved
SHARES_ULTPCTOWNED Ultimate percent ownership
SHARES_ULTPCTCTL Ultimate percent control
SHARES_ULTPCTCONSOL Ultimate percent consolidated
Use the wCode values in Table 20 to retrieve the parent entity's direct ownership of the specifiedchild entity. The value that is returned is either the number of shares or the percent ownership,depending on the setting of the Input Shares as Units or Percentages option in HyperionEnterprise.
Table 20 wCode Direct Ownership Values
Value Information Retrieved
SHARES_NONVOTING Direct ownership (number of shares owned)
SHARES_VOTING Direct control (number of voting shares owned)
Use the wCode values in Table 21 to retrieve various totals for calculation of percentages.
Table 21 wCode Percentage Calculation Values
Value Information Retrieved
SHARES_TOT_ISSUED_NONVOT The total number of outstanding shares
SHARES_TOT_ISSUED_VOT The total number of outstanding voting shares
SHARES_TOT_OWNED_NONVOT The total number of shares owned by other entities
SHARES_TOT_OWNED_VOT The total number of voting shares owned by other entities
Return Codes:
54 Spreadsheet Add-in Functions
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_CODE Error occurred, invalid wCode
HACC_BAD_SELECT Error occurred
Use this format for C:
short pascal HypHPOWN( HRETRIEVEAPP hRApp, LPCSTR szParent, LPCSTR szChild,LPCSTR szCat, LPCSTR szPeriod, WORD wCode, double * pdretval)
HypHPPBE( ) - Calculate Percent Better or WorseGiven two values for an account, this function returns the percentage by which the later timeperiod value is better or worse than the earlier time period value. The sign of the result is basedon whether the supplied account is an expense, asset, income, or liability account.
Use this format:
Declare Function HypHPPBE Lib “heaccess.dll” Alias “_HypHPPBE@20”(ByVal hRApp AsInteger, ByVal szAcct As String, value2 As Double, value1 As Double, dretval As Double) AsLong
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szAcct The account
value2 The later time period value
value1 The earlier time period value
dretval The buffer to return the floating point number
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_SELECT Error occurred
Example:
ret& = HypHPPBE(hRApp%, "INCOME", 200.0, 100.0, pctDif#)
Alphabetical Function Reference 55
Use this format for C:
int WINAPI HypHPPBE( HRETRIEVEAPP hRApp, LPCSTR szAcct, const double FAR *pdValue2, const double FAR * pdValue1, double FAR * pdRetval)
HypHPPCH( ) - Calculate Percent ChangeThis function returns the percentage change between two values.
Use this format:
Declare Function HypHPPCH Lib “heaccess.dll” Alias “_HypHPPCH@16”(ByVal hRApp AsInteger, value1 As Double, value2 As Double, dretval As Double) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
value1 One value.
value2 Another value
dretval The buffer to return the floating point number
Return Codes:
Code Meaning
0 Successful
Example:
ret& = HypHPPCH(hRApp%, 200.0, 100.0, pctDif#)
Use this format for C:
int WINAPI HypHPPCH( HRETRIEVEAPP hRApp, const double FAR * pdValue1, constdouble FAR * pdValue2 double FAR * pdRetval)
HypHPSCA( ) - Get ScaleThis function retrieves the scaling factor for an entity, category, and account.
Use this format:
Declare Function HypHPSCA Lib “heaccess.dll” Alias “_HypHPSCA@20”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, dretval AsDouble) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
56 Spreadsheet Add-in Functions
Variable Description
szEntity The entity ID
szCat The category ID
szAcct The account ID
dretval The buffer to return the scaling factor
If the account is a non-scalable account, then the function argument dretval will be one. If thecategory has a scale factor, dretval will be the category scale factor. Otherwise, dretval will be theentity scale factor. For example, if the category scale is 3, then the scaling factor referred to indretval is 1000. If there is no scaling or if there is an error, the scaling factor returned in dRetValis 1.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
Example:
ret& = HypHPSCA(hRApp%, "EuroDiv", "ACTUAL", "SALES", scale#)
Use this format for C:
int WINAPI HypHPSCA( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat, LPCSTRszAcct, double FAR * pdRetval)
HypHPVAL( ) - Retrieve Normal Account Value This function retrieves a data value from the Hyperion Enterprise database based on the specifiedentity, category, account, period, and frequency. You can use the DateConv( ) function tocalculate the proper period number to use with HypHPVAL( ). If this function returns an error,you can call HypValReturn( ) to get more information about the error. HypHPVAL( ) scalessystem-generated derived values for periods that have no data.
Note: Use HypHPVAL( ) to retrieve a data value. Use HypHPVALEx( ) to get special valuessuch as contribution, proportional, adjustment, or currency translation values. You canalso use HypHPVAL2 in either case.
Alphabetical Function Reference 57
Use this format:
Declare Function HypHPVAL Lib “heaccess.dll” Alias “_HypHPVAL@32” (ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriodAs String, ByVal szFreq As String, ByVal fScale As Long, dretval As Double) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szAcct The account ID
szPeriod A period date (“02/08/03”), a period label (“Feb 03"), or a period number (“2”)
szFreq The pointer to one of the following reporting frequency codes: DAY, DYTD, WEE, WYTD, MON, YTD, QUA, QYTD, HAL, HYTD, YEA, DAI,TRI, or TYTD. For more information on frequencies, see “Frequencies and Views” on page 20.
fScale TRUE (non-zero) to scale the data, otherwise FALSE (zero)
dretval The buffer to return the floating point number
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
RET_NA Data not available (no data)
HACC_DATAFILE_ERR Error reading data
Example:
ret& = HypHPVAL(hRApp%, "CANADA", "ACTUAL", "SALES", "2", "MON", 0, TheValue#)
Use this format for C:
int WINAPI HypHPVAL( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat, LPCSTRszAcct, LPCSTR szPeriod, LPCSTR szFreq, BOOL fScale, double FAR * pdRetval)
58 Spreadsheet Add-in Functions
HypHPVAL2( ) - Retrieve Normal Account ValueThis function is a clone of HypHPVAL( ) and HypVALEX customized specifically to improvethe efficiency of Hyperion Enterprise. HypHPVAL2( ) includes an option to internally callHypValReturn( ) to adjust the return code according to the missing values setting (MV Mode),but only if the parameters are valid.
Note: Use HypHPVAL( ) to retrieve a normal data value. Use HypHPVALEx( ) to get specialvalues such as contribution, proportional, adjustment, or currency translation values.You can also use HypHPVAL2 in either case.
Use this format:
Declare Function HypHPVAL2 Lib “heaccess.dll” Alias “_HypHPVAL@44”(ByVal hRApp AsInteger, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriodAs String, ByVal szFreq As String, ByVal szParent As String, ByVal wType As Integer, ByValfScale As Long, ByVal fUseMVMode As Long, dVal As Double) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity label
szCat The category label
szAcct The account label
szPeriod A period date (“02/08/03”), a period label (“Feb 03"), or a period number (“2”)
szFreq One of the following reporting frequency codes: DAY, DYTD, WEE, WYTD, MON, YTD, QUA, QYTD, HAL, HYTD, YEA, DAI, TRI, orTYTD. For more information on frequencies, see the “Frequencies and Views” on page 20.
szParent The parent entity label, or NULL if wType = ID_REGULAR
wType The code for the type of data to retrieve. Should be one of the following:
l ID_REGULAR
l ID_PROPORTIONAL
l ID_ELIMINATION
l ID_CONTRIBUTION
l ID_ADJUSTMENT
l ID_TRANSLATION
l ID_TRANSLATION_FORCE
fScale TRUE (nonzero) to scale the data, otherwise FALSE (zero)
fUseMVMode TRUE to adjust the return code according to MV Mode, otherwise FALSE
dval The variable in which to return the data value
Return Codes:
Alphabetical Function Reference 59
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
RET_NA Data not available (no data)
HACC_DATAFILE_ERR Error reading data
Example1:
rc% = HypHPVAL2(hRApp%, "CANADA", "ACTUAL", "SALES", "2", "MON", "", ID_REGULAR, 0, 1, TheValue#)
Example 2:
rc% = HypHPVAL2(hRApp%, "Spain", "ACTUAL", "SALES", "2", "MON", "EUROPE", ID_CONTRIBUTION, 0, 1, TheValue#)
Use this format for C:
int WINAPI HypHPVAL2( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat,LPCSTR szAcct, LPCSTR szPeriod, LPCSTR szFreq, LPCSTR szParent, WORD wType, BOOLfScale, BOOL fUseMVMode, double FAR * pdVal)
HypHPVALEx( ) - Retrieve Special Account ValueThis function retrieves a data value from the Hyperion Enterprise database based on the specifiedentity, category, account, period, and frequency. You can use the DateConv( ) function tocalculate the proper period number to use with HypHPVALEx( ) and HypHPVAL( ).
Note: Use HypHPVAL( ) to retrieve a normal data value. Use HypHPVALEx( ) to get specialvalues such as contribution, proportional, adjustment, or currency translation values.You can also use HypHPVAL2 in either case.
Use this format:
Declare Function HypHPVALEx Lib “heaccess.dll” Alias “_HypHPVALEx@40”(ByVal hRAppAs Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByValszPeriod As String, ByVal szFreq As String, ByVal szParent As String, ByVal wType As Integer,ByVal fScale As Integer, dretval As Double) As Integer
60 Spreadsheet Add-in Functions
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szAcct The account ID
szPeriod The pointer to a period date (“02/08/03”), a period ID (“Feb 03"), or a period number (“2”)
szFreq One of the following reporting frequency codes: DAY, DYTD, WEE, WYTD, MON, YTD, QUA, QYTD, HAL, HYTD, YEA, DAI, TRI, or TYTD.For more information on frequencies, see “Frequencies and Views” on page 20.
szParent The parent entity, unless wType is ID_REGULAR.
wType The type of data being requested. Use one of the of the following codes:
ID_REGULAR
ID_PROPORTIONAL
ID_ELIMINATION
ID_CONTRIBUTION
ID_ADJUSTMENT
ID_TRANSLATION
ID_TRANSLATION_FORCE
fScale TRUE (nonzero) to scale the data, otherwise FALSE (zero)
dretval The buffer to return the floating point number
Return Codes:
Code Meaning
0 Successful
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_SELECT Error occurred
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
RET_NA Data not available (no data)
HACC_DATAFILE_ERR Error reading data
Example1:
rc% = HypHPVALEx(hRApp%, "CANADA", "ACTUAL", "SALES", "2", "MON", "", ID_REGULAR, 0, TheValue#)
Alphabetical Function Reference 61
Example 2:
rc% = HypHPVALEx(hRApp%, "Spain", "ACTUAL", "SALES", "2", "MON", "EUROPE", ID_CONTRIBUTION, 0, TheValue#)
Use this format for C:
short WINAPI HypHPVALEx( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat,LPCSTR szAcct, LPCSTR szPeriod, LPCSTR szFreq, LPCSTR szParent, WORD wType, SBOOLfScale, double FAR * pdRetval)
HypJourAsk( ) - Select JournalThis function displays a dialog box for choosing a journal. Your selection becomes the defaultjournal that will be used by the Journal Detail dialog box. This also sets the default category andperiod for the Journal Detail dialog box.
Use this format:
Declare Function HypJourAsk Lib “heaccess.dll” Alias “_HypJourAsk@8”(ByVal hRApp AsInteger, ByVal szRetbuf As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szRetbuf The buffer to return the journal ID
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI HypJourAsk( HRETRIEVEAPP hRApp, LPSTR szRetbuf)
HypJourDetAsk( ) - Select Journal DetailThis function displays the Journal Detail dialog box. You should first use HypJourAsk( ) tochoose a journal, then call HypJourDetAsk( ) to select a detail record from that journal.HypJourDetAsk() uses the default category and period set by HypJourAsk(). For moreinformation, see “HypJourAsk( ) - Select Journal” on page 62.
Use this format:
Declare Function HypJourDetAsk Lib “heaccess.dll” Alias “_HypJourDetAsk@8”(ByValhRApp As Integer, sig As Long) As Integer
62 Spreadsheet Add-in Functions
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sig The buffer to return the journal detail record signature
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI HypJourDetAsk (HRETRIEVEAPP hRApp, SIGNA * psig)
HypMultiAsk( ) - Select Default ApplicationThis function calls the Select Application dialog box, which lists the applications opened byHypConstruct( ) or HypMultiInit( ). The application you select will be the default application,which is returned by subsequent calls to HypMultiDefault( ). For more information, see“HypConstruct( ) - Open an Application” on page 29, “HypMultiInit( ) - Log on to MultipleApplications” on page 66, or “HypMultiDefault( ) - Get Default Handle” on page 63.
Use this format:
Declare Function HypMultiAsk Lib “heaccess.dll” Alias “_HypMultiAsk@0” ( ) As Long
Return Codes:
Code Meaning
0 Successful
Example:
ret& = HypMultiAsk()hRApp% = HypMultiDefault() 'hRApp% is the selected app
Use this format for C:
int WINAPI HypMultiAsk( void )
HypMultiDefault( ) - Get Default HandleThis function returns the Hyperion Enterprise Retrieve application handle of the defaultapplication. If no applications are initialized, NULL is returned. If there is no default application,HypMultiDefault( ) returns the handle of the first open application.
Use this format:
Alphabetical Function Reference 63
Declare Function HypMultiDefault Lib “heaccess.dll” Alias “_HypMultiDefault@0”( ) AsInteger
Return Codes:
Code Meaning
Hyperion Enterprise Retrieve application handle Successful
0 No applications are open
NONE Error occurred
Example:
hRApp% = HypMultiDefault()If hRApp% = 0 Then ret% = MsgBox("No applications are open", vbOKOnly, "Error")
Use this format for C:
HRETRIEVEAPP WINAPI HypMultiDefault( void )
HypMultiDeinit( ) - Log off Multiple ApplicationsYou use this function to log off Hyperion Enterprise. This function closes and de-initializes allHyperion Enterprise applications that were opened using HypMultiInit( ) or HypConstruct( ).For more information, see “HypMultiInit( ) - Log on to Multiple Applications” on page 66 or“HypConstruct( ) - Open an Application” on page 29.
Pair each call to HypMultiInit( ) with a call to HypMultiDeinit( ) when each call is finished.Because calls to HypConstruct( ) share the same data, any applications opened byHypConstruct( ) are also closed when the last call is made to HypMultiDeinit( ).
Use this format:
Declare Function HypMultiDeinit Lib “heaccess.dll” Alias “_HypMultiDeinit@0”( ) As Long
Return Codes:
Code Meaning
0 Successful
Example:
hRApp% = HypMultiDeinit()If hRApp% <> 0 Then retz% = MsgBox("Log off failed", vbOKOnly, "Error")
Use this format for C:
int WINAPI HypMultiDeinit( void )
64 Spreadsheet Add-in Functions
HypMultiEnum( ) - Enumerate Open ApplicationsThis function calls the supplied function address once for each open application in the systemand returns the Hyperion Enterprise Retrieve application handle and the ID of each openapplication. This allows you to select an application without making it the default application.
Use this format:
Declare Sub HypMultiEnum Lib “heaccess.dll” Alias “_HypMultiEnum@4”(ByVal lpCallbackAs Long)
Where lpCallback is the address of the enumeration function. For more information, see“CALLBACKSTR” on page 320.
Use this format for 16-bit Visual Basic:
Public Function MyFunc(ByVal hRApp As Integer, ByVal szApp As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle
szApp The application ID
Return Codes:
There are no return codes for this function.
Use this format for C:
void WINAPI HypMultiEnum( CALLBACKSTR lpCallback)
HypMultiGet( ) - Get Application HandleThis function retrieves the correct Hyperion Enterprise Retrieve application handle to use for agiven application name. If the specified application name is not found, NULL (0) is returned.
Note: You can use HypMultiGet( ) to retrieve a Hyperion Enterprise Retrieve application handleonly after initializing applications using HypMultiInit( ) or HypConstruct( ). For moreinformation, see “HypMultiInit( ) - Log on to Multiple Applications” on page 66 or“HypConstruct( ) - Open an Application” on page 29.
Use this format:
Declare Function HypMultiGet Lib “heaccess.dll” Alias “_HypMultiGet@4”(ByVal szApp AsString) As Integer
Where szApp is the name of the application for which a Hyperion Enterprise Retrieve applicationhandle is requested. If a null string, the system returns the default Hyperion Enterprise Retrieveapplication handle from HypMultiDefault( ).
Return Codes:
Alphabetical Function Reference 65
Code Meaning
Hyperion Enterprise Retrieve application handle Successful
NULL Error occurred
Example:
hRApp% = HypMultiGet("TAX")If hRApp% = 0 Then ret% = MsgBox("TAX application is not active", vbOKOnly, "Error")
Use this format for C:
HRETRIEVEAPP WINAPI HypMultiGet( LPCSTR szApp)
HypMultiInit( ) - Log on to Multiple ApplicationsThis function opens multiple applications based on the contents of an application list file bycalling HypConstruct( ) internally for each application. You can have a maximum of 20(MAX_OPEN_APPS) applications open at one time. The program should call HypMultiInit( )only once. Call HypMultiDeinit( ) when you are through using the application, before endingthe program. For more information, see “HypConstruct( ) - Open an Application” on page 29or “HypMultiDeinit( ) - Log off Multiple Applications” on page 64.
The application list file must be in the same format as the HPAPP.DAT file used by HyperionEnterprise Retrieve, as shown in this example.
app [, user [, password]]
Use this format:
Declare Function HypMultiInit Lib “heaccess.dll” Alias “_HypMultiInit@8”(ByVal szFNameAs String, ByVal ShowErr As Long) As Long
Variable Description
szFName The name of the application list file, such as HPAPP.DAT
ShowErr Zero or nonzero. If TRUE (non-zero), the system displays all errors
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
'Initialize applications in HPAPP.DATret& = HypMultiInit("HPAPP.DAT", -1)If ret& <> 0 Then ret2% = MsgBox("Logon failed", vbOKOnly, "Error")
66 Spreadsheet Add-in Functions
Use this format for C:
int WINAPI HypMultiInit(LPCSTR szFName, int iShowErr)
HypNamAskEx( ) - Select EntityThis function calls the Hyperion Enterprise Select Entity dialog box and retrieves the entityselected by the user. If the user selects Cancel, no entity is retrieved.
Use this format:
Declare Function HypNamAskEx Lib “heaccess.dll” Alias “_HypNamAskEx@8”(ByVal hRAppAs Integer, ByVal szRetbuf As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypMultiGet( ) or HypConstruct( )
szRetbuf The buffer to return the entity ID. The buffer must be large enough for at least HYP_SIZEFULLNAME+1 characters (SIZEFULLNAME+1 in C)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szEntity$ = SPACE (HYP_SIZEFULLNAME+1)ret% = HypNameAskEx(hRApp%, szEntity$)If ret% = 0 Then szEntity$ = CToBStr(szEntity$)
Use this format for C:
short WINAPI HypNamAskEx( HRETRIEVEAPP hRApp, LPSTR szRetbuf)
HypNameListAskEx( ) - Select Entity ListThis function calls the Hyperion Enterprise Select Entity List dialog box and retrieves the entitylist selected by the user. If the user selects Cancel, no entity list is retrieved.
Use this format:
Declare Function HypNameListAskEx Lib “heaccess.dll” Alias “_HypNameListAskEx@8”(ByVal hRApp As Integer, ByVal szRetbuf As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypMultiGet( )
Alphabetical Function Reference 67
Variable Description
szRetbuf The buffer to return the entity list. The buffer must be large enough for at least HYP_SIZELABEL+1 characters (SIZENAME+1 in C)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szEntityList$ = SPACE (HYP_SIZELABEL+1)ret% = HypNameListAskEx(hRApp%, szEntityList$)If ret% = 0 Then szEntityList$ = CToBStr(szEntityList$)
Use this format for C:
short WINAPI HypNameListAskEx( HRETRIEVEAPP hRApp, LPSTR szRetbuf )
HypPerAsk( ) - Select PeriodThis function calls the Hyperion Enterprise Select Period dialog box and retrieves the periodselected by the user. If the user selects Cancel, no period is retrieved.
Use this format:
Declare Function HypPerAsk Lib “heaccess.dll” Alias “_HypPerAsk@12”(ByVal hRApp AsInteger, fWantDate As Long, ByVal szRetbuf As String) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypMultiGet( ) or HypConstruct( )
fWantDate One of the following indicators to return the period as a period number or date:0 for period number1 for date
szRetbuf The buffer to return the period. The buffer must be large enough for the date and one extra character.
If you specify 1 for fWantDate and no date is available, Hyperion Enterprise changes the valueof fWantDate to zero. For example, if you specify 1 for fWantDate, and you are trying to retrievethe 13th month of a 13-month accounting year, Hyperion Enterprise changes the value offWantDate to zero and returns the period number in szRetbuf.
Note: The date (if fWantDate = 1) is returned as month, day, and year, separated by commas(mm,dd,yy). For example, March 31, 2003 would be returned as “3,31,2003”.
Return Codes:
68 Spreadsheet Add-in Functions
Code Meaning
0 Successful
NONE Error occurred
Example:
szPer$ = SPACE (HYP_SIZELABEL)ret& = HypPerAsk(hRApp%, 0, szPer$)If ret& = 0 Then szPer$ = CToBStr(szPer$)
Use this format for C:
int WINAPI HypPerAsk( HRETRIEVEAPP hRApp, BOOL FAR * pfWantDate, LPSTRszRetbuf )
HypSetDefJour( ) - Set Default Journal This function changes the default journal associated with an application. This default is normallyset in the Journal selection dialog box. For more information, see “HypJourAsk( ) - SelectJournal” on page 62. You need to set the default journal before you can call HypJourDetAsk( ).For more information about the HypJourDetAsk function, see “HypJourDetAsk( ) - SelectJournal Detail” on page 62.
Use this format:
Declare Function HypSetDefJour Lib “heaccess.dll” Alias “_HypSetDefJour@8” (ByVal hRAppAs Integer, ByVal sigDefJour As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigDefJour The signature of the journal
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
SBOOL WINAPI HypSetDefJour(HRETRIEVEAPP hRApp, SIGNA sigDefJour)
HypSetDefJourCat( ) - Set Default Journal CategoryThis function changes the default journal category associated with an application. This defaultis normally set in the Journal selection dialog box (HypJourAsk( )). You need to set the default
Alphabetical Function Reference 69
journal before you can call HypJourDetAsk( ). For more information about the HypJourDetAskfunction, see “HypJourDetAsk( ) - Select Journal Detail” on page 62.
Use this format:
Declare Function HypSetDefJourCat Lib “heaccess.dll” Alias “_HypSetDefJourCat@8” (ByValhRApp As Integer, ByVal sigDefJourCat As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigDefJourCat The signature of the category
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
SBOOL WINAPI HypSetDefJourCat(HRETRIEVEAPP hRApp, SIGNA sigDefJourCat)
HypSetDefJourPer - Set Default Journal PeriodThis function changes the default journal period associated with an application. This default isnormally set in the Journal selection dialog box (HypJourAsk( )). You need to set the defaultjournal before you can call HypJourDetAsk( ). For more information about the HypJourDetAskfunction, see “HypJourDetAsk( ) - Select Journal Detail” on page 62.
Use this format:
Declare Function HypSetDefJourPer Lib “heaccess.dll” Alias “_HypSetDefJourPer@8” (ByValhRApp As Integer, ByVal sigDefJourPer As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigDefJourPer The signature of the period
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
70 Spreadsheet Add-in Functions
SBOOL WINAPI HypSetDefJourPer(HRETRIEVEAPP hRApp, SIGNA sigDefJourPer)
HypSetMVMode( ) - Set HypVal Return BehaviorThis function controls the behavior of the HypValReturn( ) function. HypValReturn( ) returnsa code for valid data, missing data, or an error. For more information, see “HypValReturn( ) -Return Status of Last Value Retrieval” on page 75.
Use this format:
Declare Sub HypSetMVMode Lib “heaccess.dll” Alias “_HypSetMVMode@4”(ByVal iModeAs Long)
where iMode is one of the following codes:
0 = Allow NA and ERR
1 = Zero for NA
2 = Zero only
Return Codes:
iMode Value Result Returned
0 An error code
1 0 if data is not available, otherwise an error code
2 0 (always)
Example:
HypSetMVMode(1)ret& = HypHPVAL(...)If ret& <> 0 Then ret& = HypValReturn( )
Use this format for C:
void WINAPI HypSetMVMode( int iMode )
HypSetProgramName( ) - Set Text for Users in ApplicationReportUse this function to specify the text that will be displayed as the program name in the HyperionEnterprise Users in Application report. Call this function before you open an application. Allapplications opened using HypConstruct( ) or HypMultiInit( ) after callingHypSetProgramName( ) will use the text specified in the szProgram argument. Applicationsopened using the advanced function EntOpenApplication( ) are not affected byHypSetProgramName( ). For more information, see “HypMultiInit( ) - Log on to MultipleApplications” on page 66, “HypConstruct( ) - Open an Application” on page 29, or“EntOpenApplication( ) - Open Application” on page 236.
Alphabetical Function Reference 71
Use this format:
Declare Function HypSetProgramName Lib “heaccess.dll” Alias “_HypSetProgramName@4”(ByVal szProgram As String) As Integer
where szProgram is the text you want to display as the program name in the Hyperion EnterpriseUser in Application report.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
ret% = HypSetProgramName("Our Custom Program")ret2& = HypConstruct(hRApp%, application$, userID$, password$)
Use this format for C:
short WINAPI HypSetProgramName(LPCSTR szProgram)
HypValidateLnkParams( ) - Check Link ParametersThis function determines whether the parameters you plan to supply to the HypHPLNK( ) callfor setting data are valid. It confirms that the entity, category, period, and frequency are valid,and that the account is an input account. For more information, see “HypHPLNK( ) - StoreData Values” on page 51.
Use this format:
Declare Function HypValidateLnkParams Lib “heaccess.dll” Alias“_HypValidateLnkParams@24” (ByVal hRApp As Integer, ByVal szEntity As String, ByValszCat As String, ByVal szAcct As String, ByVal szPer As String, ByVal szFreq As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szAcct The account ID
szPer The period date (“02/08/03”), a period ID (“Feb 03"), or a period number (“2”)
szFreq A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (“M,” “Q,” and so on), andview is a reporting view. For more information about frequencies, see “Frequencies and Views” on page 20
Return Codes:
72 Spreadsheet Add-in Functions
Code Meaning
0 All parameters are valid
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_PERIOD Error occurred, invalid szPer
HACC_BAD_SELECT Error occurred
Example:
ret% = HypValidateLnkParams(hRApp%, "US100", "ACTUAL", "INCOME", "JAN 03", "M.CTD")
Use this format for C:
short WINAPI HypValidateLnkParams(HRETRIEVEAPP hRApp, LPCSTR szEntity,LPCSTR szCat, LPCSTR szAcct, LPCSTR szPer, LPCSTR szFreq)
HypValidateParams( ) - Check ParametersThis function checks that the entity, category, account, period, and frequency are valid. You canuse this function to test the arguments you plan to use with HypHPVAL( ).HypValidateParams( ) is similar to HypValidateLnkParams( ), except that the account does nothave to be an input account for HypValidateParams( ). For more information, see“HypValidateLnkParams( ) - Check Link Parameters” on page 72.
Use this format:
Declare Function HypValidateParams Lib “heaccess.dll” Alias”_HypValidateParams@24”(ByVal hRApp As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct AsString, ByVal szPer As String, ByVal szFreq As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity ID
szCat The category ID
szAcct The account ID
szPer A period date (“02/08/03”), a period label (“Feb 03"), or a period number (“2”)
szFreq A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (“M,” “Q,” and so on), andview is a reporting view. For more information about frequencies, see “Frequencies and Views” on page 20.
Alphabetical Function Reference 73
Return Codes:
Code Meaning
0 All parameters are valid
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_PERIOD Error occurred, invalid szPer
HACC_BAD_SELECT Error occurred
Example:
ret% = HypValidateParams(hRApp%, "US100", "ACTUAL", "INCOME", "JAN 03", "M.PER")
Use this format for C:
short WINAPI HypValidateParams(HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTRszCat, LPCSTR szAcct, LPCSTR szPer, LPCSTR szFreq)
HypValidateParamsEx( ) - Check ParametersThis function checks that the entity, category, account, period, frequency, and are valid. Youcan use this function to test the arguments you plan to use with HypHPVALEx( ).
Use this format:
Declare Function HypValidateParamsEx Lib “heaccess.dll” Alias”_HypValidateParams@32”(ByVal hRApp As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct AsString, ByVal szPer As String, ByVal szFreq As String, ByVal szParent As String, wType AsInteger) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity label
szCat The category label
szAcct The account label
szPer A period date (“02/08/03”), a period label (“Feb 03"), or a period number (“2”)
szFreq A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (“M,” “Q,” and so forth), andview is a reporting view. For more information about frequencies, see the Frequencies and Views topic in the About HyperionEnterprise Developer's Toolkit chapter.
74 Spreadsheet Add-in Functions
Variable Description
szParent The parent entity label.
wType The type of data being requested. Use one of the of these codes:
l ID_REGULAR
l ID_PROPORTIONAL
l ID_ELIMINATION
l ID_CONTRIBUTION
l ID_ADJUSTMENT
l ID_TRANSLATION
l ID_TRANSLATION_FORCE
Return Codes:
Code Meaning
0 All parameters are valid
HACC_BAD_ACCOUNT Error occurred, invalid szAcct
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_FREQUENCY Error occurred, invalid szFreq
HACC_BAD_NAME Error occurred, invalid szEntity
HACC_BAD_PERIOD Error occurred, invalid szPer
HACC_BAD_SELECT Error occurred
Example:
ret% = HypValidateParamsEx(hRApp%, "US100", "ACTUAL", "INCOME", "JAN 03", "M.PER", "EUROPE", ID_CONTRIBUTION)
Use this format for C:
short WINAPI HypValidateParamsEx(HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTRszCat, LPCSTR szAcct, LPCSTR szPer, LPCSTR szFreq, LPCSTR szParent, WORD wType)
HypValReturn( ) - Return Status of Last Value RetrievalThis function returns a value that indicates the status of the last HypHPVAL( ) orHypHPVALEx( ) data retrieval functions and the following other functions:
l HypHPACC( )
l HypHPBET( )
l HypHPCAD( )
l HypHPCAL( )
Alphabetical Function Reference 75
l HypHPCDE( )
l HypHPCUREx( )
l HypHPDRV( )
l HypHPECO( )
l HypHPFLW( )
l HypHPFRE( )
l HypHPFUL( )
l HypHPHEA( )
l HypHPINC( )
l HypHPINP( )
l HypHPJOUR( )
l HypHPKEYEx( )
l HypHPNAM( )
l HypHPOWN( )
l HypHPPBE( )
l HypHPPCH( )
l HypHPSCA( )
You use HypValReturn( ) to get more detailed information about the error returned by any ofthe functions listed above. Call HypValReturn( ) immediately after calling the function thatreturned the error and before you call any other functions in the list.
Use this format:
Declare Function HypValReturn Lib “heaccess.dll” Alias “_HypValReturn@0”( ) As Long
Return Codes:
Code Meaning
RET_OK (0) The request was successful.
RET_NA (-1) A value is not available. The request was valid, but no data was found in the database.
HACC_BAD_...( >= 10 ) An error occurred. The request was not valid for the current structure of the database. See the TOOLKIT.BAS orTOOLKIT.H file for specific error codes, or see the topics for the individual functions.
Example:
ValRet& = HypValReturn( )Select Case ValRet&Case Ret_NARetString$ = "Data not available"Case HACC_BAD_ACCOUNTRetString$ = "Bad Account"Case Ret_OKRetString$ = "OK"
76 Spreadsheet Add-in Functions
Case ElseRetString$ = "Error"End Select
Use this format for C:
int WINAPI HypValReturn( void )
Alphabetical Function Reference 77
78 Spreadsheet Add-in Functions
3Table Functions
In This Chapter
Table Functions Overview ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
Select and Deselect Tables Using Hyp...( ) Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
Using Tables with Hyp...( ) Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
Related Tables and Hyp...( ) Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Organization Structures and Hyp...( ) Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
Table Functions Alphabetical Reference .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82
This chapter provides information about using Hyperion Enterprise API functions to retrieveinformation from the tables into which Hyperion Enterprise applications are organized.
Table Functions OverviewInformation about Hyperion Enterprise applications is organized into tables. For example, anaccount table lists the accounts in the chart of accounts and their attributes, and a categoriestable lists the categories in the application and their attributes. This chapter describes how toretrieve the information you want from the tables using functions in the Hyperion EnterpriseAPI.
Table functions are designed to be used with the spreadsheet add-in functions described inChapter 2, “Spreadsheet Add-in Functions” and are alternatives to the more advanced functionsdescribed in the Advanced Functions chapter. Table functions take the form Hyp...( ).
Most table functions require a handle from a Hyperion Enterprise Retrieve application(hRApp) as an argument. You get this handle when you open the application using theHypConstruct( ) function. If you open multiple applications, you can get the handle fromHypMultiGet( ) or HypMultiDefault( ). For more information, see “Single ApplicationManagement Functions” on page 23 or “Multiple Application Management Functions” on page24.
Select and Deselect Tables Using Hyp...( ) FunctionsBefore you can access any information in a table, you must first select the table by calling theHypLockEx( ) function. This function tells the Hyperion Enteprise API that you plan to use thetable and makes it possible for you to use the table. You can select multiple tables at the same
Table Functions Overview 79
time. When you are finished using the table, use the HypUnLockEx( ) function to deselect thetable.
Many tables have other tables associated with them. In Hyperion Enterprise SE, these associatedtables are available when you select the main table. For example, the currencies and entities tablesare available when you select the organizations table. In Hyperion Enterprise, you can selectassociated tables individually.
When you select or deselect a table, you can use an OR operation with HYP_ID_ASSOC(ID_ASSOC in C) and the table ID to select or deselect the associated tables automatically. Youshould always use HYP_ID_ASSOC to select or deselect the associated tables rather than selectingor deselecting the tables individually. For more information about HYP_ID_ASSOC, see“Associated Tables” on page 362.
When you use the HypConstruct( ) function or the HypMultiInit( ) function to open anapplication, the organization (ID_ORGANIZATION), category (ID_CATEGORY), andaccount (ID_ACCOUNT) tables and their associated tables are automatically selected.HypConstruct( ) also automatically selects the reporting frequencies and reporting views tables(ID_RPTFREQ and ID_RPTVIEW). The HypDestruct( ) function automatically deselects theprevious tables.
If an application was set up with dynamic organizations, you should reselect the organizationtable (ID_ORGANIZATION) and its associated tables, whenever you change categories. Passthe signature of the new category as the sigkey argument when you select the organization table.For more information, see “Organization Structures and Advanced Functions” on page 120.
Using Tables with Hyp...( ) FunctionsAfter you select a table using the HypLockEx( ) function, you can use the functions listed inTable 22 to retrieve information from the selected table.
Table 22 Functions to Use after Selecting a Table with HypLockEx( )
Function Description
HypEnumEx( ) Enumerates the records in the table.
HypFindEx( ) Finds a specific record in the table.
HypQueryEx( ) Retrieves information about a specific record.
Each record in the table is identified by a unique value called a signature. You specify the signaturewhen you ask for information about a record. For example, when you call the HypQueryEx( )function, you pass it the signature to identify the record for which you want to retrieveinformation. You can get the signature of a specific record by calling HypFindEx( ). If you useHypEnumEx( ) to enumerate the records in a table, the function returns the signature of eachrecord.
80 Table Functions
Related Tables and Hyp...( ) FunctionsSome tables are related to another table. Whenever you select, access, or deselect a table to whichanother table is closely related, you must specify a record in the related table. For example, theaccount list entries table (ID_ACCTLISTENTRY) contains information about the records in anaccount list. You must specify an account list by passing the account list's signature (in theaccount list table, ID_ACCTLIST).
You pass the signature of the related record as the sigKey argument when you use one of thefollowing functions:
l HypEnumEx( ) - Enumerate Records in a Table
l HypFindEx( ) - Find Signature
l HypLockEx( ) - Select a Table
l HypQueryEx( ) - Query Hyperion Enterprise Tables
l HypUnLockEx( ) - Deselect a Table
Note: Because the key is an argument to HypLockEx( ), you must select the related tablebefore you can select the dependent table.
For a listing of related Hyperion Enterprise tables, see “Related Tables” on page 363.
Organization Structures and Hyp...( ) FunctionsTable 23 lists the functions that retrieve information about an organization structure.
Table 23 Functions To Use To Retrieve Organization Information
Function Description
HypEnumOrgNames( ) Enumerates nodes in an organization.
HypFindNameInOrgEx( ) Finds a node in an organization.
HypGetChild( ) Gets the signature of a child node.
HypGetOrgLevel( ) Gets the organization level of a node.
HypGetSibling( ) Gets the signature of the next sibling node in an organization.
HypGetTopNodeEx( ) Gets the signature of the top node in an organization.
HypIsNameParentEx( ) Checks if a specified entity is a parent entity.
Hyperion Enterprise stores most information about an organization structure in the Nodes table(ID_NODES). Each record in the Nodes table is called a node. Each node has information abouta particular entity in the organization structure. This information lets you find the parent,immediate dependent (child), or a sibling on the same level in the organization structure.
Related Tables and Hyp...( ) Functions 81
Most of the functions in the above table return the signature of a node in the Nodes table, notthe signature of an entity. You can retrieve the signature of the entity by querying the Nodestable using the HypQueryEx( ) function and query attribute NAMESIG.
If an application was set up with dynamic organizations, the organization structure can vary bycategory and period. These functions have no way of specifying the category or period. They usethe current category and period.
You should use the advanced functions that take the form Ent...( ) if an application uses dynamicorganizations. See “Organization Structures and Advanced Functions” on page 120.
Table Functions Alphabetical Reference This topic includes a list of all table functions in alphabetical order.
DateConv( ) - Date ConversionGiven a period in one category, for example the reference category, DateConv( ) calculates theequivalent period in another category and reporting frequency, for example, the base categoryand frequency. For more information on reporting frequencies, see “Frequencies and Views”on page 20.
Use this format:
Declare Function DateConv Lib “heaccess.dll” Alias “_DateConv@28” (ByVal hRApp AsInteger, ByVal iMethod As Integer, ByVal szRefCat As String, ByVal szRefPeriod As String,ByVal iOffset As Integer, ByVal szFreq As String, ByVal szBaseCat As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
iMethod One of the following codes:
l DCONV_CMO, which resets the calculated period each year
l DCONV_CUR, which does not reset the calculated period each year
szRefCat The ID of the reference category
szRefPeriod The ID of the reference period
iOffset The number of periods by which to offset the result
szFreq The ID of the base reporting frequency
szBaseCat The ID of the base category
Return Codes:
82 Table Functions
Code Meaning
Period number Successful
BAD_PERIOD Error occurred
Example:
period% = DateConv(hRApp%, DCONV_CUR, "ACTUAL", "JAN 03", 0, "MON", "ACTUAL");
Use this format for C:
short WINAPI DateConv(HRETRIEVEAPP hRApp, short iMethod, LPSTR szRefCat, LPSTRszRefPeriod, short iOffset, LPSTR szFreq, LPSTR szBaseCat);
HypCatGetNumPeriodsEx( ) - Calculate Number of Periods ina CategoryThis function calculates the number of periods in a category for any given frequency. Given acategory in one frequency and a different frequency, this function returns the number of availableperiods. For example, given a monthly category with 12 periods and a quarterly frequency,HypCatGetNumPeriodsEx( ) would return 4 (quarters) as the number of periods in the category.
Use this format:
Declare Function HypCatGetNumPeriodsEx Lib “heaccess.dll” Alias“HypCatGetNumPeriodsEx_@12” (ByVal hRApp As Integer, ByVal sigCat As Long, ByValsigFreq As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigCat The category signature
sigFreq The frequency signature
Return Codes:
Code Meaning
Number of periods that category sigCat has for frequency sigFreq Successful
NONE Error occurred
Example:
sigCat& = HypFindEx(hRApp% HYP_ID_CATEGORY, HYP_NONE, "ACTUAL")sigFreq& = FREQ_QUARTERnumPer% = HypCatGetNumPeriodsEx(hRApp%, sigCat&, sigFreq&)
Use this format for C:
Table Functions Alphabetical Reference 83
short WINAPI HypCatGetNumPeriodsEx(HRETRIEVEAPP hRApp, SIGNA sigCat, SIGNAsigFreq);
HypCatGetPerShortEx( ) - Get Period ID in CategoryFrequencyThis function returns the ID of a period in a specified frequency for a specified category.
Use this format:
Declare Function HypCatGetPerShortEx Lib “heaccess.dll”Alias”_HypCatGetPerShortEx@24” (ByVal hRApp As Integer, ByVal sigCatAs Long, ByValsigPer As Long, ByVal sigFreq As Long, ByVal cchTag As Integer, ByVal pzTag As String) AsInteger
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigCat The category signature
sigPer The period number in the specified category
sigFreq The frequency, or HYP_NONE (NONE in C) to use the specified category's frequency.
cchTag The length of the pszTag buffer.
pzTag The buffer to return the period ID.
Return Codes:
Code Meaning
Length of the result string Successful
0 Error occurred
Example:
szPer$ = SPACE(10) 'arbitrary sizeret% = HypCatGetPerShortEx(hRApp%, sigCat&, sigPer&, sigFreq&, Len(szPer$), szPer$)if ret% Then szPer$ = cToBStr (szPer$)
Use this format for C:
short WINAPI HypCatGetPerShortEx(HRETRIEVEAPP hRApp, SIGNA sigCat, SIGNAsigPer, SIGNA sigFreq, short cchTag, char * pzTag);
HypCatMapPeriodEx( ) - Map Period into FrequencyThis function maps a period in a given frequency into the corresponding period in anotherfrequency.
84 Table Functions
Use this format:
Declare Function HypCatMapPeriodEx Lib “heaccess.dll” Alias”_HypCatMapPeriodEx@20”(ByVal hRApp As Integer, ByVal sigCat As Long,ByVal sigFreq As Long, ByVal sigPer As Long,ByVal sigAltFreq As Long) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigCat The category signature
sigFreq The frequency signature for sigPer
sigPer The period signature for frequency sigFreq
sigAltFreq The frequency signature for the alternate period into which you want the period sigPer to be mapped. Specify HYP_NONE (NONEin C) to use the category's default frequency.
Return Codes:
Code Meaning
Period signature for frequency Successful
BAD_PERIOD Error occurred
Example:
Suppose you know that you want to retrieve the first period of quarterly data within a category,and you need to know what the weekly period number is. You could use the following call:
sigPerWeekly& = HypCatMapPeriodEx(hRApp%, sigCat&, FREQ_QUARTER, 0, FREQ_WEEK)
In this case, assuming that the category was monthly starting in January, this would map Q1 toMonthly and get March (3). The function would then map the Monthly (3) to weeks and comeup with W13, because the last week in March is Week 13. This is useful if you are trying to builda report based on weeks, but you need to get the corresponding values from two categories thathave different frequencies.
Use this format for C:
SIGNA WINAPI HypCatMapPeriodEx(HRETRIEVEAPP hRApp, SIGNA sigCat, SIGNAsigFreq, SIGNA sigPer, SIGNA sigAltFreq);
HypEnumAcctListEntriesEx( ) - Enumerate Accounts inAccount ListThis function enumerates all accounts in the specified account list, calling a user-suppliedcallback function for each account in the account list. For a dynamic list,HypEnumAcctListEntriesEx( ) passes the account signature to the callback function. For a fixedlist, the signature passed to the callback function is the signature of the entry in the Account ListEntries table (ID_ACCTLISTENTRY), which you can query for the account signature.
Table Functions Alphabetical Reference 85
Note: You should select the account list table (ID_ACCTLIST) and the Account List Entriestable (ID_ACCTLISTENTRY) before calling this function.
Use this format:
Declare Function HypEnumAcctListEntriesEx Lib “heaccess.dll”Alias”_HypEnumAcctListEntriesEx@16” (ByVal hRApp As Integer,ByVal sigList As Long,ByVal lpCallBack As Long,ByVal lParam As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigList The signature of the account list to enumerate
lpCallBack Address of a user-provided callback function. For more information, see “CALLBACK12” on page 308.
lParam The parameter to be passed back to the user-provided callback function
Return Codes:
Code Meaning
0 Successful
Non-zero value Returned from callback function to terminate enumeration
NONE Error occurred
Example:
sigList& = HypFindEx(hRApp%, HYP_ID_ACCTLIST, HYP_NONE, szAcctList$)If sigList& = HYP_NONE Then Return 'Error'Is it a fixed or dynamic list? Get listType%ret% = HypQueryEx(hRApp%, HYP_ID_ACCTLIST,LIST_TYPE, sigList&, HYP_NONE, 2, listType%)If ret% Then Return 'Errorret% = HypLockEx(hRApp%, HYP_ID_ACCTLISTENTRY,sigList&, APILOCK_READONLY)If ret% <> APILOCK_READONLY Then Return 'ErrorlParam& = listType%ret% = HypEnumAcctListEntriesEx(hRApp%, sigList&, AddressOf EnumAcctListEntriesCB, lParam&)ret% = HypUnLockEx(hRApp%, HYP_ID_ACCTLISTENTRY, sigList&, 0)...'Callback function, whatever you named itPublic Function EnumAcctListEntriesCB(ByVal hRApp%, ByVal sigList&, ByVal sigEntry&, ByVal lParam&) As Integer'We passed the list type in lParam in this exampleIf lParam& = Asc("F") Then 'Fixed list 'Get the account signature
86 Table Functions
ret% = HypQueryEx(hRApp%, HYP_ID_ACCTLISTENTRY, ENTRY_SIG, sigEntry&, sigList&, 4, sigAcct&)Else 'Dynamic list sigAcct& = sigEntry&End If'Display account idszAcct$ = Space(HYP_SIZEFULLACCT+1)ret% = HypQueryEx(hRApp%, HYP_ID_ACCOUNTS, NAME, sigAcct&, Len(szAcct$), szAcct$)If ret% = 0 Then szAcct$ = CToBStr(szAcct$)ret% = MsgBox("Account: " & szAcct$)'return 0 to continue enumerationEnumAcctListEntriesCB% = 0End Function
Use this format for C:
short WINAPI HypEnumAcctListEntriesEx(HRETRIEVEAPP hRApp, SIGNA sigList,CALLBACK12 lpCallBack, LONG lParam);
HypEnumApplications( ) - Enumerate ApplicationsThis function enumerates all Hyperion Enterprise applications that have been set up on thecurrent machine using the New Application or Add Application command in HyperionEnterprise. HypEnumApplications( ) reads the HYPENT.INI file and enumerates applicationsusing a callback function.
Use this format:
Declare Function HypEnumApplications Lib “heaccess.dll”Alias”_HypEnumApplications@8” (ByVal lpfnCallBack As Long, ByVal lParam As Long) AsInteger
Variable Description
lpfnCallBack Callback function. For more information, see “CALLBACKAPP (or CALLBACK6)” on page 310.
lParam Parameter passed to the callback function
Return Codes:
Code Meaning
0 Successful
1 Error occurred or no applications listed
Non-zero value Returned from callback function to terminate enumeration
Example:
ret% = HypEnumApplications(AddressOf EnumAppsCallback, lParam&)..
Table Functions Alphabetical Reference 87
.'Callback functionPublic Function EnumAppsCallback(laddr as Long, ByVal lParam&) As Integer ‘Copy C string to B stringwLen% = EntVBGetCStrLen( lAddr&)szApp$=Space (wLen%)ret%=EntVBCopyStr(szApp$, lAddr&, wLen%)If UCASE(szApp$) <> "DEFAULT" Then ret% = MsgBox("Application: " & szApp$)End IfEnumAppsCallback% = 0 'continue enumerationEnd Function
Use this format for C:
short WINAPI HypEnumApplications(CALLBACKAPP lpCallBack, LONG lParam);
HypEnumEx( ) - Enumerate Records in a TableThis function enumerates the signatures of all records in a specified table using a user-providedcallback function. For each record in the table wTabId, HypEnumEx( ) passes the signature tothe specified callback function. You can stop the enumeration by returning a non-zero valuefrom the callback function.
Use this format:
Declare Function HypEnumEx Lib “heaccess.dll” Alias “_HypEnumEx@20”(ByVal hRApp AsInteger, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal lpCallback As Long, ByVallParam As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
wTabId The table for which signatures are enumerated. For a complete list of table IDs, see Appendix A, “Table IDs.”
sigKey The optional key (usually NONE). This is a required key if wTabId is one of the tables listed in “Related Tables” on page 363.
lpCallback The pointer to a user-provided callback function. For more information, see “DWCALLBACK” on page 322.
lParam The parameter to be passed back to the user-provided callback function
Note: For more information about enumerating specific tables, see topics for each table, whichbegin with “EntEnum( ) - Enumerate Records in a Table” on page 167.
Table 24 lists the Hyperion Enterprise tables for which you cannot use the HypEnumEx( )function.
88 Table Functions
Table 24 Tables You Cannot Use with HypEnumEx( )
Table Function To Use
ID_ACCTLISTENTRY HypEnumAcctListEntriesEx( )
ID_NODES HypEnumOrgNames( )
ID_SUBACCTDET HypEnumSubAcctSig( )
ID_NAMELISTENTRY HypEnumNameListEntriesEx( )
ID_SECGRPTAB EntEnum( )
ID_SECUSERTAB EntEnum( )
ID_SECRIGHTS EntEnum( )
ID_SHARES EntEnum( )
ID_DATAFILE HypHPVAL( ) to get the data values for each account after enumerating accounts.
ID_JOURNAL_DETAIL EntEnum( )
ID_JOURNAL_HISTORY EntEnum( )
ID_JOURNAL_HISTORY_DETAIL EntEnum( )
ID_JOURNAL_TEMPLATES EntEnum( )
ID_JOURNAL_TEMPLATES_DETAIL EntEnum( )
ID_JOURNAL_PERIOD_INFO EntEnum( )
ID_JOURNALS EntEnum( )
ID_PSFDATA NA
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Non-zero value Returned from callback function to terminate enumeration
Example:
This example enumerates the account lists. It does not enumerate the entries in an account list.
ret%= HypEnumEx(hRapp%, HYP_ID_ACCTLIST, HYP_NONE, AddressOf MyCallback, 0)
Use this format for C:
short WINAPI HypEnumEx(HRETRIEVEAPP hRApp, short wTabId, SIGNA sigKey,DWCALLBACK lpCallBack, LONG lParam);
Table Functions Alphabetical Reference 89
HypEnumNameListEntriesEx( ) - Enumerate Entities in anEntity ListThis function enumerates all entities within the specified entity list. The function calls the user’slParam and user-supplied callback function with the entry within the entity list.
Note: You should select the entity list table (ID_NAMELIST) and the Entity List Entries tables(ID_NAMELISTENTRY) before calling this function.
Use this format:
Declare Function HypEnumNameListEntriesEx Lib “heaccess.dll”Alias”_HypEnumNameListEntriesEx@16” (ByVal hRApp As Integer, ByVal sigList As Long,ByVal lpCallback As Long, ByVal lParam As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct
sigList The list to enumerate
lpCallback The user-supplied callback routine for entries. For more information, see “CALLBACK12” on page 308.
lParam User information for callback
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Non-zero value Returned from callback function to terminate enumeration
Example:
ret% = HypLockEx(hRApp%, HYP_ID_NAMELIST, HYP_NONE, APILOCK_READONLY)If ret% <> APILOCK_READONLY Then Return 'ErrorsigList& = HypFindEx(hRApp%, HYP_ID_NAMELIST, HYP_NONE,szList$)If sigList& <> HYP_NONE Thenret% = HypLockEx(hRApp%, HYP_ID_NAMELISTENTRY, sigList&, APILOCK_READONLY)If ret% = APILOCK_READONLY Then 'okret% = HypEnumNameListEntriesEx(hRApp%, sigList&, AddressOf EnumEntityListEntriesCB, 0)ret% = HypUnLockEx(hRApp%, HYP_ID_NAMELISTENTRY, sigList&, 0)End IfEnd Ifret% = HypUnLockEx(hRApp%, HYP_ID_NAMELIST, HYP_NONE, 0).
90 Table Functions
.
.'Callback function, whatever you named itPublic Function EnumEntityListEntriesCB(ByVal hRApp%,ByVal sigList&, ByVal sigEntry&, ByVal lParam&) As Integerret% = HypQueryEx(hRApp%, HYP_ID_NAMELISTENTRY, ENTRY_SIG, sigEntry&, sigList&, 4, sigEntity&)'Display entity labelszEntity$ = Space(HYP_SIZEFULLNAME+1)ret% = HypQueryEx(hRApp%, HYP_ID_NAMES, NAME, sigEntity&, Len(szEntity$), szEntity$)If ret% = 0 Then szEntity$ = CToBStr(szEntity$)ret% = MsgBox("Entity: " & szEntity$)'return 0 to continue enumerationEnumEntityListEntriesCB% = 0End Function
Use this format for C:
short WINAPI HypEnumNameListEntriesEx(HRETRIEVEAPP hRApp, SIGNA sigList,CALLBACK12 lpCallback, LONG lParam);
HypEnumOrgNames( ) - Enumerate Nodes in an OrganizationOrganization information is stored in the Nodes table (ID_NODES). Each record in the tableis called a node. HypEnumOrgNames( ) enumerates all nodes in an organization. Nodes areenumerated beginning with the specified node, in the order that they appear in the organization.For more information about nodes, see “Organization Structures and Hyp...( ) Functions” onpage 81.
Note: If the application was set up to use dynamic organizations, we recommend that you usethe advanced functions. For more information, see “Organization Structures andAdvanced Functions” on page 120.
Use this format:
Declare Function HypEnumOrgNames Lib “heaccess.dll” Alias”_HypEnumOrgNames@20”(ByVal hRApp As Integer, ByVal sigNode As Long, ByVal lpCallBack As Long, ByVal lParam AsLong, ByVal wMask As Integer) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigNode The signature of the starting node
lpCallBack A user-supplied callback function. For more information, see “DWCALLBACK” on page 322.
lParam A user-supplied parameter passed into the callback function.
Table Functions Alphabetical Reference 91
Variable Description
wMask Any combination of the following selection flags:
l ENUM_DEP, which enumerates immediate dependents only (ENUM_DEP must be used alone.)
l ENUM_CON, which enumerates all parent entities below the specified node
l ENUM_BAS, which enumerates all base entities below the specified node
l ENUM_UNOWNED, which enumerates all unowned entities
l ENUM_SUBNAME, which includes all subentities
l ENUM_ALL, which enumerates base and parent entities and subentities below sigNode
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Non-zero value Returned from callback function to terminate enumeration
Example:
'Enumerate all base entities in an organization,'starting at the top node.sigNode& = HypGetTopNodeEx(hRApp%, sigOrg&)If sigNode& <> HYP_NONE Then ret% = HypEnumOrgNames(hRApp%, sigNode&, AddressOf EnumOrgCB,0, ENUM_BASE Or ENUM_SUBNAME)End If...'Callback function, whatever you named itPublic Function EnumOrgCB(hSelect&, sigNode&, sigKey&, lParam&, apiS) As Integer'Get & display entity IDret% = EntQuery(ByVal hRapp%, ByVal sigNode&, ByVal lParam&)szEntity$ = Space(HYP_SIZEFULLNAME+1)ret% = HypQueryEx(hRapp%, HYP_ID_NAMES, HYP_NAME, sigEntity&, HYP_NONE, Len(szEntity$), szEntity$)If ret% = 0 Then szEntity$ = CToBStr(szEntity$)ret% = MsgBox("Entity: " & szEntity$)'return 0 to continue enumerationEnumOrgCB% = 0End Function
Use this format for C:
short WINAPI HypEnumOrgNames(HRETRIEVEAPP hRApp, SIGNA sigNode, shortDWCALLBACK lpCallBack, LONG lParam, WORD wMask);
HypEnumSubAcctSig( ) - Enumerate Subaccount SignaturesThis function enumerates a series of sub-account signatures for a specified major account. Usethis function instead of the HypEnumEx( ) function to enumerate the sub-account table
92 Table Functions
(ID_SUBACCTDET). HypEnumSubAcctSig( ) passes the account signature in the account table(ID_ACCOUNTS) for each sub-account to the callback function.
Use this format:
Declare Function HypEnumSubAcctSig Lib “heaccess.dll” Alias “_HypEnumSubAcctSig@16”(ByVal hRApp As Integer, ByVal sigAcct As Long, ByVal lpCallback As Long, ByVal lParam AsLong) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigAcct The account signature with which to start
lpCallback The user-supplied callback function. For more information, see “DWCALLBACK” on page 322.
lParam The user-supplied parameter passed into the callback function.
Return Codes:
Code Meaning
0 Successful
None Error occurred
Non-zero value Returned from callback function to terminate enumeration
Example:
ret% = HypEnumSubAcctSig(hRApp%, sigAcct&, AddressOf EnumSubAcctCB, 0)...'Callback functionPublic Function EnumSubAcctCB(ByVal hRApp%, ByVal sigAcct&,ByVal lParam&) As IntegerszAcct$ = Space(HYP_SIZEFULLACCT+1)ret% = HypQueryEx(hRApp%, HYP_ID_ACCOUNTS, NAME, sigAcct&, HYP_NONE, Len(szAcct$), szAcct$)If ret% = 0 Then szAcct$ = CToBStr(szAcct$) ret2% = MsgBox(szAcct$)End IfEnumSubAcctCB% = 0End Function
Use this format for C:
short WINAPI HypEnumSubAcctSig(HRETRIEVEAPP hRApp, SIGNA sigAcct,DWCALLBACK lpCallback, SIGNA lParam);
Table Functions Alphabetical Reference 93
HypFindEx( ) - Find SignatureThis function searches a specified table (wTabId) using a given search string and returns thesignature of the record that matches the search string.
Table 25 lists the Hyperion Enterprise tables you should not use with HypFindEx( ).
Table 25 Tables You Cannot Use with HypFindEx( )
Table Function to Use
ID_ACCTCONVERT EntFind( )
ID_DATAFILE NA
ID_INTCODET See the note that follows this table.
ID_JOURNAL_DETAIL EntFind( )
ID_JOURNAL_HISTORY EntFind( )
ID_JOURNAL_HISTORY_DETAIL EntFind( )
ID_JOURNAL_TEMPLATES EntFind( )
ID_JOURNAL_TEMPLATES_DETAIL EntFind( )
ID_JOURNAL_PERIOD_INFO EntFind( )
ID_JOURNALS EntFind( )
ID_NAMECONVERT EntFind( )
ID_NAMES HypGetNameSig( )
ID_NODES HypFindNameInOrgEx( )
ID_PSFDATA NA
ID_SHARES EntFind( )
Note: For the Intercompany Detail table (ID_INTCODET), do not use HypFindEx( ). Instead,use HypFindEx( ) for the Intercompany Set table (ID_ICSET) to find the desiredintercompany matching set, then call HypQueryEx( ) with query attributeINTCO_GROUPSIG (and table ID_ICSET) to get the signature of the first detail recordin table ID_INTCODET. You get subsequent detail records by calling HypQueryEx( ) foreach detail record, using query attribute INTCO_NEXTDET and table ID_INTCODET.
For the following tables, the key is a special struct defined in the TOOLINC.H file, rather thana string:
l For the ID_SECRIGHTS table, use the SECURRIGHTSKEY struct.
l For the ID_SECGRPTAB table, use the SECURGROUPKEY struct.
94 Table Functions
Use this format:
Declare Function HypFindEx Lib “heaccess.dll” Alias “_HypFindEx@16”(ByVal hRApp AsInteger, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal szKey As String) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
wTabId The ID of the table you want to search. For a complete list of table IDs, see Appendix A, “Table IDs.”
sigKey A secondary key (usually NONE). This is a required key if wTabId is one of the tables listed in “Related Tables and Hyp...( ) Functions”on page 81.
szKey The string for which you are searching
Return Codes:
Code Meaning
The signature Successful
NONE Error occurred
Example:
sigCat& = HypFindEx(hRApp%, HYP_ID_CATEGORY, HYP_NONE, "ACTUAL")
Use this format for C:
SIGNA WINAPI HypFindEx(HRETRIEVEAPP hRApp, short wTabId, SIGNA sigKey, void FAR* pzKey);
HypFindNameInOrgEx( ) - Find Node IDThis function returns the node signature of a particular entity instance (node) in a specifiedorganization. A node defines the location of an occurrence of an entity within an organization.An individual entity can occur multiple times in an organization, and each occurrence has aunique node signature. For more information about nodes, see “Organization Structures andHyp...( ) Functions” on page 81.
Note: If the application was set up to use dynamic organizations, we recommend that you usethe advanced functions. For more informations, see “Organization Structures andAdvanced Functions” on page 120.
Use this format:
Declare Function HypFindNameInOrgEx Lib “heaccess.dll”Alias”_HypFindNameInOrgEx@16” (ByVal hRApp As Integer, ByVal sigOrg As Long, ByValsigNode As Long, ByVal sigEntity As Long) As Long
Table Functions Alphabetical Reference 95
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigOrg The organization in which to search
sigNode The starting node for the search. If this is HYP_NONE (NONE in C), the search starts at the top node in the organization.
sigEntity The signature of the entity to find
Return Codes:
Code Meaning
Node signature of
the specified entity
Successful
NONE Error occurred because the name is not in the specified organization
Example:
ret% = HypHPKEYEx(hRApp%, "ORGANIZATION", sigOrg&) 'Get sigOrg&If ret% = 0 ThensigNode& = HypFindNameInOrgEx(hRApp%, sigOrg&, HYP_NONE, sigEntity&)End If
Use this format for C:
SIGNA WINAPI HypFindNameInOrgEx(HRETRIEVEAPP hRApp, SIGNA sigOrg, SIGNAsigNode, SIGNA sigEntity);
HypGetCatPerFreq( ) - Get Period Number and Frequency inCategoryThis function returns the period number within a category for a particular period.
Use this format:
Declare Function HypGetCatPerFreq Lib “heaccess.dll” Alias”_HypGetCatPerFreq@16”(ByVal hRApp As Integer, ByVal szPeriodAs String, ByVal sigCat As Long, sigFreq As Long) AsLong
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szPeriod The period ID, such as JAN 03
sigCat The category signature
96 Table Functions
Variable Description
sigFreq NULL, or the buffer to return the frequency signature
Return Codes:
Code Meaning
Period number Successful
NONE Error occurred
Example:
sigPeriod& = HypGetCatPerFreq(hRApp%, "APR 03", sigCat, sigFreq&)
In the previous example, sigFreq& on return is the signature of the frequency used in szPeriod,which is monthly. If you used Q1 03, sigFreq& would be the signature of a quarterly frequency.The frequency does not need to match the actual frequency of the category.
Use this format for C:
SIGNA WINAPI HypGetCatPerFreq(HRETRIEVEAPP hRApp, LPSTR szPeriod, SIGNAsigCat, SIGNA * psigFreq);
HypGetChild( ) - Get Child NodeThis function returns the signature of the child node. For more information about nodes, see“Organization Structures and Hyp...( ) Functions” on page 81.
Note: If the application was set up to use dynamic organizations, we recommend that you usethe advanced functions. For more information, see “Organization Structures andAdvanced Functions” on page 120.
Use this format:
Declare Function HypGetChild Lib “heaccess.dll” Alias “_HypGetChild@12”(ByVal hRAppAs Integer, ByVal sigNode As Long, ByVal fExpandSubentities As Long) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigNode The signature of the child node
fExpandSubentities One of the following:
l 1 = True. Retrieve the attached substructure.
l 0 = False. Do not retrieve the attached substructure.
Return Codes:
Table Functions Alphabetical Reference 97
Code Meaning
Signature of the child node Successful
NONE Error occurred
Example:
sigChild& = HypGetChild(hRApp%, sigNode&, 1)
Use this format for C:
SIGNA WINAPI HypGetChild(HRETRIEVEAPP hRApp, SIGNA sigNode, BOOLfExpandSubentities);
HypGetNameSig( ) - Get Entity SignatureThis function returns an entity signature based on the application handle, entity, and sub-entitycriteria code you provide.Table 26 shows three possible sub-entity criteria codes.
Table 26 Subentity Criteria Codes for HypGetNameSig( )
Code Signature Returned
NAME_IMPLICIT The signature for an entity.subentity combination, even if only the entity is specified
NAME_EXPLICIT The signature for an explicit entity only. For entities with subentities, this code returns an error because the explicit entityis not considered a valid entity.
NAME_ADMIN The signature for an explicit entity only, regardless of whether the entity has subentities associated with it
For example, suppose the entity ITALY has a substructure TRAN. If you set the sub-entity criteriacode to NAME_IMPLICIT, the function returns the signature for ITALY.TRAN because that iswhere the data is stored. If you set the code to NAME_EXPLICIT, the function call fails becauseITALY by itself is not considered a valid entity. If you use NAME_ADMIN, the function returnsthe signature for ITALY because no data is associated with that entity.
Use this format:
Declare Function HypGetNameSig Lib “heaccess.dll” Alias “_HypGetNameSig@12”(ByValhRApp As Integer, ByVal szEntity As String, ByVal fImpliedSubEntities As Integer) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szEntity The entity for which to search
fImpliedSubEntities One of the following codes:
l NAME_IMPLICIT
l NAME_EXPLICIT
l NAME_ADMIN
98 Table Functions
Return Codes:
Code Meaning
Entity signature Successful
NONE Error occurred
Example:
'Next line returns signature Italy.TransigEntity& = HypGetNameSig(hRApp%, "Italy", NAME_IMPLICIT)'Next line returns HYP_NONEsigEntity& = HypGetNameSig(hRApp%, "Italy", NAME_EXPLICIT)'Next line returns signature of Italy onlysigEntity& = HypGetNameSig(hRApp%, "Italy", NAME_ADMIN)
Use this format for C:
SIGNA WINAPI HypGetNameSig(HRETRIEVEAPP hRApp, LPSTR szEntity, shortfImpliedSubEntities);
HypGetOrgLevel( ) - Get Level in OrganizationThis function returns the organization level of the specified node. For more information aboutnodes, see “Organization Structures and Hyp...( ) Functions” on page 81.
Note: If the application was set up to use dynamic organizations, we recommend that you usethe advanced functions. For more information, see “Organization Structures andAdvanced Functions” on page 120.
Use this format:
Declare Function HypGetOrgLevel Lib “heaccess.dll” Alias “_HypGetOrgLevel@16”(ByValhRApp As Integer, ByVal sigTopNode As Long, ByVal sigTarget As Long, ByVal nLevel As Integer)As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigTopNode The signature of the top node in the organization, or the node from which you want to start counting
sigTarge The signature of the node for which you want to know the organization level
nLevel Usually 0, or one level less than the level of sigTopNode
Return Codes:f
Table Functions Alphabetical Reference 99
Code Meaning
Organization level Successful
0 Error occurred
Example:
ret% = HypHPKEYEx(hRApp%, "ORGANIZATION", sigOrg&) 'Get sigOrg&If ret% = 0 ThensigTop& = HypGetTopNodeEx(hRApp%, sigOrg&)If sigTop& = HYP_NONE Then ret% = HYP_NONEEnd IfIf ret% = 0 ThennLevel% = HypGetOrgLevel(hRApp%, sigTop&, sigTarget&, 0)If nLevel% = 0 Then ret% = HYP_NONE 'errorEnd If
Use this format for C:
short WINAPI HypGetOrgLevel(HRETRIEVEAPP hRApp, SIGNA sigTopNode, SIGNAsigTarget, short nLevel);
HypGetPerViewEx( ) - Get Frequency and ViewThis function returns the frequency and view for a specified reporting frequency.
Use this format:
Declare Function HypGetPerViewEx Lib “heaccess.dll” Alias “_HypGetPerViewEx@16”(ByVal hRApp As Integer, ByVal szFreq As String, sigFreq As Long, iView As Integer) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
szFreq The reporting frequency (DAI, DYTD, WEE, WYTD, MON, YTD, QUA, QYTD, TRI, TYTD, HAL, HYTD, YEA, DAY). For more information,see “Frequencies and Views” on page 20.
sigFreq The place to return the frequency for the specified reporting frequency
iView The place to return the view for the specified reporting frequency (VIEW_YTD or VIEW_PERIODIC)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
ret% = HypGetPerViewEx(hRApp%,”QTD”,SigFreq&,iview%)
100 Table Functions
Use this format for C:
short WINAPI HypGetPerViewEx(HRETRIEVEAPP hRApp, LPSTR szFreq, SIGNA *psigFreq, short * piView);
HypGetSibling( ) - Get SiblingThis function returns the signature of the next sibling node in an organization.
Use this format:
Declare Function HypGetSibling Lib “heaccess.dll” Alias “_HypGetSibling@8” (ByVal hRAppAs Integer, ByVal sigNode As Long) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigNode The signature of the node
Return Codes:
Code Meaning
Signature of the next sibling node Successful
NONE Error occurred
Example:
sigSibling& = HypGetSibling(hRApp%, sigNode&)
Use this format for C:
SIGNA WINAPI HypGetSibling(HRETRIEVEAPP hRApp, SIGNA sigNode);
HypGetTopNodeEx( ) - Get Top NodeThis function returns the signature of the top node in an organization. You can then use the topnode signature in conjunction with HypEnumOrgNames( ) to create a list of all entities withinan organization. For more information about nodes, see “Organization Structures and Hyp...( ) Functions” on page 81.
Note: If the application was set up to use dynamic organizations, we recommend that you usethe advanced functions. For more information, see “Organization Structures andAdvanced Functions” on page 120. Use EntQueryEx( ) with the Organization table(ID_ORGANIZATION) and query attribute TOPNODE to get the node signature of thetop node in the organization.
Use this format:
Table Functions Alphabetical Reference 101
Declare Function HypGetTopNodeEx Lib “heaccess.dll” Alias “_HypGetTopNodeEx@8”(ByVal hRApp As Integer, ByVal sigOrg As Long) As Long
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigOrg The organization signature
Return Codes:
Code Meaning
Signature of the top node in the organization Successful
NONE Error occurred
Example:
ret% = HypHPKEYEx(hRApp%, "ORGANIZATION", sigOrg&) 'Get sigOrg&If ret% = 0 ThensigTop& = HypGetTopNodeEx(hRApp%, sigOrg&)End If
Use this format for C:
SIGNA WINAPI HypGetTopNodeEx(HRETRIEVEAPP hRApp, SIGNA sigOrg);
HypIsNameParentEx( ) - Check If Entity Is a ParentThis function checks whether an entity is a parent entity. For more information about nodes,see “Organization Structures and Hyp...( ) Functions” on page 81.
Note: If the application was set up to use dynamic organizations, we recommend that you usethe advanced functions. For more information, see “Organization Structures andAdvanced Functions” on page 120.
Use this format:
Declare Function HypIsNameParentEx Lib “heaccess.dll” Alias”_HypIsNameParentEx@12”(ByVal hRApp As Integer, ByVal sigEntity As Long, ByVal sigOrg As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigEntity The entity signature
sigOrg The organization to search
If sigOrg is set to NONE, Hyperion Enterprise checks to see if the entity is a parent anywhere inthe system. If sigOrg specifies an organization signature, Hyperion Enterprise checks if the entity
102 Table Functions
is a parent in the organization. It is possible for an entity to be a parent without displayingchildren in certain organization views.
Return Codes:
Code Meaning
TRUE (1) The entity is a parent.
FALSE (0) The entity is not a parent.
Example:
isParent% = HypIsNameParentEx(hRApp%, sigEntity&, HYP_NONE)If isParent% Thenret% = MsgBox("Unable to put data in parent company")End If
Use this format for C:
SBOOL WINAPI HypIsNameParentEx(HRETRIEVEAPP hRApp, SIGNA sigEntity, SIGNAsigOrg);
HypLockEx( ) - Select a TableThis function selects one or more specified tables. A table must be selected before you can accessits data. HypLockEx( ) loads the requested table from disk if the table is not already in memory.If the table is already in memory, HypLockEx( ) increments the table use count. You shoulddeselect the table when you are through using it by calling HypUnLockEx( ).
Note: You can use the table ID combined with the ID_ASSOC constant using an OR operationto simultaneously deselect the table and its associated tables. For more information, see“Associated Tables” on page 362.
Table 27 lists the specific tables you should not select with HypLockEx( ).
Table 27 Table You Cannot Select Using HypLockEx( )
Table Function To Use
ID_DATAFILE EntDataFileOpen( )
ID_JOURNAL_DETAIL EntSelectTableAdd( )
ID_JOURNAL_HISTORY_DETAIL EntSelectTableAdd( )
ID_JOURNAL_TEMPLATE_DETAIL EntSelectTableAdd( )
ID_JOURNAL_PERIOD_INFO EntSelectTableAdd( )
Use this format:
Table Functions Alphabetical Reference 103
Declare Function HypLockEx Lib “heaccess.dll” Alias “_HypLockEx@16”(ByVal hRApp AsInteger, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal wAttr As Integer) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
wTabId The table ID for the table you are trying to select. Use one of the table IDs listed in the Table IDs topic in the Table IDs appendix,and use an OR operation with the constant ID_ASSOC to also select all associated tables.
sigKey A key record (usually NONE). If this is required, you must select the table that contains the key before you can select the tablespecified by wTabId. For more information, see Appendix A, “Table IDs.”
wAttr APILOCK_READONLY, which selects the table as read-only
Return Codes:
Code Meaning
NONE Access to table denied.
APILOCK_READONLY Table was opened with read-only access.
Example:
rc% = HypLockEx(hRApp%, HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, APILOCK_READONLY)If rc% <> APILOCK_READONLY Then MsgBox("Error selecting account list table")
Use this format for C:
short WINAPI HypLockEx(HRETRIEVEAPP hRApp,short wTabId, SIGNA sigKey, shortwAttr);
HypQryRptFreqEx( ) - Query Reporting FrequencyThis function retrieves the reporting frequency that corresponds to a specified HyperionEnterprise frequency and view. You can retrieve the ID or the description of the reportingfrequency.
Use this format:
Declare Function HypQryRptFreqEx Lib “heaccess.dll” Alias “_HypQryRptFreqEx@24”(ByVal hRApp As Integer, ByVal sigFreq As Long, ByVal wView As Integer, ByVal wAttr AsInteger, ByVal wMax As Integer, ByVal pzbuf As String) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
sigFreq The frequency, such as FREQ_MONTH or FREQ_QUARTER
104 Table Functions
Variable Description
wView The view associated with the specified frequency, such as VIEW_YTD or VIEW_PERIODIC
wAttr NAME to retrieve the ID or DESC to retrieve the description of the reporting frequency
wMax The length of the wAttr buffer
pzBuf The buffer to return the ID or description of the reporting frequency. The buffer should be big enough for at least HYP_SIZERPTFREQ+1 (SIZERPTFREQ+1 in C) if wAttr is NAME, and at least HYP_SIZEDESC+1 (SIZEDESC+1 in C) if wAttr is DESC.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szRptFreq$ = space(HYP_SIZERPTFREQ+1)ret% = HypQryRptFreqExRpt(hRApp%, FREQ_MONTH, VIEW_YTD, NAME, Len(szRptFreq$) szRtpFreq$)If ret% = 0 Then szRptFreq$ = CToBStr(szRptFreq$)
Use this format for C:
short WINAPI HypQryRptFreqEx(HRETRIEVEAPP hRApp, SIGNA sigFreq, short wView,short wAttr, short wMax, void * pzBuf);
HypQueryEx( ) - Query Hyperion Enterprise TablesThis function allows you to query a Hyperion Enterprise table and retrieve information aboutan entry in the table. For details on the kinds of information you can retrieve, see Appendix B,“Query Attributes.” Visual Basic programmers should use the HypQueryExStr() function whenquerying a string value. HypQueryExStr(), declared in the TOOLKIT.BAS file, is a clone of thedeclaration for HypQueryEx() adjusted for use with strings.
Use this format:
Declare Function HypQueryEx Lib “haccess.dll” (ByVal hRApp As Integer, ByVal wTabId AsInteger, ByVal wAttr As Integer, ByVal sigRecd As Long, ByVal sigKey As Long, ByVal wLen AsInteger, pzBuf As Any) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
wTabId The ID of the table you want to query. For a complete list of table IDs, see Appendix A, “Table IDs.”
wAttr The field of the record you want to query. This can be any query attribute listed for the table identified in wTabId that does notrequire an apiStruct.
Table Functions Alphabetical Reference 105
Variable Description
sigRecd The record number you want to query.
sigKey NONE, or the key of a related table. This is a required key if wTabId is one of the tables listed in “Related Tables and Hyp...( )Functions” on page 81.
wLen The length of pzBuf.
pzBuf The buffer to return the requested information. This argument should be type-appropriate for the query. For more information, seeAppendix B, “Query Attributes.”
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
To retrieve the number of periods in a category:
ret% = HypQueryEx(hRApp%, HYP_ID_CATEGORY, HYP_CAT_NUMPERIODS, sigCat&, HYP_NONE, Len(numPeriods%), numPeriods%)
Use this format for C:
short WINAPI HypQueryEx(HRETRIEVEAPP hRApp, short wTabId, short wAttr, SIGNAsigRecd, SIGNA sigKey, short wLen, void FAR * pzBuf);
HypUnLockEx( ) - Deselect a TableThis function deselects a table that was selected with the HypLockEx( ) function. All selectedtables should be deselected before calling either HypMultiDeinit( ) or HypDestruct( ) to closean application.
Note: You can use the table ID combined with the ID_ASSOC constant using an OR operationto simultaneously deselect the table and its associated tables. For more information, see“Associated Tables” on page 362.
Use this format:
Declare Function HypUnLockEx Lib “heaccess.dll” Alias “_HypUnLockEx@16”(ByVal hRAppAs Integer, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal bDiscard As Integer) AsInteger
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
106 Table Functions
Variable Description
wTabId The table ID for the table you are trying to unlock. Use one of the table IDs listed in Appendix A, “Table IDs,” or NONE for allselected tables and use the OR operation with the table ID and ID_ASSOC to deselect all associated tables also.
sigKey A key record. This is NONE, or the value of sigKey if you specified sigKey when you selected the table.
bDiscard Either 1 (True) or 0 (False) to indicate whether or not the table should be automatically discarded from memory
Return Codes
Code Meaning
0 Successful
NONE Error occurred
Example:
To deselect all tables:
ret% = HypUnLockEx(hRApp%, HYP_NONE, HYP_NONE, 0)
To deselect an individual table and all of its associated tables:
ret% = HypUnLockEx(hRApp%, wTabId% OR HYP_ID_ASSOC, HYP_NONE, 0)
Use this format for C:
short WINAPI HypUnLockEx(HRETRIEVEAPP hRApp, short wTabId, SIGNA sigKey,SBOOL bDiscard);
Table Functions Alphabetical Reference 107
108 Table Functions
4Advanced Functions
In This Chapter
Advanced Functions Overview ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Opening an Application ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Tables and Advanced Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Combining Spreadsheet Add-in Functions with Advanced Functions .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Selection Dialog Box Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Working with Data... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Organization Structures and Advanced Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Setting the Point of View ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Server Tasks ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Hyperion Enterprise INI File Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Security .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Replacing Obsolete Ent...( ) Functions with New Ent...( ) Functions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Advanced Functions Alphabetical Reference... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
This chapter describes the more complicated functions in the Hyperion Enterprise API.
Advanced Functions OverviewMost of the advanced functions of the Hyperion Enterprise API make direct calls to theunderlying Hyperion Enterprise API functions that are used by the Hyperion Enterprise productitself. The advanced functions give you access to the full power and capability of HyperionEnterprise.
Most advanced functions require a handle to the tables that you have selected, called the hSelectof the table. You get this handle by calling EntSelect( ) to select a table.
A few functions, including EntSelect( ), require the handle of an application rather than anhSelect. You get the application handle, called an hApp, when you open an application by callingEntOpenApplication( ).
Note: An hApp is not the same as a Hyperion Enterprise Retrieve application handle (hRApp)used by the spreadsheet add-in functions that take the form Hyp...( ).
Advanced Functions Overview 109
Here is the general flow of a program:
l Open an application. For more information, see “Opening an Application” on page 110.
l Select the tables. For more information, see “Select and Deselect Tables using AdvancedFunctions” on page 111.
l Perform the desired operation.
l Deselect the tables.
l Close the application.
If you opened an application with the spreadsheet add-in functions HypConstruct( ) orHypMultiInit( ), see “Combining Spreadsheet Add-in Functions with Advanced Functions ” onpage 113 for instructions on retrieving the hApp and the hSelect, so that you can use theadvanced functions.
Opening an ApplicationYou must call the EntOpenApplication( ) function to open an application before you can callany other functions for that application. EntOpenApplication( ) gives you a handle to theapplication. In C, this handle is defined as type HAPP.
You must call the EntCloseApplication( ) function to close the application when you are finishedusing that application, before the program ends.
Unlike the spreadsheet add-in function HypConstruct( ), EntOpenApplication( ) does not selectany tables. You must select one or more tables before you can do much with the application.
Tables and Advanced FunctionsInformation about Hyperion Enterprise applications is organized into tables. This sectiondescribes how to work with tables to get whatever information you want.
Using an apiStruct StructureMany of the advanced functions for working with tables have an argument that is a structurecalled an apiStruct. This structure is defined in the TOOLKIT.BAS and TOOLINC.H files. It isused to pass more information to the function than can be handled in the rest of the arguments.
For most tables, you do not need an apiStruct. You can pass NULL for the apiStruct argument.For more information on passing NULL in Visual Basic, see “Visual Basic Programming Notes”on page 16.
When you need to use an apiStruct, you must allocate the structure by declaring a variable oftype APISTRUCT, initialize the structure by calling the EntInitApiStruct( ) function, then setthe particular fields required for what you are trying to do.
110 Advanced Functions
Note: If you are using a callback function that has an apiStruct argument and you are usingSpyworks, see “EntVBCopyData( ) - Copy Data” on page 276 to convert the SpyWorkslong argument to an apiStruct.
Example:
'get ID of category's period 1 ("Jan 03", for example)DIM apiS As APISTRUCTCall EntInitApiStruct(hApp&, apiS)apiS.lStartPeriod = 1apiS.u_ApiQry.sPeriod_View = HYP_NONE 'use category's frequencyszPeriod$ = SPACE(HYP_SIZELABEL+1)ret% = EntQueryEx(hSelect&, HYP_ID_CATEGORY, CAT_PER_SHORT, sigCat&, HYP_NONE, Len(szPeriod$), szPeriod$, apiS)If ret% = 0 Then szPeriod$ = CToBStr(szPeriod$)
Select and Deselect Tables using Advanced FunctionsAfter you open a Hyperion Enterprise application, you must select the tables that you want toaccess. When you select a table, the Hyperion Enterprise API prepares the table for access.Usethe following guidelines when selecting tables:
l To select your first table, open the application with EntOpenApplication( ), then callEntSelect( ).
l To select more tables, call EntSelectAdd( ). You pass hSelect, which is the handle of theselected tables that you received when you selected the first table via EntSelect( ), toEntSelectAdd( ). You can select as many tables as you like.
l When you are finished using a table, call EntUnSelect( ) to deselect the table. You can tellEntUnSelect( ) to deselect all selected tables, if you prefer, with one call. You should deselectall selected tables before your program ends.
Many tables have other tables associated with them. When you select or deselect a table, you canuse an OR operation with HYP_ID_ASSOC (ID_ASSOC in C) and the table ID to select ordeselect the associated tables automatically. You should always use HYP_ID_ASSOC to selector deselect the associated tables rather than selecting or deselecting the tables individually. Formore information, see “Associated Tables” on page 362.
Tip: Select the category, organization, and account tables and their associated tables. Manyfunctions assume that these tables are available. For best performance, select the categorytable first, followed by the organization table and then the account table.
In case the Hyperion Enterprise application was set up to use dynamic organizations, you shouldpass the signature of the category as the sigkey argument when you select the organization table.You should re-select the organization table (and its associated tables) whenever you change toanother category, specifying the new category as the sigKey argument. For more information,see “Organization Structures and Advanced Functions” on page 120.
Tables and Advanced Functions 111
The advanced functions for selecting tables have an argument for specifying a callback function.You can pass NULL for this argument. You pass a callback function if you want the HyperionEnterprise API to call your function to update a display or something else you have read fromthe table whenever the table has been changed. For more information, see “Selection Callbacks”on page 112.
Selection CallbacksThe advanced functions for selecting tables have an argument for specifying a callback function.You can pass NULL for this argument. You pass a callback function if you want the HyperionEnterprise API to call your function whenever the table is changed, or if you want to update adisplay or something else you have read from the table.
You specify your callback function and your argument for it when you select a table. All of thecallback functions for all of the tables you select are associated with hSelect, which is the handleto the selected tables. You can also specify a callback function after you have selected a table, bycalling EntAppendToCBChain( ). You can instruct the API to stop using a callback function bycalling EntDeleteFromCBChain( ).
Whenever any selected table changes, the Hyperion Enterprise API will call all of the callbackfunctions associated with that hSelect handle. It passes to your callback function the table ID ofthe table that changed. For more information, see “CALLBACKSEL” on page 318.
Using Tables with Advanced FunctionsTo get information from a table, you select the table then use the functions described inTable 28.
Table 28 Advanced Functions Used with Tables
Function Description
EntEnum( ) Enumerates the records in the table.
EntFind( ) Finds a specific record in the table.
EntQueryEx( ) Retrieves information about a specific record.
Each record in the table is identified by a unique value called a signature. You specify the signaturewhen you ask for information about a record. For example, when you call the EntQueryEx( )function, you need to pass it the signature to identify the record for which you want information.You can get the signature by calling the EntFind( ) function to find a specific record. You canalso get the record signatures by using EntEnum( ). EntEnum( ) enumerates and returns thesignatures of all the records in a table.
These functions work with most tables. There are many other specialized advanced functionsfor retrieving specific information from specific tables.
112 Advanced Functions
Related Tables and Advanced FunctionsSome tables are so closely related to another table that you must specify a record in the relatedtable whenever you select, access, or deselect the table. For example, the account list entries table(ID_ACCTLISTENTRY) contains information about the records in an account list. You mustspecify an account list by passing the signature of the account list (in the account lists table,ID_ACCTLIST).
You pass the signature of the related record as the sigKey argument when you call one of thefollowing API functions:
l EntDiscardChanges( ) - Discard Changes
l EntEnum( ) - Enumerate Records in a Table
l EntFind( ) - Find Signature
l EntIsModified( ) - Is Table Modified?
l EntIsSelected( ) - Is Table Selected?
l EntQueryEx( ) - Query Information
l EntSave( ) - Save Table
l EntSelectAdd( ) - Select an Additional Table for Use
l EntSelectTable( ) - Select a Table for Use
l EntSelectTableAdd( ) - Select an Additional Table for Use
l EntUnSelect( ) - Deselecting Tables
Note: Because the sigKey is an argument to EntSelectAdd( ) you must select the related tablebefore you can select the dependent table.
For a listing of related Hyperion Enterprise tables, see “Related Tables” on page 363.
Combining Spreadsheet Add-in Functions withAdvanced Functions Most of the advanced functions use either hApp or hSelect as the argument. hApp is returnedwhen you open a Hyperion Enterprise software application. hSelect is returned when you selecta table. By contrast, the spreadsheet add-in functions use hRApp as an argument. HRApp is thehandle of a Hyperion Enterprise Retrieve application returned by HypConstruct( ).
If you opened an application using one of the spreadsheet add-in functions, HypConstruct( )or HypMultiInit( ), you can also use the advanced functions with it. Table 29 shows functionsyou use to combine the spreadsheet add-in functions with the advanced functions.
Combining Spreadsheet Add-in Functions with Advanced Functions 113
Table 29 Spreadsheet Add-in Functions to Use with Advanced Functions
Function Description
HypGethApp( ) Gets the hApp associated with a Hyperion Enterprise Retrieve application.
HypGethSelect( ) Returns the hSelect handle associated with a Hyperion Enterprise Retrieve application.
HypSethSelect( ) Changes the hSelect handle associated with a Hyperion Enterprise Retrieve application.
You must call HypSethSelect( ) whenever you perform any action that could potentially changethe hSelect handle, such as EntUnSelect( ).
Selection Dialog Box FunctionsYou use selection dialog box functions to access the API standard selection dialog boxes. Thesedialog boxes allow you to select accounts, account lists, categories, frequencies, entities, andperiods. Table 30 lists the selection dialog box functions:
Table 30 Selection Dialog Box Functions
Function Description
EntAcctAsk( ) Used to select an account.
EntAcctListAsk( ) Used to select an account list.
EntCatAsk( ) Used to select a category.
EntEntityAsk( ) Used to select an entity.
EntEntityListAsk( ) Used to select an entity list.
EntFreqAsk( ) Used to select a frequency.
EntPerAsk( ) Used to select a period.
Working with DataHyperion Enterprise data values are stored in the Datafile table, ID_DATAFILE. Unlike othertables, you select this table by calling EntDataFileOpen( ), not EntSelect( ). You specify thecategory and entity when you select the Datafile table.
Once you select the Datafile table, you can use the EntQueryEx( ) function to retrieve data values.Use the EntUpdate( ) function to write data values, calculate formulas, clear existing data, orerase the selected datafile table. When you are finished working with the table, use theEntUnSelect( ) function to deselect the Datafile table.
After you select the datafile table, you must set up an apiStruct structure for use with the otherAPI functions. Table 31 lists the fields that you must set in the apiStruct for all API functions,including EntUnSelect( ).
114 Advanced Functions
Table 31 apiStruct Fields for All API Functions
Field Description
sigCat The category signature.
sigName The entity signature.
sigParent NONE normally (if wType is ID_REGULAR).
wType ID_REGULAR for normal data. For more information, see “Consolidation Detail Values” on page 119.
Retrieving DataAfter you select the datafile table and set up an apiStruct structure, you use the EntQueryEx( )function to get data values using the query attribute DATAFILE_GET. Use HYP_NONE (NONEin C) as the record signature for EntQueryEx( ).
Before you can call EntQueryEx( ), you must allocate two buffers and set more fields in theapiStruct. The size of the two buffers depends on the number of periods that you want. Onebuffer is for data values, which must be large enough for one data value (type double) for eachperiod. The other buffer is for status information, which must be an integer (two bytes) for eachperiod.
Table 32 lists the fields you need to set in the apiStruct.
Table 32 apiStruct fields for Retrieving Data
Field Description
sigCat The category signature.
sigName The entity signature.
sigParent NONE normally (if wType is ID_REGULAR).
wType ID_REGULAR for normal data. For more information, see “Consolidation Detail Values” on page 119.
lStartPeriod The first period desired (0-based).
lEndPeriod The last period desired (0-based).
lpimrData The address of your data buffer.
lpseStatus The address of your status buffer.
u_Dfa.sigAcct The account signature.
u_Dfa.iFreq NONE for default frequency, or the signature of desired frequency.
u_Dfa.bAutoRecalc The automatic recalculation of formulas when getting data. Must be 1 (TRUE) or 0 (False).
u_Dfa.bPeriodic 1 (TRUE) for periodic data, or 0 (False) for category-to-date or other to-date data.
Working with Data 115
Field Description
u_Dfa.sViewType NONE, or one of the following codes:
VIEWTYPE_YTD for category-to-date
VIEWTYPE_PER for periodic
VIEWTYPE_TODATE for to date (when specifying u_Dfa.sigAccumFreq)
u_Dfa.sigAccumFreq The accumulate frequency. This is needed only if u_Dfa.sViewType is VIEWTYPE_TODATE.
u_Dfa.wRndFlag The data rounding flag. Must be one of the following codes:
DFPUT_RNDDEF for default rounding
DFPUT_ROUND for always round
DFPUT_NOROUND for never round
Microsoft Visual Basic programmers can use EntGetVarAddr( ) to set the lpimrData andlpseStatus fields to the addresses of the buffers. The u_Dfa.sViewType, u_Dfa.sigAccumFreq,and u_Dfa.wRndFlag fields are generally used only for reporting.
EntQueryEx( ) returns 0 if it succeeded, NONE if there was an error. On return fromEntQueryEx( ), your data buffer (apiStruct.lpimrData) will contain the data values that yourequested, one for each period. Your status buffer (apiStruct.lpseStatus) will contain a statusvalue for each period. The status value PS_OK (see the TOOLINC.H file) indicates that the datafor that period is in your data buffer; PS_NODATA indicates that there is no data for that accountand period.
Example:
DIM apiS As APISTRUCTret% = EntDataFileOpen(hSelect&, ID_REGULAR, sigCat&,
sigEntity&, HYP_NONE, APILOCK_READONLY, 0)
If ret% = APILOCK_READONLY THEN 'ok
EntInitApiStruct(hApp&, apiS)apiS.sigCat = sigCat&apiS.sigName = sigEntity&apiS.sigParent = HYP_NONEapiS.wType = ID_REGULARapiS.lStartPeriod = 0apiS.lEndPeriod = 0 'let's just get the first periodapiS.lpimrData = EntGetVarAddr(dValue#)apiS.lpseStatus = EntGetVarAddr(wStatus%)apiS.u_Dfa.sigAcct = sigAcct&apiS.u_Dfa.bPeriodic = 0apiS.u_Dfa.iFreq = HYP_NONEapiS.u_Dfa.sViewType = HYP_NONEret% = EntQueryStr(hSelect&, HYP_ID_DATAFILE,'C programmers should use EntQueryEx( ) and pass NULL in place of vbNullString.HYP_DATAFILE_GET, HYP_NONE, HYP_NONE, 0, vbNullString,apiS)if ret% = 0 Then ret2% = MsgBox("The value is " & Str$(dValue#))hSelect& = EntUnSelect(hSelect&, HYP_ID_DATAFILE,HYP_NONE, 1, ret2%, apiS) 'when through, deselect the table
116 Advanced Functions
End If
Updating DataTo update data, you must request read-write access when you select the Datafile table. UseAPILOCK_READWRITE instead of APILOCK_READONLY when you call theEntDataFileOpen( ) function.
You also must allocate two buffers, one for the data and one for status information. The size ofthese buffers depends on the number of periods that you want to update. You fill the data bufferwith one data value (type double) for each period that you want to update. Fill the status bufferwith the constant PS_OK, see the TOOLINC.H file for each period.
Next, set up the apiStruct. Table 33 shows the fields you need to set in the apiStruct.
Table 33 apiStruct Fields for Updating Data
Field Description
sigCat The category signature.
sigName The entity signature.
sigParent NONE.
wType ID_REGULAR.
lStartPeriod The first period to update.
lEndPeriod The last period to update.
lpimrData The address of your data buffer.
lpseStatus The address of your status buffer.
u_Dfa.sigAcct The account signature.
u_Dfa.iFreq NONE for the default frequency, or the frequency signature.
u_Dfa.bPeriodic 1 (TRUE) for periodic data, or 0 (False) for category-to-date data.
u_Dfa.sigAccumFreq NONE or the signature of the category’s default frequency.
u_Dfa.sViewType NONE, or one of the following codes:
VIEWTYPE_YTD for category-to-date
VIEWTYPE_PER for periodic
Visual Basic programmers can use the EntGetVarAddr( ) function to set the lpimrData andlpseStatus fields to the addresses of the buffers.
When your setup is complete, call the EntUpdate( ) function to update the data values. You canalso use EntUpdate( ) to calculate formulas, clear existing data, or erase the selected datafiletable, depending on the attribute you pass to EntUpdate( ). After you have updated the data,you need to call the EntSave( ) function to save your changes.
Working with Data 117
Table 34 shows the attributes for EntUpdate( ).
Table 34 EntUpdate( ) Attributes
Attribute Description
DATAFILE_CLEAR Clears existing data. To clear all accounts for the selected datafile table (entity and category), set the u_Dfa.sigAcct field in the apiStruct to HYP_NONE (NONE in C). To clear only that account, set it to a specificaccount signature.
DATAFILE_ERASE Erases the selected datafile table.
DATAFILE_LOGICEXECUTE Calulates formulas. To execute through the last period with data, set the lEndPeriod field in the apiStructto HYP_NONE (NONE in C). To use the lEndPeriod field as the start, you can set the lStartPeriod field toHYP_NONE . Setting both to HYP_NONE effectively calculates formulas for all periods with data. Set theu_Dfa.sigAcct field in the apiStruct to HYP_NONE.
DATAFILE_NODATAFLOW Produces zero data except for calculated accounts.
DATAFILE_PUT Updates a data value.
DATAFILE_SETPER_EJLCKED Sets periods explicit journal locked.
DATAFILE_SETPER_EJUNLCK Sets periods explicit journal unlocked.
DATAFILE_SETPER_LCKED Sets periods locked.
DATAFILE_SETPER_UNLCK Sets periods unlocked.
Example:
Global Const PS_OK = 0DIM apiS As APISTRUCTret% = EntDataFileOpen(hSelect&, ID_REGULAR, sigCat&, sigEntity&, HYP_NONE, APILOCK_READWRITE, 1)If ret% = APILOCK_READWRITE THEN 'ok
dValue# = 100.35wStatus% = PS_OK
EntInitApiStruct(hApp&, apiS)apiS.sigCat = sigCat&apiS.sigName = sigEntity&apiS.wType = ID_REGULARapiS.lStartPeriod = 0apiS.lEndPeriod = 0 'let's just update the first periodapiS.lpimrData = EntGetVarAddr(dValue#)apiS.lpseStatus = EntGetVarAddr(wStatus%)apiS.u_Dfa.sigAcct = sigAcct&apiS.u_Dfa.bAutoRecalc = 0;apiS.u_Dfa.iFreq = HYP_NONEapiS.u_Dfa.bPeriodic = 0'C programmers should use EntUpdate() and pass NULL in place of vbNullString
ret% = EntUpdateStr(hSelect&, HYP_ID_DATAFILE,HYP_DATAFILE_PUT, HYP_NONE, HYP_NONE, vbNullString,apiS)
if ret% <> 0 Then ret2% = MsgBox("Error updating data")
118 Advanced Functions
'calculate formulas for all periods and accounts
apiS.u_Dfa.sigAcct = HYP_NONEapiS.lStartPeriod = HYP_NONEapiS.lEndPeriod = HYP_NONE
ret% = EntUpdateStr(hSelect&, HYP_ID_DATAFILE, HYP_DATAFILE_LOGICEXECUTE, HYP_NONE, HYP_NONE, vbNullString, apiS)
'when finished, save and deselect the table
ret% = EntSave(hSelect&, HYP_NONE, HYP_NONE, 0);hSelect& = EntUnSelect(hSelect&, HYP_ID_DATAFILE, HYP_NONE, 1, ret2%, apiS)
End If
Consolidation Detail ValuesHyperion Enterprise applications can store consolidation detail, such as eliminations,adjustments, currency-translated values, or the amounts that an entity contributed to its parententity during consolidation. You might see this feature referred to in the header files as theDetailed Storage Model (DSM).
ID_TRANSLATION_FORCE is similar to ID_TRANSLATION with the exception that it is valideven when the parent and child entities use the same currency. When the currencies are thesame, the data is not translated and a translation datafile table does not exist. In this case, if youuse ID_TRANSLATION, you will get an error code, since a translation datafile table does notexist. If you use ID_TRANSLATION_FORCE instead, then it will access the regular data (typeID_REGULAR) when the parent and child use the same currency, instead of returning an errorcode.
Warning: Do not select the ID_TRANSLATION_FORCE type of datafile table if there is apossibility that the ID_REGULAR datafile table may already be selected for the specified categoryand entity. Similarly, do not select the ID_REGULAR type of datafile table if theID_TRANSLATION_FORCE type may already be selected.
To read these consolidation detail values, follow the instructions in “Retrieving Data” on page115 with the following exceptions:
l Set the sigParent field in the apiStruct to the signature of the parent entity.
l Set the wType field in the apiStruct to one of the codes in Table 35.
l
Table 35 wType Codes
Code Description
ID_ADJUSTMENT Parent adjustment values.
ID_CONTRIBUTION Contribution values.
Working with Data 119
Code Description
ID_ELIMINATION Elimination values.
ID_PROPORTIONAL Proportion values.
ID_TRANSLATION Translation values.
ID_TRANSLATION_FORCE Translation or child if same currency.
Do not try to update any consolidation detail values. These values are read-only. These valuesare written by Hyperion Enterprise during consolidation as a record of how the consolidatednumbers were calculated.
Organization Structures and Advanced FunctionsTable 36 lists the advanced functions you should use to get information about an organizationstructure.
Table 36 Advanced Functions to Use with Organizations
Function Description
EntEnumOrgEntities( ) Enumerates nodes in an organization.
EntFindEntityInOrg( ) Finds a node in an organization.
EntGetChild( ) Gets the signature of a child node.
EntGetOrgLevel( ) Gets the organization level of a node.
EntGetSibling( ) Gets the signature of the next sibling node in an organization.
EntIsEntityParent( ) Checks if a specified entity is a parent entity.
Before you call these functions, you should select the Categories table (ID_CATEGORY), thenthe Organizations table (ID_ORGANIZATION) with all of their associated tables. Forapplications that were set up to use dynamic organizations, you should pass the categorysignature as the key when you select the Organizations table. For more information aboutselecting tables, see “Select and Deselect Tables using Advanced Functions” on page 111.
Hyperion Enterprise stores most information about an organization structure in the nodes table(ID_NODES). Each record in the Nodes table is called a node. Each node has information abouta particular entity in the organization structure. This information allows us to find the parent,immediate dependent, or a sibling on the same level in the organization structure.
Most of the previously listed functions return the signature of a node in the Nodes table, not thesignature of an entity. You can get the signature of the entity by querying the nodes table usingthe EntQueryEx( ) function and query attribute NAMESIG.
You can get the signature of the top node in an organization by calling EntQueryEx( ) with theorganizations table (ID_ORGANIZATION) and query attribute TOPNODE.
120 Advanced Functions
If an application was set up to use dynamic organizations, the organization structure can varyby category and period. In this case, use EntEnum( ), EntFind( ), and EntQueryEx( ) to getinformation about the organization structure instead of the functions in the previous table.
Set up an apiStruct that specifies the category (sigCat field) and period (lStartPeriod andlEndPeriod fields) filled in. Set the lEndPeriod field to the same value as lStartPeriod. Pass thisapiStruct to EntEnum( ), EntFind( ), and EntQueryEx( ) to get information about theorganization structure. For more information about apiStructs, see “Using an apiStructStructure” on page 110.
Code written for organizations that vary by category and period should also work fororganizations that do not vary. The API ignores any unnecessary information.
Setting the Point of ViewBe sure to set the point of view before calling most API functions to execute a task. Set the currentorganization, category, and entity. For example:
wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURORGSIG,sigOrg);wRet = EntUpdateDefault(hApp,ID_USERDEFAULT, CURCATEGORYSIG,sigCat);wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURNAMESIG,sigEntity);
Server TasksThere are several process that you can run on the application server instead of the clientworkstation using Hyperion Enterprise Application Server. Table 37 lists functions that can beexecuted on the server if the application uses Hyperion Enterprise Application Server:
Table 37 Server-based Functions
Server-Based Process Functions Where To Find More Information
Consolidation EntConsolidate( )l “EntConsolidate( ) - Consolidate” on page 141
Load Data EntUNCDataLoad( )
EntUNCDataLoadVB( )
l “EntUNCDataLoad( ) - Load Data” on page 264
l “EntUNCDataLoadVB( ) - Load Data” on page 266
Extract Data EntDataExtract( )
EntDataExtractVB2( )
EntDSMDataExtract( )
EntDSMDataExtractVB( )
l “EntDataExtract( ) - Extract Data” on page 146
l “EntDataExtractVB2( ) - Extract Data ” on page 148
l “EntDSMDataExtract( ) - Extract DSM Data” on page 156
l “EntDSMDataExtractVB( ) - Extract DSM Data” on page 158
Load Formulas EntLogicImport( )
EntLogicImportVB( )
l “EntLogicImport( ) - Import Formulas” on page 227
l “EntLogicImportVB( ) - Import Formulas” on page 229
Setting the Point of View 121
Server-Based Process Functions Where To Find More Information
Extract Formulas EntLogicExport( )
EntLogicExportVB( )
l “EntLogicExport( ) - Export Formulas” on page 223
l “EntLogicExportVB( ) - Export Formulas” on page 225
Load Journals EntJournalLoad( )
EntJournalLoadVB( )
l “EntJournalLoad( ) - Load Journal” on page 215
l “EntJournalLoadVB( ) - Load Journal” on page 217
Extract Journals EntJournalExtract( )
EntJournalExtractVB( )
l “EntJournalExtract( ) - Extract Journal” on page 208
l “EntJournalExtractVB( ) - Extract Journal” on page 210
Load Application EntAppLoad( )
EntAppLoadVB( )
l “EntAppLoad( ) - Load Application” on page 132
l “EntAppLoadVB( ) - Load Application” on page 133
Extract Application EntAppExtract( )
EntAppExtractVB( )
l “EntAppExtract( ) - Extract Application” on page 129
l “EntAppExtractVB( ) - Extract Application” on page 130
Load Security EntSecurityLoad( )
EntSecurityLoadVB( )
l “EntSecurityLoad( ) - Load Security” on page 249
l “EntSecurityLoadVB( ) - Load Security” on page 250
Extract Security EntSecurityExtract( )
EntSecurityExtractVB( )
l “EntSecurityExtract( ) - Extract Security” on page 246
l “EntSecurityExtractVB( ) - Extract Security” on page 247
Lock Data EntEntityListLock( )l “EntEntityListLock( ) - Lock Data” on page 164
Unlock Data EntEntityListUnlock( )l “EntEntityListUnLock( ) - Unlock Data” on page 166
Extract Shares EntSharesExtract( )l “EntSharesExtract( ) - Shares Extract” on page 258
l “EntSharesExtractVB( ) - Shares Extract” on page 259
Load Shares EntSharesLoad( )
EntSharesLoadVB( )
l “EntSharesLoad( ) - Shares Load” on page 261
l “EntSharesLoadVB( ) - Shares Load” on page 262
Compile Logic EntLogicCompile( )l “EntLogicCompile( ) - Compile Logic” on page 221
Each of these tasks has an argument that you set to indicate the options that you want to use.One option is to execute the task on the server. This option is usually defined by a constantnamed ...._REMOTE. (The exact name of the constant depends on the function.)
Be sure to set the Point of View before calling any of the functions. For more information, see“Setting the Point of View” on page 121.
Each of these functions uses a callback function (used to specify the function the you want theAPI to call) to pass status information back to you while the task is executing. However, whenyou select the option to execute the task on the server, the callback function is not used. Youshould pass NULL as the address of your callback function. The API creates an instance ofHcommgr.exe running on the client computer to display status information about the taskrunning on the server.
When you execute a task on the server (for example, consolidation, data load, or data extract),you can get back the handle of the instance of hcommgr.exe for the task. Hcommgr.exe showsthe status window on the client computer. To get the handle, you must pass the address of a
122 Advanced Functions
variable where you would like the API function to put the handle. To do this in Visual Basic,you must modify or clone the declaration of the API function (depending on the function) andchange the declaration to pass the argument ByRef instead of ByVal. For example, when you callEntConsolidate( ), you set the lParam argument to the address of your variable for the handle;to do this, you need to change the declaration for EntConsolidate( ) to pass the lParam argumentByRef instead of ByVal.
Once you have the handle, you can use the Microsoft function WaitForSingleObject( ) to waitfor this instance of hcommgr.exe to end. You can then use the Microsoft functionGetExitCodeProcess( ) to get the exit code that was returned by hcommgr.exe when it ended.
HComMgr.exe returns the following exit codes.
0 - Finished ok
non-zero - error 6000 - server error (connection problems); 6004 - canceled; 6005 - finished buterrors occurred (check the application log)).
Note: Even if this instance of hcommgr.exe ends, the task may still be executing on the server,since the handle is for a process on the client computer, not the process executing the taskon the server. For instance, if the connection gets dropped, the task continues to executeon the server, but the client does not get any more status information (exit code 6000 -server error). Also, a user could close the status window or otherwise terminatehcommgr.exe prematurely, while the task is still running on the server.
The server selects the necessary tables for the task. You do not need to select any special tablesbeyond the usual default tables, unless the API needs special tables in order to pass informationto the server. For some tasks, such as data load, the server needs read/write access to specifictables. Do not select these tables within your call because that prevents the server from havingread/write access, causing the task to fail.
Hyperion Enterprise INI File FunctionsYou use the Hyperion Enterprise INI file functions to read from and write to application .INIfiles. The functions in Table 38 are used to read and write values in Hyperion Enterprise'shypent.ini file.
Table 38 Advanced Functions to Use with the Hypent.ini File
Function Description
EntGetProfileLong Reads an integer.
EntGetProfileString Reads a text value.
EntWriteProfileLong Writes an integer.
EntWriteProfileString Writes a text value.
Hyperion Enterprise INI File Functions 123
The functions in Table 39 are used to read and write values in a file-based Hyperion Enterpriseapplication's INI file (appl.ini).
Table 39 Advanced Functions to Use with Application INI Files
Function Description
EntGetAppProfileLong Reads an integer.
EntGetAppProfileString Reads a text value.
EntWriteAppProfileLong Writes an integer.
EntWriteAppProfileString Writes a text value.
Because Hyperion Enterprise SQL applications do not have an application INI file, you shoulduse the EntQueryDefault( ) function, for both SQL and file-based applications, to read the valuesthat Hyperion Enterprise stores in a file-based application's .INI file. You can use theEntUpdateDefault( ) and EntSaveDefault( ) functions to update these values.
SecurityThe underlying Hyperion Enterprise API checks the user’s rights to access items, such ascategories, entities, or accounts. However, the API does not check the user’s rights to executetasks, such as consolidation, data load, or data extract. It is the responsibility of the programmerto check the user’s rights to execute tasks.
To check the current user’s rights to execute a task, call the EntGetRightsToTask( ) function.
To check the current user’s rights to access an item such as a category or an entity, first find theitem in the appropriate table (such as ID_CATEGORY for categories or ID_NAMES for entities),then call the EntQueryEx( ) function using the USER_RIGHTS query attribute. The buffer forthe returned value should be an integer (short * in C).
For more information, see the following topics:
l “EntFind( ) and ID_SECGRPTAB (Security Group Table)” on page 185
l “EntFind( ) and ID_SECRIGHTS (Security Rights Table)” on page 185
l “EntEnum( ) and ID_SECTASK (Security Task Table)” on page 176
l “EntEnum( ) and ID_SECUSERTAB (Security User Table)” on page 176
l “EntEnum( ) and ID_SECGRPTAB (Security Group Table)” on page 175
l “EntEnum( ) and ID_SECRIGHTS (Security Rights Table)” on page 176
l “Default Query Attributes” on page 366
l “ID_SECCLASS (Security Class Table) Query Attributes” on page 407
l “ID_SECGRPTAB (Security Group Table) Query Attributes” on page 408
l “ID_SECRIGHTS (Security Rights Table) Query Attributes” on page 408
l “ID_SECTASK (Security Task Table) Query Attributes” on page 409
124 Advanced Functions
l “ID_SECTASKFILTER (Security Task Filter Table) Query Attributes” on page 409
l “ID_SECUSERTAB (Security Users Table) Query Attributes” on page 409
API Functions for Hyperion Enterprise SecuritySecurity in Hyperion Enterprise uses the generic API functions used for all the other tables. Itdoes not need any special functions. However, there is a function called EntGetRightsToTask( )for getting the current user's rights to a particular task. The primary API function you woulduse for security information, besides EntGetRightsToTask( ), would be EntQueryEx( ).Hyperion Enterprise has query attributes for getting the security class or the current user's rightsfor any item (category, entity, and so on.) For more information, see “Default Query Attributes”on page 366. Hyperion Enterprise 5 has a number of new or substantially different securitytables than Hyperion Enterprise SE, but they can all be accessed through the same API functionsthat are used for all other tables. See the “EntEnum( ) - Enumerate Records in a Table” on page167 for more information on subtopics on enumerating various security tables.
Replacing Obsolete Ent...( ) Functions with New Ent...( ) FunctionsTable 40 lists all of the Ent...( ) functions that have been replaced with new Ent...( ) function forthis release of Hyperion Enterprise. While you can continue to use the obsolete functions, theseare not documented in this guide.
Table 40 Obsolete Hyperion Enterprise Ent...( ) Functions and Corresponding New Ent...( ) Functions
Old Function New Function
EntDataExtractVB( ) EntDataExtractVB2( )
EntDataLoad( ) EntUNCDataLoad( )
EntDataLoadVB( ) EntUNCDataLoadVB( )
EntFormatNumber( ) EntFormatNumber2( )
EntQuery( ) EntQueryEx( )
EntQueryStr( ) EntQueryExStr( )
Advanced Functions Alphabetical ReferenceThis topic includes a list of all advanced functions in alphabetical order.
The following items are general notes for most advanced functions.
l If you must select the default tables for a function, you must select ID_CATEGORY,ID_ORGANIZATION, and ID_ACCOUNTS and their associated tables. For moreinformation, see “Select and Deselect Tables using Advanced Functions” on page 111.
Replacing Obsolete Ent...( ) Functions with New Ent...( ) Functions 125
l You do not need to select ID_APPDEFAULT, because it is always available when you havean application handle (hApp argument). For more information, see “Tables of DefaultSettings” on page 361.
l Only use APILOCK_READWRITE to select the tables specified for the function.
l Do not use EntSelect() to select ID_SECCLASS. Use EntSelectAdd(). EntSelect() is only forthe first selected table.
EntAcctAsk( ) - Select AccountThis function calls the Hyperion Enterprise Select Account dialog box and retrieves the accountyou select. If you select Cancel, no account is retrieved.
Use this format:
Declare Function EntAcctAsk Lib "heaccess.dll" Alias "_EntAcctAsk@8" (ByVal hSelect AsLong, ByVal szRetbuf As String) As Integer
Variable Description
hSelect The handle of the selected tables
szRetbuf The buffer to return the account ID. The buffer should be large enough for at least HYP_SIZEFULLACCT+1 (SIZEFULLACCT+1 in C)characters.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szAcct$ = Space (HYP_SIZEFULLACCT+1)ret% = EntAcctAsk(hSelect&, szAcct$)If ret% = 0 Then szAcct$ = CToBStr(szAcct$)
Use this format for C:
short WINAPI EntAcctAsk( HSELECT hSelect, LPSTR szRetbuf )
EntAcctListAsk( ) - Select Account ListThis function displays a dialog box you use to select an account list. EntAcctListAsk( ) returnsthe name of the selected account list at the return buffer, or an empty string if you select Cancel.This function selects and deselects the Account List table (ID_ACCTLIST) temporarily.
Use this format:
Declare Function EntAcctListAsk Lib "heaccess.dll" Alias "_EntAcctListAsk@8" (ByVal hSelectAs Long, ByVal szRetbuf As String) As Integer
126 Advanced Functions
Variable Description
hSelect The handle of the selected tables
szRetbuf The buffer to return the selected account list. This should be large enough for at least HYP_SIZELABEL+1 (SIZENAME+1 in C)characters.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szAcctList$ = Space (HYP_SIZELABEL+1)ret% = EntAcctAskListAsk(hSelect&, szAcctList$)If ret% = 0 Then szAcctList$ = CToBStr(szAcctList$)
Use this format for C:
short WINAPI EntAcctListAsk(HSELECT hSelect, LPSTR szRetbuf)
EntAcctSplit( ) - Split Account Signature into PartsGiven an account signature, this function returns the signatures of the major account andsubaccounts.
Use this format:
Declare Function EntAcctSplit Lib "heaccess.dll" Alias "_EntAcctSplit@20" (ByVal hSelect AsLong, ByVal sigAcct As Long, sigMajor As Long, sigSub As Long, sigSubSub As Log) As Integer
Variable Description
hSelect The handle of the selected tables
sigAcct The account signature for which you want major account and sub-account signatures
sigMajor The buffer to return the major account signature
sigSub The buffer to return the first-level sub-account signature
sigSubSub The buffer to return the second-level sub-account signature
Return Codes:
Code Meaning
0 Successful
Advanced Functions Alphabetical Reference 127
Code Meaning
NONE Error occurred
Example:
ret% = EntAcctSplit(hselect&, sigAcctIn&, sigMajor&, sigSub1&, sigSub2&)If ret% = 0 ThenMsg$ = "Major: " & sigMajor& & " sub1: " & sigSub1& & "sub2: " & sigSub2&Else msg$ = "Error "End Ifret2% = MsgBox(msg$)
Use this format for C:
short WINAPI EntAcctSplit(HSELECT hSelect, SIGNA sigAcct, SIGNA * psigMajor, SIGNA *psigSub, SIGNA * psigSubSub);
EntAppendToCBChain( ) - Append to Callback ChainThis function appends a callback function to the chain of callback functions associated with thehSelect argument variable. This callback function is called if any table in the hSelect blockchanges. For more information, see “Selection Callbacks” on page 112.
Use this format:
Declare Function EntAppendToCBChain Lib "heaccess.dll" Alias"_EntAppendToCBChain@12" (ByVal hSelect As Long, ByVal SelCallback As Long, ByVallParam As Long) As Integer
Variable Description
hSelect The handle of the selected tables
SelCallback The address of the callback function. For more information, see “CALLBACKSEL” on page 318.
lParam The argument for the SelCallback function.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntAppendToCBChain(HSELECT hSelect, CALLBACKSEL SelCallback,LONG lParam);
128 Advanced Functions
EntAppExtract( ) - Extract ApplicationThis function extracts an application to an ASCII file. Do not select any tables before calling thisfunction.
The callback function for status information, pArgs->fnStatusCB, is the same type as the callbackfunction used for EntDataExtract( ). For more information, see “CALLBACKDBLOAD - ForEntAppExtract( )” on page 312. However, the szCategory argument to the callback function isused for a status message rather than for the category name. The szEntity, iStart, iEnd, iTot , andiCur arguments are not used.
Note: If you are a Visual Basic programmer, use EntAppExtractVB( ) instead ofEntAppExtract( ).
Use this format for C:
short WINAPI EntAppExtract(HAPP hApp, LPAPPLOADSTRUCT pArgs)
Variable Description
hApp The application handle
pArgs Structure with arguments for the application extract
pArgs->dwSize The size of this structure.
pArgs->cDelim The field delimiter, which typically is a comma ( , )
pArgs->szFile The path and file name to the extract file
pArgs->dwOptions Option bit flags. See APPL_... in the TOOLINC.H file for details
pArgs->dwMoreOptions 0, reserved for future use
pArgs->fnStatusCB The callback function for status or NULL. This is used only when not executing on a server.
pArgs->lParamStatus The argument for fnStatusCB
pArgs->fnSelectCB Intended for future use.
pArgs->lParamSelect Intended for future use.
pArgs->hProcess The handle of the Task Status window process. This returns the process handle when executing on the server.
pArgs->bLoad Returns TRUE if anything was extracted, otherwise FALSE.
Return Codes:
Code Meaning
0 Successful
LOAD_CHECK_ERRORLOG Errors occurred and are listed in the error log.
Advanced Functions Alphabetical Reference 129
Code Meaning
NONE Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.
For an example, see “EntAppExtractVB( ) - Extract Application” on page 130.
EntAppExtractVB( ) - Extract ApplicationIf you are a Visual Basic programmer, use this function instead of EntAppExtract(). This functionextracts an application to an ASCII file. Do not select any tables before calling this function.
The callback function for status information, pArgs.fnStatusCB, is the same type as the callbackfunction used for EntDataExtract( ). For more information, see “CALLBACKDBLOAD - ForEntAppExtract( )” on page 312. However, the szCategory argument to the callback function isused for a status message rather than for the category name. The szEntity, iStart, iEnd, iTot, andiCur arguments are not used.
Use this format:
Declare Function EntAppExtractVB Lib "heaccess.dll" Alias "_EntAppExtractVB@12" (ByValhApp As Long, pArgs As APPLOADSTRUCT, ByVal szExtractFile As String) As Integer
Variable Description
hApp The application handle
pArgs Structure with arguments for the application extract
pArgs.dwSize The size of this structure
pArgs.cDelim The field delimiter, which typically is a comma ( , )
pArgs.dwOptions Option bit flags. See APPL_... in the TOOLINC.H file for details.
pArgs.dwMoreOptions 0, reserved for future use
pArgs.fnStatusCB The callback function for status or NULL. This is used only when not executing on a server.
pArgs.lParamStatus The argument for fnStatusCB
pArgs.fnSelectCB Reserved for future use.
pArgs.lParamSelect Reserved for future use.
pArgs.hProcess The handle of the Task Status window process. This returns the process handle when executing on the server.
pArgs.bLoad Returns TRUE if anything was extracted, otherwise FALSE
szExtractFile The path and file name of the extract file
Return Codes:
130 Advanced Functions
Code Meaning
0 Successful
LOAD_CHECK_ERRORLOG Errors occurred and are listed in the error log.
NONE Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.
Note: EntUnSelect0( ) in this example is declared similar to EntUnSelect( ) but its declarationallows passing 0 in place of the apiStruct. For more information, see “Visual BasicProgramming Notes” on page 16.
Example:
Private Sub ApplicationExtract(hSelect As Long,szFile As String)Dim s As APPLOADSTRUCTDim wRet%Dim hApp&
'set up structs.dwSize = LenB(s)s.cDelim = Asc("!")s.szFile = 0s.dwOptions = SetOptionFlags()s.fnStatusCB = FuncPtrToLong(AddressOf MyCallback)s.lParamStatus = 0s.fnSelectCB = 0
hApp& = EntGetHappFromSelect(hSelect&)'unselect all tableshSelect& = EntUnSelect0(hSelect&,HYP_NONE,HYP_NONE,0,wRet%,0)
wRet% = EntAppExtractVB(hApp&, s, szFile$)End Sub
'Example of callback function' Input: addressOfFileNameCString = extract filename (C-style string);' addressOfMessageCString = status message (C-style string);' lParam ' Output: returns 0'' =========================================Public Function MyCallback(ByVal
addressOfFileNameCString As Long, ByVal addressOfMessageCString As Long, ByVal unused1 As Long, ByVal unused2 As Long,ByVal unused3 As Long, ByVal unused4 As Long, ByVal unused5 As Long, ByVal lParam As Long) As Integer
Dim szFileName$, szMessage$Dim wRet%, wLen%
On Error Resume Next 'recommended by Microsoft for callback functions;
Advanced Functions Alphabetical Reference 131
'Get szFileName$ from addressOfFileNameCStringwLen% = EntVBGetCStrLen(addressOfFileNameCString)szFileName$ = Space(wLen%)wRet% = EntVBCopyStr(szFileName$, addressOfFileNameCString, wLen%)
'Get szMessage$ from addressOfMessageCStringwLen% = EntVBGetCStrLen (addressOfMessageCString)szMessage$ = Space(wLen%)wRet% = EntVBCopyStr(szMessage$, addressOfMessageCString, wLen%)
'display messageszMessage$ = "File: [" & szFileName$ & "]"& Chr(13) & Chr(13) & "[" & szMessage$ & "]"wRet% = MsgBox(szMessage$, vbOKOnly, "Now Extracting...")
MyCallback = 0 'return 0End Function
'Pass the result of AddressOf() to this function (as fnPtr).'This function converts it to a long so you can assign it to'a field or argument declared as long rather than 'As Any'.Public Function FuncPtrToLong(ByVal fnPtr As Long) As Long
FuncPtrToLong = fnPtr
End Function
Use this format for C:
short DllExport WINAPI EntAppExtractVB(HAPP hApp, LPAPPLOADSTRUCT pArgs,LPCSTR szExtractFile);
EntAppLoad( ) - Load ApplicationThis function loads an application from an ASCII file. Do not select any tables before callingthis function.
The callback function for status information, pArgs->fnStatusCB, is the same type as the callbackfunction used for EntDataLoad( ). For more information, see “CALLBACKDBLOAD - ForEntAppLoad( )” on page 313. However, the szCategory argument to the callback function isused for a status message rather than for the category name. The szEntity, iStart, and iEndarguments are not used. The iTot and iCur arguments, useful for a progress bar, refer to the totalnumber of bytes in the load file (total and processed so far), not to the number of accounts. ThepArgs->fnSelectCB callback function is used if you want to be notified when changes to thecategories table are saved. For more information, see “CALLBACKSEL” on page 318.
Note: If you are a Visual Basic programmer, use EntAppLoadVB( ) instead of EntAppLoad( ).
Use this format for C:
short WINAPI EntAppLoad(HAPP hApp, LPAPPLOADSTRUCT pArgs)
132 Advanced Functions
Variable Description
hApp The application handle
pArgs Structure with arguments for the application extract
pArgs->dwSize The size of this structure
pArgs->cDelim The field delimiter, which typically is a comma ( , )
pArgs->szFile The path and file name to the load file
pArgs->dwOptions Option bit flags. See APPL_... in the TOOLINC.H file for details.
pArgs->dwMoreOptions 0, reserved for future use
pArgs->fnStatusCB The callback function for status or NULL. This is used only when not executing on a server.
pArgs->lParamStatus The argument for fnStatusCB
pArgs->fnSelectCB The function to call when the category table changes, or NULL. Use this argument when executing locally only. (Notused when executing on a server.)
pArgs->lParamSelect The argument for fnSelectCB
pArgs->hProcess The handle of the Task Status window process. This returns the process handle when executing on the server.
pArgs->bLoad Returns TRUE if anything was loaded; otherwise FALSE
Return Codes:
Code Meaning
0 Successful
LOAD_CHECK_ERRORLOG Errors occurred and are listed in the error log.
NONE Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.
EntAppLoadVB( ) - Load ApplicationIf you are a Visual Basic programmer, use this function instead of EntAppLoad( ). This functionloads an application from an ASCII file. Do not select any tables before calling this function.
The callback function for status information, pArgs.fnStatusCB, is the same type as the callbackfunction used for EntDataLoad( ). For more information, see “CALLBACKDBLOAD - ForEntAppLoad( )” on page 313. However, the szCategory argument to the callback function isused for a status message rather than for the category name. The szEntity, iStart, and iEndarguments are not used. The iTot and iCur arguments, useful for a progress bar, refer to the totalnumber of bytes in the load file (total and processed so far), not to the number of accounts. ThepArgs.fnSelectCB callback function is used if you want to be notified when changes to thecategories table are saved. For more information, see “CALLBACKSEL” on page 318.
Use this format:
Advanced Functions Alphabetical Reference 133
Declare Function EntAppLoadVB Lib "heaccess.dll" Alias "_EntAppLoadVB@12" (ByValhApp As Long, pArgs As APPLOADSTRUCT, ByVal szLoadFile As String) As Integer
Variable Description
hApp The application handle
pArgs Structure with arguments for the application extract
pArgs.dwSize The size of this structure
pArgs.cDelim The field delimiter, which typically is a comma ( , )
pArgs.szFile NULL. Use szLoadFile instead.
pArgs.dwOptions Option bit flags. See APPL_... in the TOOLINC.H file fordetails.
pArgs.dwMoreOptions 0, reserved for future use
pArgs.fnStatusCB The callback function for status or NULL. This is used only when not executing on a server.
pArgs.lParamStatus The argument for fnStatusCB
pArgs.fnSelectCB The function to call when the category table changes, or NULL. Use this argument when executing locally only.
pArgs.lParamSelect The argument for fnSelectCB
pArgs.hProcess The handle of the Task Status window process. This returns the process handle when executing on the server.
pArgs.bLoad Returns TRUE if anything was loaded, otherwise FALSE
szLoadFile The path name of the file to load
Return Codes:
Code Meaning
0 Successful
LOAD_CHECK_ERRORLOG Errors occurred and are listed in the error log.
NONE Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.
Use this format for C:
short WINAPI EntAppLoadVB(HAPP hApp, LPAPPLOADSTRUCT pArgs, LPCSTRszLoadFile);
Example:
Note: EntUnSelect0( ) in this example is declared similar to EntUnSelect( ) but its declarationallows passing 0 in place of the apiStruct. For more information, see “Visual BasicProgramming Notes” on page 16.
Private Sub ApplicationLoad(hSelect As Long, szFile As String)Dim s As APPLOADSTRUCT
134 Advanced Functions
Dim wRet%Dim hApp&
'set up structs.dwSize = LenB(s)s.cDelim = Asc("!")s.szFile = 0s.dwOptions = SetOptionFlags()s.fnStatusCB = FuncPtrToLong(AddressOf MyCallback)s.lParamStatus = 0s.fnSelectCB = 0
hApp& = EntGetHappFromSelect(hSelect&)'unselect all tableshSelect& = EntUnSelect0(hSelect&, HYP_NONE, HYP_NONE, 0, wRet%, 0)
wRet% = EntAppLoadVB(hApp&, s, szFile$)
End Sub'Example of callback function' Input: addressOfFileNameCString = load filename (C-style string);' addressOfMessageCString = status message (C-style string);' lTotalSize = total bytes in load file' lCurPos = current position in load file' lParam ' Output: returns 0'' ==============================================Public Function MyCallback(ByVal addressOfFileNameCString As Long,
ByVal addressOfMessageCString As Long, ByValunused1 As Long, ByVal unused2 As Long, ByVal unused3 As Long, ByVal lTotalSize As Long, ByVal lCurPos As Long, ByVal lParam As Long) As Integer
Dim szFileName$, szMessage$Dim wRet%, wLen%
On Error Resume Next 'recommended by Microsoft for callback functions;
'Get szFileName$ from addressOfFileNameCStringwLen% = EntVBGetCStrLen(addressOfFileNameCString)szFileName$ = Space(wLen%)wRet% = EntVBCopyStr(szFileName$, addressOfFileNameCString, wLen%)
'Get szMessage$ from addressOfMessageCStringwLen% = EntVBGetCStrLen(addressOfMessageCString)szMessage$ = Space(wLen%)wRet% = EntVBCopyStr(szMessage$, addressOfMessageCString, wLen%)
'display messageszMessage$ = "File: [" & szFileName$ & "]"
& Chr(13) & Chr(13) & "[" & szMessage$ & "]"
szMessage$ = szMessage$ & Chr(13) & Chr(13)
Advanced Functions Alphabetical Reference 135
& CStr(lCurPos&) & " of " & CStr(lTotalSize&) & " bytes."
wRet% = MsgBox(szMessage$, vbOKOnly, "Now Loading...")
MyCallback = 0 'return 0
End Function'Set bit flags for APPLOADSTRUCT.dwOptions'Input: Checkboxes on form'Output: returns value to use for APPLOADSTRUCT.dwOptionsPrivate Function SetOptionFlags() As LongDim dwOptions&
dwOptions& = 0If chkEntities.Value Then 'do entities, orgs, and currencies
dwOptions& = dwOptions& Or APPL_ORGANIZATIONdwOptions& = dwOptions& Or APPL_ENTITY Or APPL_ENTITYLISTdwOptions& = dwOptions& Or APPL_ENTITYCONVERSION Or APPL_SUBENTITYdwOptions& = dwOptions& Or APPL_ENTOWNERSHIP Or APPL_SUBSTRUCTUREdwOptions& = dwOptions& Or APPL_INTERCODEPENDdwOptions& = dwOptions& Or APPL_CURRENCYdwOptions& = dwOptions& Or APPL_ENTITYCODEdwOptions& = dwOptions& Or APPL_SUBENTOWNERSHIP
End IfIf chkAccts.Value Then 'do accounts
dwOptions& = dwOptions& Or APPL_ACCOUNT Or APPL_ACCOUNTLISTdwOptions& = dwOptions& Or APPL_SUBACCOUNT Or APPL_ACCOUNTCONVERSIONdwOptions& = dwOptions& Or APPL_INTERCOACCT
End IfIf chkReports.Value Then 'do books and reports dwOptions& = dwOptions& Or APPL_REPORT Or APPL_BOOKEnd If
If chkCat.Value Then 'do categories and rollovers dwOptions& = dwOptions& Or APPL_CATEGORY Or APPL_ROLLOVEREnd If
If chkLogic.Value Then 'do methods, custom functions, and update rules dwOptions& = dwOptions& Or APPL_METHODEnd If
If chkCodes.Value Then 'do codes table dwOptions& = dwOptions& Or APPL_CODEEnd If
If chkFormats.Value Then 'do formats table dwOptions& = dwOptions& Or APPL_FORMATEnd If
136 Advanced Functions
If chkSchedules.Value Then 'do schedules table dwOptions& = dwOptions& Or APPL_SCHEDULEEnd If
If chkAppOptions.Value Then 'do application options & consol method table dwOptions& = dwOptions& Or APPL_CONSOLASSIGN dwOptions& = dwOptions& Or APPL_APPDEFAULTEnd If
SetOptionFlags = dwOptions&
End Function'Pass the result of AddressOf() to this function (as fnPtr).'This function converts it to a long so you can assign it to'a field or argument declared as long rather than 'As Any'.Public Function FuncPtrToLong(ByVal fnPtr As Long) As Long
FuncPtrToLong = fnPtr
End Function
EntAsciiToDouble( ) - Convert String to DoubleThis function converts a string to a number. The string can contain the decimal point characterand thousands separator specified in the application settings.
Use this format:
Declare Function EntAsciiToDouble Lib "heaccess.dll" Alias "_EntAsciiToDouble@12" (ByValhApp As Long, ByVal szBuf As String, ByVal pzRest As Long) As Double
Variable Description
hApp The application handle
szBuf The string to convert
pzRest On return, a pointer to the place in szBuf immediately following the number. (This argument can be useful if you are programmingin C, but it does not apply to Microsoft Visual Basic.)
Return Codes:
Code Meaning
Numeric value Successful
0 Error occurred
Example:
szVal$ = "100.35"dVal# = EntAsciiToDouble(hApp&, szVal$, dummyVar&)
Use this format for C:
Advanced Functions Alphabetical Reference 137
double WINAPI EntAsciiToDouble(HAPP hApp, LPSTR szBuf, LPSTR * pzRest);
EntCatAsk( ) - Change CategoryThis function calls the Select Category dialog box and retrieves the category you select. If youselect Cancel, no category is retrieved.
Use this format:
Declare Function EntCatAsk Lib "heaccess.dll" Alias "_EntCatAsk@8" (ByVal hSelect As Long,ByVal szRetbuf As String) As Integer
Variable Description
hSelect The handle of the selected tables
szRetbuf The buffer to return the category name. The buffer should be large enough for at least HYP_SIZELABEL+1 (SIZECAT+1 in C)characters.
Return Codes:
Code Meaning
0 Successful
NONE Invalid hSelect
Example:
szCat$ = Space (HYP_SIZELABEL+1)ret% = EntCatAsk(hSelect&, szCat$)If ret% = 0 Then szCat$ = CToBStr(szCat$)
Use this format for C:
short WINAPI EntCatAsk( HSELECT hSelect, LPSTR szRetbuf);
EntCatGetNumPeriods( ) - Calculate Number of Periods in aCategoryThis function calculates the number of periods in a category for any given frequency. Given acategory in one frequency and a different frequency, this function returns the number of availableperiods. For example, given a monthly category with 12 periods and a quarterly frequency,EntCatGetNumPeriods( ) would return 4 (quarters) as the number of periods in the category.
Use this format:
Declare Function EntCatGetNumPeriods Lib "heaccess.dll" Alias"_EntCatGetNumPeriods@12" (ByVal hSelect As Long, ByVal sigCat As Long, ByVal sigFreqAs Long) As Integer
138 Advanced Functions
Variable Description
hSelect The handle of the selected tables
sigCat The category signature
sigFreq The frequency signature
Return Codes:
Code Meaning
Number of periods that category sigCat has for frequency sigFreq Successful
NONE Error occurred
Example:
sigCat& = EntFind(hSelect&, HYP_ID_CATEGORY, HYP_NONE, "ACTUAL", 0)sigFreq& = FREQ_QUARTERnumPer% = EntCatGetNumPeriods(hSelect&, sigCat&, sigFreq&)
Use this format for C:
short WINAPI EntCatGetNumPeriods(HSELECT hSelect, SIGNA sigCat, SIGNA sigFreq);
EntCatGetPerShort( ) - Get Period LabelFor a given period within a category, this function returns the period ID in the specifiedfrequency.
Use this format:
Declare Function EntCatGetPerShort Lib "heaccess.dll" Alias "_EntCatGetPerShort@24"(ByVal hSelect As Long, ByVal sigCat As Long, ByVal sigPer As Long, ByVal sigFreq As Long,ByVal cchTag As Integer, ByVal pzPer As String) As Integer
Variable Description
hSelect The handle of the selected tables
sigCat The category signature
sigPer The period number in the category
sigFreq The frequency signature, or HYP_NONE (NONE in C) to use the category's frequency
cchTag The length of the pzPer buffer
pzPer The buffer to return the period ID
Return Codes
Advanced Functions Alphabetical Reference 139
Code Meaning
The length of the string Successful
0 Error occurred
Example:
szPer$ = SPACE(10) 'arbitrary sizerc% = EntCatGetPerShort(hSelect&, sigCat&, sigPer&, sigFreq&, Len(szPer$), szPer$)If rc% Then szPer$= CTobStr(szPer$)
Use this format for C:
short WINAPI EntCatGetPerShort(HSELECT hSelect, SIGNA sigCat, SIGNA sigPer, SIGNAsigFreq, short cchTag, char * pzPer);
EntCatMapPeriod( ) - Map Period into Frequency This function maps a period in one frequency to the equivalent period in another frequency.
Use this format:
Declare Function EntCatMapPeriod Lib "heaccess.dll" Alias "_EntCatMapPeriod@20" (ByValhSelect As Long, ByVal sigCat As Long, ByVal sigFreq As Long, ByVal sigPer As Long, ByValsigAltFreq As Long) As Long
Variable Description
hSelect The handle of the selected tables
sigCat The category signature
sigFreq The frequency signature for sigPer
sigPer The period signature for frequency sigFreq
sigAltFreq The frequency signature for the alternate period into which you want the period sigPer to be mapped, or HYP_NONE (NONE in C)to use the category default frequency
Return Codes:
Code Meaning
Period signature for the frequency Successful
BAD_PERIOD Error occurred
Example:
Suppose you know that you want the first period of quarterly data within a category, and youneed to know the weekly period number. You could use the following example.
sigPerWeekly& = EntCatMapPeriod(hSelect&, sigCat&, FREQ_QUARTER, 0, FREQ_WEEK)
140 Advanced Functions
In the previous example, assuming that the category was monthly in January, this would mapQ1 to Monthly and get March (3). The function would then map the Monthly (3) to weeks, andcome up with W13, because the last week in March is Week 13. This is useful if you are tryingto build a report based on weeks, but you need to get the corresponding values from twocategories that might have different frequencies.
Use this format for C:
SIGNA WINAPI EntCatMapPeriod(HSELECT hSelect, SIGNA sigCat, SIGNA sigFreq,SIGNA sigPer, SIGNA sigAltFreq);
EntCloseApplication( ) - Close ApplicationThis function closes an application.
Use this format:
Declare Sub EntCloseApplication Lib "heaccess.dll" Alias "_EntCloseApplication@4" (ByValhApp As Long)
Where hApp is the handle of the application.
Example:
Public Sub CloseApplication( )
If hApp& <> 0 Then EntCloseApplication hApp& hApp& = 0End If
End Sub
Use this format:
VOID WINAPI EntCloseApplication(HAPP hApp);
EntConsolidate( ) - ConsolidateThis function is used to consolidate. Select the Category, Organization, and Accounts tables andtheir associated tables before calling EntConsolidate( ). Also select the PSF table (ID_PSFDATA),passing the category as the sigKey argument and specifying APILOCK_READWRITE as thewAttr argument.
Be sure to set the point of view before calling EntConsolidate( ) to execute a task. Set the currentorganization, category, and entity. For more information, see “Setting the Point of View” onpage 121.
Use this format:
Declare Function EntConsolidate Lib "heaccess.dll" Alias "_EntConsolidate@24" (ByValhSelect As Long, ByVal cConsType As Integer, ByVal sigTopNode As Long, ByVal ConsolCB AsLong, ByVal lParam As Long, apiS As APISTRUCT) As Integer
Advanced Functions Alphabetical Reference 141
Variable Description
hSelect The handle of the selected tables
cConsType One of the following consolidation types:
CONSOL_IMPACTED
CONSOL_ALL
CONSOL_ALLWITHDATA
If you are running Hyperion Enterprise and you have the client-server option installed, you can use an OR operation with theCONSOL_REMOTE constant for whatever consolidation type you select to consolidate on the server.
sigTopNode The signature of the top node for consolidation
ConsolCB The callback function. NULL if CONSOL_REMOTE is set in cConstType. For more information, see “CALLBACKAPI” on page309.
lParam The argument for the ConsolCB callback function. However, if CONSOL_REMOTE is set in cConsType, the callback function isnot used, and lParam is assumed to be a buffer for a process handle if it is not NULL.
apiS A pointer to an apiStruct with more information. Set sigCat to the category signature, and lStartPeriod and lEndPeriod to thestarting and ending periods of the range to consolidate.
The callback function provides status information. The sigRecd argument is the signature of theparent entity currently being processed. The sigKey argument is the signature of the child entitycurrently being consolidated into the parent entity. The apiStruct argument is the same as theapiStruct you passed to EntConsolidate( ), except the lStartPeriod and lEndPeriod fields indicatethe periods currently being processed. Your callback function should return 0 to continue, or 1to cancel consolidation.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
If you are consolidating on a server (CONSOL_REMOTE flag is set in the argument variablecConsType), you might want to know the process handle of the consolidation process so thatyou can track and monitor the consolidation processes your program launches. You can retrievethe process handle by setting the argument variable lParam to a HANDLE variable before callingEntConsolidate( ). The handle returned is the process handle of an instance of the Task Statuswindow program, HCOMMGR.EXE, running on the local client computer. For moreinformation, see “Server Tasks” on page 121.
Example:
Dim lpAPIStruct As apiStruct'Set the current POVwRet% = EntUpdateDefault(hApp&, HYP_ID_USERDEFAULT, HYP_CURCATEGORYSIG, sigCat&)wRet% = EntUpdateDefault(hApp&, HYP_ID_USERDEFAULT, HYP_CURORGSIG, sigOrg&)
142 Advanced Functions
wRet% = EntUpdateDefault(hApp&, HYP_ID_USERDEFAULT, HYP_CURNAMESIG, sigEntity&)'Note: If the application might be org-by-period, then be sure you specified the correct category as the sigKey& argument 'when you selected table ID_ORGANIZATION and its associated tables.'Select the PSF tablewRet% = EntSelectAdd(HYP_ID_PSFDATA Or HYP_ID_ASSOC, sigCat&, hSelect&, APILOCK_READWRITE, 0, 0, 0, 0)If wRet% <> APILOCK_READWRITE Then Exit FunctionCall EntInitApiStruct(hApp&, lpAPIStruct)lpAPIStruct.sigCat = sigCat&lpAPIStruct.lStartPeriod = lStartPeriodSiglpAPIStruct.lEndperiod = lEndPeriodSigwRet% = EntConsolidate(hSelect&, iConsolidateFlags, sigTopNode&, AddressOf(MyCallBack), lParam, lpAPIStruct)
Use this format for C:
short WINAPI EntConsolidate(HSELECT hSelect, HYPBOOL cConsType, SIGNAsigTopNode, CALLBACKAPI ConsolCB, LONG lParam, LPAPISTRUCT pApiS);
EntCreateApplication( ) - Create ApplicationThis function creates an application. The application opens automatically, so you do not haveto call EntOpenApplication( ). Call EntCloseApplication( ) to close the application when youare finished using it and before the program ends.
If you do not specify a path (containing '\') for the calendar file, EntCreateApplication( )prepends the directory of the program that is executing (only.) When you are runningEntCreateApplication() in the VB debugging environment, that is the directory where VB.EXEis located.
Note: If EntCreateApplication() cannot find the calendar file, it cannot display an error message.This is because the new application is not completely initialized for the error messageroutine.
Use this format:
Declare Function EntCreateApplication Lib "heaccess.dll" Alias "_EntCreateApplication@40"(ByVal szAppId As String, ByVal szAppDesc As String, ByVal szDLL As String, ByVal szCal AsString, ByVal szUserName As String, ByVal szPassword As String, ByVal lpCallback As Long,lParam As Long, wRet As Integer, ByVal sigSite As Long) As Long
Variable Description
szAppId The application ID
szAppDesc The application description
szDLL The file driver (HEFILE or HESQL)
Advanced Functions Alphabetical Reference 143
Variable Description
szCal The calendar file. If NULL, uses LOAD.PER
szUserName The user ID of the user creating the application
szPassword The password of the user creating the application
lpCallback The pointer to the callback function. For more information, see “CALLBACKCREATE” on page 310.
lParam The argument for the lpCallback callback function
wRet The buffer to return the error code
sigSite NONE, or the signature of the site
Use the callback function to define the application settings at the appropriate time in the creationprocess.
To use a conversion file to create the application, set the first character of the applicationdescription to 0x01 (numeric 1, not the ASCII code for '1', i.e. not "1") and pass the conversionfilename as the szCal argument.
After successfully calling EntCreateApplication(), you should call EntSaveDefault() for tableID_APPDEFAULT and for table ID_USERDEFAULT.
Return Codes:
Code Meaning
Handle (hApp) of the new application Successful
NONE Error occurred
EntCreateApplication() currently sets the defaults in Table 41before it calls your callbackfunction.
Table 41 Defaults set by EntCreateApplication()
Attribute Value
APP_USE_MULTI_THREAD TRUE for file-based application, FALSE for SQL
APP_BILLIONS ","
APP_MILLIONS ","
APP_THOUSANDS ","
APP_DECIMAL "."
APP_NUM_DECIMALS 6
APP_USES_SYSTEM_NUM 0
Defaults set by EntCreateApplication()
144 Advanced Functions
APP_ID
APP_DRV_DLL
APP_DESC
APP_SITE
APP_CALENDAR
Use this format for C:
HAPP WINAPI EntCreateApplication(LPSTR szAppId, LPSTR szAppDesc, LPSTR szDLL,LPSTR szCal, LPSTR szUserName, LPSTR szPassword, CALLBACKCREATE lpCallback,LPARAM lParam, short * wRet, SIGNA sigSite);
Example:
Public gsDir As String'- - -Dim sName As StringDim sDesc As StringDim sUserName As StringDim sUserPass As StringDim sCal As StringDim sDLL As StringDim sigSite As LongDim lParam As LongDim hApp As LongDim nRC As Integer sName = Trim(txtName.Text) sDesc = Trim(txtDesc.Text) sDLL = "HEFILE" sCal = "c:\hypent\LOAD.PER" sUserName = Trim(txtID.Text) sUserPass = Trim(txtPW.Text) lParam = 0 sigSite = HYP_NONE gsDir = Trim(frmMain.txtDir.Text) hApp = EntCreateApplication(sName, sDesc, sDLL, sCal, sUserName, sUserPass, AddressOf .CreateAppCB, lParam, nRC, sigSite) If hApp <> 0 Then MsgBox "Created the app." EntCloseApplication hApp Else MsgBox "Failed to create app." End If- - - - - - - - - - - - - - - Public Function CreateAppCB(ByVal hApp As Long, ByVal lParam As Long) As LongDim nRC As IntegerDim sReport As StringDim sOutbox As StringDim sInbox As StringDim sData As String sReport = "@APP\REPORT" sOutbox = "@APP\OUTBOX" sInbox = "@APP\INBOX"
Advanced Functions Alphabetical Reference 145
sData = "@APP\DATA"'************************************************************************************'**** Use EntUpdateDefaultStr for strings, not EntUpdateDefault.'************************************************************************************ nRC = EntUpdateDefaultStr(hApp, HYP_ID_APPDEFAULT,
HYP_APP_PATH, gsDir)
nRC = EntUpdateDefaultStr(hApp, HYP_ID_APPDEFAULT, HYP_APP_DATADIR, sData)nRC = EntUpdateDefaultStr(hApp, HYP_ID_APPDEFAULT, HYP_APP_INBOXDIR, sInbox)nRC = EntUpdateDefaultStr(hApp, HYP_ID_APPDEFAULT, HYP_APP_OUTBOXDIR, sOutbox)nRC = EntUpdateDefaultStr(hApp, HYP_ID_APPDEFAULT, HYP_APP_REPORTDIR, sReport)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_CONSOL_IS_PER, 1)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_IS_ORGBYPER, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_JOUR_AUTONUMBER, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_USE_CHILD_RATES, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_SUBACCTSIG, 1)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_STORETRANDETAIL, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_STORECONDETAIL, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_USETURBO, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_DEVERASELOG, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_JOUR_TOPLEVEL, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_IMPACTFUTURECAT, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_EXPECTED_ENTITIES, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_EXPECTED_REPORTS, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_EXPECTED_ACCTS, 0)nRC = EntUpdateDefault(hApp, HYP_ID_APPDEFAULT, HYP_APP_EXPECTED_CATS, 0)nRC = EntSaveDefault(hApp, HYP_ID_APPDEFAULT)'************************************************************************************'**** Must return "1" to create the app'************************************************************************************ CreateAppCB = 1 End Function
EntDataExtract( ) - Extract DataThis function executes a data extract. You must provide a function to enumerate the accountsfor which you want to extract data. In some cases, you might need to select theID_NAMELISTENTRY and ID_PSFDATA tables before calling EntDataExtract( ).
Note: This function can be used with any language except Visual Basic. UseEntDataExtractVB2( ) for Visual Basic applications. C programmers might also prefer touse EntDataExtractVB2( ).
If extracting data on a server (the DBE_REMOTE bit flag is set in pS->wExtractFlags), you mightwant to know the process handle of the extract process so that you can track and monitor theserver processes that your program launches. The process handle returned at pS - > hProcess isthe process handle of an instance of the Task Status window program, HComMgr.exe, runningon the local client computer. For more information, see “Server Tasks” on page 121.
146 Advanced Functions
Use this format for C:
short WINAPI EntDataExtract(HSELECT hSelect, LPDBEXTRACTSTRUCT pS)
Variable Description
hSelect The handle of the selected tables
pS Pointer to struct with arguments for the data extract. All fields are required except hProcess.
pS->dwSize The size of this structure
pS->cDelim The field delimiter, which typically is a comma( , )
pS->cNeg The negative delimiter, which typically is a dash or apostrophe (- or ‘)
pS->cScale Scale of the data
pS->cView Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category's defaultview.
pS->wDecimals Number of decimal places to extract.
pS->wDSMType Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if notID_REGULAR.
pS->wExtractFlags data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h).
pS->wOperation FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE.
pS->dDataBy Data to use with wOperation.
pS->bDataFileOpened Data file is currently opened (TRUE or FALSE); input and output.
pS->hProcess Process handle returned when executing on server (DBE_REMOTE).
pS->lStartPeriod The first period to extract (0-based).
pS->lEndPeriod The last period to extract (0-based).
pS->sigAcctConv The account conversion table signature.
pS->sigCat The category signature.
pS->sigName The entity signature.
pS->sigNameConv Name conversion table signature.
pS->sigParent Parent for wDSMType.
pS->sigNameList Entity list.
pS->szExtractFile The path name of extract file.
pS->-pApiDFA The apiStruct set up for enum of entity list (if pS->sigNameList != NONE) and for querying data fromdatafile (data and status buffers allocated).
For more information, see “EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table)” on page173 and “Working with Data” on page 114.
Advanced Functions Alphabetical Reference 147
Variable Description
pS->pApiDFA->sigName Entity signature.
pS->pApiDFA-> u_Dfa.bAutoRecalc For more information, see “Working with Data” on page 114.
pS->fnEnumAcct Callback function to enumerate accounts. For more information, see “CALLBACKDBENUM ” on page311.
pS->lParamEnumAcct Your arguments for fnEnumAcct.
pS->fnStatusCB Callback function for status information (not used if DBE_REMOTE bit flag is set in pS->wExtractFlags).For more information, see “CALLBACKDBLOAD - For EntDataExtract( )” on page 314.
pS->lParamStatus The argument for fnStatusCB.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) At least one error occurred and they are listed in the error log for the application.
Be sure to set the point of view before calling EntDataExtract( ). For example:
wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURORGSIG,sigOrg);wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURCATEGORYSIG,sigCat);wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURNAMESIG,sigEntity);
Note: You must specify values for the pS->fnEnumAcct and pS->fnStatusCB fields.
EntDataExtractVB2( ) - Extract Data This function extracts data for the accounts in an account list or for all accounts. In some cases,you might need to select the ID_NAMELISTENTRY and ID_PSFDATA tables before callingEntDataExtractVB2( ).
Note: This function is intended for Visual Basic users, although other programmers can alsouse it.
Use this format:
Declare Function EntDataExtractVB2 Lib "heaccess.dll" Alias "_EntDataExtractVB@24" _(ByVal hSelect As Long, pArgs As DBEXTRACTSTRUCT, ByVal szExtractFile As String,ByVal sigList As Long, ByVal lpfnCallback As Long, ByVal lParam As Long) As Integer
148 Advanced Functions
Variable Description
hSelect The handle of the selected tables
pArgs Structure with arguments for the data extract. All fields are required except hProcess.
pArgs.dwSize The size of this structure
pArgs.cDelim The field delimiter, which typically is a comma( , )
pArgs.cNeg The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ]
pArgs.cScale Scale of the data
pArgs.cView Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category’s defaultview.
pArgs.wDecimals Number of decimal places to extract
pArgs.wDSMType Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if notID_REGULAR
pArgs.wExtractFlags Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h)
pArgs.wOperation Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE
pArgs.dDataBy Data to use with wOperation
pArgs.bDataFileOpened Data file is currently opened (TRUE or FALSE); input and output
pArgs.hProcess Process handle returned when executing on server (DBE_REMOTE)
pArgs.lStartPeriod The first period to extract (0-based)
pArgs.lEndPeriod The last period to extract (0-based)
pArgs.sigAcctConv The account conversion table signature
pArgs.sigCat The category signature
pArgs.sigName The entity signature.
pArgs.sigNameConv Entity conversion table signature
pArgs.sigParent Parent if wDSMType is not ID_REGULAR
pArgs.sigNameList Entity list
pArgs.pApiDFA The address of an apiStruct set up for enum of entity list (if pArgs.sigNameList != NONE) and for queryingdata from datafile (data & status buffers allocated).
For more information, see “EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table)” on page173 and “Working with Data” on page 114.
pArgs.pApiDFA.sigName Entity signature
pArgs.pApiDFA.u_Dfa.bAutoRecalc For more information, see “Working with Data” on page 114
szExtractFile The path\name of extract file
Advanced Functions Alphabetical Reference 149
Variable Description
sigList Signature of an account list; NONE for all accounts
lpfnCallback Your callback function for status information. For more information, see “CALLBACKVB” on page 321.
lParam Argument for your callback function
Internally, EntDataExtractVB2( ) makes a local copy of the filename string, so it does not matterif Visual Basic relocates the original during the callback function.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) At least one error occurred and they are listed in the error log for the application.
Example:
Dim s As DBEXTRACTSTRUCT Dim apiS As APISTRUCT lPer& = Val(per$)-1 sigAcctList& = HYP_NONE ‘If using an account list, select the table and get the signatureIf LenB(acctList$) Then ret% = EntSelectAdd(HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)sigAcctList& = EntFind0(hSelect&, HYP_ID_ACCTLIST, HYP_NONE, acctList$, 0)End If‘Set the options based on various check boxes flag% = 0If chkCalc.Value Then flag% = flag% Or DBE_CALC_ACCTSIf chkGlobal.Value Then flag% = flag% Or DBE_GLOBAL_ACCTSIf chkSupNoData.Value Then flag% = flag% Or DBE_SUPPRESS_NDIf chkSupZero.Value Then flag% = flag% Or DBE_SUPPRESS_ZEROIf chkDerived.Value Then flag% = flag% Or DBE_EXTRACT_DERIVED‘Set the apiStruct fields hApp& = HypGethApp(frmMain.ghRApp%) Call EntInitApiStruct(hApp&, apiS) apiS.sigName = sigEntity& apiS.u_Dfa.bAutoRecalc = 0‘Set the DBEXTRACTSTRUCT fieldss.dwSize = LenB(s)s.cDelim = Asc(",")s.cNeg = Asc("-")s.cScale = 255 'use NONE for defaults.cView = Asc(FORMVIEW_CAT)s.wDecimals = HYP_NONEs.wDSMType = ID_REGULARs.wExtractFlags = flag%s.wOperation = HYP_NONEs.dDataBy = -1 'data to use with wOperation.
150 Advanced Functions
s.bDataFileOpened = 0 'DataFile is currently opened (TRUE or FALSE); input and outputs.hProcess = 0 'Process handle returned when executing on server (DBE_REMOTE)s.lStartPeriod = lPer& 'first period to extract (0-based)s.lEndPeriod = lPer& 'last period to extract (0-based)s.sigAcctConv = HYP_NONE 'Account conversion table signatures.sigCat = sigCat& 'category signatures.sigName = sigEntity& 'entity signatures.sigNameConv = HYP_NONE 'Entity conversion table signatures.sigParent = HYP_NONE 'parent (if wDSMType is not ID_REGULAR)s.sigNameList = HYP_NONE 'Entity lists.fnEnumAcct = 0 'address of function to enumerate accounts (not used, just set to 0)s.lParamEnumAcct = 0 'your argument for fnEnumAcct functions.fnStatusCB = 0 'address of callback function for status information (not used, use lpfnCallback argument instead.)s.lParamStatus = 0 'your argument for fnStatusCB functions.pApiDFA = EntGetVarAddr(apiS) 'address of APISTRUCT; set signame field in apiStruct; EntDataExtract() may modify apiStructs.szExtractFile = 0 ‘Not used; use szExtractFile argument instead‘This example uses SpyWorks for the callback functionret% = EntDataExtractVB2(hSelect&, s, szFile$, sigAcctList&, cbkExtract.ProcAddress, 0)If LenB(acctList$) ThenhSelect& = EntUnSelect0(hSelect&, HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, 0, ret%, 0) End If...’The SpyWorks function callbackPrivate Sub cbkExtract_cbxLLL(lval1 As Long, lval2 As Long, lval3 As Long, retval As Long) Dim ret%, wLen% Dim szFile$ Dim args As CALLBACKSTRUCT'lval1 should really be 'ByVal szFile As String''Get szFile$ from lval1wLen% = EntVBGetCStrLen(lval1) szFile$ = Space(wLen%)ret% = EntVBCopyStr(szFile$, lval1, wLen%)'lval2 should really be 'args As CALLBACKSTRUCT''Get args from lval2 ret% = EntVBCopyData(args, lval2, LenB(args)) ret% = MyCallBack (szFile$, args, lval3) retval& = ret%EndSubFunction MyCallBack (szFile$, args As CALLBACKSTRUCT, ByVal lparam&) As Integer Dim szCat$, szEntity$, szMsg$) szMsg$ = "File: [" & szFile$ szCat$ = Space(HYP_SIZELABEL + 1) ret% = EntQueryExStr0(args.hSelect, HYP_ID_CATEGORY, HYP_NAME, args.sigCat, HYP_NONE, Len(szCat$), szCat$, 0) If ret% = 0 Then szCat$ = CToBStr(szCat$) szMsg$ = szMsg$ & "], Category: [" & szCat$ szEntity$ = Space(HYP_SIZEFULLNAME + 1) ret% = EntQueryExStr0(args.hSelect, HYP_ID_NAMES, HYP_NAME, args.sigEntity, HYP_NONE, Len(szEntity$), szEntity$, 0)
Advanced Functions Alphabetical Reference 151
If ret% = 0 Then szEntity$ = CToBStr(szEntity$) szMsg$ = szMsg$ & "], Entity: [" & szEntity$ szMsg$ = szMsg$ & "] Period " & Str(args.lStart) & " to Period " & Str(args.lEnd) ret% = MsgBox(szMsg$, vbOKOnly, "Now Extracting...") MyCallBack% = 0End Function
Note: EntFind0 ( ), EntQueryExStr0( ), and EntUnSelect0 ( ) in this example have declarationssimilar to EntFind( ), EntQueryExStr( ), and EntUnSelect( ), but are adjusted to allowpassing 0 in place of the apiStruct. For more information, see “Visual Basic ProgrammingNotes” on page 16.
Use this format for C:
EntDataExtractVB2(HSELECT hSelect, LPDBEXTRACTSTRUCT pArgs, LPCSTRszExtractFile, SIGNA sigList, CALLBACKVB lpfnCallback, LPARAM lParam);
EntDataFileOpen( ) - Open DatafileThis function selects the Datafile table for a specified entity, category, and parent. This functionmust be used for each category, entity combination. The Datafile table stores the account valuesfor each period for the specified category, entity. Call EntUnSelect( ) to deselect this table whenyou are finished using it.
Warning: Do not select the ID_TRANSLATION_FORCE type of datafile table if there is apossibility that the ID_REGULAR datafile table may already be selected for the specified categoryand entity. Similarly, do not select the ID_REGULAR type of datafile table if theID_TRANSLATION_FORCE type may already be selected.
Use this format:
Declare Function EntDataFileOpen Lib "heaccess.dll" Alias "_EntDataFileOpen@28" (ByValhSelect As Long, ByVal wType As Integer, ByVal sigCat As Long, ByVal SigEntity As Long, ByValsigParent As Long, ByVal wAttr As Integer, ByVal bCreate As Integer) As Integer
Variable Description
hSelect The handle of the selected tables
wType See the following table
sigCat The category signature
sigEntity The entity signature
sigParent NONE if wType = ID_REGULAR, otherwise the parent signature.
152 Advanced Functions
Variable Description
wAttr How you want to lock the data file. Use one of the following codes:
l APILOCK_READONLY to open table read-only
l APILOCK_READWRITE to open table for update
l APILOCK_DEFAULT to open read-write preferably, but read-only is acceptable
bCreate TRUE to create the datafile if it does not exist, otherwise FALSE.
Field wType Description
ID_ADJUSTMENT Adjustments
ID_CONTRIBUTION Contribution
ID_ELIMINATION Elimination
ID_PROPORTIONAL Proportion
ID_REGULAR Standard table
ID_ROLLOVERS Rollovers
ID_TRANSLATION Translations
ID_TRANSLATION_FORCE Translation or child if same currency
Return Codes:
Code Meaning
wAttr Returns the actual rights granted
NONE Error occurred
APILOCK_MULTIUSER Selected as read-only due to multiuser
Example:
rc% = EntDataFileOpen(hSelect&, ID_REGULAR, sigCat&, SigEntity&, HYP_NONE, APILOCK_READONLY, False)
Use this format for C:
short WINAPI EntDataFileOpen(HSELECT hSelect, WORD wType, SIGNA sigCat, SIGNAsigEntity, SIGNA sigParent, short wAttr, BOOL bCreate);
EntDateConv( ) - Date Conversion and Calculate PeriodNumberGiven a period in one category (the reference category), EntDateConv( ) calculates thecorresponding period in another category and frequency (the base category and frequency).
Advanced Functions Alphabetical Reference 153
Select the reporting frequencies and reporting views tables (ID_RPTFREQ and ID_RPTVIEW)before calling this function.
Use this format:
Declare Function EntDateConv Lib "heaccess.dll" Alias "_EntDateConv@28" (ByVal hSelectAs Long, ByVal wMethod As Integer, ByVal szRefCat As String, ByVal szRefPeriod As String,ByVal iOffset As Integer, ByVal szFreq As String, ByVal szBaseCat As String) As Long
Variable Description
hSelect The handle of the selected tables
wMethod DCONV_CMO for the current period ignoring the year, or DCONV_CUR for the current period
szRefCat The reference category ID
szRefPeriod The reference period (a period in the reference category)
iOffset The number of the period offset from the reference period
szFreq The ID of the base reporting frequency. For more information about reporting frequencies and views, see “Frequencies andViews” on page 20.
szBaseCat The base category ID
Return Codes:
Code Meaning
Period number Successful
BAD_PERIOD Error occurred
Example:
sigPeriod& = EntDateConv(hSelect&, DCONV_CUR, "ACTUAL", "JAN 03", 0, "MON", "LASTYR")
Use this format for C:
SIGNA WINAPI EntDateConv(HSELECT hSelect, short wMethod, char * szRefCat, char *szRefPeriod, short iOffset, char * szFreq, char * szBaseCat);
EntDeleteFromCBChain( ) - Delete from Callback ChainThis function deletes a callback function from the chain of callback functions associated withthe hSelect argument variable. For more information, see “Selection Callbacks” on page 112.
Use this format:
Declare Function EntDeleteFromCBChain Lib "heaccess.dll" Alias"_EntDeleteFromCBChain@12" (ByVal hSelect As Long, ByVal lpCallback As Long, ByVallParam As Long) As Integer
154 Advanced Functions
Variable Description
hSelect The handle of the selected tables
lpCallback The callback function you want to delete from the chain
lParam The argument for the IpCallback function. This must be the argument that was specified when you added the callback functionto the chain of callback functions.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntDeleteFromCBChain(HSELECT hSelect, CALLBACKSEL lpCallback,LONG lParam);
EntDiscardChanges( ) - Discard ChangesThis function discards changes made to one or more tables by EntUpdate( ) orEntUpdateDefault( ). Call this function before calling EntSave( ) or EntSaveDefault( ).
Use this format:
Declare Function EntDiscardChanges Lib "heaccess.dll" Alias "_EntDiscardChanges@16"(ByVal hSelect As Long, ByVal wTabId As Integer, ByVal sigKey As Long, apiS As APISTRUCT)As Integer
Variable Description
hSelect The handle of the selected tables
wTabID The table ID or NONE for all tables in hSelect. This can be any of the valid table IDs listed in Appendix A, “Table IDs.”
sigKey NONE, or the key of a related table. For more information, see “Related Tables” on page 363.
apiS NULL, or a pointer to an apiStruct
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
Advanced Functions Alphabetical Reference 155
short WINAPI EntDiscardChanges(HSELECT hSelect, short wTabID, SIGNA sigKey,LPAPISTRUCT pApiS);
EntDiscardDefault( ) - Discard DefaultThis function discards changes made to default settings by EntUpdateDefault( ). Call thisfunction before calling EntSaveDefault( ) or you cannot discard your changes.
Use this format:
Declare Function EntDiscardDefault Lib "heaccess.dll" Alias "_EntDiscardDefault@8" (ByValhApp As Long, ByVal wTabId As Integer) As Integer
Variable Description
hApp The application handle
wTabId The table ID, such as ID_APPDEFAULT or ID_USERDEFAULT. For more information, see “Tables of Default Settings” on page361.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntDiscardDefault(HAPP hApp, short wTabId);
EntDSMDataExtract( ) - Extract DSM DataThis function extracts consolidation detail from C. The tables selected are ID_NAMELISTENTRY and ID_PSFDATA.
Note: VB programmers should use EntDSMDataExtractVB( ) to extract consolidation detail.
Use this format for C:
short WINAPI EntDSMDataExtract(HSELECT hSelect, LPDBEXTRACTSTRUCT pS,LPDSMEXTRACT pDsm)
Variable Description
hSelect The handle of the selected tables
pS Pointer to struct with arguments for the data extract. All fields are required except hProcess.
156 Advanced Functions
Variable Description
pS->dwSize The size of this structure
pS->cDelim The field delimiter, which typically is a comma( , )
pS->cNeg The negative delimiter, which typically is a dash or apostrophe (- or ‘)
pS->cScale Scale of the data
pS->cView Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category's defaultview.
pS->wDecimals Number of decimal places to extract
pS->wDSMType Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if notID_REGULAR
pS->wExtractFlags data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h)
pS->wOperation FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE
pS->dDataBy Data to use with wOperation
pS->bDataFileOpened Data file is currently opened (TRUE or FALSE); input and output
pS->hProcess Process handle returned when executing on server (DBE_REMOTE)
pS->lStartPeriod The first period to extract (0-based)
pS->lEndPeriod The last period to extract (0-based)
pS->sigAcctConv The account conversion table signature
pS->sigCat The category signature
pS->sigName The entity signature
pS->sigNameConv Name conversion table signature
pS->sigParent Parent for wDSMType
pS->sigNameList Entity list
pS->szExtractFile The path name of extract file
pS->-pApiDFA The apiStruct set up for enum of entity list (if pS->sigNameList != NONE) and for querying data fromdatafile (data and status buffers allocated)
pS->pApiDFA->sigName Entity signature
pS->pApiDFA->u_Dfa.bAutoRecalc See “Working with Data” on page 114.
pS->fnEnumAcct Callback function to enumerate accounts. For more information, see “CALLBACKDBENUM ” on page311.
pS->lParamEnumAcct Your arguments for fnEnumAcct
Advanced Functions Alphabetical Reference 157
Variable Description
pS->fnStatusCB Callback function for status information (not used if DBE_REMOTE bit flag is set in pS->wExtractFlags).For more information, see “CALLBACKDBLOAD - For EntDataExtract( )” on page 314.
pS->lParamStatus The argument for fnStatusCB
pDsm Structure with arguments for dsm extract
pDsm->dwSize Size of this structure
pDsm->wExtractFlags Data extract options flag.
Use a combination of any or all of these values:
DBE_DSM_TRANS Extract translation data
DBE_DSM_PROP Extract proportion data
DBE_DSM_CONTRIB Extract contribution data
DBE_DSM_ELIM Extract elimination data
DBE_DSM_TOPADJ Extract parent adjustment data
pDsm->cSeperator Field delimiter (Default '|') used when extracting consolidation detail
pDsm->bXAFormat Extract using format(one field concatenated) or External format (three fields)
pDsm->bAllDeps Extract consolidation detail for all dependents. If not use list of immediate dependents.
pDsm->bAllImmedDeps Extract consolidation detail for all dependents. If not use list of immediate dependents.
pDsm->iSelectedDependents Number of dependents selected
pDsm->lpSelectedDepSigs List of selected dependents
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) At least one error occurred and they are listed in the error log for the application.
EntDSMDataExtractVB( ) - Extract DSM DataThis function extracts consolidation detail from VB. The tables selected are ID_NAMELISTENTRY and ID_PSFDATA.
Note: C programmers should use EntDSMDataExtract( ) to extract consolidation detail.
Use this format:
158 Advanced Functions
Declare Function EntDSMDataExtractVB Lib "heaccess.dll" Alias"_EntDSMDataExtractVB@28" _ (ByVal hSelect As Long, pArgs As DBEXTRACTSTRUCT,ByVal szExtractFile As String, ByVal sigList As Long, _ ByVal lpfnCallback As Long, ByVallParam As Long, dsm As DSMDBEXTRACTSTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables
pArgs Structure with arguments for the data extract. All fields are required except hProcess.
pArgs.dwSize The size of this structure
pArgs.cDelim The field delimiter, which typically is a comma( , )
pArgs.cNeg The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ]
pArgs.cScale Scale of the data.
pArgs.cView Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category’s defaultview.
pArgs.wDecimals Number of decimal places to extract
pArgs.wDSMType Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if notID_REGULAR
pArgs.wExtractFlags Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h)
pArgs.wOperation Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE
pArgs.dDataBy Data to use with wOperation
pArgs.bDataFileOpened Data file is currently opened (TRUE or FALSE); input and output
pArgs.hProcess Process handle returned when executing on server (DBE_REMOTE)
pArgs.lStartPeriod The first period to extract (0-based)
pArgs.lEndPeriod The last period to extract (0-based)
pArgs.sigAcctConv The account conversion table signature
pArgs.sigCat The category signature
pArgs.sigName The entity signature
pArgs.sigNameConv Entity conversion table signature
pArgs.sigParent Parent if wDSMType is not ID_REGULAR
pArgs.sigNameList Entity list
pArgs.pApiDFA The address of an apiStruct set up for enum of entity list (if pArgs.sigNameList != NONE) and for queryingdata from datafile (data & status buffers allocated)
pArgs.pApiDFA.sigName Entity signature
Advanced Functions Alphabetical Reference 159
Variable Description
pArgs.pApiDFA.u_Dfa.bAutoRecalc See “Working with Data” on page 114.
szExtractFile The path name of extract file
sigList Signature of an account list; NONE for all accounts
lpfnCallback Your callback function for status information. For more information, see “CALLBACKVB” on page 321.
lParam Argument for your callback function
dsm Structure with arguments for dsm extract
dsm.dwSize Size of this structure
dsm.wExtractFlags Data extract options flag.
Use any or all of these values:
DBE_DSM_TRANS Extract translation data
DBE_DSM_PROP Extract proportion data
DBE_DSM_CONTRIB Extract contribution data
DBE_DSM_ELIM Extract elimination data
DBE_DSM_TOPADJ Extract parent adjustment data
dsm.cSeperator Field delimiter (Default '|') used when extracting consolidation detail.
dsm.bXAFormat Extract using format (one field concatenated) or External format (3 fields).
dsm.bAllDeps The extract consolidation detail for all dependents. If not use list of immediate dependents.
dsm.bAllImmedDeps The extract consolidation detail for all immediate dependents. If not use list of immediate dependents.
dsm.iSelectedDependents Number of dependents selected. Use if both dsm.bAllDeps and dsm.bAllImmedDeps are false.
dsm.lpSelectedDepSigs List of selected dependents.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) At least one error occurred and they are listed in the error log for the application.
Example:
Private Sub DSMExtractDim acctList$, entity$, cat$, per$, szFile$Dim sigEntity&, sigCat&, sigAcctList&, lPer&, sigFreq&Dim s As DBEXTRACTSTRUCT
160 Advanced Functions
Dim hApp&, hSelect&Dim flag%, ret%Dim apiS As apiStructDim sigArr(4) As LongDim dsm As DSMDBEXTRACTSTRUCTszFile$ = RTrim(txtFilename.Text)cat$ = RTrim(frmMain.lblCat.Caption)entity$ = RTrim(frmMain.lblEntity.Caption)per$ = RTrim(frmMain.lblPer.Caption)If frmMain.ghRApp% = 0 Or LenB(entity$) = 0 Or LenB(cat$) = 0 Or LenB(per$) = 0 Or LenB(szFile$) = 0 Thenret% = MsgBox("Please select application, category,entity, period, and filename first.", vbOKOnly, "Error!")Exit SubEnd IfhSelect& = HypGethSelect(frmMain.ghRApp%)sigCat& = EntFind0(hSelect&, HYP_ID_CATEGORY, HYP_NONE, cat$, 0)sigEntity& = EntFind0(hSelect&, HYP_ID_NAMES, HYP_NONE, entity$, 0)lPer& = Val(per$) - 1acctList$ = RTrim(frmMain.lblAcctList.Caption)sigAcctList& = HYP_NONEIf Len(acctList$) Then ret% = EntSelectAdd(HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, _ 0, 0, 0, 0) sigAcctList& = EntFind0(hSelect&, HYP_ID_ACCTLIST, HYP_NONE, acctList$, 0)End Ifflag% = 0If chkCalc.Value Then flag% = flag% Or DBE_CALC_ACCTSIf chkGlobal.Value Then flag% = flag% Or DBE_GLOBAL_ACCTSIf chkSupNoData.Value Then flag% = flag% Or DBE_SUPPRESS_NDIf chkSupZero.Value Then flag% = flag% Or DBE_SUPPRESS_ZEROIf chkDerived.Value Then flag% = flag% Or DBE_EXTRACT_DERIVEDhApp& = HypGethApp(frmMain.ghRApp%)Call EntInitApiStruct(hApp&, apiS)apiS.sigName = sigEntity&apiS.u_Dfa.bAutoRecalc = 0s.dwSize = LenB(s)s.cDelim = Asc(",")s.cNeg = Asc("-")s.cScale = 255 'use NONE for defaults.cView = Asc(FORMVIEW_CAT)s.wDecimals = HYP_NONEs.wDSMType = ID_REGULARs.wExtractFlags = flag%s.wOperation = HYP_NONEs.dDataBy = -1 'data to use with wOperation.s.bDataFileOpened = 0 'DataFile is currently opened (TRUE or FALSE); input and outputs.hProcess = 0 'Process handle returned when executing on server (DBE_REMOTE)s.lStartPeriod = lPer& 'first period to extract (0-based)s.lEndperiod = lPer& 'last period to extract (0-based)s.sigAcctConv = HYP_NONE 'Account conversion table signatures.sigCat = sigCat& 'category signature
Advanced Functions Alphabetical Reference 161
s.sigName = sigEntity& 'entity signatures.sigNameConv = HYP_NONE 'Entity Conversion Table signatures.sigParent = HYP_NONE 'parent (if wDSMType is not ID_REGULAR)s.sigNameList = HYP_NONE 'Entity lists.fnEnumAcct = 0 'address of function to enumerate accountss.lParamEnumAcct = 0 'your argument for fnEnumAcct functions.fnStatusCB = 0 'address of callback function for status informations.lParamStatus = 0 'your argument for fnStatusCB functions.pApiDFA = EntGetVarAddr(apiS) 'address of APISTRUCT; set signame field in apiStruct; EntDataExtract() may modify apiStructdsm.dwSize = LenB(dsm)dsm.wExtractFlags = 0dsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_TRANSdsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_PROPdsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_CONTRIBdsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_ELIMdsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_TOPADJdsm.cSeperator = Asc("|")dsm.bXAFormat = 1dsm.bAllDeps = 0dsm.bAllImmedDeps = 0' Set entity list signaturesdsm.iSelectedDependents = 4sigArr(0) = 14sigArr(1) = 15sigArr(2) = 16sigArr(3) = 18dsm.lpSelectedDepSigs = EntGetVarAddr(sigArr(0))ret% = EntDSMDataExtractVB(hSelect&, s, szFile$, sigAcctList&, AddressOf DataExtractCallback, 0, dsm)ret% = MsgBox("Data extracted, return code = " & str(ret%), vbOKOnly, "Data Extract")'If Len(acctList$) Then hSelect& = EntUnSelect0(hSelect&, HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, 0, ret%, 0)End IfUnload MeEnd Sub
Use this format in C:
short WINAPI EntDSMDataExtractVB(HSELECT hSelect, LPDBEXTRACTSTRUCT pArgs,LPCSTR szExtractFile, SIGNA sigList, CALLBACKVB lpfnCallback, LPARAM lParam,LPDSMDBEXTRACTSTRUCT lpDsm);
EntEntityAsk( ) - Select EntityThis function is used to display an entity selection box and retrieve the entity you select. If youselect Cancel, no entity is retrieved.
Use this format:
162 Advanced Functions
Declare Function EntEntityAsk Lib "heaccess.dll" Alias "_EntEntityAsk@8" (ByVal hSelect AsLong, ByVal szRetbuf As String) As Integer
Variable Description
hSelect The handle of the selected tables
szRetbuf The buffer to return the ID of the selected entity. The buffer should be large enough for at least HYP_SIZEFULLNAME+1(SIZEFULLNAME+1 in C) characters.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szEntity$ = Space (HYP_SIZEFULLNAME +1)ret% = EntEntityAsk(hSelect&, szEntity$)If ret% = 0 Then szEntity = CToBStr(szEntity$)
Use this format for C:
short WINAPI EntDSMDataExtract(HSELECT hSelect, LPDBEXTRACTSTRUCT pArgs,SIGNA sigList, CALLBACKVB lpfnCallback, LPARAM lParam,LPDSMDBEXTRACTSTRUCT lpDsm);
EntEntityListAsk( ) - Select Entity ListThis function is used to display an entity list selection box and retrieve the entity list you select.If you select Cancel, no entity list is retrieved.
Use this format:
Declare Function EntEntityListAsk Lib "heaccess.dll" Alias "_EntEntityListAsk@8" (ByValhSelect As Long, ByVal szRetbuf As String) As Integer
Variable Description
hSelect The handle of the selected tables
szRetbuf The buffer to return the ID of the selected entity list. The buffer should be large enough for at least HYP_SIZELABEL+1 (SIZENAME+1 in C) characters.
Return Codes:
Code Meaning
0 Successful
Advanced Functions Alphabetical Reference 163
Code Meaning
NONE Error occurred
Example:
szEntityList$ = Space (HYP_SIZELABEL +1)ret% = EntEntityListAsk(hSelect&, szEntityList$)If ret% = 0 Then szEntityList$ = CToBStr(szEntityList$)
Use this format for C:
short WINAPI EntEntityListAsk(HSELECT hSelect, LPSTR szRetbuf);
EntEntityListLock( ) - Lock DataThis function locks data for an entity list. EntEntityListLock() utilizes an optional callbackfunction, which the API will call to report the status of the routine. You should have one of thedefault tables selected prior to calling EntEntityListLock().
Use this format:
Declare Function EntEntityListLock Lib "heaccess.dll" Alias "_EntEntityListLock@12" (ByValhSelect As Long, lpLockData As EListLockStruct, ByVal lpApiStruct As ApiStruct) As Integer
Variable Description
hSelect The handle of the selected tables
lpLockData The structure with arguments for the routine
lpLockData.dwSize The size of this structure
lpLockData.sigNameList The signature of the entity list to lock
lpLockData.dwFlags Option Bit Flags. Currently only DB_REMOTE to denote server processing.
lpLockData.sigCat Category signature
lpLockData.lStartPeriod Zero-based start period
lpLockData.lEndPeriod Zero-based end period
lpLockData.sigNameOpenDatafile Denotes that the datafile has been opened and is read-write with this signature, and that the API doesnot need to open the datafile with this signature.
lpLockData.fnCallBack The callback function for status or NULL. This is used only when not executing on a server.
lpLockData.lParam The argument for fnCallBack
lpLockData.lNthStatusCallback The API will call fnCallBack every nth entity
lpLockData.hProcess The handle of the task status window process. This returns the process handle when executing on theserver.
IpApiStruct NULL. This argument is for API compatibility.
164 Advanced Functions
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) Errors occurred and they are listed in the error log for the application.
Use this format for C:
Short WINAPI EntEntityListLock(HSELECT hSelect, LPELISTLOCKSTRUCT lpLockData,LPAPISTRUCT lpApiStruct);
Example:
Private Sub EntityListLock(sigCat&, lStartPeriod&,lEndPeriod&, sigEntityList&, bServer As Boolean)hSelect& = HypGethSelect(frmMain.ghRApp%)Dim ELockStruct As EListLockStruct ELockStruct.dwSize = LenB(ELockStruct) ELockStruct.sigNameList = sigNameList& ELockStruct.dwFlags = 0 ELockStruct.sigCat = sigCat& ELockStruct.lStartPeriod = lStartPeriod& ELockStruct.lEndperiod = lEndPeriod& ELockStruct.lNthStatusCallBack = 5 ' Callback every 5th entity ELockStruct.sigNameOpenDatafile = HYP_NONE ELockStruct.fnCallBack = FuncPtrToLong(AddressOf cbEntityListLock) ELockStruct.lParam = 666 'Dummy paramater for display ELockStruct.hProcess = 0If bServer Then ELockStruct.dwFlags = ELockStruct.dwFlags Or DB_REMOTE End If If chkUnlock.Value Then rc% = EntEntityListUnLock0(hSelect&, ELockStruct,0) Else rc% = EntEntityListLock0(hSelect&, ELockStruct,0) End If End SubPublic Function cbEntityListLock(ByVal szCategory As Long, _ ByVal szName As Long, ByVal lStartPer As Long, _ ByVal lEndPer As Long, ByVal lCurrPer As Long, _ ByVal lNumEntities As Long, _ ByVal lCurEntity As Long, _ ByVal lParam As Long) As Integer Dim szCaption$ Dim ret%, wLen% Dim szMsg As String Dim strCat$, strName$ wLen% = EntVBGetCStrLen(szCategory) strCat$ = Space(wLen%) ret% = EntVBCopyStr(strCat$, szCategory, wLen%)
Advanced Functions Alphabetical Reference 165
wLen% = EntVBGetCStrLen(szName) strName$ = Space(wLen%) ret% = EntVBCopyStr(strName$, szName, wLen%) szCaption$ = "Now Processing at period " & str(lCurrPer) & " " & str(lCurEntity) _ & "th entity of " & str(lNumEntities) & " Lparam = " & str(lParam)frmEntityListLock.List1.AddItem (szCaption$) ret% = MsgBox(strName$, vbOKOnly, strCat$ & " from " & str(lStartPer) & " to " & str(lEndPer)) ret% = 0End Function
Note: EntEntityListLock0 () and EntEntityListUnlock0 () in this example have declarationssimilar to EntEntityListLock () and EntEntityListUnlock () but are adjusted to allowpassing 0 in place of the apistruct. For more information, see “Visual Basic ProgrammingNotes” on page 16.
EntEntityListUnLock( ) - Unlock DataThis function unlocks data for an entity list. EntEntityListUnLock() utilizes an optional callbackfunction, which the API will call to report the status of the routine. You should have one of thedefault tables selected prior to calling EntEntityListUnLock().
Use this format:
Declare Function EntEntityListUnLock Lib "heaccess.dll" Alias "_EntEntityListUnlock@12"(ByVal hSelect As Long, lpLockData As EListUnLockStruct, ByVal IpApiStruct As ApiStruct) AsInteger
Variable Description
hSelect The handle of the selected tables
lpUnLockData The structure with arguments for the routine
lpUnLockData.dwSize The size of this structure
lpUnLockData.sigNameList The signature of the entity list to unlock
lpUnLockData.dwFlags Option Bit Flags; currently only DB_REMOTE to denote server processing
lpUnLockData.sigCat Category signature
lpUnLockData.lStartPeriod Zero-based start period
lpUnLockData.lEndPeriod Zero-based end period
lpUnLockData.sigNameOpenDatafile Denotes that the datafile has been opened and is read-write with this signature, and that the API doesnot need to open the datafile with this signature.
lpUnLockData.fnCallBack The callback function for status if not executing on a server, or NULL. This is used only when notexecuting on a server.
lpUnLockData.lParam The argument for fnCallBack
166 Advanced Functions
Variable Description
lpUnLockData.lNthStatusCallback The API calls fnCallBack every nth entity.
lpUnLockData.hProcess The handle of the task status window process. This returns the process handle when executing on theserver.
lpApiStruct NULL. This argument is not used.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) Errors occurred and they are listed in the error log for the application.
Use this format for C:
Short WINAPI EntEntityListUnLock(HSELECT hSelect, LPELISTLOCKSTRUCT lpLockData,LPAPISTRUCT lpApiStruct);
For an example, see “EntEntityListLock( ) - Lock Data” on page 164.
EntEnum( ) - Enumerate Records in a TableThis function enumerates the signatures of all records in a specified table using a user-providedcallback function. For each record in the table wTabId, EntEnum( ) passes the record signatureto the specified callback function. You can stop the enumeration by returning a non-zero valuefrom the callback function.
For many tables, you can filter the enumeration by setting api’s, u_ApiEnum.dwMask to specificconstants appropriate for the table. Look in ToolInc.h for the constants.
Tip: Pass NULL for the api’s argument unless you really need an apistruct for the particular tableor are trying to filter the enumeration. Otherwise, the API may think you are trying to filterthe enumeration and may find that no records meet the criteria you unintentionallyspecified.
Use this format:
Declare Function EntEnum Lib "heaccess.dll" Alias "_EntEnum@24" (ByVal hSelect As Long,ByVal wTabId As Integer, ByVal sigKey As Long, ByVal lpCallback As Long, ByVal lParam AsLong, apiS As APISTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables
Advanced Functions Alphabetical Reference 167
Variable Description
wTabId The table for which signatures are enumerated. It can be of the valid table IDs listed in the missing link.
sigKey NONE or the key of a related table. This is a required key if wTabId is a related table. For more information, see the “RelatedTables” on page 363.
lpCallBack A pointer to a user-provided callback function. For more information, see “CALLBACKAPI” on page 309.
lParam The Parameter to be passed back to the user-provided callback function (lpCallBack)
apiS NULL or a pointer to an apiStruct
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Other value Value returned from your callback function
Example:
rc% = EntEnum0(hSelect&, HYP_ID_ACCTLISTENTRY, SigList&, AddressOf MyCallBackFunc, 0, 0)
EntEnum0() is declared just like EntEnum() except the declaration is adjusted to allow passing0 in place of the apiStruct. For more information, see “Visual Basic Programming Notes” onpage 16.
Use this format for C:
short WINAPI EntEnum(HSELECT hSelect, short wTabId, SIGNA sigKey, CALLBACKAPIlpCallBack, LONG lParam, LPAPISTRUCT pApiS);
The following sections describe how to use EntEnum( ) with specific Hyperion Enterprise tables.
EntEnum( ) and ID_ACCTLISTENTRY (Account List Entries Table)The signature passed to your callback function is an account signature (table ID_ACCOUNTS)if the list is a dynamic list. However, if the account list is a fixed list, the signature is the signatureof a record in the Account List Entries table (ID_ACCTLISTENTRY). You can callEntQueryEx( ) with query attribute ENTRY_SIG (table ID_ACCTLISTENTRY) to get theaccount signature. You can call EntQueryEx( ) for the Account List table (ID_ACCTLIST) usingquery attribute LIST_TYPE to find out if the list is dynamic or fixed. For an example, see“HypEnumAcctListEntriesEx( ) - Enumerate Accounts in Account List” on page 85.
When you enumerate the account list entries, the sigRecd and sigKey arguments to the callbackfunction are reversed. The first signature is the list signature. The second signature is the entrysignature for a fixed list, or the account signature for a dynamic list.
When you call EntEnum() to enumerate table ID_ACCTLISTENTRY for a dynamic accountlist:
168 Advanced Functions
l If your callback function returns ACCTLIST_DONTEXPANDSUBS (defined in Toollnc.h),EntEnum() will not enumerate the subaccounts (if any) for that account (the account thatwas passed to your callback function).
l In the apiStruct (if any) passed to your callback function, the u_ApiEnum.dwMask fieldindicates the indent level: 0 for a major account, 1 for a first-level sub-account, 2 for thesecond level (subsubaccount).
EntEnum( ) and ID_CODESWhen enumerating table ID_CODES, you can filter account codes or entity codes. To use thisoption, you have to initialize an apiStruct and set its u_ApiEnum.dwMask field to eitherCODE_TYPE_ACCOUNT or to CODE_TYPE_ENTITY.
Example:
EntInitApiStruct(hApp, apiS)apiS.u_ApiEnum.dwMask = CODE_TYPE_ACCOUNT 'CODE_TYPE_ENTITY is the other choice.nRet = EntEnum(hSelect, HYP_ID_CODES, HYP_NONE, AddressOf EnumCodesCallBack, lParam, apiS)
If you do not wish to filter the results, do not pass an apiStruct to EntEnum( ). Alternatively,you can use HypEnumEx( ) to enumerate the ID_CODES table.
EntEnum() and ID_DATAFILEWhen you use EntEnum() to enumerate the records in a datafile table, it normally checkssecurity, skips any totally blank records (no data in any period), and skips any old records forwhich the account has been changed to a dynamic view account.
The u_ApiEnum.dwMask field in the apiStruct specifies an optional filter for skipping particulartypes of records. Set this field to 0 or any of the following constants (see definitions in ToolInc.h).You can use the bit-wise or operator to combine any number of the options in Table 42.
Table 42 EntUnum() Options
Option Description
DF_FILTOUT_INP Skips any account that does not have a logic statement. It does not test logic statements to see if logic makes anaccount an input account.
DF_FILTOUT_CALC Skips any account that has a logic statement, unless the logic statement makes it an input account. It does notskip other kinds of calculated accounts, such as major accounts that are the sum of their subaccounts, or accountsin the global account group when the entity isn't the global entity.
DF_FILTOUT_LINP Skip accounts that have a logic statement that specifically makes them an input account.
DF_FILTOUT_LOGIMP Skip accounts with implied logic, such as major accounts that are the sum of their subaccounts.
DF_FILTOUT_NODATA
Skip accounts that have no data in the specified periods. You must set the lStartPeriod and lEndPeriod fields inthe apiStruct.
Advanced Functions Alphabetical Reference 169
Option Description
DF_FILTOUT_NODATA_FROM_PER0
Skip accounts that have no data from the first period (period 0) through the period specified in the lEndPeriodfield in the apiStruct. This is the same as DF_FILTOUT_NODATA except that it uses 0 for the start period regardlessof what is in the lStartPeriod field in the apiStruct.
EntEnum() passes to your callback function the same sigKey, lParam, and apiStruct argumentsthat you passed to EntEnum().
EntEnum( ) and ID_INTCODET (Intercompany Detail Table)Set the sigKey argument to the signature of the intercompany matching set in table ID_ICSET.This enumerates the detail records in that set. You can also set sigKey to HYP_NONE (NONEin C) to enumerate the detail records of all sets.
EntEnum( ) and ID_JOURNALS (Journals Table)The sigKey argument should be HYP_NONE (NONE in C). Set up an apiStruct with the fieldsshown in Table 43.
Table 43 EntEnum() apiStruct Fields - Jourals Table
Field Description
sigCat The category signature.
lStartPeriod The period number.
lEndPeriod The period number (same as lStartPeriod).
u_ApiEnum.dwMask 0 to enumerate all.
To enumerate all journals for the specified category and period, set the mask field in the apiStruct(u_ApiEnum.dwMask) to 0, which is the default value. You can also enumerate only the journalsthat meet specific criteria by setting the mask field to indicate which journals to include. Themask is broken down into three parts: the mask for journal status, the mask for journal type,and the mask for journal attribute. If you want to specify a mask for the enumeration, your maskmust include each of these parts. For example, if you want to filter on journal status, you mustspecify a mask for type and attribute as well. If a mask is specified and one of its components iszero, the enumeration will not run.
Example:
Dim apiS As APISTRUCTCall EntInitApiStruct(hApp&, apiS)apiS.sigCat = sigCatapiS.lStartPeriod = PeriodNum&apiS.lEndPeriod = PeriodNum&'enumerate all journals (for this category and period)apiS.u_ApiEnum.dwMask = 0
170 Advanced Functions
ret% = EntEnum(hSelect&, HYP_ID_JOURNALS, HYP_NONE, callback.ProcAddress, lParam&, apiS)'enumerate all regular journals that are both posted andbalancedapiS.u_ApiEnum.dwMask = JOURMASK_STATUS_POSTED OrJOURMASK_TYPE_REGULAR Or JOURMASK_ATTRIB_BALANCEDret% = EntEnum(hSelect&, HYP_ID_JOURNALS, HYP_NONE, callback.ProcAddress, lParam&, apiS)'enumerate all autoreversing journals in specifiedcategory and period.apiS.u_ApiEnum.dwMask = JOURMASK_TYPE_AUTOREVERSING Or JOURMASK_ALL_STATUS Or JOURMASK_ALL_ATTRIBret% = EntEnum(hSelect&, HYP_ID_JOURNALS, HYP_NONE, callback.ProcAddress, lParam&, apiS)'this mask would not work -all journals have an attribute,and 'the attribute mask is set to zero, so no journals pass thetest.apiS.u_ApiEnum.dwMask = JOURMASK_TYPE_AUTOREVERSING or JOURMASK_ALL_STATUS
EntEnum( ) and ID_JOURNAL_DETAIL (Journals Detail Table)Set the sigKey argument to the signature of the journal to which the detail applies. Thisenumerates all entries in the detail table for that particular journal. Set up an apiStruct with thefields shown in Table 44.
Table 44 EntEnum() apiStruct Fields - Journals Detail Table
Field Description
sigCat The category signature.
u_ApiEnum.sigJournal The signature of either the journal or the first detail record for the journal.
u_ApiEnum.sJournalTableID The table ID to which sigJournal applies.
u_ApiEnum.dwMask Not used (no filtering).
EntEnum() apiStruct Fields - Journals Detail TableExample:
Dim apiS As APISTRUCTCall EntInitApiStruct(hApp&, apiS)apiS.sigCat = sigCatapiS.u_ApiEnum.sigJournal = sigJournalapiS.u_ApiEnum.sJournalTableID = HYP_ID_JOURNALSret% = EntEnum(hSelect&, HYP_ID_JOURNAL_DETAIL, sigJournal, callback.ProcAddress, lParam&, apiS)'or ...apiS.u_ApiEnum.sigJournal = sigFirstJournalDetailapiS.u_ApiEnum.sJournalTableID = HYP_ID_JOURNAL_DETAILret% = EntEnum(hSelect&, HYP_ID_JOURNAL_DETAIL, sigJournal, callback.ProcAddress, lParam&, apiS)
Advanced Functions Alphabetical Reference 171
EntEnum( ) and ID_JOURNAL_HISTORY_DETAIL (Journals History DetailTable)Set the sigKey argument to the signature of the journal to which the history applies. Thisenumerates all entries in the journals history table for that particular journal. Set up an apiStructwith the fields shown in Table 45.
Table 45 EntEnum() apiStruct Fields - Journals History Detail Table
Field Description
sigCat The category signature.
u_ApiEnum.sigJournal The signature of either the journal or the first history.
u_ApiEnum.sJournalTableID The table ID to which sigJournal applies.
u_ApiEnum.dwMask Not used (no filtering).
For more information, see “Using an apiStruct Structure” on page 110.
All entries for a given journal are enumerated if the journal's signature is specified in the apiStructwith its table ID. All entries for a given journal are enumerated if the signature of the first historyrecord for the journal is specified in u_ApiEnum.sigJournal in the apiStruct. Ifu_ApiEnum.sigJournal is set to NONE, the entire table is enumerated.
EntEnum( ) and ID_JOURNAL_TEMPLATES (Journals Template Table)The sigKey argument should be HYP_NONE (NONE in C). Set up an apiStruct with the fieldsshown in the following table.
Table 46 EntEnum() apiStruct Fields - Journals Template Table
Field Description
sigCat The category signature.
u_ApiEnum.dwMask 0 to enumerate all.
For more information, see “Using an apiStruct Structure” on page 110.
To enumerate all journal templates for the specified category, set the u_ApiEnum.dwMask fieldin the apiStruct to 0, which is the default value. Alternatively, you can enumerate only the journaltemplates that meet specific criteria, by setting the mask field to indicate which journal templatesto include. The mask is broken down into three parts: the mask for template type, the mask forjournal type, and the mask for journal attribute. If you want to specify a mask for theenumeration, your mask must include each of these parts, for example, if you want to filter ontemplate type, you must specify a mask for type and attribute as well. If a mask is specified andone of its components is 0, the enumeration will not run.
Example:
172 Advanced Functions
Dim apiS As APISTRUCTCall EntInitApiStruct(hApp&, apiS)apiS.sigCat = sigCat'enumerate all journal templates for categoryapiS.u_ApiEnum.dwMask = 0ret% = EntEnum(hSelect&, HYP_ID_JOURNAL_TEMPLATES, HYP_NONE, callback.ProcAddress, lParam&, apiS)'enumerate all standard templates that are both regular andbalancedapiS.u_ApiEnum.dwMask = JOURMASK_TEMPTYPE_STANDARD or JOURMASK_TYPE_REGULAR or JOURMASK_ATTRIB_BALANCEDret% = EntEnum(hSelect&, HYP_ID_JOURNAL_TEMPLATES,HYP_NONE, callback.ProcAddress, lParam&, apiS)'enumerate all recurring templates in specified category.apiS.u_ApiEnum.dwMask = JOURMASK_TEMPTYPE_RECURRING or JOURMASK_ALL_TYPE or JOURMASK_ALL_ATTRIBret% = EntEnum(hSelect&, HYP_ID_JOURNAL_TEMPLATES,HYP_NONE, callback.ProcAddress, lParam&, apiS)'This mask won't work -all templates have a template type, 'and the template type mask is zero, so no templates pass the test.apiS.u_ApiEnum.dwMask = JOURMASK_ATTRIB_BALANCED or JOURMASK_ALL_TYPE
EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table)When you enumerate the entity list entries, the sigRecd and sigKey arguments to the callbackfunction are reversed. The first signature is the list signature. The second signature is the entrysignature.
To enumerate a dynamic entity list for an application that is set up to use dynamic organizations:If you pass an apiStruct to EntEnum(), then you should set the fields shown in the followingtable in the apiStruct. If you do not pass an apiStruct, the API function will use the currentcategory and the current period.
Field Description
sigCat The category signature. If this is NONE, the API will use the current category.
lStartPeriod The starting period (0-based).
lEndPeriod The ending period (0-based).
u_ApiQry.bSupSubNames True (1) to suppress subentities, false (0) to expand subentities.
Tip: Set it to 0 if not sure.
For a fixed entity list, if you pass an apiStruct to EntEnum(), you can set itsu_ApiEnum.uUseFixedListCriteria field to ENUM_FIXEDLIST_CRITERIA (constant definedin ToolInc.h) to enumerate the entities that match the criteria from which the fixed list was builtinstead of enumerating the entities in the fixed list.
Advanced Functions Alphabetical Reference 173
EntEnum( ) and ID_NAMES (Entities Table)You can enumerate the parents of an entity (not just the immediate parents, but all of its parents),rather than enumerating all entities. To do this, set the sigKey argument to the signature of theentity whose parents you wish to enumerate. To do this, set up an apiStruct with theu_ApiEnum.dwMask field set to ENUM_PARENTS_ABOVE.
For applications that are set up to use dynamic organizations, also set the fields shown in thefollowing table in the apiStruct.
Field Description
sigCat The category signature (the number of periods in the category is used to size an internal buffer).
lStartPeriod The starting period.
lEndPeriod The ending period.
lpseStatus The address of the buffer to return status information. The buffer must be large enough for an integer (short in C) for eachperiod for the start period (lStartPeriod) through the last period in the category (not just lEndPeriod).
This enumerates all parents for the given range of periods. The enumeration overwrites somefields in the apiStruct when passing it to your callback function. The lStartPeriod field indicatesthe first period for which the entity is a parent of the specified entity. The status buffer has avalue of 1 for each period for which the entity has children (because an entity can be a parent inone period but a base entity in another period).
For more information, see “Using an apiStruct Structure” on page 110.
EntEnum( ) and ID_NODES (Nodes Table)Set the sigKey argument to the signature of the top node or entity at which to start. Set it toNONE (HYP_NONE in Visual Basic) to enumerate all nodes that are active in the specifiedperiods. Set up an apiStruct with the fields shown in the following table.
Field Description
u_ApiEnum.bNameSig 1 (TRUE) if sigKey is an entity signature, FALSE if sigKey is a node signature.
u_ApiEnum.dwMask Use the following codes:
l ENUM_ALL to enumerate all children below.
l ENUM_DEP (ENUM_IMMED_DEPS) to enumerate immediate dependents only.
l ENUM_CON (ENUM_PARENT) to enumerate only parents below sigKey.
l ENUM_BAS (ENUM_BASE) to enumerate only base entities below.
l ENUM_UNOWNED to enumerate unowned entities.
l ENUM_SUBNAME to include all subentities.
If the application is set up to use dynamic organizations, also set the fields shown in the followingtable in the apiStruct.
174 Advanced Functions
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
lpseStatus NULL or the address of the status buffer. The buffer must be large enough for one byte (char) per period.
If the lpseStatus field is not NULL, EntEnum( ) will fill in the status buffer with a non-zero value(TRUE) for each period in which the node is active, and 0 (FALSE) for each period in which thenode is inactive.
For more information, see “Using an apiStruct Structure” on page 110.
EntEnum( ) and ID_RPTVIEW (Reporting Views Table)Set the sigKey argument to a frequency signature (FREQ_MONTH, and so on) to enumerateonly the reporting views appropriate for that frequency. Set sigKey to HYP_NONE (NONE inC) to enumerate all reporting views.
EntEnum( ) and ID_ROLLOVER (RolloversTable)Set the sigKey argument to the signature of the rollover set in table ID_ROLLSET to enumeratethe detail records in a rollover set. You can also set sigKey to HYP_NONE (NONE in C) toenumerate all detail records for all rollover sets.
EntEnum( ) and ID_SECGRPTAB (Security Group Table)To use EntEnum( ) with ID_SECGRPTAB, set up an apiStruct. For more information, see “Usingan apiStruct Structure” on page 110.
Unlike most tables, you cannot enumerate all of the records in the security group table. Selectone of the following enumeration options:
l To enumerate the groups to which a user belongs, pass the user signature (in tableID_SECUSERTAB) as the sigKey argument. Set the u_ApiEnum.bSecUserGroupCode fieldin the apiStruct to SECURITY_USER (defined in the TOOLINC.H file).
l To enumerate the members of a user group, pass the group's signature in the user table(ID_SECUSERTAB) as the sigKey argument. Set the u_ApiEnum.bSecUserGroupCode fieldin the apiStruct to SECURITY_GROUP (defined in the TOOLINC.H file).
You must select the user table (ID_SECUSERTAB) before calling EntEnum( ) for the securitygroup table. We recommend using an OR operation to select table ID_SECURITY and all of itsassociated security tables rather than selecting the tables individually.
The signature passed to your callback function is the signature of a cell in the tableID_SECGRPTAB. For information about the query attributes you can use to get the signature
Advanced Functions Alphabetical Reference 175
of the user or group, see “ID_SECGRPTAB (Security Group Table) Query Attributes” on page408.
EntEnum( ) and ID_SECRIGHTS (Security Rights Table)To use EntENum() with ID_SECRIGHTS, you need to setup an apiStruct. To enumerate theclasses to which a user has explicit rights, pass the user signature (in table ID_SECUSERTAB)as the sigKey argument. Set the u_ApiEnum.bSecUserGroupCode field in the apiStruct toSECURITY_USER.
To enumerate the users in a security class, set the sigKey argument to the class signature (in tableID_SECCLASS). Set the u_ApiEnum.bSecUserGroupCode field in the apiStruct toSECURITY_CLASS.
You can also set the u_ApiEnum.bSecUserGroupCode field in the apiStruct toSECURITY_ALLTYPES. In this case, the sigKey argument should probably be HYP_NONE(NONE in C).
EntEnum( ) and ID_SECTASK (Security Task Table)To enumerate only the tasks specified by a particular security task filter in tableID_SECTASKFILTER, set the sigKey argument to the signature of the security task filter. Toenumerate all tasks, set the sigKey argument to HYP_NONE (NONE in C).
EntEnum( ) and ID_SECUSERTAB (Security User Table)To use EntEnum( ) with ID_SECUSERTAB, set up an apiStruct. Set theu_ApiEnum.bSecUserGroupCode field in the apiStruct to one of the following codes:
l SECURITY_USER enumerate only users (not groups)
l SECURITY_GROUP enumerate only groups
l SECURITY_ALLTYPES enumerate all records (users and groups)
For more information on, see “Using an apiStruct Structure” on page 110.
EntEnum( ) and ID_SHARES (Shares Table)If the application is set up to use dynamic organizations, pass the category signature as sigKey.
Set up an apiStruct with the fields in the following table.
Field Description
sigName The entity signature or NONE.
176 Advanced Functions
Field Description
u_ApiEnum.dwMask
Use one of the following constants:
l SHARES_WHOIOWN to enumerate shares owned by a specific entity. Set the sigName field to the signature of theentity.
l SHARES_WHOOWNSME to enumerate shares of a specific entity owned by other entities. Set the sigName field tothe signature of the entity.
l SHARES_OWNER_GLOBAL to enumerate shares owned of the global entity. Set sigName to NONE.
l SHARES_ALL_WHOIOWN to enumerate shares owned by any entity. Set sigName to NONE.
Note: These constants are defined in the Toolinc.h file.
Optionally, you can use the OR operation with the constant SHARES_INC_NON_INTCO andthe mask field to include non-intercompany entities. This is only relevant forSHARES_WHOIOWN, SHARES_WHOOWNSME, and SHARES_ALL_WHOIOWN.
If the application is set up to use dynamic organizations, also set the fields shown in the followingtable in the apiStruct.
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
Example:
Dim apiS As APISTRUCTCall EntInitApiStruct(hApp&, apiS)apiS.sigCat& = sigCat& 'category signatureapiS.lStartPeriod& = 0 'let's use the first periodapiS.lEndPeriod& = apiS.lStartPeriod&apiS.u_ApiEnum.dwMask = SHARES_WHOOWNSMEapiS.sigName = sigEntityOwned&ret% = EntEnum(hSelect&, HYP_ID_SHARES, sigCat&,callback.ProcAddress, 0, apiS)
For more information, see “Using an apiStruct Structure” on page 110.
EntEnum( ) and ID_SUBACCTDET (Subaccount Detail Table)The sigKey argument is normally the signature of a sub-account table (in tableID_SUBACCTHDR). However, you can specify an account signature (in table ID_ACCOUNTS)as the sigKey argument to enumerate the subaccounts for that account. In this case, you mustset up an apiStruct.
Set the u_ApiEnum.bSubAcctDet field in the apiStruct to ENUMSAD_BYACCOUNT toindicate that the sigKey argument is an account signature. Alternatively, useEntEnumSubAcctSig( ).
For more information, see “Using an apiStruct Structure” on page 110.
Advanced Functions Alphabetical Reference 177
EntEnumApplications( ) - Enumerate ApplicationsThis function enumerates all Hyperion Enterprise applications that have been set up using theNew Application or Add Application command in Hyperion Enterprise.EntEnumApplications( ) reads the HYPENT.INI file and enumerates applications using acallback function. You do not have to open an application before calling this function.
Use this format:
Declare Function EntEnumApplications Lib "heaccess.dll" Alias "_EntEnumApplications@8"(ByVal lpCallback As Long, ByVal lParam As Long) As Integer
Variable Description
lpCallback A pointer to a user-provided callback function. For more information, see “CALLBACKAPP (or CALLBACK6)” on page 310.
lParam Parameter to be passed back to the user-provided callback function
Return Codes:
Code Meaning
0 Successful
1 Error occurred or no applications are listed
Other Value returned from your callback function
Example:
ret% = EntEnumApplications(AddressOf EnumAppsCallback, lParam&)...'Your callback functionPublic Function EnumAppsCallback(ByVal lAddr As Long, ByVallParam&) As Integer‘Copy C string to B stringwLen% = EntVBGetCStrLen( lAddr&szApp$=Space (wLen%)ret%=EntVBCopyStr(szApp$, lAddr&, wLen%)If UCASE(szApp$) <> "DEFAULT" Then ret% = MsgBox("Application: " & szApp$)End IfEnumAppsCallback% = 0 "Continue enumerationEnd Function
Use this format for C:
short WINAPI EntEnumApplications(CALLBACKAPP lpCallback, LONG lParam);
EntEnumOrgEntities( ) - Enumerate Nodes in an OrganizationThis function enumerates all of the nodes in a given organization using a user-provided callbackfunction, starting from a given node in the organization. Organization information is stored in
178 Advanced Functions
the Nodes table, ID_NODES. EntEnumOrgEntities( ) enumerates the nodes in an organizationin the order in which they appear in the organization. You can use EntQueryEx( ) to query theNodes table for the entity for each node.
For more information about nodes and organization structures, see “Organization Structuresand Advanced Functions” on page 120.
Use this format:
Declare Function EntEnumOrgEntities Lib "heaccess.dll" Alias "_EntEnumOrgEntities@20"(ByVal hSelect As Long, ByVal sigNode As Long, ByVal lpCallback As Long, ByVal lParam AsLong, ByVal wMask As Integer) As Integer
Variable Description
hSelect The handle of the selected tables
sigNode The node at which to start enumerating
lpCallback A pointer to a user-provided callback function. For more information, see “CALLBACKAPI” on page 309.
lParam The parameter to be passed back to the user-provided callback function
wMask Use the following codes:
l ENUM_IMMED_DEPS Enumerate immediate dependents only.
l ENUM_PARENT Enumerate parent entities below sigNode.
l ENUM_BASE Enumerate base entities.
l ENUM_ALL Enumerate base and parent entities and subentities.
l ENUM_UNOWNED Enumerate unowned entities.
l ENUM_SUBNAME Include all subentities. (This should be used with the OR operation and with one of the other constants).
If the application was set up to use dynamic organizations, EntEnumOrgEntities() assumes thatyou want the organization structure for the current category and period. If you do not want thisinformation, use EntEnum( ) instead of EntEnumOrgEntities( ). Enumerate ID_NODES andspecify the category and period in the sigCat, lStartPeriod, and lEndPeriod fields in the apiStruct.Set the u_ApiEnu.dwMask field in the apiStruct to the wMask value. Set theu_ApiEnum.bNameSig field to FALSE (0).
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Other Value returned from your callback function
Example:
'Enumerate all base-level entities in an organization, 'starting at the top node.
Advanced Functions Alphabetical Reference 179
ret% = EntQueryEx(hSelect&, HYP_ID_ORGANIZATION, TOPNODE, sigOrg&, HYP_NONE, 4, sigTopNode&, 0)If sigTopNode& <> HYP_NONE Then ret% = EntEnumOrgEntities(hSelect%, sigTopNode&, AddressOf EnumOrgCB, 0, ENUM_BASE Or ENUM_SUBNAME)End If...'Callback functionPublic Function EnumOrgCB(ByVal hSelect&, ByVal sigNode&, ByVal sigKey&, ByVal lParam&, apis as ApiStruct) As Integer 'Get & display entity IDret% = EntQueryEx(hSelect&, HYP_ID_NODES, NAMESIG, sigNode&, HYP_NONE, 4, sigEntity&, 0)szEntity$ = Space(HYP_SIZEFULLNAME+1)ret% = EntQueryEx(hSelect%, HYP_ID_NAMES, NAME, sigEntity&, Len(szEntity$), szEntity$)If ret% = 0 Then szEntity$ = CToBStr(szEntity$)ret% = MsgBox("Entity: " & szEntity$)'return 0 to continue enumerationEnumOrgCB% = 0End Function
Use this format for C:
short WINAPI EntEnumOrgEntities(HSELECT hSelect, SIGNA sigNode, CALLBACKAPIlpCallback, LONG lParam, WORD wMask);
EntEnumSubAcctSig( ) - Enumerate SubaccountsThis function enumerates a series of sub-account signatures for a specified major account. Usethis function instead of EntEnum( ) to enumerate the Subaccount Detail table(ID_SUBACCTDET). EntEnumSubAcctSig( ) passes the account signature in the Accounts table(ID_ACCOUNTS) for each sub-account to the callback function.
Use this format:
Declare Function EntEnumSubAcctSig Lib "heaccess.dll" Alias "_EntEnumSubAcctSig@16"(ByVal hSelect As Long, ByVal sigAcct As Long, ByVal lpCallback As Long, ByVal lParam AsLong) As Integer
Variable Description
hSelect The handle of the selected tables
sigAcct The signature of the account with subaccounts that you want to enumerate
lpCallback A pointer to a user-provided callback function. For more information, see “CALLBACKAPI” on page 309.
lParam The parameter to be passed back to the user-provided callback function
The signature passed to the callback function is an account signature in ID_ACCOUNTS.
Return Codes:
180 Advanced Functions
Code Meaning
0 Successful
NONE Error occurred
Other Value returned from your callback function
Example:
ret% = EntEnumSubAcctSig(hSelect&, sigAcct&, AddressOf EnumSubAcctCB, 0)...'Callback function, whatever you named itPublic Function EnumSubAcctCB(ByVal hSelect&, ByVal sigAcct&, ByVal sigNone&, ByVal lParam&,apiS As APISTRUCT) As IntegerszAcct$ = Space(HYP_SIZEFULLACCT+1)ret% = EntQueryEx(hSelect&, HYP_ID_ACCOUNTS, NAME, sigAcct&, HYP_NONE, Len(szAcct$), szAcct$, 0)If ret% = 0 Then szAcct$ = CToBStr(szAcct$) ret2% = MsgBox(szAcct$)End IfEnumSubAcctCB% = 0End Function
Use this format for C:
short WINAPI EntEnumSubAcctSig(HSELECT hSelect, SIGNA sigAcct, CALLBACKAPIlpCallback, LONG lParam);
EntEnumUsersOnSystem( ) - Enumerate Users on SystemThis function enumerates users and programs that are currently using a given application. Foreach user currently using the specified application, this function calls your callback function.
Use this format:
Declare Function EntEnumUsersOnSystem Lib "heaccess.dll" Alias"_EntEnumUsersOnSystem@12" (ByVal hApp As Long, ByVal lpCallback As Long, ByVallParam As Long) As Integer
Variable Description
hApp The application handle
lpCallback A pointer to a user-provided callback function. For more information, see “CALLBACKUSERS” on page 320.
lParam The argument for lpCallback
Return Codes:
Advanced Functions Alphabetical Reference 181
Code Meaning
0 Successful
NONE Error occurred
Other Value returned from your callback function
Example:
ret% = EntEnumUsersOnSystem(hApp&, AddressOf MyCallBackFunc, lParam&)
Use this format for C:
short WINAPI EntEnumUsersOnSystem(HAPP hApp, CALLBACKUSERS lpCallback,LONG lParam);
EntFind( ) - Find SignatureThis function searches a specified table (wTabId) using a given search string and returns thesignature of the record that matches the search string. The search string is usually the ID (shortname) for the record (category, entity, and so on), or, in the case of accounts, the account ID.
Use this format:
Declare Function EntFind Lib "heaccess.dll" Alias "_EntFind@20" (ByVal hSelect As Long,ByVal wTabId As Integer, ByVal sigKey As Long, ByVal szKey As String, apiS As APISTRUCT)As Long
Variable Description
hSelect The handle of the selected tables
wTabId The table you want to search
sigKey NONE or the key of a related table. This key is required if wTabId is a closely related table. For more information, see “RelatedTables” on page 363.
szKey The search string for the record that you want to find
apiS NULL or a pointer to an apiStruct with more information
Return Codes:
Code Meaning
The signature Successful
NONE Error occurred
Example:
sigCat& = EntFind0(hSelect&, HYP_ID_CATEGORY, HYP_NONE, "ACTUAL", 0)
182 Advanced Functions
EntFind0() is declared just like EntFind() except the declaration is adjusted to allow passing 0in place of the apiStruct. For more information, see “Visual Basic Programming Notes” on page16.
Use this format for C:
SIGNA WINAPI EntFind(HSELECT hSelect, short wTabId, SIGNA sigKey, void FAR * szKey,LPAPISTRUCT pApiS)
The following sections describe how to use EntFind( ) with specific Hyperion Enterprise Tables.
EntFind( ) and ID_ACCTCONVERT (Account Conversion List Table)To use EntFind( ) with the Account Conversion List table, set the sigKey argument to thesignature of the account conversion list. Set up an apiStruct with the fields shown in the followingtable.
Field Description
u_ApiFind.sItemToFindOne Use one of the following codes:
l ACONV_FIND_ACONV_EXT if the search string is the external account name
l ACONV_FIND_ACONV_HYP if the search string is the Hyperion Enterprise account ID
u_ApiFind.ucIncludeDel EXCLUDE_DELETED
For more information, see “Using an apiStruct Structure” on page 110.
EntFind( ) and ID_INTCODET (Intercompany Detail Table)Do not use EntFind( ) with the Intercompany Detail table. Instead, call EntFind( ) for tableID_ICSET to find the desired intercompany matching set, then call EntQueryEx( ) with queryattribute INTCO_GROUPSIG (and table ID_ICSET) to get the signature of the first detail recordin table ID_INTCODET. Retrieve subsequent detail records by calling EntQueryEx( ) for eachdetail record using query attribute INTCO_NEXTDET (and table ID_INTCODET).
EntFind( ) and the Journals Tables: ID_JOURNALSAll of the the journal tables require an apiStruct to specify the category and period. Set the fieldsshown in the following table in the apiStruct.
Field Description
sigCat The category signature.
lStartPeriod The period.
lEndPeriod The period (same as lStartPeriod). Each journal deals with only one period.
To use EntFind( ) with the Journals table (ID_JOURNALS), you also need to set the lpStringfield in the apiStruct. Set it to the address of the journal name string. (You cannot do this in
Advanced Functions Alphabetical Reference 183
Visual Basic.) Set the sigKey argument to HYP_NONE (NONE in C), and the szKey argumentto NULL (pass the journal name in the apiStruct instead of in the normal argument).
To use EntFind( ) with any of the journal detail tables (ID_JOURNAL_DETAIL,ID_JOURNAL_HISTORY_DETAIL, ID_JOURNAL_TEMPLATES_DETAIL), set the sigKeyargument to the signature of the journal in the appropriate table. For the other tables(ID_JOURNAL_HISTORY, ID_JOURNAL_TEMPLATES, ID_JOURNAL_PERIOD_INFO),you can set sigKey to HYP_NONE (NONE in C).
For more information, see “Using an apiStruct Structure” on page 110.
EntFind( ) and ID_NAMECONVERT (Entity Conversion Table)To use EntFind( ) with the Entity Conversion table, set the sigKey argument to the signature ofthe entity conversion list. Set up an apiStruct with the fields in the following field.
Field Description
u_ApiFind.sItemToFindCode Use one of the following codes:
l NCONV_FIND_NCONV_EXT if the search string is the external entity
l NCONV_FIND_NCONV_HYP if the search string is the Hyperion Enterprise entity
u_ApiFind.ucIncludeDeletedItems EXCLUDE_DELETED
For more information, see “Using an apiStruct Structure” on page 110.
EntFind( ) and ID_NAMES (Entities Table)Create an apiStruct and set the u_ApiFind.sItemToFindCode field to one of the codes shown inthe following table.
NAME_IMPLICIT Get the signature of the entity or sub-entity, even if only the entity is specified in szKey.
NAME_EXPLICIT Return an error if you do not specify a sub-entity for an entity that has subentities.
NAME_ADMIN Get the signature of whatever you asked for (as opposed to the above codes).
If the field is not set or if you do not pass an apiStruct, the default is the same as specifying theNAME_ADMIN code.
The following table shows the different options that would be returned if EUROFF has asubstructure attached with a top node of PTADJ.
Signature Returned
szKey NAME_ADMIN NAME_IMPLICIT NAME_EXPLICIT
"EUROFF" EUROFF EUROFF.PTADJ NONE (error)
"EUROFF.PTADJ" EUROFF.PTADJ EUROFF.PTADJ EUROFF.PTADJ
184 Advanced Functions
Signature Returned
szKey NAME_ADMIN NAME_IMPLICIT NAME_EXPLICIT
"USDIV" USDIV USDIV USDIV
EntFind( ) and ID_SECGRPTAB (Security Group Table)The record key (szKey) is a SECURGROUPKEY structure as defined in the TOOLINC.H file,not a string. Create the structure and fill in its fields. The sigGroup field in the structure is thesignature of the group in the Security User table (ID_SECUSERTAB). The sigUser field is theuser signature of a member of the group, which could be an individual user or another group.
EntFind( ) and ID_SECRIGHTS (Security Rights Table)The record key (szKey) is a SECURRIGHTSKEY structure as defined in the TOOLINC.H file,not a string. Create the structure and fill in its fields.
EntFind( ) and ID_SHARES (Shares Table)To use EntFind( ) with the Shares table, pass NULL as the record key (szKey). The record key isgiven in an apiStruct instead. Pass the category signature as sigKey. This is required if theapplication is set up to use dynamic organizations.
Each record in the Shares table indicates how many shares of stock for one entity are owned byanother entity. To find a specific record, you specify the entity signatures for both the ownerand the owned entity. Other records contain the total number of shares outstanding for aparticular entity and the total number of its shares that are owned by other entities. These otherrecords specify the entity signature as the owner and NONE (HYP_NONE in Visual Basic) asthe owned entity signature.
To find a particular record, set up an apiStruct with the fields shown in the following table.
Field Description
sigParent The signature of the entity that owns the shares.
sigName The signature of the owned entity, or HYP_NONE if you want the record that has the total shares issued or the total sharesowned by other entities.
If the application is set up to use dynamic organizations, also set the fields shown in the followingtable in the apiStruct.
Field Description
sigCat The category signature.
lStartPeriod The period.
Advanced Functions Alphabetical Reference 185
Field Description
lEndPeriod The period (same as lStartPeriod).
For more information, see “Using an apiStruct Structure” on page 110.
EntFindEntityInOrg( ) - Find Node IDThis function returns the node signature of an entity in a given organization. If the sigNodeargument variable is HYP_NONE (NONE in C), the search starts from the top node of theorganization. Otherwise, the search starts from sigNode. For more information about nodes, see“Organization Structures and Advanced Functions” on page 120.
Use this format:
Declare Function EntFindEntityInOrg Lib "heaccess.dll" Alias "_EntFindEntityInOrg@16"(ByVal hSelect As Long, ByVal sigOrg As Long, ByVal sigNode As Long, ByVal sigEntity As Long)As Long
Variable Description
hSelect The handle of the selected tables
sigOrg The organization signature
sigNode The node at which to start the search, or NONE to start at top of the organization
sigEntity The signature of the entity for which you are searching
Return Codes:
Code Meaning
Node signature Successful
NONE Error occurred
Example:
sigNode& = EntFindEntityInOrg(hSelect&, sigOrg&, HYP_NONE, sigEntity&)
Use this format for C:
SIGNA WINAPI EntFindEntityInOrg(HSELECT hSelect, SIGNA sigOrg, SIGNA sigNode,SIGNA sigEntity);
EntFindEntityInOrg( ) - Dynamic OrganizationsIf the application was set up to use dynamic organizations, the EntFindEntityinOrg( ) functionassumes that you want to use the organization structure for the current category and the current
186 Advanced Functions
period (see EntQueryDefault( )). If this is not what you want, use EntEnum() to find the entity.Here is an example of how to use EntEnum( ) instead of EntFinEntityOrg( ):
Function FindEntityInOrg(ByVal hSelect As Long, ByVal sigOrg As Long, ByVal sigNode As Long, ByVal sigEntity As Long) As Long, Dim apiS As APISTRUCT Dim myStruct As MYSTRUCT_TYPE) sigFound& = HYP_NONE ret% = 0 'Set up the apiStruct hApp& = EntGetHappFromSelect(hSelect&) Call EntInitApiStruct(hApp&, apiS) apiS.sigCat& = sigCat& 'category signature apiS.lStartPeriod& = 0 'let's use the first period apiS.lEndPeriod& = apiS.lStartPeriod& apiS.u_ApiEnum.bNameSig = 0 apiS.u_ApiEnum.dwMsk = ENUM_ALL 'Get top node if sigNode& wasn't specified If sigNode& = HYP_NONE Then ret% = EntQueryEx(hSelect&, HYP_ID_ORGANIZATION, TOPNODE, sigOrg&, HYP_NONE, Len(sigNode&), sigNode&, 0) End If If sigEntity& = HYP_NONE Then ret% = 1 'error 'Is top node the one we want? If ret% = 0 Then ret% = EntQueryEx(hSelect&, HYP_ID_NODES, NAMESIG, sigNode&, HYP_NONE, Len(sig&), sig&, apiS) If sig& = sigEntity Then 'fout! sigFound& = sigNode& ret% = 1 'skip the rest End If End If If ret% = 0 Then myStruct.sigEntity& = sigEntity& myStruct.sigFound& = HYP_NONE lParam& = EntGetVarAddr(myStruct) ret2% = EntEnum(hSelect&, HYP_ID_NODES, sigNode&, callback.ProcAddress, lParam&, apiS) sigFound& = myStruct.sigFound& End If EntFindEntityInOrg& = sigFound& 'return valueEnd Function'Callback function, whatever you named itFunction EnumOrgCB(ByVal hSelect As Long, ByVal sigNode& As Long, ByVal sigKey& As Long, myStruct As MYSTRUCT_TYPE, apiS As APISTRUCT) As Integer 'Get entity signature and compare it ret% = EntQueryEx(hSelect&, HYP_ID_NODES, NAMESIG, sigNode&, HYP_NONE, Len(sigEntity&), sigEntity&, apiS) If sigEntity& = myStruct.sigEntity& Then 'found it! myStruct.sigFound& = sigNode& EnumOrgCB% = 1 'stop enumerating Else EnumOrgCB% = 0 'continue enumerating End IfEnd Function
Advanced Functions Alphabetical Reference 187
EntFormatNumber2( ) - Format NumberThis function formats a number.
Use this format:
Declare Function EntFormatNumber2 Lib "heaccess.dll" Alias "_EntFormatNumber2@32"(ByVal hApp As Long, ByVal dVal As Double, ByVal szBuf As String, ByVal wLen As Integer,ByVal wScale As Integer, ByVal wDecimals As Integer, ByVal bRetZero As Integer) As Integer
Variable Description
hApp The application handle
dVal The value to format
szBuf The buffer to return the formatted number
wLen The length of szBuf
wScale Scaling to apply, if any
wDecimals The number of decimal digits
bRetZero The flag to format the string as "0.00" (or empty on a zero)
Return Codes:
This function always returns a zero.
Use this format for C:
SIGNA WINAPI EntFormatNumber2(HAPP hApp, double dVal, LPSTR szBuf, short wLen,short wScale, short wDecimals, short bRetZero);
EntFreqAsk( ) - Select FrequencyThis function calls the Select Frequency dialog box and retrieves the frequency you select. If youselect Cancel, no frequency is retrieved. You must select the Reporting Frequencies(ID_RPTFREQ) and Reporting Views (ID_RPTVIEW) tables before calling this function.
Use this format:
Declare Function EntFreqAsk Lib "heaccess.dll" Alias "_EntFreqAsk@8" (ByVal hSelect AsLong, ByVal szRetbuf As String) As Integer
Variable Description
hSelect The handle of the selected tables
szRetbuf The buffer to return the frequency code. The buffer should be large enough for 2 * (HYP_SIZELABEL+1) characters. On return, thiswill be a string in the format freq.view where freq is the Hyperion Enterprise frequency and view is the reporting view. For moreinformation about frequencies and views, see “Frequencies and Views” on page 20.
Return Codes:
188 Advanced Functions
Code Meaning
0 Successful
NONE Error occurred
Example:
szFreq$ = Space(2*(HYP_SIZELABEL+1))ret% = EntFreqAsk(hSelect&, szFreqView$)If ret% = 0 Then szFreqView$ = CToBStr(szFreqView$)
Use this format for C:
short WINAPI EntFreqAsk( HSELECT hSelect, LPSTR szRetbuf );
EntGetAccountsInputType( ) - Get Account TypeThis function returns the type of account.
Use this format:
Declare Function EntGetAccountsInputType Lib "heaccess.dll" Alias_"EntGetAccountsInputType@36" (ByVal hSelect As Long, ByVal sigCat As Long, ByValsigEntity As Long, ByVal sigParentEntity As Long, ByVal sigAccount As Long, ByVal wDSMTypeAs Integer, ByVal lStartPeriod As Long, ByVal lEndperiod As Long, lRetAcctType As Long) AsInteger
Variable Description
ENTXA_ACCT_INPUT An input account (and the entity is not a parent)
ENTXA_ACCT_CALCULATED A calculated account, either because of logic or because the entity is a parent entity
ENTXA_ACCT_LOGICINPUT A logic statement makes the account an input account.
ENTXA_ACCTIMPLIEDSUBTOTAL An account is a major account with a sub-account table attached.
ENTXA_ACCTCONSOLIDATED An entity is an active parent in the specified range of periods.
ENTXA_ACCTNOINPUT An account is a major account with the currency subtable attached.
ENTXA_ACCTBADGROUP An entity is the Global entity but the account is not a global account, or the account is a global account,but the entity is not the Global entity.
ENTXA_ACCT_DYNAMICVIEW A dynamic view account (no other bit flags are set.)
ENTXA_ACCT_ERROR An error occured (bad hSelect, invalid sigCat, invalid sigAccount, invalid sigParentEntity, internal queryfailed, out of memory, invalid period range, error attaching logic, an so on.
Variable Description
hSelect The handle of the selected tables
Advanced Functions Alphabetical Reference 189
Variable Description
sigCat The signature of the category
sigEntity The signature of the entity or None. If NONE, the function will use default chart logic and will assume the entity is a base-level, not a parent entity.
sigParentEntity None if wDSMType is ID_REGULAR; otherwise, the signature of the parent entity
sigAccount The signature of the account. This is required. It cannot be NONE.
wDSMType The consolidation detail type. Use ID_REGULAR for regular data. Must be one of the following types:
l ID_REGULAR
l ID_PROPORTIONAL
l ID_ELIMINATION
l ID_CONTRIBUTION
l ID_ADJUSTMENT
l ID_TRANSLATION
lStartPeriod The starting period. This can be NONE to use the first period (period 0.)
lEndPeriod The starting period. For an application with a dynamic organization (org-by-period), this can be NONE to use the last periodin th category. If the application is not a dynamic organization (org-by-period), IEndPeriod must be one greater thanIStartPeriod (but not greater than the number of periods in the category.) Tip: For an application that does not use a dynamicorganization (org-by-period), set IStartPeriod to 0 and IEndPeriod to 1.
lRetAcctType The variable in which the result is returned. This is required. On return from the function, IRetAcctType will be one or moreof the following account types:
l ENTXA_ACCT_INPUT
l ENTXA_ACCT_CALCULATED
l ENTXA_ACCT_LOGICINPUT
l ENTXA_ACCT_IMPLIEDSUBTOTAL
l ENTXA_ACCT_CONSOLIDATED
l ENTXA_ACCT_NOINPUT
l ENTXA_ACCT_BADGROUP
l ENTXA_ACCT_DYNAMICVIEW
l ENTXA_ACCT_ERROR
If there was no error (the ENTXA_ACCT_ERROR bit flag is not set) and the account is not adynamic view account (the ENTXA_ACCT_DYNAMICVIEW bit flag is not set), then one andonly one of the ENTXA_ACCT_INPUT, ENTXA_ACCT_CALCULATED, orENTXA_ACCT_LOGICINPUT bit flags will be set. Other bit flags may also be combined withwhichever one of those bit flags is set.
Tip: ENTXA_ACCT_INPUT is defined as zero. To test for it, test that neither theENTXA_ACCT_CALCULATED nor ENTXA_ACCT_LOGICINPUT bit flags are set.
As an alternative, see “EntIsAccountInput( ) - Check if an Account is an Input Account” on page205.
190 Advanced Functions
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntGetAccountsInputType(HSELECT hSelect, SIGNA sigCat, SIGNAsigEntity, SIGNA sigParentEntity, SIGNA sigAccount, WORD wDSMType, long lStartPeriod,long lEndPeriod, long* plRetAcctType);
EntGetActiveModule( ) - Get Program NameThis function returns the code for the program or module that opened the application specifiedby the argument variable hApp. See the section in the TOOLINC.H file that lists MF_ codes forthe codes that define Hyperion Enterprise modules. Your program should use MF_HACCESS.
Use this format:
Declare Function EntGetActiveModule Lib "heaccess.dll" Alias "_EntGetActiveModule@16"(ByVal hApp As Long, wModule As Integer, ByVal szUser As String, ByVal ncbUser As Long) AsInteger
Variable Description
hApp The application handle
wModule The buffer to return the code identifying the program or module
szUser Not used.
ncbUser Not used.
Return Codes:
This function always returns a zero.
Example:
ret% = EntGetActiveModule(hApp&, progCode%, dummy$, 0)If progCode% <> MF_HACCESS Then MsgBox("Something's Wrong")
Use this format for C:
short WINAPI EntGetActiveModule(HAPP hApp, short * pwModule, LPSTR pszUser, intncbUser)
EntGetAppProfileLong( ) - Get Application Profile LongThis function returns a numeric value stored in a specified application .INI file.
Advanced Functions Alphabetical Reference 191
Note: You should use the EntQueryDefault( ) function with the ID_APPDEFAULT table to getvalues from the application .INI file (or SQL equivalent) for both SQL and file-basedapplications. SQL applications do not have an .INI file.
Use this format:
Declare Function EntGetAppProfileLong Lib "heaccess.dll" Alias"_EntGetAppProfileLong@12" (ByVal szAppName As String, ByVal szKeyName As String,ByVal lDefault As Long) As Long
Variable Description
szAppName The application name
szKeyName The key name of the value
lDefault The default value to be assigned if szKeyName is not found
Return Codes:
Code Meaning
The value of the given key Successful
NONE Error occurred
Example:
isServerEnabled& = EntGetAppProfileLong(szApp$, "APP_USE_SERVER”, 0)
Use this format for C:
long WINAPI EntGetAppProfileLong(LPSTR szAppName, LPCSTR szKeyName, longlDefault)
EntGetAppProfileString( ) - Get Application Profile StringThis function reads a text string from the application .INI file.
Note: You should use the EntQueryDefault( ) function with the ID_APPDEFAULT table to getvalues from the application .INI file (or SQL equivalent) for both SQL and file-basedapplications. SQL applications do not have an .INI file.
Use this format:
Declare Function EntGetAppProfileString Lib "heaccess.dll" Alias"_EntGetAppProfileString@20" (ByVal szAppName As String, ByVal szKeyName As String,ByVal szDefault As String, ByVal szResult As String, ByVal wSize As Integer) As Integer
192 Advanced Functions
Variable Description
szAppName The application name
szKeyName The key name of the string
szDefault The default value to be assigned if szKeyName is not found
szResult The buffer to return the string
wSize The length of szResult (in bytes)
Return Codes:
Code Meaning
The number of characters copied to szResult Successful
NONE Error occurred
Example:
szPath$ = Space(128)wLen% = EntGetAppProfileString(szApp$, "APP_OUTBOX", "@APP", szPath$, Len(szPath$))If wLen% Then szPath$ = CToBStr(szPath$)
Use this format for C:
short WINAPI EntGetAppProfileString(LPCSTR szAppName, LPCSTR szKeyName, LPCSTRszDefault, LPSTR szResult, short wSize)
EntGetCatPerFreq( ) - Get Period Number and Frequency inCategoryThis function retrieves the period number within a given category for a specific period. Thisfunction also returns the frequency used in the period string if the argument variable sigFreq isnot NULL.
Use this format:
Declare Function EntGetCatPerFreq Lib "heaccess.dll" Alias "_EntGetCatPerFreq@16" (ByValhSelect As Long, ByVal szPeriod As String, ByVal sigCat As Long, sigFreq As Long) As Long
Variable Description
hSelect The handle of the selected tables
szPeriod The label of the period, such as JAN 03
sigCat The category signature
sigFreq NULL, or the buffer to return the signature of the frequency. This will be the frequency used in szPeriod
Advanced Functions Alphabetical Reference 193
Return Codes:
Code Meaning
The period number Successful
NONE Error occurred
Example:
sigPeriod& = EntGetCatPerFreq(hSelect&, "Q1 03", sigCat&, sigFreq&)
This example returns the period for Q1 03 in the specified category. On return, sigFreq is thesignature of the quarterly frequency. Note that the category does not have to be a quarterlycategory for this example to work.
Use this format for C:
SIGNA WINAPI EntGetCatPerFreq(HSELECT hSelect, LPSTR szPeriod, SIGNA sigCat, SIGNA* psigFreq)
EntGetChild( ) - Get Child NodeThis function retrieves the signature of the child node of the specified node. For moreinformation about nodes, see “Organization Structures and Advanced Functions” on page120.
Use this format:
Declare Function EntGetChild Lib "heaccess.dll" Alias "_EntGetChild@12" (ByVal hSelect AsLong, ByVal sigNode As Long, ByVal fExpandSubnames As Integer) As Long
Variable Description
hSelect The handle of the selected tables
sigNode The signature of the node whose child you want to retrieve
fExpandSubnames 1 (TRUE) to consider subentities, otherwise 0 (False)
Return Codes:
Code Meaning
The signature of the child node Successful
NONE Error occurred
Example:
sigChild& = EntGetChild(hSelect&, sigNode&, 1)
Use this format for C:
194 Advanced Functions
SIGNA WINAPI EntGetChild(HSELECT hSelect, SIGNA sigNode, SBOOL fExpandSubnames)
EntGetChild( ) - Dynamic OrganizationsIf the application was set up to use dynamic organizations, the EntGetChild( ) function assumesthat you want to use the organization structure for the current category and the current period(see EntQueryDefault( )). If this is not what you want, you can use EntQueryEx( ) to get thesignature of the child node. Use table ID ID_NODES or HYP_ID_NODES in Visual Basic andquery attribute CHILD. Here is an example of how to use EntQueryEx( ) instead ofEntGetChild():
Function GetChild(hSelect&, sigNode&, fExpandSubentities%)As LongDim apiS As APISTRUCT 'Set up the apiStruct hApp& = EntGetHappFromSelect(hSelect&) Call EntInitApiStruct(hApp&, apiS) apiS.sigCat& = sigCat& 'category signature apiS.lStartPeriod& = 0 'let's use the first period apiS.lEndPeriod& = apiS.lStartPeriod& If fExpandSubentities% = 0 Then apiS.u_ApiQry.bSupSubNames = 1 'suppress subentities Else apiS.u_ApiQry.bSupSubNames = 0 End If 'Get sigChild& sigChild& = HYP_NONE ret% = EntQueryEx(hSelect&, HYP_ID_NODES, CHILD, sigNode&, HYP_NONE, Len(sigChild&), sigChild&, apiS)GetChild& = sigChild&End Function
EntGetEntitySig( ) - Get Entity SignatureThis function returns an entity signature based on the application handle, entity, and sub-entitycriteria code you provide. The following table shows three possible sub-entity criteria codes.
Table 47 Subentity Criteria Codes for EntGetEntitySig( )
Code Information Returned
NAME_IMPLICIT The signature of the entity.subentity, even if the entity is specified in szKey
NAME_EXPLICIT An error message if you specify a sub-entity for an entity that does not have subentities
NAME_ADMIN The signature of the item you requested (as opposed to the preceding codes)
If the field is not set or if you do not pass an apiStruct, the default is the same as NAME_ADMIN.
As an example, the following table shows the different options that would be returned if EUROFFhas a substructure attached with a top node PTADJ, while USDIV does not have a substructure.
Advanced Functions Alphabetical Reference 195
Signature returned
szKey NAME_ADMIN NAME_IMPLICIT NAME_EXPLICIT
"EUROFF" EUROFF EUROFF.PTADJ NONE (error)
"EUROFF.PTADJ" EUROFF.PTADJ EUROFF.PTADJ EUROFF.PTADJ
"USDIV" USDIV USDIV USDIV
Use this format:
Declare Function EntGetEntitySig Lib "heaccess.dll" Alias "_EntGetEntitySig@12" (ByValhSelect As Long, ByVal szEntity As String, ByVal fImpliedSubEntities As Integer) As Long
Variable Description
hSelect The handle of the selected tables
szEntity The enitity for which you are looking
fImpliedSubEntities One of the following codes:
l NAME_IMPLICIT
l NAME_EXPLICIT
l NAME_ADMIN
Return Codes:
Code Meaning
Entity signature Successful
NONE Error occurred
Example:
'Next line returns signature of Italy.TransigEntity& = EntGetEntitySig(hSelect&, "Italy",NAME_IMPLICIT)'Next line returns HYP_NONEsigEntity& = EntGetEntitySig(hSelect&, "Italy",NAME_EXPLICIT)'Next line returns signature of only ItalysigEntity& = EntGetEntitySig(hSelect&, "Italy",NAME_ADMIN)
Use this format for C:
SIGNA WINAPI EntGetEntitySig(HSELECT hSelect, LPSTR szEntity, shortfImpliedSubEntities)
EntGetHappFromSelect( ) - Get the Application HandleThis function returns the application handle associated with a given table selection handle.
Use this format:
196 Advanced Functions
Declare Function EntGetHappFromSelect Lib "heaccess.dll" Alias"_EntGetHappFromSelect@4" (ByVal hSelect As Long) As Long
Where hSelect is the handle of the selected tables.
Return Codes:
Code Meaning
The application handle Successful
NONE Error occurred
Example:
hApp& = EntGetHappFromSelect(hSelect&)
Use this format for C:
HAPP WINAPI EntGetHappFromSelect(HSELECT hSelect)
EntGetLastError( ) - Get Last ErrorThis function retrieves the last error code set by previous API calls. Whenever any other APIfunction returns an error code (usually NONE), call this function to retrieve any additionalinformation about the error. This function returns the last internal API error code that was setby the most recently called API function. For a complete list of error codes, see the TOOLINC.Hfile. For more information, see “EntGetLastErrorByHApp( ) - Get Last Error” on page 198.
Use this format:
Declare Function EntGetLastError Lib "heaccess.dll" Alias "_EntGetLastError@4" (ByValhSelect As Long) As Integer
Where hSelect is the handle of the selected tables.
Return Codes:
Code Meaning
Error code Successful
NONE Error occurred
After calling EntDataFileOpen( ):
FILE_NOEXIST The requested datafile table does not exist, and the bCreate argument was FALSE so the table was notcreated. No data.
SECURITY_VIOLATION The user does not have access rights to the requested datafile table and wAttr access code.
ERR_TABLE_NOT_SELECTED Necessary tables are not selected.
Tip: For applications that us dynamic organizations, verify that you specified the correct category whenyou selected table ID_ORGANIZATION and its associated tables (ID_ASSOC).
Advanced Functions Alphabetical Reference 197
Code Meaning
After calling EntQueryEx( ) for table ID_DATAFILE:
DFER_NOERR No error.
DFER_BADPERIOD Bad period.
INSUFFICIENT_SECURITY RIGHTS
Example:
wRet% = EntAppLoadVB(hApp&, s, szFile$)wErrCode% = EntGetLastErrorByHApp(hApp&)If wErrCode% = MEMORY_ERROR Then MsgBox("Insufficient memory.", vbOKOnly, "Application Load")
Use this format for C:
short WINAPI EntGetLastError(HSELECT hSelect)
EntGetLastErrorByHApp( ) - Get Last ErrorThis function retrieves the last error code set by previous API calls. It is identical toEntGetLastError( ), except EntGetLastErrorByHApp( ) takes an application handle as theargument, so you can use it when no tables are selected.
Whenever any other API function returns an error code (usually NONE), call this function toretrieve any additional information about the error. This function returns the last internal APIerror code that was set by the most recently called API function for the Hyperion Enterpriseapplication. See the EntGetLastError section in the TOOLINC.H file for a complete list of errorcodes.
Use this format:
Declare Function EntGetLastErrorByHApp Lib "heaccess.dll" Alias"_EntGetLastErrorByHApp@4" (ByVal hApp As Long) As Integer
Where hApp is the application handle.
Return Codes:
Code Meaning
Error code Successful
NONE Error occurred
Note: For a partial list of Return Codes, see “EntGetLastError( ) - Get Last Error” on page197.
Use this format for C:
198 Advanced Functions
short WINAPI EntGetLastErrorByHApp(HAPP hApp)
EntGetOrgLevel( ) - Get Level in OrganizationThis function returns the organization level for a specified node. If the application is set up touse dynamic organizations, this function uses the organization structure for the current periodand category. If you do not want the organization structure for the current period and category,use EntUpdateDefault( ) to temporarily change the current period and category.
Use this format:
Declare Function EntGetOrgLevel Lib "heaccess.dll" Alias "EntGetOrgLevel@16" (ByValhSelect As Long, ByVal sigTopNode As Long, ByVal sigTarget As Long, ByVal wLevel As Integer)As Integer
Variable Description
hSelect The handle of the selected tables
sigTopNode The signature of the top node in the organization, or the node from which you want to start counting
sigTarget The signature of the node for which you want to know the organization level
wLevel Usually 0, or one level less than the level of sigTopNode
Return Codes:
Code Meaning
Organization level Successful
0 Error occurred
Example:
ret% = EntQueryEx(hSelect&, HYP_ID_ORGANIZATION, TOPNODE, sigOrg&, HYP_NONE, Len(sigTop&), sigTop&, 0)If ret% = 0 Then nLevel% = EntGetOrgLevel(hSelect&, sigTop&, sigTarget&, 0)End If
Use this format for C:
short WINAPI EntGetOrgLevel(HSELECT hSelect, SIGNA sigTopNode, SIGNA sigTarget, shortwLevel)
EntGetPerView( ) - Get Frequency and ViewThis function retrieves the frequency and view for a specified reporting frequency. You mustselect the Reporting Frequencies (ID_RPTFREQ) and Reporting Views (ID_RPTVIEW) tablesbefore calling this function.
Use this format:
Advanced Functions Alphabetical Reference 199
Declare Function EntGetPerView Lib "heaccess.dll" Alias "_EntGetPerView@16" (ByValhSelect As Long, ByVal szFreq As String, sigFreq As Long, iView As Integer) As Integer
Variable Description
hSelect The handle of the selected tables
szFreq The reporting frequency. Must be one of the following: DAI, DYTD, WEE, WYTD, MON, YTD, QUA, QYTD, TRI, TYTD, HAL, HYTD, YEA,or DAY. For more information, see “Frequencies and Views” on page 20.
sigFreq Place to return the frequency from the reporting frequency specified by szFreq
iView Place to return the view from the reporting frequency specified by szFreq (either VIEW_YTD or VIEW_PERIODIC)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntGetPerView(HSELECT hSelect, LPSTR szFreq, SIGNA * psigFreq, short *piView)
EntGetProfileLong( ) - Get Hyperion Profile LongThis function reads a numeric value stored in HYPENT.INI.
Use this format:
Declare Function EntGetProfileLong Lib "heaccess.dll" Alias "_EntGetProfileLong@12"(ByVal szAppName As String, ByVal szKeyName As String, ByVal lDefault As Long) As Long
Variable Description
szAppName The application name, or NULL for the [Default] section
szKeyName The key name of the value
lDefault The default value to be assigned if szKeyName is not found
Return Codes:
Code Meaning
The value of the given key Successful
Example:
isServerOpt& = EntGetProfileLong(vbNullString, "USE_SERVER", 0)
200 Advanced Functions
Use this format for C:
long WINAPI EntGetProfileLong(LPCSTR szAppName, LPCSTR szKeyName, long lDefault)
EntGetProfileString( ) - Get Hyperion Profile String This function reads a string stored in the HYPENT.INI file.
Use this format:
Declare Function EntGetProfileString Lib "heaccess.dll" Alias "_EntGetProfileString@20"(ByVal szAppName As String, ByVal szKeyName As String, ByVal szDefault As String, ByValszResult As String, ByVal wSize As Integer) As Integer
Variable Description
szAppName The application ID, or NULL for the [Default] section
szKeyName The key name of the string
szDefault The default value to be assigned if szKeyName is not found.
szResult The buffer to receive the string result
wSize The length of the szResult buffer (in bytes)
Return Codes:
Code Meaning
The number of characters copied to szResult Successful
0 Error occurred
Example:
szDefaultApp$ = Space(HYP_SIZELABEL+1)wLen% = EntGetProfileString(vbNullString, "APPID", "", szDefaultApp$, Len(szDefaultApp$))If wLen% Then szDefaultApp$ = CToBStr(szDefaultApp$)
Use this format for C:
short WINAPI EntGetProfileString(LPCSTR szAppName, LPCSTR szKeyName, LPCSTRszDefault, LPSTR szResult, short wSize)
EntGetRightsToTask( ) - Get Rights to TaskThis function retrieves the rights of the current user to the specified task.
Use this format:
Declare Function EntGetRightsToTask Lib "heaccess.dll" Alias "_EntGetRightsToTask"(ByVal hApp As Long, ByVal lTaskID As Long) As Integer
Advanced Functions Alphabetical Reference 201
Variable Description
hApp The application handle
lTaskID The task for which you want to retrieve the rights of the current user. This must be one of the security task codes defined in theTOOLINC.H file in the form SECTASK_xxxx.
Return Codes:
Code Meaning
SECURITY_MODIFY Modify (write)
SECURITY_NONE None
SECURITY_RESTRICTED Restricted (partial view)
SECURITY_VIEW Read-only (view)
Example:
secRight% = EntGetRightsToTask(hApp&, SECTASK_LOADDATA)
Use this format for C:
short WINAPI EntGetRightsToTask(HAPP hApp, long lTaskID)
EntGetSibling( ) - Get Sibling NodeThis function retrieves the signature of the next sibling node in an organization. For moreinformation about nodes, see “Organization Structures and Advanced Functions” on page120.
Use this format:
Declare Function EntGetSibling Lib "heaccess.dll" Alias "_EntGetSibling@8" (ByVal hSelectAs Long, ByVal sigNode As Long) As Long
Variable Description
hSelect The handle of the selected tables
sigNode The node signature
Return Codes:
Code Meaning
The signature of the next sibling node Successful
NONE Error occurred
Example:
202 Advanced Functions
sigSibling& = EntGetSibling(hSelect&, sigNode&)
Use this format for C:
SIGNA WINAPI EntGetSibling(HSELECT hSelect, SIGNA sigNode)
EntGetSibling( ) - Dynamic OrganizationsIf the application was set up to use dynamic organizations, the EntGetSibling function assumesthat you want to use the organization structure for the current category and the current period.For more information, see “EntQueryDefault( ) - Query Defaults” on page 243. If this is notwhat you want, you can use EntQueryEx( ) to get the signature of the next sibling node in theorganization. Use table ID ID_NODES or HYP_ID_NODES in Visual Basic and query attributeSIBLING. Here is an example of how to use EntQueryEx() instead of EntGetSibling():
Function EntGetSibling(hSelect&, sigNode&) As LongDim apiS As APISTRUCT'Set up the apiStruct hApp& = EntGetHappFromSelect(hSelect&) Call EntInitApiStruct(hApp&, apiS) apiS.sigCat& = sigCat& 'category signature apiS.lStartPeriod& = 0 'let's use the first period apiS.lEndPeriod& = apiS.lStartPeriod& 'Get sigSibling& sigSibling& = HYP_NONE ret% = EntQueryEx(hSelect&, HYP_ID_NODES, SIBLING, sigNode&, HYP_NONE, Len(sigSibling&), sigSibling&, apiS)GetSibling& = sigSibling&End Function
EntGetVarAddr( ) - Get Variable's AddressEntGetVarAddr( ) allows you to force Microsoft Visual Basic into assigning an address to avariable. The function returns the address of whatever you pass to it. You pass the argument byreference, so the function just returns the same address that you pass it. You can use this functionto set the address fields in an apiStruct structure, which is necessary for some other HyperionEnterprise API functions.
Note: Do not use EntGetVarAddr( ) to get the address of a string.
Use this format:
Declare Function EntGetVarAddr Lib "heaccess.dll" Alias "_EntGetVarAddr@4" (pBuf As Any)As Long
Where pBuf is the address you pass to the function.
Return Codes:
Advanced Functions Alphabetical Reference 203
Code Meaning
The address of the variable you passed to the function Successful
NONE Error occurred
Example:
apiS.lpimrData = EntGetVarAddr(dVal#)
Caution! Microsoft Visual Basic can relocate things in memory anytime you perform a stringoperation. This includes string assignments, string concatenation, and stringfunctions.
Behind-the-scenes string operations can also cause this problem. For example, if you pass a fixed-length string as a function argument, Visual Basic makes a temporary copy of the string andpasses the copy instead. Redimensioning an array (ReDim) can also cause Visual Basic to relocatethings in memory. Be very careful when using the EntGetVarAddr( ) function to get the addressof a dynamic array, which can move around in memory. You should get the address immediatelybefore using it and be sure you do not perform any operation that could cause Visual Basic torelocate items in memory. Otherwise, you can cause an intermittent but serious bug that isextremely difficult to find.
EntInitApiStruct( ) - Initialize API StructureThis function initializes an apiStruct structure.
Use this format:
Declare Sub EntInitApiStruct Lib "heaccess.dll" Alias "_EntInitApiStruct@8" (ByVal hApp AsLong, apiS As APISTRUCT)
Variable Description
hApp The application handle
apiS The pointer to the apiStruct structure
Return Codes:
None
Example:
Dim apiS As APISTRUCTEntInitApiStruct hApp&, apiS
Use this format for C:
void WINAPI EntInitApiStruct(HAPP hApp, LPAPISTRUCT pApiS)
204 Advanced Functions
EntIsAccountInput( ) - Check if an Account is an InputAccountThis function is used to determine whether an account is an input account for the specifiedentity. This depends on formulas, so before you call this function, you must either select thedatafile table (ID_DATAFILE) for the category and entity, or call EntLogicAttach( ) for thecategory and method.
Use this format:
Declare Function EntIsAccountInput Lib "heaccess.dll" Alias "_EntIsAccountInput@20"(ByVal hSelect As Long, ByVal sigCat As Long, ByVal sigEntity As Long, ByVal sigAccount AsLong, bIsInput As Byte) As Integer
Variable Description
hSelect The handle of the selected tables
sigCat The category signature
sigEntity The entity signature
sigAccount The account signature
bIsInput The buffer to return the result. On return, this will be 1 (TRUE) if the account is an input account, else 0 (False).
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntIsAccountInput(HSELECT hSelect, SIGNA sigCat, SIGNA sigEntity, SIGNAsigAccount, HYPBOOL* pbIsInput);
EntIsEntityParent( ) - Check if an Entity is a ParentThis function checks whether an entity is a parent entity. If sigOrg is set to NONE, HyperionEnterprise checks if the entity is a parent entity anywhere in the application. If sigOrg specifiesan organization signature, Hyperion Enterprise checks if the entity is a parent entity in theorganization. For more information about organizations, see “Organization Structures andAdvanced Functions” on page 120.
Note: An entity can be a parent without displaying children in certain organization views.
If the application was set up to use dynamic organizations, this function assumes that you wantto use the organization structure for the current category and current period. If you do not want
Advanced Functions Alphabetical Reference 205
to use the organization structure for the current category and current period, you can get thenode signature using EntFindEntityInOrg( ), then call EntQueryEx( ) to get its child node, justto see if there is a child.
Use this format:
Declare Function EntIsEntityParent Lib "heaccess.dll" Alias "_EntIsEntityParent@12" (ByValhSelect As Long, ByVal sigEntity As Long, ByVal sigOrg As Long) As Integer
Variable Description
hSelect The handle of the selected tables
sigEntity The entity signature
sigOrg The signature of the organization in which to search
Return Codes:
Code Meaning
1 (TRUE) The entity is a parent.
0 (False) The entity is not a parent.
Example:
isParent% = EntIsEntityParent(hSelect&, sigEntity&,HYP_NONE)If isParent% Then MsgBox("Unable to put data in parent company.")
Use this format for C:
SBOOL WINAPI EntIsEntityParent(HSELECT hSelect, SIGNA sigEntity, SIGNA sigOrg)
EntIsModified( ) - Is Table Modified?This function determines whether a table in the specified hSelect has been modified by theEntUpdate( ) or EntUpdateDefault( ) functions.
Use this format:
Declare Function EntIsModified Lib "heaccess.dll" Alias "_EntIsModified@16" (ByVal hSelectAs Long, ByVal wTabId As Integer, ByVal sigKey As Long, apiS As APISTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables.
wTabId The table ID you want to check, or NONE to see if any selected table has been modified. It can be any of the valid table IDs listedin or ID_APPDEFAULT.
sigKey NONE or the key of a related table. For more information, see “Related Tables” on page 363.
apiS NULL or a pointer to an apiStruct structure with more information
206 Advanced Functions
Return Codes:
Code Meaning
NON-ZERO Table has been modified.
0 (False) Table has not been modified, or an error occurred.
-1 (NONE) Error occured invalid hselect.
Use this format for C:
short WINAPI EntIsModified(HSELECT hSelect, short wTabId, SIGNA sigKey,LPAPISTRUCT pApiS)
The return code is generally 1 if the table has been modified. However, other bits may also beset to indicate how the modifications affect the impacted status. For more information, seeNMODIFY and related constants defined in TOOLINC.H.
EntIsSelected( ) - Is Table Selected?This function determines whether a specified table is already selected. Use arguments that aresimilar to those you would use to select the table.
Use this format:
Declare Function EntIsSelected Lib "heaccess.dll" Alias "_EntIsSelected@20" (ByVal hSelectAs Long, ByVal wTabId As Integer, ByVal sigKey As Long, wLockMode As Integer, apiS AsAPISTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables
wTabId The table you want to check.
sigKey NONE (for most tables), or the key of a related table. For more information, see “Related Tables” on page 363.
wLockMode The buffer for the current selection mode (APILOCK_READONLY, etc.). On return, this variable contains the current selectionmode or NONE if the table is not selected.
apiS NULL, or a pointer to an apiStruct structure with more information
Return Codes:
Code Meaning
1 (TRUE) Table is selected.
0 (False) Table is not selected.
Use this format for C:
Advanced Functions Alphabetical Reference 207
SIGNA WINAPI EntIsSelected(HSELECT hSelect, short wTabId, SIGNA sigKey, short FAR *pwLockMode, LPAPISTRUCT pApiS)
EntJournalExtract( ) - Extract JournalThis function extracts one or more journals. It uses an optional callback function that the APIcalls to send the current status of the journal extract. Before calling this function, you must selectthe following tables, in read-only format:
l Default tables (ID_CATEGORY, ID_ORGANIZATION, ID_ACCOUNTS, and associatedtables.)
l ID_JOURNALS - the journals tables.
l ID_SECURITY - security tables.
Note: If you are a Visual Basic Programmer, you must use EntJournalExtractVB( ) insteadof EntJournalExtract( ).
EntJournalExtract() calls the function that Hyperion Enterprise uses to extract journals. Thefunction supports the two methods that Hyperion Enterprise uses for extracting journals: extractjournals for a single period or extract journals for all periods. To extract journals for a singleperiod, you specify the signatures of the particular journal(s) that you wish to extract (inlpJourData.SelectedJourSigs). To extract journals for all periods, you specify the criteria and theAPI function will find and extract all journals that match the criteria. Specifically, the APIfunction will internally enumerate journals, journal templates, or recurring journal templatesas indicated in lpJourData.sCheckedInclude; of those, it will extract the journals that match thecriteria indicated in lpJourData.lCheckedAttribTypeStatus.
Use this format for C:
short WINAPI EntJournalExtract(HSELECT hSelect, LPJOUREXTRSTRUCT lpJourData,CALLBACKJOURLOAD fnCallBack, LPARAM lParam, LPAPISTRUCT lpApiStruct)
Variable Description
hSelect The handle of the selected tables
lpJourData The structure with arguments for the journal extract
lpJourData->dwSize The size of this structure
lpJourData->hProcess When executing on the server, the API function returns the handle of the Task Status window processhere.
lpJourData->szDelimiter The field delimiter, which is typically an exclamation point ( ! )
lpJourData->sCheckedInclude Bitmask for extracting journals (LOADEXT_JOURNALS), standard journal templates (LOADEXT_STANDARD), or recurring journal templates (LOADEXT_RECTMP). Indicates to the API function what tosearch if IpJourData.wOperation is JOUROP_EXTRACTALLPER.
lpJourData->sCurrentInclude Used internally by the API function. Set this to 0.
208 Advanced Functions
Variable Description
lpJourData->lCheckedAttribTypeStatus
Bitmask that holds the journal attribute, type, and status and a couple of other flags for the extractoperation. The attribute, type, and status determine which journals will be extracted when IpJourData.wOperation is JOUROP_EXTRACTALLPER. This field can be set to any combination of the following:
Attributes to be Extracted:
l JOURMASK_ALL_ATTRIB (include all atrributes)
l JOURMASK_ATTRIB_BALANCED (include balanced journals)
l JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals)
l JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals
Journal Types to be Extracted:
l JOURMASK_ALL_TYPE (include all journal types)
l JOURMASK_TYPE_REGULAR (include regular journals)
l JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals)
l JOURMASK_TYPE_TOP_LEVEL (include top-level journals)
Journal Status to be Extracted:
l JOURMASK_ALL_STATUS (include all statuses)
l JOURMASK_STATUS_UNPOSTED (include unposted journals)
l JOURMASK_STATUS_POSTED (include posted journals)
l JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals)
l JOURMASK_STATUS_REVIEWED (include reviewed journals)
l JOURMASK_STATUS_REVERSED (include reversed journals)
l JOURMASK_STATUS_LOCKED (include locked journals)
Template Types to be Extracted:
l JOURMASK_ALL_TEMPTYPE (include all template types)
l JOURMASK_TEMPTYPE_STANDARD (include all standard templates)
l JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)
Other Flags
l DBE_REMOTE (server-based extract)
l JOURE_APPEND (append to existing extract file)
lpJourData->lCurrentAttrib 0. Internal use.
lpJourData->wOperation Indicates the operation. Must be JOUROP_EXTRACTSINGLEPER or JOUROP_EXTRACTALLPER.
lpJourData->wFlags Used internally. Set this to 0.
lpJourData->lSelectedJourCount The number of signatures in IpJourData.SelectedJourSigs array. Use 0 if IpJourData.wOperation isJOUROP_EXTRACTSINGLEPER.
lpJourData->SelectedJourSigs The address of an array of the signatures of the selected journals. To distinguish journals from journaltemplates, combine signatures of journals (not templates) with the JOUR_ENTRIES constant using the"or" operator.
Advanced Functions Alphabetical Reference 209
Variable Description
lpJourData->bExtractPasU True (1) to extract posted journal(s) as unposted, otherwise False.
lpJourData->wExtFlag Reserved for future use. Use 0.
lpJourData->lpcExtFileName The path and file name of the journal extract file.
fnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData->lCheckedAttribTypeStatus.
lParam The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData->lCheckedAttribTypeStatus. For more information, see “CALLBACKJOUREXTRACT” on page 315.
lpApiStruct An apiStruct with the sigCat, lStartPeriod, and lEndPeriod fields set.
lpApiStruct->sigCat The signature of the category.
lpApiStruct->lStartPeriod The period number (starting with 0 for the first period.) Set this to 0 if lpJourData.wOperation is JOUROP_EXTRACTALLPER.
lpApiStruct->lEndPeriod The same as lpApiStruct.lStartPeriod.
Return Codes:
Code Meaning
EXTRACT_NOERR (0) Successful
EXTRACT_CANCELLED Cancelled by user.
EXTRACT_CHECK_ERRORLOG Errors occurred and are listed in ERROR.LOG.
EXTRACT_CHECKBOTH Errors occurred and are listed in ERROR.LOG and the userid.ERR file.
Example:
See “EntJournalExtractVB( ) - Extract Journal” on page 210.
EntJournalExtractVB( ) - Extract JournalIf you are a Visual Basic programmer, use this function instead of EntJournalExtract( ). Thisfunction extracts one or more journals. It uses an optional callback function that the API callsto send the current status of the journal extract. Before calling this function, you must select thefollowing tables in read-only format:
l Default tables (ID_CATEGORY, ID_ORGANIZATION, ID_ACCOUNTS, and associatedtables.)
l ID_JOURNALS - the journals tables.
l ID_SECURITY - security tables.
EntJournalExtractVB() calls the function that Hyperion Enterprise uses to extract journals. Thefunction supports the two methods that Hyperion Enterprise uses for extracting journals: extract
210 Advanced Functions
journals for a single period or extract journals for all periods. To extract journals for a singleperiod, you specify the signatures of the particular journal(s) that you wish to extract (inlpJourData.SelectedJourSigs). To extract journals for all periods, you specify the criteria and theAPI function will find and extract all journals that match the criteria. Specifically, the APIfunction will internally enumerate journals, journal templates, or recurring journal templatesas indicated in lpJourData.sCheckedInclude; of those, it will extract the journals that match thecriteria indicated in lpJourData.lCheckedAttribTypeStatus.
Use this format:
Declare Function EntJournalExtractVB Lib "heaccess.dll" Alias "_EntJournalExtractVB@24"(ByVal hSelect As Long, lpJourData As JourExtrStruct, ByVal szExtFileName As String, ByVallpfnCallBack As Any, ByVal lParam As Long, lpApiStruct As apiStruct) As Integer
Variable Description
hSelect The handle of the selected tables
lpJourData The structure with arguments for the journal extract
lpJourData.dwSize The size of this structure
lpJourData.hProcess When executing on the server, the API function returns the handle of the Task Status window processhere.
lpJourData.szDelimiter The field delimiter, which is typically an apostrophe ( ‘ ).
lpJourData.sCheckedInclude Bitmask for extracting journals (LOADEXT_JOURNALS), standard journal templates (LOADEXT_STANDARD), or recurring journal templates (LOADEXT_RECTMP). Indicates to the API function what tosearch if IpJourData.wOperation is JOUROP_EXTARCTALLPER.
lpJourData.sCurrentInclude Used internally by the API function. Set this to 0.
Advanced Functions Alphabetical Reference 211
Variable Description
lpJourData.lCheckedAttribTypeStatus
Bitmask that holds the journal attribute, type, and status and two flags for the extract operation. Theattribute, type, and status determine which journals will be extracted when IpJourData.wOperation isJOUROP_EXTRACTALLPER. This field can be set to any combination of the following:
Attributes to be Extracted:
l JOURMASK_ALL_ATTRIB (include all atrributes)
l JOURMASK_ATTRIB_BALANCED (include balanced journals)
l JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals)
l JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals_
Journal Types to be Extracted:
l JOURMASK_ALL_TYPE (include all journal types)
l JOURMASK_TYPE_REGULAR (include regular journals)
l JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals)
l JOURMASK_TYPE_TOP_LEVEL (include parent journals)
Journal Status to be Extracted:
l JOURMASK_ALL_STATUS (include all statuses)
l JOURMASK_STATUS_UNPOSTED (include unposted journals)
l JOURMASK_STATUS_POSTED (include posted journals)
l JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals)
l JOURMASK_STATUS_REVIEWED (include reviewed journals)
l JOURMASK_STATUS_REVERSED (include reversed journals)
l JOURMASK_STATUS_LOCKED (include locked journals)
Template Types to be Extracted:
l JOURMASK_ALL_TEMPTYPE (include all template types)
l JOURMASK_TEMPTYPE_STANDARD (include all standard templates)
l JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)
Other Flags
l DBE_REMOTE (server-based extract)
l JOURE_APPEND (append to existing extract file)
lpJourData.lCurrentAttrib 0. Internal use.
lpJourData.wOperation Indicates the operation. Must be JOUROP_EXTRACTSINGLEPER or JOUROP_EXTRACTALLPER.
lpJourData.wFlags Used internally. Set this to 0.
lpJourData.lSelectedJourCount The number of signatures in lpJourData.SelectedJourSigs array. Use 0 if lpJourData.wOperation isJOUROP_EXTRACTALLPER. This must be at least one if lpJourData.wOperation is JOUROP_EXTRACTSINGLEPER.
212 Advanced Functions
Variable Description
lpJourData.SelectedJourSigs The address of an array of the signatures of the selected journals. To distinguish journals from journaltemplates, signatures of journals (not templates) should be combined with the JOUR_ENTRIES constantusing the "or" operator.
lpJourData.bExtractPasU True (1) to extract posted journal(s) as unposted, otherwise False.
lpJourData.wExtFlag Reserved for future use. Use 0.
lpszExtFileName The path and file name of the journal extract file.
lpfnCallBack The callback function for status information or null. This is not used if the DBE_REMOTE flag is set inlpJourData.lCheckedAttribTypeStatus.
lParam The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData.ICheckedAttribTypeStatus. For more information, see “CALLBACKJOUREXTRACT” on page 315.
lpApiStruct An apiStruct with the sigCat, lStartPeriod, and lEndPeriod fields set.
lpApiStruct->sigCat The signature of the category.
lpApiStruct->lStartPeriod The period number (starting with 0 for the first period.) Set this to 0 if lpJourData.wOperation is JOUROP_EXTRACTALLPER.
lpApiStruct->lEndPeriod The same as lpApiStruct.lStartPeriod.
Return Codes:
Code Meaning
Extract_NOERR (0) Successful
Extract_CANCELLED Cancelled by user
Extract_CHECK_ERRORLOG Errors occurred and are listed in ERROR.LOG.
Extract_CHECKBOTH Errors occurred and are listed in ERROR.LOG and the userid.ERR file.
Use this format for C:
short WINAPI EntJournalExtractVB(HSELECT hSelect, LPJOUREXTRSTRUCT lpJourData,LPCSTR lpszExtFileName, CALLBACKJOURLOAD fnCallBack, LPARAM lParam,LPAPISTRUCT lpApiStruct)
Example:
Private Sub JournalExtract(hSelect As Long, : sigCat As Long, szFile As String)Dim apiStruct As apiStructDim jourData As JourExtrStructDim hApp&Dim wRet As IntegerConst MAXJOURNALS = 100 'let's size array for 100 journalsDim sigArr(MAXJOURNALS+1) As Long 'fixed, not dynamic, array so VB won't relocate it during G.C.'setup apiStructhApp& = EntGetHappFromSelect(hSelect&)
Advanced Functions Alphabetical Reference 213
Call EntInitApiStruct(hApp&, apiStruct)apiStruct.sigCat = sigCat&apiStruct.lStartPeriod = 0 ‘first periodapiStruct.lEndPeriod = 0jourData.dwSize = LenB(jourData)jourData.hProcess = 0jourData.szDelimiter = Asc("!")'extract regular journals, standard templates, and recurring templatesjourData.sCheckedInclude = 0jourData.sCheckedInclude = jourData.sCheckedInclude Or LOADEXT_JOURNALSjourData.sCheckedInclude = jourData.sCheckedInclude Or LOADEXT_STANDTMPjourData.sCheckedInclude = jourData.sCheckedInclude Or LOADEXT_RECTMPjourData.sCurrentInclude = 0'Set attribute, type, and statusjourData.lCheckedAttribTypeStatus = 0jourData.lCheckedAttribTypeStatus =jourData.lCheckedAttribTypeStatus Or JOURMASK_ALL_ATTRIBjourData.lCheckedAttribTypeStatus =jourData.lCheckedAttribTypeStatus Or JOURMASK_ALL_TYPEjourData.lCheckedAttribTypeStatus =jourData.lCheckedAttribTypeStatus Or JOURMASK_ALL_STATUSjourData.bExtractPasU = 0'do not extract posted journals as unpostedjourData.lCurrentAttrib = 0jourData.wFlags = 0jourData.wExtFlag = 0jourData.cExtFileName = 0 'pass szFile$ as argument to function'select the tableswRet% = EntSelectAdd(HYP_ID_JOURNALS, sigCat, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)wRet% = EntSelectAdd(HYP_ID_SECURITY or HYP_ID_ASSOC, sigCat, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)If List1.SelCount>0 Then ‘Extract selected journals jourData.wOperation = JOUROP_EXTRACTSINGLEPER‘Be sure apiStruct.IStartPeriod = apiStruct.IEndPeriod = correct periodlCount& = List1.SelCountIf lCount& > MAXJOURNALS Then lCount& = MAXJOURNALS jourData.iSelectedJourCount = lCount& For i = 0 To lCount& - 1 ‘For this example, List1.List(i) = sigJournal Or JOUR_ENTRIES‘or else List1.List(i) = sigTemplate sigArr(i) = List1.List(i) Next i jourData.lpSelectedJourSigs = EntGetVarAddr(sigArr(0)) 'do not use a dynamic arrayElse 'Extract all journals based on criteria ‘jourData.sCheckedInclude and jourData.ICheckedAttribTypeStatus were set above. jourData.wOperation = JOUROP_EXTRACTALLPER jourData.iSelectedJourCount = 0 jourData.IpSelectedJourSigs = 0End If
214 Advanced Functions
wRet% = EntJournalExtractVB(hSelect&, jourData, szFile$, 0, 0, apiStruct)hSelect& = EntUnSelect0(hSelect&,HYP_ID_SECCLASS,sigCat&,0,wRet%,0)hSelect& = EntUnSelect0(hSelect&,HYP_ID_JOURNALS,sigCat&,0,wRet%,0)End Sub
EntJournalLoad( ) - Load JournalThis function executes a journal load. It requires a callback function that the API calls to sendthe current status of the journal load. In addition to the default tables, you must select the securitytables, the Journal Period Info table, and the Journal Entries table before calling this function.
Note: If you are a Visual Basic Programmer, you must use EntJournalLoadVB( ) instead ofEntJournalLoad( ).
Use this format for C:
short WINAPI EntJournalLoad(HSELECT hSelect, LPJOURLOADSTRUCT lpJourData,CALLBACKJOURLOAD fnCallBack, LONG lParam, LPAPISTRUCT lpApiStruct)
Variable Description
hSelect The handle of the selected tables
lpJourData The structure with arguments for the journal load
lpJourData->dwSize The size of this structure
lpJourData->hProcess The handle of the Task Status window process. This returns the process handle when executing onthe server.
lpJourData->szDelimiter The field delimiter, which is typically a comma ( , )
lpJourData->sCheckedInclude Loads journals (LOADEXT_JOURNALS) and standard or recurring journal templates (LOADEXT_STANDTMP or LOADEXT_RECTMP)
lpJourData->sCurrentInclude Indicates the type of journal or journal template to include in the load. Used internally.
Advanced Functions Alphabetical Reference 215
Variable Description
lpJourData->lCheckedAttribTypeStatus
Bitmask that holds the journal attribute, type, and status. Can be set to any combination of thefollowing:
Attributes to be Extracted:
l JOURMASK_ALL_ATTRIB (include all atrributes)
l JOURMASK_ATTRIB_BALANCED (include balanced journals)
l JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals)
l JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals_
Journal Types to be Extracted:
l JOURMASK_ALL_TYPE (include all journal types)
l JOURMASK_TYPE_REGULAR (include regular journals)
l JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals)
l JOURMASK_TYPE_TOP_LEVEL (include top-level journals)
Journal Status to be Extracted:
l JOURMASK_ALL_STATUS (include all statuses)
l JOURMASK_STATUS_UNPOSTED (include unposted journals)
l JOURMASK_STATUS_POSTED (include posted journals)
l JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals)
l JOURMASK_STATUS_REVIEWED (include reviewed journals)
l JOURMASK_STATUS_REVERSED (include reversed journals)
l JOURMASK_STATUS_LOCKED (include locked journals)
Template Types to be Extracted:
l JOURMASK_ALL_TEMPTYPE (include all template types)
l JOURMASK_TEMPTYPE_STANDARD (include all standard templates)
l JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)
l DBE_REMOTE (server-based extract)
lpJourData->lCurrentAttrib Holds the attribute. Used internally.
lpJourData->lCurrentType Holds the type. Used internally.
lpJourData->lCurrentStatus Holds the status. Used internally.
lpJourData->buse18Format TRUE to use Release 1.8 format, else False.
lpJourData->sAutoReversing Flags to check for posted and unposted autoreversing journals. Set to Null and used internally.
lpJourData->wExtFlag Reserved for future use.
lpJourData->lpcLoadFileName The path\name of the journal load file.
fnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set inlpJourData->lCheckedAttribTypeStatus.
216 Advanced Functions
Variable Description
lParam The argument for the callback function, or NULL is the DBE_REMOTE flag is set in lpJourData->lCheckedAttribTypeStatus.
lpApiStruct Set to Null.
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
Non Zero Failure
Example:
See “EntJournalLoadVB( ) - Load Journal” on page 217.
EntJournalLoadVB( ) - Load JournalIf you are a Visual Basic programmer, use this function instead of EntJournalLoad( ). Thisfunction executes a journal load. It requires a callback function that the API calls to send thecurrent status of the journal load. In addition to the default tables, you must select the securitytables, the Journal Period Info table, and the Journal Entries table before calling this function.
Use this format:
Declare Function EntJournalLoadVB Lib "heaccess.dll" Alias "_EntJournalLoadVB@24"(ByVal hSelect As Long, lpJourData As JourLoadStruct, ByVal lpszLoadFileName As String,ByVal lpfnCallBack As Any, ByVal lParam As Long, lpApiStruct As apiStruct) As Integer
Variable Description
hSelect The handle of the selected tables
lpJourData The structure with arguments for the journal load
lpJourData.dwSize The size of this structure
lpJourData.hProcess The handle of the Task Status window process. This returns the process handle when executing on theserver.
lpJourData.szDelimiter The field delimiter, which is typically a comma ( , )
lpJourData.sCheckedInclude Loads journals and standard or recurring journal templates
lpJourData.sCurrentInclude Indicates the type of journal or journal template.
Advanced Functions Alphabetical Reference 217
Variable Description
lpJourData.lCheckedAttribTypeStatus
Bitmask that holds the journal attribute, type, and status. Can be set to any combination of the following:
Attributes to be Extracted
l JOURMASK_ALL_ATTRIB (include all atrributes)
l JOURMASK_ATTRIB_BALANCED (include balanced journals)
l JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals)
l JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals)
Journal Types to be Extracted
l JOURMASK_ALL_TYPE (include all journal types)
l JOURMASK_TYPE_REGULAR (include regular journals)
l JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals)
l JOURMASK_TYPE_TOP_LEVEL (include top-level journals)
Journal Status to be Extracted
l JOURMASK_ALL_STATUS (include all statuses)
l JOURMASK_STATUS_UNPOSTED (include unposted journals)
l JOURMASK_STATUS_POSTED (include posted journals)
l JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals)
l JOURMASK_STATUS_REVIEWED (include reviewed journals)
l JOURMASK_STATUS_REVERSED (include reversed journals)
l JOURMASK_STATUS_LOCKED (include locked journals)
Template Types to be Extracted
l JOURMASK_ALL_TEMPTYPE (include all template types)
l JOURMASK_TEMPTYPE_STANDARD (include all standard templates)
l JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)
l DBE_REMOTE (server-based extract)
lpJourData.lCurrentAttrib Holds the attribute.
lpJourData.lCurrentType Holds the type.
lpJourData.lCurrentStatus Holds the status.
lpJourData.buse18Format TRUE if load file is in Release 1.8 format, else False.
lpJourData.sAutoReversing Flags to check for posted and unposted autoreversing journals.
lpJourData.wExtFlag Reserved for future use.
szLoadFileName The path name of the journal load file.
fnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData.lCheckedAttribTypeStatus.
218 Advanced Functions
Variable Description
lParam The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData.lCheckedAttribTypeStatus.
lpApiStruct Structure containing the rest of the journal load arguments.
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
Non Zero Failure
Example:
Private Sub JournalLoad(hSelect As Long, sigCat As Long, szFile As String)Dim jourData As JourLoadStructDim wRet%jourData.dwSize = LenB(jourData) 'should be 44jourData.hProcess = 0jourData.szDelimiter = 33jourData.sCheckedInclude = LOADEXT_JOURNALS 'regular journalsjourData.sCurrentInclude = 0'Set attribute, type, and statusjourData.lCheckedAttribTypeStatus = 0jourData.lCheckedAttribTypeStatus =jourData.lCheckedAttribTypeStatus Or JOURMASK_ALL_ATTRIBjourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or JOURMASK_TYPE_REGULARjourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or JOURMASK_STATUS_UNPOSTEDjourData.lCurrentAttrib = 0jourData.lCurrentStatus = 0jourData.buse18Format = 0jourData.lpcLoadFileName = 0 'Pass szFile as function argument instead'Select the journals tableswRet% = EntSelectAdd(HYP_ID_JOURNALS, sigCat&, hSelect&, APILOCK_READWRITE, 0, 0, 0, 0)wRet% = EntSelectAdd(HYP_ID_SECURITY or HYP_ID_ASSOC, sigCat&, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)wRet% = EntSelectAdd(HYP_ID_JOURNAL_PERIOD_INFO Or HYP_ID_ASSOC, sigCat&, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)wRet% = EntJournalLoadVB(hSelect&, jourData, szFile$, AddressOf MyCallBack, 0, apiStruct)End SubPublic Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfJourNameCString As Long,ByVal fSize As Long,ByVal fPos As Long, ByVal lParam As Long) As IntegerDim wRet%, wLen%Dim szFile$, szJourName$Dim szMsg$
Advanced Functions Alphabetical Reference 219
' Convert the C-style strings into Basic stringswLen% = EntVBGetCStrLen(addressOfFileNameCString)szFile$ = Space(wLen%)wRet% = EntVBCopyStr(szFile$, addressOfFileNameCString, wLen%)wLen% = EntVBGetCStrLen(addressOfJourNameCString)szJourName$ = Space(wLen%)wRet% = EntVBCopyStr(szJourName$, addressOfJourNameCString, wLen%)szMsg$ = "Now Loading " & szJourName$ & " From " & szFile$ frmJourLoad.List1.AddItem (szMsg$)MyCallBack = 0End Function
Use this format for C:
short WINAPI EntJournalLoadVB(HSELECT hSelect, LPJOURLOADSTRUCT lpJourLoad,LPCSTR lpszLoadFileName, CALLBACKJOURLOAD fnCallBack, LONG lParam,LPAPISTRUCT lpApiStruct)
EntLogicAttach( ) - Attach FormulasThis function builds a logic block and attaches it to the application. You need to do this beforeyou can calculate formulas or call any function that depends on formulas, such asEntIsAccountInput( ). You must select the Logic table (ID_LOGIC) table before callingEntLogicAttach( ). You should call EntLogicDetach( ) when you are finished using the logicblock.
Note: Selecting the ID_DATAFILE table automatically builds and attaches the logic block. Youdo not need to call EntLogicAttach( ) if you select the Datafile table.
A logic block is the merged set of formulas appropriate for a particular category and method. Itmerges the pcode tables for the indicated method, the Chart method, and any methods includedin them using ‘USE’ statements. It merges formulas for the indicated category with formulasthat apply to all categories.
Use this format:
Declare Function EntLogicAttach Lib "heaccess.dll" Alias "_EntLogicAttach@12" (ByValhSelect As Long, ByVal sigCat As Long, ByVal sigMethod As Long) As Integer
Variable Description
hSelect The handle of the selected tables
sigCat The signature of the category
sigMethod The signature of the method
Return Codes:
220 Advanced Functions
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntLogicAttach(HSELECT hSelect, SIGNA sigCat, SIGNA sigMethod)
EntLogicCompile( ) - Compile LogicEntLogicCompile( ) compiles specific selected methods or all invalid methods. Before callingthis selection you must select the following tables:
l Default Tables.
l ID_SECURITY with ID_ASSOC(ReadOnly)
l ID_LOGIC with ID_ASSOC (read-write). If executing on server the logic table is selectedas read-only to avoid multiuser conflicts.
Use this format:
Declare Function EntLogicCompile Lib "heaccess.dll" Alias "_EntLogicCompile@12" (ByValhSelect As Long, lpLogicCompile As LOGICCOMPSTRUCTSTRUCT, lpApiStruct As apiStruct)As Integer
Variable Description
hSelect The handle of the selected tables
lpLogicCompile Structure with arguments for logic compile
lpLogicCompile.dwSize The size of this structure
lpLogicCompile.hProcess The handle of the Task Status window process. Returns the process handle when executing on server, NULLlocally.
lpLogicCompile.bRemoteFlag Indicates whether to compile logic locally or on the server; FALSE if compiled local, TRUE if server.
lpLogicCompile.fnCallBack Address of the callback function for status information can pass NULL (0) if no callback function
lpLogicCompile.lParam The argument for the callback function.
lpLogicCompile.bAllMethods This is set to TRUE to compile all methods. Overrides (ignores) noMethods and lpMethodArr.
lpLogicCompile.wCurrMethod Reserved for internal use.
lpLogicCompile.wExtendFlag Reserved for future use
lpLogicCompile.noMethods Used to pass in the number no of methods selected in lpMethodArr (0 if bAllMEthods set to TRUE).
lpLogicCompile.lpMethodArr Used to pass in the signatures of methods to be compiled (ignored if bAllMethods set to TRUE).
Advanced Functions Alphabetical Reference 221
Variable Description
lpApiStruct An API structure that can be set to NULL. If error logging for PCODEs is needed, set lpApiStruct.u_ApiUpd.bPcodeOnlyLogErr to TRUE.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntLogicCompile(HSELECT hSelect, LPLOGICCOMPSTRUCTlpLogicCompile, LPAPISTRUCT lpApiStruct)
EntLogicDetach( ) - Detach FormulasThis function detaches a logic block. Call this function when you are finished using a block thatwas created by EntLogicAttach( ). A logic block is the merged set of formulas appropriate for aparticular category and method. It merges the pcode tables for the indicated method, the Chartmethod, and any methods included in them using ‘USE’ statements. It merges formulas for theindicated category with formulas that apply to all categories.
Use this format:
Declare Function EntLogicDetach Lib "heaccess.dll" Alias "_EntLogicDetach@12" (ByValhSelect As Long, ByVal sigCat As Long, ByVal sigMethod As Long) As Integer
Variable Description
hSelect The handle of the selected tables
sigCat The signature of the category
sigMethod The signature of the method
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntLogicDetach(HSELECT hSelect, SIGNA sigCat, SIGNA sigMethod)
222 Advanced Functions
EntLogicDiscard() Discard Logic BlocksThis function discards all logic blocks that are flagged to be discarded. A logic block is the mergedset of formulas appropriate for a particular category and method. It merges the pcode tables forthe indicated method, the Chart method, and any methods included in them using ‘USE’statements. It merges formulas for the indicated category with formulas that apply to allcategories.
Use this format:
Declare Function EntLogicDiscard Lib "heaccess.dll" Alias "_EntLogicDiscard@12" (ByValhApp As Long, ByVal sigCat As Long, ByVal sigMethod As Long) As Integer
Variable Description
hApp The application handle
sigCat The signature of the category or NONE. Not used.
sigMethod The signature of the method or NONE. Not used.
Return Codes:
This function always returns a zero.
Use this format for C:
short WINAPI EntLogicDiscard(HAPP hApp, SIGNA sigCat, SIGNA sigMethod)
EntLogicExport( ) - Export FormulasThis function exports formulas from an application. Before calling this function, you must selectthe following tables:
l Default tables
l ID_SECURITY and its associated tables (read only)
l ID_LOGIC - Logic table (read only)
Note: If you are a Visual Basic programmer, use EntLogicExportVB( ) instead ofEntLogicExport( ).
Use this format for C:
short WINAPI EntLogicExport(HSELECT hSelect, LPLOGICEXPORT lpLogicExport ,LPAPISTRUCT lpApiStruct)
Variable Description
hSelect The handle of the selected tables
lpLogicExport Structure with arguments for logic export
Advanced Functions Alphabetical Reference 223
Variable Description
lpLogicExport->dwsize The size of the structure
lpLogicExport->hProcess The handle of the Task Status window process. Returns the process handle when executing on a server,or NULL when executing locally.
lpLogicExport->delimiter The field delimiter, which is typically a comma ( , )
lpLogicExport->sigEntry Used to select current export method
lpLogicExport->lFlag Must be one of the following:
l LOGEXP_ISMETHOD
l LOGEXP_ISMETHOD
l LOGEXP_ISFUNCTION
l LOGEXP_ISRULE
l LOGEXP_EXPALL
l LOGEXP_NOHEADER
l LOGEXP_REMOTE
Do not use LOGEXP_EXPALL when method, function, or rule is set.
lpLogicExport->wExtFlags Reserved for future use.
lpLogicExport->iSelectedMethCount The number of methods selected.
lpLogicExport->SelectedMethSigs An array of the signatures of the methods.
lpLogicExport->iSelectedRuleCount The number of rules selected.
lpLogicExport->SelectedRuleSigs An array of the signatures of the rules.
lpLogicExport->iSelectFuncCount The number of functions selected.
lpLogicExport->SelectedFuncSigs An array of the signatures of the functions.
lpLogicExport->fnCallback The callback function for status information.
lpLogicExport->lParam The argument for the callback function.
lpLogicExport->FileName The file name.
Note: If the file you specify already exists, the function appends to the existing file.
lpApiStruct Null. Structure for API compatibility.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
For an example, see “EntLogicExportVB( ) - Export Formulas” on page 225.
224 Advanced Functions
EntLogicExportVB( ) - Export FormulasUse this function instead of EntLogicExport( ) if you are a Visual Basic programmer. Thisfunction exports formulas from an application. Before calling this function, you must select thefollowing tables:
l Default tables
l ID_SECURITY and its associated tables (read only)
l ID_LOGIC - Logic table (read only)
Microsoft Visual Basic cannot reliably pass a string address in the lpLogicExport structure.EntLogicExportVB( ) allows you to pass the path and file name of the export file as a functionargument instead of in lpLogicExport.FileName.
Use this format:
Declare Function EntLogicExportVB Lib "heaccess.dll" Alias "_EntLogicExportVB@16"(ByVal hSelect As Long, lpLogicExport As LOGICEXPORTSTRUCT, lpApiStruct As apiStruct,ByVal szFileName As String) As Integer
Variable Description
hSelect The handle of the selected tables
lpLogicExport Structure with arguments for logic export
lpLogicExport.dwsize The size of the structure
lpLogicExport.hProcess The the handle of the Task Status window process. Returns the process handle when executing on aserver.
lpLogicExport.delimiter The field delimiter, which is typically a comma ( , ).
lpLogicExport.sigEntry Used internally to select current method being exported. Set to NONE.
lpLogicExport.lFlag Must be one of the following:
l LOGEXP_ISMETHOD
l LOGEXP_ISMETHOD
l LOGEXP_ISFUNCTION
l LOGEXP_ISRULE
l LOGEXP_EXPALL
l LOGEXP_NOHEADER
l LOGEXP_REMOTE
Do not use LOGEXP_EXPALL when method, function, or rule is set.
lpLogicExport.wExtFlags Reserved for future use.
lpLogicExport.iSelectedMethCount The number of methods selected.
lpLogicExport.SelectedMethSigs An array of the signatures of the methods.
Advanced Functions Alphabetical Reference 225
Variable Description
lpLogicExport.iSelectedRuleCount The number of rules selected.
lpLogicExport.SelectedRuleSigs An array of the signatures of the rules.
lpLogicExport.iSelectFuncCount The number of functions selected.
lpLogicExport.SelectedFuncSigs An array of the signatures of the functions.
lpLogicExport.fnCallback The callback function for status information.
lpLogicExport.lParam The argument for the callback function.
szFileName The load file name.
Note: If the file you specify already exists, the function appends to the existing file.
lpApiStruct Structure for API compatibility.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Private Sub ExportLogic(hSelect As Long, szFile As String)Dim logicExport As LOGICEXPORTSTRUCTDim apiStruct As apiStructDim hApp&Dim wRet%logicExport.dwSize = LenB(logicExport)logicExport.hProcess = 0logicExport.delimiter = Asc("!")logicExport.sigEntry = 0logicExport.lFlag = LOGEXP_EXPALLlogicExport.wExtFlags = 0logicExport.iSelectedMethCount = 0logicExport.lpSelectedMethSigs = 0logicExport.iSelectedRuleCount = 0logicExport.lpSelectedRuleSigs = 0logicExport.iSelectedFuncCount = 0logicExport.lpSelectedFuncSigs = 0logicExport.fileName = 0logicExport.fnCallBack = FuncPtrToLong (AddressOf MyCallBack)logicExport.lParam = 0hApp& = EntGetHappFromSelect(hSelect&)Call EntInitApiStruct(hApp&, apiStruct)wRet% = EntSelectAdd(HYP_ID_SECURITY or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)wRet% = EntSelectAdd(HYP_ID_LOGIC, HYP_NONE, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)
226 Advanced Functions
wRet% = EntLogicExportVB(hSelect&, logicExport, apiStruct, szFile$)End Sub'Pass the result of AddressOf() to this function (as fnPtr).'This function converts it to a long so you can assign it to'a field or argument declared as long rather than 'As Any'.Public Function FuncPtrToLong(ByVal fnPtr As Long) As LongFuncPtrToLong = fnPtrEnd FunctionPublic Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfMethodCString As Long, ByVal unused1 As Long, ByVal unused2 As Long, ByVal lParam As Long) As IntegerDim wRet%, wLen%Dim szFile$, szMethod$Dim szMsg$'Copy C-style strings to Basic stringswLen% = EntVBGetCStrLen(addressOfFileNameCString)szFile$ = Space(wLen%)wRet% = EntVBCopyStr(szFile$, addressOfFileNameCString, wLen%)wLen% = EntVBGetCStrLen(addressOfMethodCString)szMethod$ = Space(wLen%)wRet% = EntVBCopyStr(szMethod$, addressOfMethodCString, wLen%)szMsg$ = "Now Extracting..." & szMethod$ & " To " & szFile$ List1.AddItem (szMsg$)MyCallBack = 0 'return 0End Function
Use this format for C:
short WINAPI EntLogicExportVB(HSELECT hSelect, LPLOGICEXPORT lpLogicExport,LPAPISTRUCT lpApiStruct, LPCSTR szFileName)
EntLogicImport( ) - Import FormulasThis function imports formulas to an application. Before calling this function, you must selectthe following tables:
l Default tables
l ID_SECURITY and its associated tables (read only)
l ID_LOGIC - Logic table (read/write). If you are executing a formulas import on the server,select the Logic table read-only to avoid multiuser issue.
Note: If you are a Visual Basic programmer, use EntLogicImportVB( ) instead ofEntLogicImport( ).
Use this format for C:
short WINAPI EntLogicImport(HSELECT hSelect, LPLOGICIMPORT lpLogicImport ,LPAPISTRUCT lpApiStruct)
Advanced Functions Alphabetical Reference 227
Variable Description
hSelect The handle of the selected tables
lpLogicImport Structure with arguments for formulas import
lpLogicImport->dwsize The size of the structure
lpLogicImport->hProcess The the handle of the Task Status window process. Returns the process handle when executing on a server,or NULL when executing locally.
lpLogicImport->delimiter The field delimiter, which is typically a comma ( , )
lpLogicImport->bReplace TRUE to replace formulas
lpLogicImport->sigMethod The signature of the current method1
lpLogicImport->iLogicType One of the following types: LOGIC_CHART, LOGIC_CONSOL, or LOGIC_TRANS
lpLogicImport->uMethod TRUE to import methods
lpLogicImport->uRule TRUE to import rules
lpLogicImport->uCustomFunc TRUE to import custom functions
lpLogicImport->uLogicComp TRUE to compile formulas
lpLogicImport->bNoHeader No header
lpLogicImport->wImportFlag Indicates whether to import formulas locally or on a server. For server processing set to LOGIC_REMOTE.
lpLogicImport->wExtendFlag Reserved for future use.
lpLogicImport->fnCallback The callback function for status information
lpLogicImport->lParam The argument for the callback function
lpLogicImport->iFileListCnt The number of elements in the File List table, lpLogicImport->lpFileList
lpLogicImport->lpFileList An array of selected file names (maximum of 260 bytes each).
lpApiStruct Structure for API compatibility.
1The sigMethod field should be set to the signature of the currently selected method. Select ID_FORMULAS table and its associated tables (ID_ASSOC) and specify the method signature logicImport.sigMethod as the sigKey argument. Specify the access method as APILOCK_READWRITE(not APILOCK_READONLY). Signature 0 is the signature for the default chart method.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOGIC_COMPERR (1) Check methods failed during logic import
Example:
228 Advanced Functions
See “EntLogicImportVB( ) - Import Formulas” on page 229.
EntLogicImportVB( ) - Import FormulasIf you are a Visual Basic programmer, use this function instead of EntLogicImport( ). Thisfunction imports formulas to an application. Before calling this function, you must select thefollowing tables:
l Default tables
l ID_SECURITY and its associated tables (read only)
l ID_LOGIC - Logic table (read/write). If you are executing a formulas import on the server,select the Logic table read-only to avoid mult-user issues.
Microsoft Visual Basic cannot reliably pass a string address in the lpLogicImport structure.EntLogicImportVB( ) allows you to pass the path and file name of the import file as a functionargument instead of in lpLogicImport.lpFileList.
Note: Also, use VB's LenB function, instead of Len, to set the dwSize field in theLOGICIMPORTSTRUCT argument.
Use this format:
Declare Function EntLogicImportVB Lib "heaccess.dll" Alias "_EntLogicImportVB@16"(ByVal hSelect As Long, lpLogicImport As LOGICIMPORTSTRUCT, lpApiStruct As apiStruct,ByVal szFileList As String) As Integer
Variable Description
hSelect The handle of the selected tables
lpLogicImport Structure with arguments for formulas import
lpLogicImport.dwsize The size of the structure
lpLogicImport.hProcess The the handle of the Task Status window process. Returns the process handle when executing on a server, orNULL when executing locally.
lpLogicImport.delimiter The field delimiter, which is typically a comma ( , )
lpLogicImport.bReplace TRUE to replace formulas
lpLogicImport.sigMethod The signature of the current method
lpLogicImport.iLogicType One of the following types: LOGIC_CHART, LOGIC_CONSOL, or LOGIC_TRANS
lpLogicImport.uMethod TRUE to import methods
lpLogicImport.uRule TRUE to import rules
lpLogicImport.uCustomFunc TRUE to impoet custom functions
Advanced Functions Alphabetical Reference 229
Variable Description
lpLogicImport.uLogicComp TRUE to compile formulas
lpLogicImport.bNoHeader No header
lpLogicImport.wImportFlag Indicates whether to import formulas locally or on a server. LOGIC_REMOTE for server processing.
lpLogicImport.wExtendFlag Reserved for future use.
lpLogicImport.fnCallback The callback function for status information
lpLogicImport.lParam The argument for the callback function
lpLogicImport.iFileListCnt The number of elements in the File List table, lpLogicImport.lpFileList
szFileList The address of an array of selected file names (260 bytes each, each null-terminated)
lpApiStruct 0. Structure for API compatibility
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOGIC_COMPERR (1) Check methods failed during formulas import
Example:
Private Sub ImportLogic(hSelect As Long, szFile As String)Dim logicImport As LOGICIMPORTSTRUCTDim apiStruct As apiStructDim hApp&Dim wRet%logicImport.dwSize = LenB(logicImport)logicImport.uMethod = 1logicImport.uRule = 1logicImport.uCustomFunc = 1logicImport.delimiter = Asc(",")logicImport.hProcess = 0logicImport.iFileListCnt = 1logicImport.wImportFlag = 0logicImport.sigMethod = 0 ' just default for nowlogicImport.bReplace = 0logicImport.fnCallBack = FuncPtrToLong(AddressOf MyCallBack)logicImport.lParam = 0hApp& = EntGetHappFromSelect(hSelect&)Call EntInitApiStruct(hApp&, apiStruct)wRet% = EntSelectAdd(HYP_ID_SECURITY or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)wRet% = EntSelectAdd(HYP_ID_LOGIC, HYP_NONE, hSelect&, APILOCK_READWRITE, 0, 0, 0, 0)
230 Advanced Functions
wRet% = EntLogicImportVB(hSelect&, logicImport, apiStruct, szFile$)End Sub'Pass the result of AddressOf() to this function (as fnPtr).'This function converts it to a long so you can assign it to'a field or argument declared as long rather than 'As Any'.Public Function FuncPtrToLong(ByVal fnPtr As Long) As LongFuncPtrToLong = fnPtrEnd FunctionPublic Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfMethodCString As Long, ByVal lTotal As Long, By Val lCurrent As Long, ByVal lParam As Long) As IntegerDim wRet%, wLen%Dim szFile$, szMethod$Dim szMsg$'Copy C-style strings to Basic stringswLen% = EntVBGetCStrLen(addressOfFileNameCString)szFile$ = Space(wLen%)wRet% = EntVBCopyStr(szFile$, addressOfFileNameCString, wLen%)wLen% = EntVBGetCStrLen(addressOfMethodCString)szMethod$ = Space(wLen%)wRet% = EntVBCopyStr(szMethod$, addressOfMethodCString, wLen%)szMsg$ = "Now Loading..." & szMethod$ & " From " & szFile$List1.AddItem (szMsg$)MyCallBack = 0 'return 0End Function
Use this format for C:
short WINAPI EntLogicImportVB(HSELECT hSelect,LPLOGICIMPORT lpLogicImport,LPAPISTRUCT lpApiStruct, LPCSTR szFileList)
EntMessage( ) - Display a Message Box and Write theMessage to the Error LogEntMessage( ) displays a message box and writes the message to the Hyperion Enterprise errorlog. This function reads a message from the string table, then formats the message by substitutingthe specified strings for the placeholders in the message. The function displays the message bycalling MessageBox() using MB_OK and the specified standard Hyperion Enterprise caption.The function writes the message to the Hyperion Enterprise error log if hApp is not 0. Themessage box will not be displayed if the Hyperion Enterprise application (if hApp is not 0) isrunning in a mode that suppresses messages (for example, on a server) or if the caller specifiesthat the message box should be skipped.
Note: Visual Basic programmers must use EntMessageVB(), since Visual Basic cannot pass anarray of addresses of C-style strings.
Use this format:
short WINAPI EntMessage(HAPP hApp, short wMsgId, HINSTANCE hModule, shortwCaptionCode, short wArgCount, LPCSTR arrayOfStrings)
Advanced Functions Alphabetical Reference 231
Variable Description
hApp The application handle
wMsgId The string ID (in hModule) of the message
hModule The handle of the module (resource .DLL) that contains the string wMsgID
wCaptionCode The code to indicate which caption to use for the message box and whether to display a message box:
l HACC_NODISPLAY (HEMSG_NODISPLAY)- Do not display a message box.
l HACC_WARNING (HEMSG_WARNING) - Standard Hyperion Enterprise warning
l HACC_ERROR (HEMSG_ERROR) - Error
l HACC_FATAL (HEMSG_FATAL) - Fatal
.See the TOOLKIT.H file for details.
wArgCount The number of elements in arrayOfStrings[ ]
arrayOfStrings[] Array of strings to be substituted for the placeholders (%1, %2, etc.) in the message (wMsgID string)
Return Codes:
Returns 0 or the value returned from MessageBox( ) (0 or IDOK).
EntMessageVB( ) - Display a Message Box and Write theMessage to the Error LogEntMessageVB( ) displays a message box and writes the message to the Hyperion Enterpriseerror log. This function reads a message from the string table, then formats the message bysubstituting up to three specified strings for the first three placeholders in the message. Thefunction displays the message by calling MessageBox() using MB_OK and the specified standardHyperion Enterprise caption. The function writes the message to the Hyperion Enterprise errorlog if hApp is not 0. The message box will not be displayed if the Hyperion Enterprise application(if hApp is not 0) is running in a mode that suppresses messages (for example, on a server) orif the caller specifies that the message box should be skipped.
Use this format:
Declare Function EntMessageVB Lib "heaccess.dll" Alias "_EntMessageVB@28" (ByVal hAppas Long, ByVal wMsgId As Integer, ByVal hModule As Long, ByVal wCaptionCode As Integer,ByVal sz1 As String, ByVal sz2 As String, ByVal sz3 As String) As Integer
Variable Description
hApp The application handle
wMsgId The string ID (in hModule) of the message
hModule The handle of the module (resource DLL) that contains the string wMsgID
232 Advanced Functions
Variable Description
wCaptionCode The code to indicate which caption to use for the message box and whether to display a message box:
l HACC_NODISPLAY - do not display a message box.
l HACC_WARNING - warning.
l HACC_ERROR - error.
l HACC_FATAL - fatal.
See the TOOLKIT.H file for details
sz1, sz2, sz3 The strings to be substituted for the first three placeholders (%1, %2, %3) in the message (wMsgID string); NULL if not needed
Return Codes:
Code Meaning
IDOK Successful
0 Error or MessageBox( ) was not called.
Examples:
hModule& = GetModuleHandle("MyStrings.dll") 'Win32 function'IDS_MY_STRING is the string id for "Error in function %1." in MyStrings.dll.'It only has one placeholder, so we'll pass null for the other 2.wRet% = EntMessageVB(hApp&, IDS_MY_STRING, hModule&, HACC_ERROR, _ "MyTestFunction", vbNullString, vbNullString)
Use this format for C:
short WINAPI EntMessageVB(HAPP hApp, short wMsgId, HINSTANCE hModule, shortwCaptionCode, LPCSTR sz1, LPCSTR sz2, LPCSTR sz3)
EntMsgLogTaskEndTime( ) - Write the End Time and Task tothe Error LogThis function writes the end time and task to the log file and removes the current task informationfrom the Users in Application Report. For an example of how to set the POV, see“EntUpdateDefault( ) - Update Defaults” on page 271.
Use this format:
Declare Function EntMsgLogTaskEndTime Lib "heaccess.dll" Alias"_EntMsgLogTaskEndTimeVB@12" (ByVal hApp As Long, ByVal szTask As String, ByValbIncludePOV As Long) As Integer
Variable Description
hApp The application handle
Advanced Functions Alphabetical Reference 233
Variable Description
szTask A short description of the task
bIncludePOV TRUE to determine whether to append the current POV to the task; otherwise FALSE
This argument appends POV dimensions Category, Period, Organization, and Entity only.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
wRet% = EntMsgLogTaskStartTime(hApp&, "Custom Task", 1) . . .wRet% = EntMsgLogTaskEndTime(hApp&, "Custom Task", 1)
Use this format for C:
short WINAPI EntMsgLogTaskEndTime(HAPP hApp, LPSTR szTask, BOOL bIncludePOV)
EntMsgLogTaskStartTime( ) - Write the Start Time and Taskto the Error LogThis function writes the start time and task to the log file and to the Users in Application Report.For an example of how to set the POV, see “EntUpdateDefault( ) - Update Defaults” on page271.
Use this format:
Declare Function EntMsgLogTaskStartTime Lib "heaccess.dll" Alias"_EntMsgLogTaskStartTimeVB@12" (ByVal hApp As Long, ByVal szTask As String, ByValbIncludePOV As Long) As Integer
Variable Description
hApp The application handle
szTask A short description of the task
bIncludePOV TRUE to determine whether to append the current POV to the task; otherwise FALSE
This argument appends POV dimensions Category, Period, Organization, and Entity only.
Return Codes:
234 Advanced Functions
Code Meaning
The value from MessageBox( ), if called. Successful
NONE or 0 Error occurred
Example:
wRet% = EntMsgLogTaskStartTime(hApp&, "Custom Task", 1) . . .wRet% = EntMsgLogTaskEndTime(hApp&, "Custom Task", 1)
Use this format for C:
short WINAPI EntMsgLogTaskEndTime(HAPP hApp, LPSTR szTask, BOOL bIncludePOV)
EntMsgLogTime( ) - Write the Time and Event to the Log FileEntMsgLogTime( ) writes the time and event to the log file. This function reads a message fromthe string table, then formats the message by substituting the specified strings for the placeholdersin the message. The function substitutes the current time and date for the next placeholder inthe message, and writes the resulting formatted message to the Hyperion Enterprise error log.
Note: Visual Basic programmers must use EntMsgLogTimeVB() instead, since Visual Basiccannot pass an array of addresses of C-style strings.
Use this format:
short WINAPI EntMsgLogTime(HAPP hApp, short wMsgId, HINSTANCE hModule, shortwArgCount, LPCSTR arrayOfStrings)
Variable Description
hApp The application handle
wMsgId The string ID (in hModule) of the message
hModule The handle of the module that contains the string wMsgId
arrayOfStrings[ ] The array of strings to be substituted for the placeholders (%1, %2, etc.) in the message (wMsgID string)
wArgCount The number of elements in arrayOfStrings[ ]
Return Codes:
Returns 0.
Advanced Functions Alphabetical Reference 235
EntMsgLogTimeVB( ) - Write the Time and Event to the LogFileEntMsgLogTimeVB( ) writes the time and event to the log file. This function reads a messagefrom the string table, then formats the message by substituting up to three specified strings forthe first three placeholders in the message. The function substitutes the current time and datefor the next placeholder in the message, and writes the resulting formatted message to theHyperion Enterprise error log.
Use this format:
Declare Function EntMsgLogTimeVB Lib "heaccess.dll" Alias "_EntMsgLogTimeVB@24"(ByVal hApp As Long, ByVal wMsgId As Integer, ByVal hModule As Long, ByVal sz1 As String,ByVal sz2 As String, ByVal sz3 As String) As Integer
Variable Description
hApp The application handle
wMsgId The string ID (in hModule) of the message
hModule The handle of the module (resource DLL) that contains the string wMsgId
sz1, sz2, sz3 The strings to be substituted for the first three placeholders (%1, %2, %3) in the message (wMsgID string); NULL if not needed
Return Codes:
Always returns 0.
Example:
hModule& = GetModuleHandle("MyStrings.dll") 'Win32 function'IDS_MY_STRING is the string id for "Starting function %1 at %2." in MyStrings.dll.'The last placeholder, %2, is for the time and date.wRet% = EntMsgLogTimeVB(hApp&, IDS_MY_STRING, hModule&, "MyTestFunction", _vbNullString, vbNullString)
Use this format for C:
short WINAPI EntMsgLogTimeVB(HAPP hApp, short wMsgId, HINSTANCE hModule,LPCSTR sz1, LPCSTR sz2, LPCSTR sz3)
EntOpenApplication( ) - Open ApplicationThis function opens an application, but it does not select any tables. You must select tables aftercalling this function. You must call EntCloseApplication( ) to close the application when youare finished using it, before the program ends.
Use this format:
Declare Function EntOpenApplication Lib "heaccess.dll" Alias "_EntOpenApplication@16"(ByVal szAppId As String, ByVal szUserId As String, ByVal szPassword As String, wRet AsInteger) As Long
236 Advanced Functions
Variable Description
szAppId The application ID
szUserId The user ID
szPassword The user's password
wRet The buffer to return the error code. This variable returns 0 (zero) if successful, NONE if an error occurred.
Return Codes:
Code Meaning
The application handle (hApp) Successful
NONE or 0 Error occurred
Example:
hApp& = EntOpenAppplication("TAX", "MARY", "secret", ret%)If ret% = 0 Then MsgBox("Successful logon to TAX application")
Use this format for C:
HAPP WINAPI EntOpenApplication(LPSTR szAppId, LPSTR szUserId, LPSTR szPassword,short far * pwRet)
EntOpenServerApplication( ) - Open Server ApplicationThis function is like EntOpenApplication( ) except it sets internal flags to suppress any errormessages from being displayed. This function is intended for use on a server.
Use this format:
Declare Function EntOpenServerApplication Lib "heaccess.dll" Alias"EntOpenServerApplication@16" (ByVal szAppId As String, ByVal szUserId As String, ByValszPassWord As String, wRet As Integer) As Long
Variable Description
szAppId The application ID
szUserId The user ID
szPassWord The user password
wRet The buffer to return the error code. This variable returns 0 (zero) if successful, NONE if an error occurred.
Return Codes:
Advanced Functions Alphabetical Reference 237
Code Meaning
The application handle (hApp) Successful
NONE or 0 Error occurred
Example:
hApp& = EntOpenServerAppplication("TAX", "MARY", "secret", ret%)
Use this format for C:
HAPP WINAPI EntOpenServerApplication(LPSTR szAppId, LPSTR szUserId, LPSTRszPassWord, short far * pwRet)
EntPgeExtract( ) - Extract Page Format and Setup InformationThis function extracts page format and setup information, which can be set with Task/ExtractPage Format and Setup.
Note: EntPgeExtract( ) and EntPgeLoad( ) read and write to a binary file, which the user shouldnot access.
Use this format:
Declare Function EntPgeExtract Lib "heaccess.dll" Alias "_EntPgeExtract@12" (ByVal hAppAs Long, ByVal lpszFileName As String, ByVal wFlag As Integer) As Integer
Variable Description
hApp The application handle
lpszFileName The page format and setup load file
wFlag Flag (currently ignored)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
wRet% = EntPgeExtract(hApp&, szFile$, 0)
Use this format for C:
short WINAPI API_PgeExtract(HAPP hApp, LPCSTR szFileName, WORD wFlag)
238 Advanced Functions
EntPgeLoad( ) - Load Page Format and Setup InformationThis function loads page format and setup information, which can be set with Task/Extract PageFormat and Setup. It allows users to completely rebuild their applications.
The load is actually a merge routine of non-default format and setup information. It will notreload a default format or setup over a non-default value.
Note: EntPgeExtract( ) and EntPgeLoad( ) read and write to a binary file, which the user shouldnot access.
Use this format:
Declare Function EntPgeLoad Lib "heaccess.dll" Alias "_EntPgeLoad@12" (ByVal hApp AsLong, ByVal lpszFileName As String, ByVal wFlag As Integer) As Integer
Variable Description
hApp The application handle
lpszFileName The page format and setup load file
wFlag Flag (currently ignored)
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
wRet% = EntPgeLoad(hApp&, szFile$, 0)
Use this format for C:
short WINAPI API_PgeLoad(HAPP hApp, LPCSTR szFile, WORD wFlag)
EntPerAsk( ) - Select PeriodThis function calls the Hyperion Enterprise Select Period dialog box and retrieves the periodyou select. If you select Cancel, no period is retrieved.
Use this format:
Declare Function EntPerAsk Lib "heaccess.dll" Alias "_EntPerAsk@12" (ByVal hSelect As Long,fWantDate As Integer, ByVal szRetbuf As String) As Integer
Advanced Functions Alphabetical Reference 239
Variable Description
hSelect The handle of the selected tables
fWantDate One of the following flags to return the period:
l 0 to return the period as a period number.
l 1 to return the period as a date, if possible.
szRetbuf The buffer to return the period. The buffer should be large enough for the date and one extra character.
Note: If you specify 1 for fWantDate and no date is available, Hyperion Enterprise changes thevalue of fWantDate to zero. For example, if you specify 1 for fWantDate and you are tryingto retrieve the 13th month of a 13-month accounting year, Hyperion Enterprise changesthe value of fWantDate to zero (0) and returns the period number in szRetbuf. The date(if fWantDate = 1) is returned as month, day, and year, separated by commas. For example,March 31, 2003 would be returned as 3,31,2003.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Public Function SelectPeriod(iMethod As Integer) As StringDim ret As IntegerDim PerAsk As String * 20If hSelect& <> 0 ThenIf iMethod% < 0 Or iMethod% > 1 Then iMethod% = 0ret% = EntPerAsk(hSelect&, iMethod%, PerAsk$)If ret% = 0 Then SelectPeriod = CToBStr(PerAsk$)End IfEnd Function
Use this format for C:
short WINAPI EntPerAsk( HSELECT hSelect, SBOOL FAR * pfWantDate, LPSTR szRetbuf)
EntQryRptFreq( ) - Query Reporting FrequencyThis function retrieves the ID (short name) or description of the reporting frequency associatedwith a given frequency and view. You must select the Reporting Frequencies (ID_RPTFREQ)and Reporting Views (ID_RPTVIEW) tables before calling this function.
Use this format:
240 Advanced Functions
Declare Function EntQryRptFreq Lib "heaccess.dll" Alias "_EntQryRptFreq@24" (ByValhSelect As Long, ByVal sigFreq As Long, ByVal wView As Integer, ByVal pzbuf As String, ByValwMax As Integer, ByVal szBuf As String ) As Integer
Variable Description
hSelect The handle of the selected tables
sigFreq The signature of the frequency (FREQ_MONTH, FREQ_QUARTER, and so on). For more information, see “Frequencies and Views”on page 20
wView The view (VIEW_YTD or VIEW_PERIODIC)
pzbuf The query attribute (NAME or DESC)
wMax The length of szBuf
szBuf The buffer to return the ID or description of the reporting frequency. If szBuf is NAME, the buffer should be large enough for at leastHYP_SIZERPTFREQ+1 (SIZERPTFREQ+1 in C) characters. If szBuf is DESC, the buffer should be large enough for at least HYP_SIZEDESC+1 (SIZEDESC+1 in C) characters.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szRptFreq$ = Space(HYP_SIZERPTFREQ+1)ret% = EntQryRptFreq(hSelect&, FREQ_MONTH, VIEW_YTD, NAME, Len(szRptFreq$), szRptFreq$)If ret% = 0 Then szRptFreq$ = CToBStr(szRptFreq$)
Use this format for C:
short WINAPI EntQryRptFreq(HSELECT hSelect, SIGNA sigFreq, short iView, short iAttr,short iMax, void * szBuf )
EntQueryEx( ) - Query InformationThis function queries a record in a table and retrieves the requested field (attribute) from therecord. For detailed information about query attributes you can use with Hyperion Enterprisetables, see Appendix B, “Query Attributes.”
Visual Basic programmers should use the EntQueryExStr( ) function when querying a stringvalue. EntQueryExStr( ) is a clone of the declaration for EntQueryEx( ) adjusted for use withstrings and declared in the TOOLKIT.BAS file.
Use this format:
Advanced Functions Alphabetical Reference 241
Declare Function EntQueryEx Lib "heaccess.dll" Alias "_EntQueryEx@32" (ByVal hSelect AsLong, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal sigRecd As Long, ByVal sigKeyAs Long, ByVal dwLen As Long, pzBuf As Any, apiS As APISTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables
wTabId The table containing the record you want to query
wAttr The attribute for the field you are querying
sigRecd The signature of the record you want to query
sigKey NONE or the key of a related table. For more information, see “Related Tables” on page 363.
dwLen The length of pzBuf
pzBuf The buffer to return the requested information
apiS NULL or the address of an apiStruct structure with mor3 information
Note: If you are programming in Microsoft Visual Basic, see “Visual Basic Programming Notes”on page 16 for instructions on passing NULL in place of the apiStruct.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
dwLen& = Len(sigFreq&)ret% = EntQueryEx0(hSelect&, HYP_ID_CATEGORY, HYP_CAT_FREQ, sigCat&, HYP_NONE, dwLen&, sigFreq&, 0)
Note: EntQueryEx0( ) in this example is declared similar to EntQueryEx( ), but its declarationallows passing 0 (zero) in place of the apiStruct. For more information, see “Visual BasicProgramming Notes” on page 16.
Use this format for C:
short WINAPI EntQueryEx(HSELECT hSelect, short wTabId, short wAttr, SIGNA sigRecd,SIGNA sigKey,longd wLen, void FAR * pzBuf, LPAPISTRUCT pApiS)
242 Advanced Functions
EntQueryDefault( ) - Query DefaultsEntQueryDefault( ) queries application or user defaults. It is not necessary to select the tablesbefore calling this function. For detailed information about query attributes you can use withHyperion Enterprise tables, see Appendix B, “Query Attributes.”
Visual Basic programmers should use the EntQueryDefaultStr() function when querying a stringvalue. EntQueryDefaultStr() is a clone of the declaration of EntQueryDefault() adjusted for usewith strings and declared in the ToolKit.bas file. For detailed information about query attributesyou can use with Hyperion Enterprise tables, see Appendix B, “Query Attributes.”
Use this format:
Declare Function EntQueryDefault Lib "heaccess.dll" Alias "_EntQueryDefault@20" (ByValhApp As Long, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal wLen As Integer,pzBuf As Any) As Integer
Variable Description
hApp The application handle
wTabId The table ID, which should be one of the following tables:
l ID_HAPP
l ID_APPDEFAULT
l ID_USERDEFAULT
wAttr The attribute for the field you are querying
wLen The length of pzBuf
pzBuf The buffer for the requested information
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Dim isServerAvail As Byteret% = EntQueryDefault(hApp&, HYP_ID_HAPP, HYP_SERVER_AVAIL, Len(isServerAvail), isServerAvail)
Use this format for C:
short WINAPI EntQueryDefault(HAPP hApp, short wTabId, short wAttr, short wLen, void FAR* pzBuf)
Advanced Functions Alphabetical Reference 243
EntRegisterMsgBox( ) - Register Alternate MessageBox( )RoutineThis function registers a function for the Hyperion Enterprise API functions to use in place ofcalling the Windows MessageBox( ) function directly.
Use this format:
Declare Sub EntRegisterMsgBox Lib "heaccess.dll" Alias "_EntRegisterMsgBox@4" (ByVallpfnMsgBox)
where lpfnMsgBox is the address of a function or NULL. Use NULL to unregister a function thatyou previously registered so that the API uses MessageBox( ) again.
Return Codes:
None.
Use this format for C:
void WINAPI EntRegisterMsgBox(LPFNMSGBOX lpfnMsgBox)
EntRunRollover( ) - Run RolloverThis function executes a rollover. The callback function for EntRunRollover( ) provides statusinformation.
Use this format:
Declare Function EntRunRollover Lib "heaccess.dll" Alias "_EntRunRollover@12" (ByValhSelect As Long, ByVal sigRolloverSet As Long, ByVal lpCallback As Long) As Integer
Variable Description
hSelect The handle of the selected tables
sigRolloverSet The signature of the rollover record
lpCallback The address of a user-provided callback function. For more information, see “CALLBACKAPI” on page 309.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntRunRollover(HSELECT hSelect, SIGNA sigRolloverSet, CALLBACKAPIlpCallback)
244 Advanced Functions
EntSave( ) - Save TableThis function saves changes to one or more Hyperion Enterprise tables that were made byEntUpdate( ). You should save changes to all selected tables simultaneously. If the programaborts or fails to save the rest of the changes and you are saving changes one table at a time, thetables can become unsynchronized with each other.
Use this format:
Declare Function EntSave Lib "heaccess.dll" Alias "_EntSave@16" (ByVal hSelect As Long,ByVal wTabId As Integer, ByVal sigKey As Long, apiS As APISTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables
wTabId The ID of the table you want to save, or HYP_NONE (NONE in C) to save all tables selected by hSelect
sigKey NONE, or the key of a related table. For more information, see “Related Tables” on page 363.
apiS NULL, or a pointer to an apiStruct structure with more information
Note: Because internal tables might change due to changes to another table, we recommendsetting the wTabId argument to HYP_NONE (NONE in C) to save changes to all selectedtables.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
rc% = EntSave(hSelect&, HYP_NONE, HYP_NONE, 0)
Use this format for C:
short WINAPI EntSave(HSELECT hSelect, short wTabId, SIGNA sigKey, LPAPISTRUCTpApiS)
EntSaveDefault( ) - Save DefaultsThis function saves application or user defaults that were changed by the EntUpdateDefault( )function. For more information about default settings, see “Tables of Default Settings” on page361.
Use this format:
Advanced Functions Alphabetical Reference 245
Declare Function EntSaveDefault Lib "heaccess.dll" Alias "_EntSaveDefault@8" (ByVal hAppAs Long, ByVal wTabId As Integer) As Integer
Variable Description
hApp The application handle
wTabId The table ID, which must be one of the following tables:
l ID_APPDEFAULT
l ID_USERDEFAULT
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntSaveDefault(HAPP hApp, short wTabId)
EntSecurityExtract( ) - Extract SecurityThis function executes a security extract. This function requires a callback function that the APIwill call to send current status of the extract.
If extracting security on a server (the DBE_REMOTE bit flag is set in lpSecLoad->wFlags), youmay want to know the process handle of the extract process so that you can track and monitorthe server processes that your program launches. The process handle returned at lpSecLoad->hProcess is the process handle of an instance of the Task Status window program,HComMgr.exe, running on the local client computer. For more information, see “Server Tasks”on page 121.
Note: If you are a Visual Basic programmer, you must use EntSecurityExtractVB( ) instead ofEntSecurityExtract( ).
Use this format for C:
short WINAPI EntSecurityExtract(HSELECT hSelect, LPSECLOADSTRUCT lpSecLoad,CALLBACKSECLOAD fnCallBack, LPARAM lParam)
Variable Description
hSelect The handle of the selected tables
lpSecLoad The structure with arguments for the security extract
246 Advanced Functions
Variable Description
lpSecLoad->dwsize The size of this structure
lpSecLoad->cDelimiter The field delimiter, which typically is a comma ( , )
lpSecLoad->szFileName The path to the extract file
lpSecLoad->bSecClass TRUE to extract security classes, else False
lpSecLoad->bAcesRight TRUE to extract access rights, else False
lpSecLoad->bUserAndGroup TRUE to extract users and user groups, else False
lpSecLoad->bTask TRUE to extract security tasks, else False
lpSecLoad->wFlags Flags DBE_APPEND and DBE_REMOTE, as desired
lpSecLoad->phProcess The process handle returned when executing on a server
fnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpSecLoad->wFlags.
lParam The argument for the callback function
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
NONE Error occurred
LOAD_CANCELLED Cancelled by user
LOAD_CHECK_ERRORLOG Error occurred and listed in the error log
For an example, see “EntSecurityExtractVB( ) - Extract Security” on page 247.
EntSecurityExtractVB( ) - Extract SecurityIf you are a Visual Basic programmer, use this function instead of EntSecurityExtract( ). Thisfunction executes a security extract. This function requires a callback function that the API willcall to send current status of the extract.
If extracting security on a server (the DBE_REMOTE bit flag is set in lpSecData.wFlags), youmay want to know the process handle of the extract process so that you can track and monitorthe server processes that your program launches. The process handle returned atlpSecData.hProcess is the process handle of an instance of the Task Status window program,HComMgr.exe, running on the local client computer. For more information, see “Server Tasks”on page 121.
Use this format:
Advanced Functions Alphabetical Reference 247
Declare Function EntSecurityExtractVB Lib "heaccess.dll" Alias "_EntSecurityExtractVB@20"_ (ByVal hSelect As Long, lpSecData As SecLoadStruct, ByVal lpszFileName As String, ByVallpfnCallBack As Any, ByVal lParam As Long) As Integer
Variable Description
hSelect The handle of the selected tables
lpSecData The structure with arguments for the security extract
lpSecData.dwsize The size of this structure
lpSecData.cDelimiter The field delimiter, which typically is a comma ( , )
lpSecData.szFileName The path to the extract file
lpSecData.bSecClass TRUE to extract security classes; otherwise False
lpSecData.bAcesRight TRUE to extract access rights; otherwise False
lpSecData.bUserAndGroup TRUE to extract users and user groups; otherwise False
lpSecData.bTask TRUE to extract security tasks; otherwise False
lpSecData.wFlags Flags DBE_APPEND and DBE_REMOTE, as desired
lpSecData.phProcess The process handle returned when executing on a server
szFileName The path/filename of the extract file
lpfnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpSecData.wFlags.
lParam The argument for the callback function
Example:
Note: EntUnSelect0( ) in this example is declared similar to EntUnSelect( ) but its declarationallows passing 0 in place of the apiStruct. For more information, see “Visual BasicProgramming Notes” on page 16.
Private Sub SecurityExtract(hSelect As Long, szFile As String)Dim s As SecLoadStructDim wRet%wRet% = EntSelectAdd(HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, 0, 0, 0, 0)'Select items to extractIf chkClass.Value Then s.bSecClass = TrueIf chkRights.Value Then s.bAcesRight = TrueIf chkUsr.Value Then s.bUserAndGroup = TrueIf chkTask.Value Then s.bTask = Trues.dwSize = LenB(s)s.cDelimiter = Asc(",")s.wFlags = 0s.szFileName = 0 'Pass szFile$ as argument to function instead
248 Advanced Functions
wRet% = EntSecurityExtractVB(hSelect&, s, szFile$, AddressOf MyCallBack, 0)hSelect& = EntUnSelect0(hSelect&, HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, 0, wRet%, 0)End SubPublic Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfTaskCString As Long, ByVal lPos As Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lParam As Long) As IntegerDim wRet%, wLen%Dim szFile$, szTaskName$Dim szMsg$'Copy C-style strings to Basic stringswLen% = EntVBGetCStrLen (addressOfFileNameCString)szFile$ = Space(wLen%)wRet% = EntVBCopyStr(szFile$, addressOfFileNameCString, wLen%)wLen% = EntVBGetCStrLen(addressOfTaskCString)szTaskName$ = Space(wLen%)wRet% = EntVBCopyStr(szTaskName$, addressOfTaskCString, wLen%)szMsg$ = "Now Extracting " & szTaskName$ & " From " & szFile$List1.AddItem (szMsg$)MyCallBack = 0 'return 0End Function
Use this format for C:
short WINAPI EntSecurityExtractVB(HSELECT hSelect, LPSECLOADSTRUCT lpSecData,LPCSTR lpszExtFileName,CALLBACKSECLOAD fnCallBack, LPARAM lParam)
EntSecurityLoad( ) - Load SecurityThis function executes a security load. This function requires a callback function that the APIwill call to send current status of the load.
If loading security on a server (the DB_REMOTE bit flag is set in lpSecLoad->wFlags), you maywant to know the process handle of the load process so that you can track and monitor the serverprocesses that your program launches. The process handle returned at lpSecLoad->hProcess isthe process handle of an instance of the Task Status window program, HComMgr.exe, runningon the local client computer. For more information, see “Server Tasks” on page 121.
Note: If you are a Visual Basic programmer, you must use EntSecurityLoadVB( ) instead ofEntSecurityLoad( ).
Use this format for C:
short WINAPI EntSecurityLoad(HSELECT hSelect, LPSECLOADSTRUCT lpSecLoad,CALLBACKSECLOAD fnCallBack, LPARAM lParam)
Variable Description
hSelect The handle of the selected tables
lpSecLoad The structure with arguments for the security load
Advanced Functions Alphabetical Reference 249
Variable Description
lpSecLoad->dwsize The size of this structure
lpSecLoad->bSecClass Do security classes
lpSecLoad->bAcesRight Do access rights
lpSecLoad->bUserAndGroup Do users and groups
lpSecLoad->bTask Do security tasks
lpSecLoad->szFileName The path to the load file
lpSecLoad->cDelimiter The field delimiter, which typically is a comma ( , )
lpSecLoad->cPad Not used.
lpSecLoad->wFlags 0 or DB_REMOTE
lpSecLoad->phProcess The process handle returned when executing on a server
fnCallBack The callback function for status information. This is not used if the DB_REMOTE flag is set in lpSecLoad->wFlags.
lParam The argument for the callback function
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
NONE Error occurred
LOAD_CANCELLED Cancelled by user.
LOAD_CHECK_ERRORLOG Error occurred and listed in the error log.
For an example, see “EntSecurityLoadVB( ) - Load Security” on page 250.
EntSecurityLoadVB( ) - Load SecurityIf you are a Visual Basic programmer, use this function instead of EntSecurityLoad( ). Thisfunction executes a security load. This function requires a callback function that the API willcall to send current status of the load.
If loading security on a server (the DB_REMOTE bit flag is set in lpSecData.wFlags), you maywant to know the process handle of the load process so that you can track and monitor the serverprocesses that your program launches. The process handle returned at lpSecData.hProcess is theprocess handle of an instance of the Task Status window program, HCOMMGR.exe, runningon the local client computer. For more information, see “Server Tasks” on page 121.
250 Advanced Functions
Note: If you are a Visual Basic programmer, you must use EntSecurityLoadVB( ) instead ofEntSecurityLoad( ).
Use this format:
Declare Function EntSecurityLoadVB Lib "heaccess.dll" Alias "_EntSecurityLoadVB@20"(ByVal hSelect As Long, lpSecData As SecLoadStruct, ByVal lpszFileName As String, ByVallpfnCallBack As Any, ByVal lParam As Long) As Integer
Variable Description
hSelect The handle of the selected tables
lpSecData The structure with arguments for the security load
lpSecData.dwsize The size of this structure
lpSecData.cDelimiter The field delimiter, which typically is a comma ( , )
lpSecData.szFileName The path to the load file
lpSecData.bSecClass TRUE to load security classes; otherwise False
lpSecData.bAcesRight TRUE to load access rights; otherwise False
lpSecData.bUserAndGroup TRUE to load users and user groups; otherwise False
lpSecData.bTask TRUE to load security tasks; otherwise False.
lpSecData.wFlags 0 or DB_REMOTE
lpSecData.phProcess The process handle eturned when executing on a server
szFileName The path/filename of the file to load
fnCallBack The callback function for status information. This is not used if the DB_REMOTE flag is set in lpSecData.wFlags.
lParam The argument for the callback function.
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
NONE Error occurred
LOAD_CANCELLED Cancelled by user
LOAD_CHECK_ERRORLOG Error occurred and listed in the error log
Example:
Private Sub SecurityLoad(hSelect As Long, szFile As String)Dim s As SecLoadStructDim flag%, wRet%
Advanced Functions Alphabetical Reference 251
wRet% = EntSelectAdd(HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READWRITE, 0, 0, 0, 0)'Select items to loadIf chkClass.Value Then s.bSecClass = TrueIf chkRights.Value Then s.bAcesRight = TrueIf chkUsr.Value Then s.bUserAndGroup = TrueIf chkTask.Value Then s.bTask = Trues.dwSize = LenB(s)s.cDelimiter = Asc("!")s.wFlags = 0 'local executions.szFileName = 0 'Pass szFile$ as argument to function insteadwRet% = EntSecurityLoadVB(hSelect&, s, szFile$, AddressOf MyCallBack, 0)hSelect& = EntUnSelect0(hSelect&, HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, 0, wRet%, 0)End SubPublic Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfTaskCString As Long, ByVal lPos As Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lParam As Long) As IntegerDim wRet%, wLen%Dim szFile$, szTask$Dim szMsg$'Copy C-style strings to Basic stringswLen% = EntVBGetCStrLen(addressOfFileNameCString)szFile$ = Space(wLen%)wRet% = EntVBCopyStr(szFile$, addressOfFileNameCString, wLen%)wLen% = EntVBGetCStrLen(addressOfTaskCString)szTask$ = Space(wLen%)wRet% = EntVBCopyStr(szTask$, addressOfTaskCString, wLen%)szMsg$ = "Now Loading " & szTask$ & " From " & szFile$List1.AddItem (szMsg$)MyCallBack = 0 'return 0End Function
Use this format for C:
short WINAPI EntSecurityLoadVB(HSELECT hSelect, LPSECLOADSTRUCT lpSecData,LPCSTR lpszFileName, CALLBACKSECLOAD fnCallBack, LPARAM lParam)
EntSelect( ) - Select a Table for UseThis function is used to select a table. Tables must be selected before they can be accessed by anyother function. EntSelect( ) returns a handle of one or more selected tables. You can use theID_ASSOC constant with the table ID and an OR operation to select all associated tables. UseEntSelectAdd( ) to select additional tables. Remember to deselect the table when you are finishedusing it by calling the EntUnSelect( ) function.
You should use the ID_ASSOC constant rather than select associated tables individually. Formore information, see “Associated Tables” on page 362.
252 Advanced Functions
Note: You cannot use EntSelect( ) with any table that requires a sigKey argument. This is becauseyou must first select the table that contains sigKey, then use EntSelectAdd( ) to select thedesired table. For more information, see “EntSelectAdd( ) - Select an Additional Tablefor Use” on page 254.
Use this format:
Declare Function EntSelect Lib "heaccess.dll" Alias "_EntSelect@36" (ByVal hApp As Long,ByVal wTabId As Integer, ByVal sigKey As Long, ByVal wAttr As Integer, wLockMode As Integer,ByVal lpPtar As Long, ByVal lpPtac As Long, ByVal SelCallback As Long, ByVal lParam As Long)As Long
Variable Description
hApp The application handle
wTabId The ID of the table that you want to select
sigKe NONE
wAttr The access rights desired. Use APILOCK_READONLY to open the table with read-only access.
wLockMode The buffer to return the access rights granted. On return, this is APILOCK_READONLY if successful, or NONE if access to thetable is denied.
lpPtar NULL (not implemented)
lpPtac NULL (Reserved for internal API use.)
SelCallback NULL, or a callback function. For more information, see “Selection Callbacks” on page 112.
lParam The parameter to be passed back to the user-provided callback function
Return Codes:
Code Meaning
The handle of the selected tables Successful
NULL Error occurred
Example:
hSelect& = EntSelect(hApp&, HYP_ID_CATEGORY OR HYP_ID_ASSOC, HYP_NONE, APILOCK_READONLY, ret%, 0, 0, 0, 0)If ret% <> APILOCK_READONLY Then MsgBox("Error selecting table")
Use this format for C:
HSELECT WINAPI EntSelect(HAPP hApp, short wTabId, SIGNA sigKey, short wAttr, shortFAR * lpwLockMode, void FAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback,LPARAM lParam)
Advanced Functions Alphabetical Reference 253
EntSelectAdd( ) - Select an Additional Table for UseThis function selects a table and adds it to an existing table selection handle from EntSelect( ).You should use an OR operation with the ID_ASSOC constant to select the table and itsassociated tables at the same time rather than select associated tables individually. For moreinformation, see “Associated Tables” on page 362.
Note: Deselect the table when you are finished using it by calling EntUnSelect( ).
Tables in which the category is passed as the sigKey argument apply to one category. If you wantto select the table for more than one category, call EntSelectAdd( ) to select it for each category.
Note: If you want to select ID_JOURNAL_DETAIL, ID_JOURNAL_HISTORY_DETAIL,ID_JOURNAL_TEMPLATE_DETAIL, or ID_JOURNAL_PERIOD_INFO, useEntSelectTableAdd( ) instead of EntSelectAdd( ) because you need to pass an apiStructstructure argument.
Use this format:
Declare Function EntSelectAdd Lib "heaccess.dll" Alias "_EntSelectAdd@32" (ByVal wTabIdAs Integer, ByVal sigKey As Long, ByVal hSelect As Long, ByVal wAttr As Integer, ByVal lpPtarAs Long, ByVal lpPtac As Long, ByVal SelCallback As Long, lParam As Long) As Integer
Variable Description
wTabId The ID of the table that you want to select
sigKey NONE, or the key of a related table. The related table should already have been selected.
hSelect The handle of the currently selected tables from EntSelect( )
wAttr The access rights desired. Use APILOCK_READONLY to open the table with read-only access.
lpPtar NULL (Not implemented.)
lpPtac NULL (Reserved for internal API use).
SelCallback NULL, or a pointer to a user-provided callback function. For more information, see “Selection Callbacks” on page 112.
lParam The parameter to be passed back to the user-provided callback function
Return Codes:
Code Meaning
Access rights granted Successful
NONE Error occurred
Example:
254 Advanced Functions
ret% = EntSelectAdd(HYP_ID_ORGANIZATION OR HYP_ID_ASSOC, sigCat&, hSelect&, APILOCK_READONLY, 0,0,0,0)If ret% <> APILOCK_READONLY Then MsgBox("Error selecting table")
Use this format for C:
short WINAPI EntSelectAdd(short wTabId, SIGNA sigKey, HSELECT hSelect, short wAttr, voidFAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback, LPARAM lParam)
EntSelectTable( ) - Select a Table for UseThis function selects one or more tables. It works the same way as the EntSelect( ) function,except that you can pass an apiStruct. You should use an OR operation with the ID_ASSOCconstant to select the table and its associated tables rather than select associated tablesindividually. For more information, see “Associated Tables” on page 362.
Note: Deselect the table when you are finished using it by calling EntUnSelect( ).
Use this format:
Declare Function EntSelectTable Lib "heaccess.dll" Alias "_EntSelectTable@40" (ByVal hAppAs Long, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal wAttr As Integer, wLockModeAs Integer, ByVal lpPtar As Long, ByVal lpPtac As Long, ByVal SelCallback As Long, ByVallParam As Long, apiS As APISTRUCT) As Long
Variable Description
hApp The application handle
wTabId The ID of the table you want to select
sigKey NONE
wAttr The access rights desired. Use APILOCK_READONLY to open the table with read-only access.
wLockMode The buffer to return the access rights granted. On return, this is APILOCK_READONLY if successful, or NONE if access to thetable is denied.
lpPtar NULL (Not implemented.)
lpPtac NULL (Reserved for internal API use.)
SelCallback NULL, or a pointer to a user-provided callback function. For more information, see “Selection Callbacks” on page 112.
lParam The parameter to be passed back to the user-provided callback function
apiS NULL, or a pointer to an apiStruct structure with more information
Return Codes:
Advanced Functions Alphabetical Reference 255
Code Meaning
The handle of the selected tables Successful
NONE Error occurred
Example:
hSelect& = EntSelectTable(hApp&, HYP_ID_CATEGORY OR HYP_ID_ASSOC, HYP_NONE, APILOCK_READONLY, ret%, 0, 0, 0, 0, 0)If ret% <> APILOCK_READONLY Then MsgBox("Error selecting table")
Use this format for C:
HSELECT WINAPI EntSelectTable(HAPP hApp, short wTabId, SIGNA sigKey, short wAttr,short FAR * lpwLockMode, void FAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback,LPARAM lParam, LPAPISTRUCT pApiS)
EntSelectTableAdd( ) - Select an Additional Table for UseThis function selects a table and adds it to an existing table selection handle. It works the sameway as the EntSelectAdd( ) function, except that you can pass an apiStruct. You should use anOR operation with the ID_ASSOC constant to select the table and its associated tables ratherthan select associated tables individually. For more information, see the “Associated Tables” onpage 362.
Note: Deselect the table when you are finished using it by calling EntUnSelect( ).
For information on using this function with specific tables, see “EntSelectTableAdd( ) - Selectan Additional Table for Use” on page 256.
Use this format:
Declare Function EntSelectTableAdd Lib "heaccess.dll" Alias "_EntSelectTableAdd@36"(ByVal wTabId As Integer, ByVal sigKey As Long, ByVal hSelect As Long, ByVal wAttr As Integer,ByVal lpPtar As Long, ByVal lpPtac As Long, ByVal SelCallback As Long, lParam As Long, apiSAs APISTRUCT) As Integer
Variable Description
wTabId The ID of the table that you want to select
sigKey NONE, or the key of a related table. The related table should already have been selected.
hSelect The handle of the currently selected tables from EntSelect( )
wAttr The access rights desired. Use APILOCK_READONLY to open the table with read-only access.
lpPtar NULL (Not implemented.)
256 Advanced Functions
Variable Description
lpPtac NULL (Reserved for internal API use.)
SelCallback NULL, or a pointer to a user-provided callback function. For more information, see “Selection Callbacks” on page 112.
lParam The parameter to be passed back to the user-provided callback function
apiS NULL, or a pointer to an apiStruct structure with more information
Return Codes:
Code Meaning
Access rights granted Successful
NONE Error occurred
Use this format for C:
short WINAPI EntSelectTableAdd(short wTabId, SIGNA sigKey, HSELECT hSelect, shortwAttr, void FAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback, LPARAM lParam,LPAPISTRUCT pApiS)
EntSelectTableAdd( ) - Notes for Specific TablesFor the journal detail tables (ID_JOURNAL_DETAIL, ID_JOURNAL_HISTORY_DETAIL, andID_JOURNAL_TEMPLATES_DETAIL), you must set up an apiStruct (see “Using an apiStructStructure” on page 110). Set the fields shown in the following table in the apiStruct.
Field Description
sigCat The category signature.
lStartPeriod The period.
lEndPeriod The period (same as lStartPeriod, because journals only apply to one period).
Pass the signature of the appropriate journal as the sigKey argument. For more information, see“Related Tables and Advanced Functions” on page 113.
Table ID_JOURNAL_PERIOD_INFO requires a similar apiStruct. Here is an example:
Dim apiS As APISTRUCTCall EntInitApiStruct(hApp&, apiS)apiS.sigCat = sigCat&apiS.lStartPeriod = 0 '1st periodapiS.lEndPeriod = 0 'same as start periodret% = EntSelectTableAdd(HYP_ID_JOURNAL_DETAIL, sigJour&, hSelect&, APILOCK_READONLY, 0, 0, 0, 0, apiS)If ret% <> APILOCK_READONLY Then MsgBox("Error selecting table")
Advanced Functions Alphabetical Reference 257
EntSetActiveModule( ) - Set Active ModuleThis function tells Hyperion Enterprise the name of your program as it should appear in theUsers in Application report in the Hyperion Enterprise Application module. For moreinformation, see the Maintaining Applications chapter in the Hyperion EnterpriseAdministrator’s Guide.
Use this format:
Declare Function EntSetActiveModule Lib "heaccess.dll" Alias "_EntSetActiveModule@12"(ByVal hApp As Long, ByVal wModule As Integer, ByVal szText As String) As Integer
Variable Description
hApp The application handle
wModule MF_HACCESS, which is defined in the TOOLINC.H file
szText The text to display in the system reports
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Use this format for C:
short WINAPI EntSetActiveModule(HAPP hApp, short wModule, LPSTR szText)
EntSharesExtract( ) - Shares ExtractEntSharesExtract() extracts the shares to an ASCII file. Before you call this function, select thefollowing tables:
l Default tables (category, organization, account tables; for more information see “Select andDeselect Tables using Advanced Functions” on page 111.
l ID_SHARES and associated tables - APILOCK_READONLY
l ID_SECURITY and associated tables - APILOCK_READONLY
Set the point of view to the appropriate category before calling EntSharesExtract...(). For moreinformation, see “Setting the Point of View” on page 121.
Note: If you are a Visual Basic programmer, you must use EntSharesExtractVB() instead ofEntSharesExtract().
Use this format for C:
258 Advanced Functions
short WINAPI EntSharesExtract(HSELECT hSelect, LPSHRSEXTRACTSTRUCT pArgs,LPAPISTRUCT lpApiStruct)
Variable Description
hSelect The handle of the selected tables
pArgs The structure with arguments for the shares extract
pArgs->dwsize The size of the shares’ extract structure
pArgs->hProcess The Task Status window process handle is returned here if executing on the server
pArgs->cDelim The field delimiter, which typically is a comma ( , )
pArgs->nMode The different modes used to extract all entities, selected groups or selected entities.
Values to use for pArgs.nMode are:
l SHR_EXT_ALLENT - Extract all entities.
l SHR_EXT_SELGRP - Extract all entities in the group.
l SHR_EXT_SELENT - Extract the selected entity only (pSigs.sigNode).
pArgs->sigNode Signature of the selected entity.
pArgs->bRemoteFlag Remote or local extract. TRUE for remote extract, FALSE for local extract.
pArgs->fnCallBack Not used.
pArgs->lParam Not used.
pArgs->szExtractFile File name for file to extract to.
lpApiStruct Pointer to an APISTRUCT struct.
lpApiStruct->1StartPeriod First period (0-based).
lpApiStruct->1EndPeriod Last period for which to extract shares (0-based).
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
See “EntSharesExtractVB( ) - Shares Extract” on page 259 for an example.
EntSharesExtractVB( ) - Shares ExtractIf you are a Visual Basic programmer, use this function instead of EntSharesExtract(). Thisfunction extracts the shares to an ASCII file. Before you call this function, select the followingtables:
Advanced Functions Alphabetical Reference 259
l Default tables (category, organization, account tables; for more information see “Select andDeselect Tables using Advanced Functions” on page 111.
l ID_SHARES and associated tables - APILOCK_READONLY
l ID_SECURITY and associated tables - APILOCK_READONLY
Set the point of view to the appropriate category before calling EntSharesExtract...(). For moreinformation, see “Setting the Point of View” on page 121.
This function is similar to EntSharesExtract() except that the name of the extract file is passedas a function argument instead of in pArgs.lpszExtractFile.
Use this format:
Declare Function Lib "heaccess.dll" Alias "_@16" (ByVal hSelect As Long, pArgs AsSHRSEXTRACTSTRUCT, ByVal szExtractFile As String, apiS as ApiStruct) As Integer
Variable Description
hSelect The handle of the selected tables
pArgs Structure with arguments for the shares extract. See ToolKit.bas. All fields are required input except the callback function(NULL) and the output fields.
pArgs.dwsize The size of the shares extract structure
pArgs.hProcess The Task Status window process handle is returned here if executing on the server.
pArgs.cDelim The field delimiter, which typically is a comma ( , )
pArgs.nMode The different modes used to extract all entities, selected groups or selected entities:
l SHR_EXT_ALLENT - Extract all entities.
l SHR_EXT_SELGRP - Extract all entities in the group.
l SHR_EXT_SELENT - Extract selected entity only (pArgs.sigNode).
pArgs.sigNode Signature of the selected entity
pArgs.bRemoteFlag Remote or local extract; TRUE for remote extract, FALSE for local extract
pArgs.fnCallBack Not used.
pArgs.lParam Not used.
szExtractFile File name for shares extract
apiS ApiStruct structure (user-defined type)
apiS.lStartPeriod First period (0 based)
apiS.lEndPeriod Last period (0 based) for which to extract shares
Return Codes:
260 Advanced Functions
Code Meaning
0 Successful
NONE Error occurred
Example:
Dim shrsExt As ShrsExtractStructDim apiStruct As apiStructDim ret%shrsExt.dwSize = LenB(shrsExt)shrsExt.cDelim = Asc(",")If optAllEnt.Value = True Then shrsExt.nMode = SHR_EXT_ALLENT 'all entitiesElse If optSelGrp.Value = True Then shrsLoad.nMode = SHR_EXT_SELGRP 'selected group Else shrsExt.nMode = SHR_EXT_SELENT 'selected entity End IfEnd IfshrsExt.sigNode = EntGetEntitySig(hSelect&, szEntity, HYP_NAME_IMPLICIT)shrsExt.bRemoteFlag = 0shrsExt.fnCallBack = 0shrsExt.lParam = 0shrsExt.lpszFileName = 0Call EntInitApiStruct(hApp&, apiStruct)apiStruct.lStartPeriod = 0 '1st periodapiStruct.lEndperiod = 11 '12th periodret% = EntSharesExtractVB(hSelect&, shrsExt, szFileName, apiStruct)
EntSharesLoad( ) - Shares LoadEntSharesLoad() loads the shares from an ASCII file. Before you call this function, select thefollowing tables:
l Default tables (category, organization, account tables; for more information see “Select andDeselect Tables using Advanced Functions” on page 111.
l ID_SHARES and associated tables - APILOCK_READWRITE
l ID_SECURITY and associated tables - APILOCK_READONLY
Note: If you are a Visual Basic programmer, you must use EntSharesLoadVB() instead ofEntSharesLoad().
Use this format for C:
short WINAPI EntSharesLoad(HSELECT hSelect, LPSHRSLOADSTRUCT lpShrsLoadSruct,LPAPISTRUCT lpApiStruct)
Advanced Functions Alphabetical Reference 261
Variable Description
hSelect The handle of the selected tables
lpShrsLoadStruct The structure with arguments for the shares load
lpShrsLoadStruct->dwsize The size of the shares’ load structure
lpShrsLoadStruct->hProcess The Task Status window process handle is returned here if executing on the server.
lpShrsLoadStruct->cDelim The field delimiter, which typically is a comma ( , )
lpShrsLoadStruct->nMode Merge or replace shares mode:
l SHR_MERGE - Merge
l SHR_REPLACE - Replace
lpShrsLoadStruct->bRemoteFlag TRUE for server load, FALSE for local load
lpShrsLoadStruct->wExtFlag 0; future extensions
lpShrsLoadStruct->fnCallBack The callback function for load.
Your callback function for EntSharesLoad(), and EntSharesLoadVB() must be the type defined asCALLBACKSHARES. For more information see “CALLBACKSHARES” on page 319.
lpShrsLoadStruct->lParam The argument for the callback function
lpShrsLoadStruct->pszFileName File to load
lpApiStruct NULL. Structure for API compatibility.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
See “EntSharesExtractVB( ) - Shares Extract” on page 259 for an example.
EntSharesLoadVB( ) - Shares LoadIf you are a Visual Basic programmer, use this function instead of EntSharesLoad(). This functionloads the shares from an ASCII file. Before you call this function, select the following tables:
l Default tables (category, organization, account tables; for more information see “Select andDeselect Tables using Advanced Functions” on page 111.
l ID_SHARES and associated tables - APILOCK_READWRITE
l ID_SECURITY and associated tables - APILOCK_READONLY
262 Advanced Functions
This is similar to EntSharesLoad() except that the name of the extract file is passed as a functionargument instead of in pArgs.lpszFileName.
Use this format:
Declare Function EntSharesLoadVB Lib "heaccess.dll" Alias "_EntSharesLoadVB@16" (ByValhSelect As Long, pArgs As SHRSLOADSTRUCT, ByVal szLoadFile As String, apiS as APIStruct)As Integer
Variable Description
hSelect The handle of the selected tables
pArgs Struct with arguments for the shares load. See ToolKit.bas. All fields are required input except the callback function(NULL(0) if not used) and the output fields. The callback function (fnCallBack) is only used when executing locally, notwhen executing on the server.
pArgs.dwsize The size of the shares’ load structure
pArgs.hProcess The Task Status window process handle is returned here if executing on a server.
pArgs.cDelim The field delimiter, which typically is a comma ( , )
pArgs.nMode Merge or replace mode:
l SHR_MERGE - merge
l SHR_REPLACE - replace
pArgs.bRemoteFlag TRUE for server load;FALSE for local load
pArgs.wExtFlag Future extensions. 0
pArgs.fnCallBack The callback function for load. For more information, see “CALLBACKSHARES” on page 319.
pArgs.lParam The argument for the callback function
sxLoadFile File to load
apiS Structure for API compatibility; Nul.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Note: EntSharesLoadVB0( ) in the following example is declared similar to EntSharesLoadVB( )but its declaration allows passing 0 in place of the apiStruct. For more information, see“Visual Basic Programming Notes” on page 16.
Dim shrsLoad As ShrsLoadStruct Dim ret%
Advanced Functions Alphabetical Reference 263
shrsLoad.dwSize = LenB(shrsLoad) shrsLoad.cDelim = Asc(",")
If optMerg.Value = True Then
shrsLoad.nMode = SHR_MERGE
Else
shrsLoad.nMode = SHR_REPLACE
End If
shrsLoad.bRemoteFlag = False
shrsLoad.wExtFlag = 0
shrsLoad.fnCallBack = 0
shrsLoad.lParam = 0
shrsLoad.lpszFileName = 0
ret% = EntSharesLoadVB0(hSelect&,shrsLoad,szFileName,0)
EntUNCDataLoad( ) - Load DataThis function executes a data load.
Note: This function can be used with any language except Visual Basic. UseEntUNCDataLoadVB( ) for Visual Basic applications.
If loading data on a server, the DB_REMOTE bit flag is set in pArgs->wLoadFlag. You mightwant to know the process handle of the load process so that you can track and monitor the serverprocesses that your program launches. You can get the process handle by setting lParam to aHANDLE * variable before calling EntUNCDataLoad( ). The handle returned is the processhandle of an instance of the Task Status window program, HCOMMGR.EXE, running on thelocal client computer. For more information, see “Server Tasks” on page 121.
Use this format for C:
short WINAPI EntUNCDataLoad(HSELECT hSelect, LPCDBLOADSTRUCT_UNC pArgs,CALLBACKDBLOAD fnCallBack, LPARAM lParam)
Variable Description
hSelect The handle of the selected tables
pArgs The structure with arguments for the data load
pArgs->dwSize The size of the pArg structure
pArgs->cDelim The field delimiter, which is typically a comma ( , )
pArgs->cNeg A negative delimiter, which is typically a dash (-) or a parenthesis [ ( ) ]
264 Advanced Functions
Variable Description
pArgs->cScale The scale of the data
pArgs->cView The data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT), or NONE to use the category’s default view
pArgs->dDataBy The data to use with sOperation
pArgs->sOperation The operation (divide or multiply by dDataBy)
pArgs->iFileListCnt The number of elements in file list table
pArgs->lpFileList An array of selected path\filenames. This allows the user to load data files from different locations at the sametime.
Note: Each file name in this array should be exactly 260 (_MAX_PATH) bytes long and should be null terminatedafter the last character in the file name. If any of the filename strings are not 260 (_MAX_PATH) bytes long, thisfunction will not properly parse the list of files, which causes the function to terminate.
pArgs->szLoadErrFileName The error file name
pArgs->sigAcctConv The account conversion table signature
pArgs->sigCurCat The currently selected category
pArgs->sigFrequency The frequency
pArgs->sigNameConv The entity conversion table signature
pArgs->wLoadFlag The database load options flags
fnCallBack The callback function for status information. (Not used if DB_REMOTE bit flag is set in pArgs->wLoadFlag). Formore information, see “CALLBACKDBLOAD - For EntUNCDataLoad( )” on page 314.
lParam Normally, the argument for the fnCallBack callback function. However, if the DB_REMOTE bit flag is set inpArgs->wLoadFlag, the callback function is not used, so lParam is assumed to be a HANDLE * if it is not NULL.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CANCELLED Canceled by user
LOAD_CHECK_ERRORLOG Errors listed in the application’s error log
LOAD_CHECKBOTH Errors written to both the application’s error log and the load error file
Be sure to set the point of view before calling EntUNCDataLoad( ) to execute a task on the server.Set the current organization, category, and entity. For more information, see “Setting the Pointof View” on page 121.
Example:
Advanced Functions Alphabetical Reference 265
For an example, see “EntUNCDataLoadVB( ) - Load Data” on page 266. The additionalarguments for EntUNCDataLoadVB( ) are passed as the appropriate fields in pArgs.
EntUNCDataLoadVB( ) - Load DataThis function is intended for Visual Basic. It executes a data load.
EntUNCDataLoadVB( ) makes a local copy of the strings so Visual Basic will not move themduring the callback function, places the addresses of the strings into a copy of theDBLOADSTRUCT_UNC structure, and calls EntUNCDataLoad( ).
Use this format:
Declare Function EntUNCDataLoadVB Lib "heaccess.dll" Alias "_EntUNCDataLoadVB@24"(ByVal hSelect As Long, pArgs As DBLOADSTRUCT_UNC, ByVal lpfnCallBack As Long, ByVallParam As Long, ByVal szFileList As String, ByVal szLoadErrFileName As String) As Integer
Variable Description
hSelect The handle of the selected tables
pArgs The pointer to the structure with arguments for the data load
pArgs.dwSize The size of the pS structure
pArgs.cDelim The field delimiter, which is typicaly a comma ( , )
pArgs.cNeg A negative delimiter, which is typically a dash (-) or an apostrophe (')
pArgs.cScale The scale of the data
pArgs.cView The data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT), or NONE to use the category’s default view
pArgs.dDataBy The data to use with sOperation
pArgs.sOperatio The operation (divide or multiply by dDataBy)
pArgs.sigAcctConv The account conversion table signature
pArgs.sigCurCat The currently selected category
pArgs.sigFrequency The frequency
pArgs.sigNameConv The entity conversion table signature
pArgs.iFileListCnt The number of filenames in szFileList
pArgs.wLoadFlag The database load options flag
fnCallBack Callback function for status information (not used if DB_REMOTE bit flag is set in pArgs->wLoadFlag). For moreinformation, see “CALLBACKVB” on page 321.
lParam Usually, the argument for the fnCallBack callback function. However, if the DB_REMOTE bit flag is set in pArgs.wLoadFlag, the callback function is not used. lParam is assumed to be the buffer to put the process handle, if it is notNULL.
266 Advanced Functions
Variable Description
szFileList The pointer to an array of selected file names, each of which is 260 (_MAX_PATH) bytes in size and null-terminated,or NULL if you have already set pArgs.lpFileList (if you want to use a byte array or struct array instead of a string).
Note: Each file name in this array should be exactly 260 (_MAX_PATH) bytes long and should be null terminated afterthe last character in the file name. If any of the file name strings are not 260 (_MAX_PATH) bytes long, this functionwill not properly parse the list of files, which causes the function to terminate.
szLoadErrFileName Error file name.
If you pass null (0 or vbNullString) for the szFileList argument, EntDataLoadVB( ) will notoverwrite the lpFileList field in the DBLOADSTRUCT structure. This allows you to experimentwith using data types other than a string for the list of file names, such as an array of records.
The callback function has fewer arguments than the callback for EntUNCDataLoad( ). For moreinformation, see “CALLBACKVB” on page 321.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CANCELLED Canceled by user
LOAD_CHECK_ERRORLOG Errors listed in the application’s error log
LOAD_CHECKBOTH Errors written to both the application’s error log and the load error file
Example:
Dim s As DBLOADSTRUCT_UNCDim szFile260 As String * 260‘Filename must be a 260 character string, NULL terminated within these 260 charactersLSet szFile260$ = szFile$Mid(szFile260$, Len(szFile$) + 1) = Chr(0)szFile$ = szFile260$‘Set the load options based on various radio buttons and check boxesflag% = 0If optAccum.Value Then flag% = flag% Or DB_ACCUMElseIf optReplace.Value Then flag% = flag% Or DB_REPLACEElseIf optMerge.Value Then flag% = flag% Or DB_MERGEEnd IfIf chkLogic.Value Then flag% = flag% Or DB_EXECLOGIf chkCalcAcct.Value Then flag% = flag% Or DB_REPCALCACCTSIf chkZero.Value Then flag% = flag% Or DB_ZEROFORNO‘Set the fields in the DBLOADSTRUCT_UNC hSelect& = HypGethSelect(frmMain.ghRApp%)s.dwSize = LenB(s)
Advanced Functions Alphabetical Reference 267
s.cDelim = Asc(",")s.cNeg = Asc("-")s.cScale = 255 'use NONE for defaults.cView = Asc(FORMVIEW_CAT)s.dDataBy = -1 'data to use with sOperation.s.sOperation = HYP_NONEs.iFileListCnt = 1 'Number of elements in file list tables.sigAcctConv = HYP_NONE 'Account conversion table signatures.sigCurCat = sigCat& 'currently selected categorys.sigFrequency = HYP_NONE 'frequency signatures.sigNameConv = HYP_NONE 'Entity conversion table signatures.wLoadFlag = flag% 'Database load options flag (DB_MERGE, etc.)‘This example uses Spyworks for the callback functionret% = EntUNCDataLoadVB(hSelect&, s, cbkLoad.ProcAddress, 0, szFile$, szErrFile$)...‘The SpyWorks call back functionPrivate Sub cbkLoad_cbxLLL(lval1 As Long, lval2 As Long, lval3 As Long, retval As Long)Dim ret%, wLen%Dim szFile$Dim args As CALLBACKSTRUCT'lval1 should really be 'ByVal szFile As String''Get szFile$ from lval1wLen% = EntVBGetCStrLen(lval1) szFile$ = Space(wLen%)ret% = EntVBCopyStr(szFile$, lval1, wLen%)'lval2 should really be 'args As CALLBACKSTRUCT' 'Get args from lval2ret% = EntVBCopyData(args, lval2, LenB(args))ret% = MyCallBack (szFile$, args, lval3)retval& = ret%EndSubFunction MyCallBack (szfile$, args As CALLBACKSTRUCT, ByVal lparam&) As IntegerDim szCat$, szEntity$, szMsg$szMsg$ = "File: [" & szFile$szCat$ = Space(HYP_SIZELABEL + 1)ret% = EntQueryExStr0(args.hSelect, HYP_ID_CATEGORY, HYP_NAME, args.sigCat, HYP_NONE, Len(szCat$), szCat$, 0)If ret% = 0 Then szCat$ = CToBStr(szCat$)szMsg$ = szMsg$ & "], Category: [" & szCat$szEntity$ = Space(HYP_SIZEFULLNAME + 1)ret% = EntQueryExStr0(args.hSelect, HYP_ID_NAMES, HYP_NAME, args.sigEntity, HYP_NONE, Len(szEntity$), szEntity$, 0)If ret% = 0 Then szEntity$ = CToBStr(szEntity$)szMsg$ = szMsg$ & "], Entity: [" & szEntity$szMsg$ = szMsg$ & "] Period " & Str(args.lStart) & " to Period " & Str(args.lEnd)ret% = MsgBox(szMsg$, vbOKOnly, "Now Loading...")MyCallBack% = 0End Function
268 Advanced Functions
Note: EntQueryExStr0( ) is declared similar to EntQueryExStr( ) but adjusted to allow passing0 in place of the apiStruct argument. For more information, see “Visual BasicProgramming Notes” on page 16.
Use this format for C:
EntUNCDataLoadVB(HSELECT hSelect, LPCDBLOADSTRUCT_UNC pS, CALLBACKVBfnCallBack, LPARAM lParam, LPCSTR szFileList, LPCSTR szLoadErrFileName)
EntUnSelect( ) - Deselecting TablesThis function deselects one or more tables. This function can change the table selection handle,so use the returned value for later API calls, not the input value. You should use an OR operationwith the ID_ASSOC constant to deselect all tables associated with the specified table. For moreinformation, see “Associated Tables” on page 362.
Note: You can also deselect all selected tables by using NONE as the table ID.
To deselect the ID_DATAFILE table, pass an apiStruct that includes the category, entity, type,and if the type is not ID_REGULAR, the parent entity. The fields should have the same valuesthat were passed to EntDataFileOpen( ) when the table was selected.
Note: If the application was opened using the spreadsheet add-in function HypConstruct( ),call HypSethSelect( ) after calling EntUnSelect( ). HypSethSelect( ) updates the tableselection handle internally associated with the Hyperion Enterprise Retrieve applicationhandle.
Use this format:
Declare Function EntUnSelect Lib "heaccess.dll" Alias "_EntUnSelect@24" (ByVal hSelect AsLong, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal bDiscard As Integer, wRC AsInteger, apiS As APISTRUCT) As Long
Variable Description
hSelect The handle of the selected tables
wTabId The ID of the table you are trying to deselect. Use one of the table IDs or NONE for all.
sigKey NONE, or the key of a related table if you specified a key when you selected the table
bDiscard 1 (TRUE) to indicate that the table should be discarded from memory automatically, or 0 (False) to indicate that the table shouldbe kept in memory
wRC The buffer to return the error code. On return, this is 0 (zero) if successful, non-zero or NONE if unsuccessful.
apiS NULL or an apiStruct similar to what was used to select the table
Advanced Functions Alphabetical Reference 269
Return Codes
This function returns the same or a new table selection handle, or NULL if all tables have beendeselected.
Example:
hselect& = EntUnSelect(hselect&, HYP_ID_ACCTLISTENTRY or HYP_ID_ASSOC, sigList&, False, ret%, 0)
Use this format for C:
HSELECT WINAPI EntUnSelect(HSELECT hSelect, short wTabId, SIGNA sigKey, BOOLbDiscard, short FAR * lpwRC, LPAPISTRUCT pApiS)
EntUpdate( ) - Update RecordThis function updates the value for a specified field in a record in a table. When you are finishedupdating data, you need to call EntSave( ) to actually save your changes. Visual Basicprogrammers should use the EntUpdateStr( ) function when updating a string value.EntUpdateStr( ) is a clone of the declaration for EntUpdate( ) adjusted for use with strings anddeclared in the ToolKit.bas file.
Caution! Use this function only for the Datafile table (ID_DATAFILE). Before you use thisfunction, read “Updating Data” on page 117 which describes how to use this functionto update data.
Use this format:
Declare Function EntUpdate Lib "heaccess.dll" Alias "_EntUpdate@28" (ByVal hSelect AsLong, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal sigRecd As Long, ByVal sigKeyAs Long, pzBuf As Any, apiS As APISTRUCT) As Integer
Variable Description
hSelect The handle of the selected tables
wTabId The Datafile table, ID_DATAFILE
wAttr The attribute for the field you want to update. For valid attributes, see “Updating Data” on page 117.
sigRecd The signature of the record you want to update. For many ID_DATAFILE update attributes, you can use NONE.
sigKey NONE for table ID_DATAFILE
pzBuf The new value for the specified field. NULL for table ID_DATAFILE when the new values are in apiS
apiS An apiStruct structure with more information. Required for most ID_DATAFILE update attributes.
Return Codes:
270 Advanced Functions
Code Meaning
0 Successful
NONE Error occurred
Example:
See “Updating Data” on page 117 for an example.
Use this format for C:
short WINAPI EntUpdate(HSELECT hSelect, short wTabId, short wAttr, SIGNA sigRecd,SIGNA sigKey, void FAR * pzBuf, LPAPISTRUCT pApiS)
EntUpdateDefault( ) - Update DefaultsThis function updates application or user defaults. After you are finished updating values, callEntSaveDefault( ) to save your changes.Visual Basic programmers should use theEntUpdateDefaultStr( ) function when querying a string value. EntUpdateDefaultStr( ) is a cloneof the declaration for EntUpdateDefault( ) adjusted for use with strings and declared in theToolKit.bas file.
Use this format:
Declare Function EntUpdateDefault Lib "heaccess.dll" Alias "_EntUpdateDefault@16" (ByValhApp As Long, ByVal wTabId As Integer, ByVal wAttr As Integer, pzBuf As Any) As Integer
Variable Description
hApp The application handle
wTabId The table ID, which must be one of the following tables:
l ID_HAPP
l ID_APPDEFAULT
l ID_USERDEFAULT
wAttr The attribute that you are updating. Valid attributes for tables ID_APPDEFAULT and ID_USERDEFAULT are the same as the queryattributes for those table. The only valid attribute for ID_HAPP is HYP_HAPP_IS_SILENT. For more information on query attributes,see Appendix B, “Query Attributes.”
pzBuf The new value for the field
For the ID_APPDEFAULT table, the valid attributes are any of the query attributes with thefollowing exceptions:
l APP_NTDATADIR
l APP_NTINBOXDIR
l APP_NTOUTBOXDIR
l APP_NTREPORTDIR
Advanced Functions Alphabetical Reference 271
l APP_SITE_SHIFTED
When you update the various application directories (APP_INBOXDIR, and so on), use the@APP macro where appropriate at the beginning of the path. EntQueryDefault( ) automaticallysubstitutes the application path for @APP unless you request query attributeAPP_NTINBOXDIR, and so on. For more information, see the Creating Applications chapterin the Hyperion Enterprise Administrator’s Guide.
Caution! Many of the application settings in table ID_APPDEFAULT should not be changedafter the application is created. Examine the Hyperion Enterprise Applicationmodule for any menu item or field that is editable. Do not change the applicationsetting that corresponds to a field that cannot be edited as it could corrupt yourapplication.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURORGSIG,sigOrg);wRet = EntUpdateDefault(hApp,ID_USERDEFAULT, CURCATEGORYSIG,sigCat);wRet = EntUpdateDefault(hApp, ID_USERDEFAULT, CURNAMESIG,sigEntity);
Use this format for C:
short WINAPI EntUpdateDefault(HAPP hApp, short wTabId, short wAttr, void FAR * pzBuf)
EntWriteAppProfileLong( ) - Write Application Profile LongIntegerThis function writes a number to a specified application .INI file.
Note: Hyperion Enterprise generally writes numbers as quoted strings. For more information,see “EntWriteAppProfileString( ) - Write Application Profile String” on page 273.
You should use the EntUpdateDefault( ) function with the ID_APPDEFAULT table to updatevalues in the application's .INI file (or SQL equivalent) for both SQL and file-based applications.
Use this format:
272 Advanced Functions
Declare Function EntWriteAppProfileLong Lib "heaccess.dll" Alias"_EntWriteAppProfileLong@12" (ByVal szAppName As String, ByVal szKeyName As String,ByVal lValue As Long) As Long
Variable Description
szAppName The application ID
szKeyName The key name of the value
lValue The number to write
Return Codes:
Code Meaning
TRUE Successful
FALSE Error occurred
Use this format for C:
BOOL WINAPI EntWriteAppProfileLong(LPCSTR szAppName, LPCSTR szKeyName, longlValue)
EntWriteAppProfileString( ) - Write Application Profile StringThis function writes a string to a specified application .INI file.
You should use the EntUpdateDefault( ) function with the ID_APPDEFAULT table to updatevalues in the application's .INI file (or SQL equivalent) for both SQL and file-based applications.
Use this format:
Declare Function EntWriteAppProfileString Lib "heaccess.dll" Alias"_EntWriteAppProfileString@12" (ByVal szAppName As String, ByVal szKeyName As String,ByVal szValue As String) As Long
Variable Description
szAppName The application name
szKeyName The key name of the string
szValue The string to write. Put quotation marks (") in this string at the appropriate places if you want them written around your stringin the .INI file.
Return Codes:
Code Meaning
TRUE Successful
Advanced Functions Alphabetical Reference 273
Code Meaning
FALSE Error occurred
Use this format for C:
BOOL WINAPI EntWriteAppProfileString(LPCSTR szAppName, LPCSTR szKeyName,LPCSTR szValue)
EntWriteProfileLong( ) - Write Hyperion Profile Long IntegerThis function writes a number to the HYPENT.INI file.
Use this format:
Declare Function EntWriteProfileLong Lib "heaccess.dll" Alias "_EntWriteProfileLong@12"(ByVal szAppName As String, ByVal szKeyName As String, ByVal lValue As Long) As Long
Variable Description
szAppName The application name, or NULL for the [Default] section
szKeyName The key name of the number
lValue The number to write
Return Codes:
Code Meaning
TRUE Successful
FALSE Error occurred
Example:
ret& = EntWriteProfileLong(vbNullString, "Organization", 0)
Use this format for C:
BOOL WINAPI EntWriteProfileLong(LPCSTR szAppName, LPCSTR szKeyName, longlValue)
EntWriteProfileString( ) - Write Hyperion Profile StringThis function writes a string to the HYPENT.INI file.
Use this format:
Declare Function EntWriteProfileString Lib "heaccess.dll" Alias "_EntWriteProfileString@12"(ByVal szAppName As String, ByVal szKeyName As String, ByVal szValue As String) As Long
274 Advanced Functions
Variable Description
szAppNam The application name, or NULL for the [Default] section
szKeyName The key name of the string
szValue The string to write
Return Codes:
Code Meaning
1 Successful
0 Error occurred
Example:
ret& = EntWriteProfileString(vbNullString, "AppID", szApp$)
Use this format for C:
BOOL WINAPI EntWriteProfileString(LPCSTR szAppName, LPCSTR szKeyName, LPCSTRszValue)
EntVBGetCStrLen( ) - Get Length of C-stringThis function is for Visual Basic only. Some callback functions are passed an argument which isthe address of a C-style string. In Visual Basic the callback argument function type is long. Youcan use EntVBGetCStrLen( ) and EntVBCopyStr( ) to convert the long argument to a VisualBasic string.
You can call EntVBGetCstrLen( ) to get the length of the string, allocate a Visual Basic stringequal to the same length, and call EntVBCopyStr( ) to copy the C-style string into the VisualBasic string. The function EntVBCopyStr( ) is a clone of the of EntVBCopyData. )
Use this format:
Declare Function EntVBGetCStrLen Lib "heaccess.dll" Alias "EntVBGetCStrLen@4" (ByVallAddr As Long) As Integer
where lAddr is the address of the C-style string.
Return Codes:
Code Meaning
Length of the string Successful
Example:
wLen% = EntVBGetCStrLen(lval1&) szFile$ = Space(wLen%)ret% = EntVBCopyStr(szFile$, lval1&, wLen%)
Advanced Functions Alphabetical Reference 275
EntVBCopyData( ) - Copy DataThis function is intended for Visual Basic only. The arguments for some callback functions areactually the address of a structure (user-defined type). If your callback function declares theargument as type long, you can use EntVBCopyData( ) to copy that structure into a Visual Basicvariable of the correct type so that you can use it.
Use this format:
Declare Function EntVBCopyData Lib "heaccess.dll" Alias "_EntVBCopyData@12" (Dest AsAny, ByVal lAddr As Long, ByVal wLen As Integer) As Integer
Variable Description
Dest The destination buffer
lAddr The address of the source to copy
wLen The length to copy
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Dim args As CALLBACKSTRUCTret% = EntVBCopyData( args, lval2&, LenB(args))
EntVBCopyStr( ) - Copy StringEntVBCopyStr( ) can be used to copy a C-style string argument to a Visual Basic string.EntVBCopyStr( ) is an alternate declaration of EntVBCopyData( ). For more information, see“EntVBGetCStrLen( ) - Get Length of C-string” on page 275.
Use this format:
Declare Function EntVBCopyStr Lib "heaccess.dll" Alias "_EntVBCopyData@12" (ByValDest As String, ByVal lAddr As Long, ByVal wLen As Integer) As Integer
Variable Description
Dest The destination buffer
lAddr The address of the source to copy
wLen The length to copy
Return Codes:
276 Advanced Functions
Code Meaning
0 Successful
NONE Error occurred
HypGethApp( ) - Get Application HandleMost of the advanced Hyperion Enterprise functions take either an application handle fromEntOpenApplication( ) or a table selection handle from EntSelect( ) as an argument. In contrast,spreadsheet add-in functions take a Hyperion Enterprise Retrieve application handle fromHypConstruct( ) as an argument. HypGethApp( ) returns the application handle associated witha Hyperion Enterprise Retrieve handle.
Use this format:
Declare Function HypGethApp Lib "heaccess.dll" Alias "_HypGethApp@4"(ByVal hRApp AsInteger) As Long
where hRApp is the Hyperion Enterprise Retrieve application handle from HypConstruct( ).
Return Codes:
Code Meaning
The application handle Successful
NULL Error occurred
Example:
hApp& = HypGethApp(hRApp%)
Use this format for C:
HAPP WINAPI HypGethApp(HRETRIEVEAPP hRApp)
HypGethSelect( ) - Get Table Selections HandleMost of the advanced Hyperion Enterprise functions take a table selection handle fromEntSelect( ) as an argument. In contrast, spreadsheet add-in functions take a Hyperion EnterpriseRetrieve application handle from HypConstruct( ) as an argument. HypGethSelect( ) returnsthe table selection handle associated with a specified Hyperion Enterprise Retrieve applicationhandle.
Use this format:
Declare Function HypGethSelect Lib "heaccess.dll" Alias "_HypGethSelect@4"(ByVal hRAppAs Integer) As Long
where hRApp is the Hyperion Enterprise Retrieve application handle from HypConstruct( ).
Return Codes:
Advanced Functions Alphabetical Reference 277
Code Meaning
The hselect application handle Successful
NULL Error occurred
Example:
hSelect& = HypGethSelect(hRApp%)
Use this format for C:
HSELECT WINAPI HypGethSelect(HRETRIEVEAPP hRApp)
HypSethSelect( ) - Set Table Selections HandleHypSethSelect( ) updates the table selection handle (hSelect) that is internally associated with aHyperion Enterprise Retrieve application handle. You should call this function only if youopened the application using HypConstruct( ) or HypMultiInit( ) and subsequently calledEntUnSelect( ). Calling EntUnSelect( ) might change the table selection handle. HypSethSelect( )tells the spreadsheet add-in functions that the table selection handle has changed.
Use this format:
Declare Function HypSethSelect Lib "heaccess.dll" Alias "_HypSethSelect@8"(ByVal hRAppAs Integer, ByVal hSelect As Long) As Integer
Variable Description
hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
hSelect The new table selection handle
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
hSelect& = EntUnSelect(hSelect&, HYP_ID_SHARES or HYP_ID_ASSOC, sigCat&, 0, ret%, 0)ret% = HypSethSelect(hRApp%, hSelect&)
Use this format for C:
SBOOL WINAPI HypSethSelect(HRETRIEVEAPP hRApp, HSELECT hSelect)
278 Advanced Functions
5Converting from Hyperion
Enterprise SE
In This Chapter
Hyperion Enterprise SE Conversion Overview... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Include Files for Hyperion Enterprise ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Function Classifications ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Unsupported Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Upgrading Hyperion Enterprise SE Code... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Upgrading Functions... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Changes to Hyperion Enterprise Tables ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
This chapter provides the information you need to convert your Hyperion Enterprise SEprograms for use with Hyperion Enterprise.
Hyperion Enterprise SE Conversion OverviewAt a minimum, 16-bit programs written using the Hyperion Developer's toolkit for HyperionEnterprise SE must be converted to 32-bit programs. 32-bit programs must be adjusted andrecompiled. For more information, see steps 1 and 2 in “Upgrading Hyperion Enterprise SECode” on page 282.
Although most older functions are still supported for backwards compatibility (see theUnsupported Functions topic for a list), you should also upgrade your code to support the newfeatures in Hyperion Enterprise. These features include larger applications and larger IDs(formerly called short names). For more information, see step 3 in “Upgrading HyperionEnterprise SE Code” on page 282.
For more information on what's new in the Developer's Toolkit, see “Include Files for HyperionEnterprise” on page 279.
Include Files for Hyperion EnterpriseHyperion Enterprise provides the following include files:
l TOOLKIT.BAS, for working with Microsoft Visual Basic
l TOOLKIT.H, for working with C and C++
Hyperion Enterprise SE Conversion Overview 279
For more information on the include files, see “Include Files for Hyperion Enterprise” on page279.
Note: If you recompile your programs using the include files provided with HyperionEnterprise, you must redefine the application handles as Hyperion Enterprise Retrieveapplication handles. For more information, see “Redefine Application Handles” on page283.
Function ClassificationsIn this guide, the Hyperion Enterprise API functions are classified into the following groups:
l Spreadsheet add-in functions that are optimized for use with applications. These functionsare described in Chapter 2, “Spreadsheet Add-in Functions”
l Other supported functions for working with tables that are designed to work with thespreadsheet add-in functions. These functions are described in the Chapter 3, “TableFunctions”
l Advanced functions that use the full power of the underlying Hyperion Enterprise APIfunctions. These functions are described in Chapter 4, “Advanced Functions.”
All of the Hyperion Enterprise SE functions that are still supported are in the first two groups.For information about these functions, see “Supported Spreadsheet Add-in Functions” on page280 or “Other Supported Functions” on page 281.
The advanced functions are new for Hyperion Enterprise and use a different set of arguments.These functions all take the form Ent...( ). For more information about these functions, see“New Ent...( ) Functions” on page 281.
Supported Spreadsheet Add-in FunctionsThese functions are optimized for use by spreadsheet add-in products, such as HyperionEnterprise Retrieve. They are generally the safest and easiest functions to use. These functionswork only for Hyperion Enterprise applications that you open using HypConstruct( ) orHypMultiInit( ).
The following functions are the same as in previous releases of Hyperion Enterprise:
l Spreadsheet add-in functions automatically buffer the most recently used datafile tables forquicker reads. They automatically buffer data writes using the HypHPLNK( ) function. TheHypHPCommit2( ) function optimizes the data writes in the buffer to increase performance.
l HypConstruct( ) and HypMultiInit( ) initialize various internal buffers and select defaulttables for use by the other functions in this group.
l You can open a maximum of 20 Hyperion Enterprise applications at any one time for useby these functions. HypConstruct( ), HypMultiDefault( ), and HypMultiGet( ) return ahandle to the application for use with the other spreadsheet add-in functions.
280 Converting from Hyperion Enterprise SE
The following functions have been changed since pervious releases of Hyperion Enterprise:
l The arguments and return values for these functions are the same as in Hyperion EnterpriseSE except that anything that was an application handle of type HAPP in Hyperion EnterpriseSE is now a Hyperion Enterprise Retrieve application handle of type HRETRIEVEAPP. Formore information, see “Redefine Application Handles” on page 283.
l Some Hyperion Enterprise SE functions have been cloned to handle the larger applicationsand IDs of Hyperion Enterprise. The new versions of these functions take the formHyp...Ex( ) and are described in Chapter 2, “Spreadsheet Add-in Functions.” To upgradeto these functions, see “Replacing Obsolete Functions with New Hyp...( ) Functions” onpage 284. The obsolete functions are not documented.
l New Hyp...( ) functions have been added to support new functions in Hyperion Enterpriseand Hyperion Enterprise Retrieve.
Other Supported FunctionsMany Hyperion Enterprise SE functions are still supported in Hyperion Enterprise for backwardcompatibility. These functions are easy to use with the spreadsheet add-in functions and aredescribed in Chapter 3, “Table Functions.”
Some of these functions have been cloned to handle the larger applications and IDs of HyperionEnterprise Release. The new versions of these functions generally take the form Hyp...Ex( ) andare described in Chapter 3, “Table Functions” To upgrade to these functions, see “ReplacingObsolete Functions with New Hyp...( ) Functions” on page 284. The obsolete functions are notdocumented.
To emphasize that these functions use a Hyperion Enterprise Retrieve application handle andmust be used with the spreadsheet add-in functions as a set, they continue to take the form Hyp...( ). The other supported Hyp...( ) functions have new equivalent Ent...( ) functions. Forinformation on replacing these functions with their corresponding Ent...( ) functions, see“Replacing Obsolete Functions with New Ent...( ) Functions” on page 286.
New Ent...( ) FunctionsMany new functions have been added for Hyperion Enterprise. These functions have beendesigned for the Hyperion Enterprise internal API and take the form Ent...( ).
The new functions take either a table selection handle, hSelect, or an application handle, hApp,as an argument. The new functions do not take a Hyperion Enterprise Retrieve applicationhandle, hRetrieveApp, as an argument.
Many of these new functions also have an argument that is a structure defined as an apiStruct.For more information, see “Using an apiStruct Structure” on page 110.
You can mix spreadsheet add-in functions and other supported Hyp...( ) functions with the newEnt...( ) functions. To get the hSelect that is associated internally with an hRetrieveApp, see“Combining Spreadsheet Add-in Functions with Advanced Functions ” on page 113.
Function Classifications 281
Unsupported FunctionsA group of functions in Hyperion Enterprise and Hyperion Enterprise SE are unsupported.Generally, there is either a new function or an equivalent method for producing the same resultusing new functions. The following functions are unsupported:
l HypAppendNode( )
l HypConsolidate( )
l HypCreateAcctTxt( )
l HypCreateCatTxt( )
l HypCreateNameTxt( )
l HypDelete( )
l HypDelNode( )
l HypInsChildNode( )
l HypInsert( )
l HypInsParentNode( )
l HypInsSiblingNode( )
l HypJLockPeriodsSet( )
l HypLockPeriodsSet( )
l HypPeriodsSetEx( )
l HypPsf_GetStatus( )
l HypPsf_ImpactStatus( )
l HypRetMultiAsk( )
l HypSave( )
l HypSetTopNode( )
l HypUnJLockPeriodsSet( )
l HypUnLinkName( )
l HypUnlockPeriodsSet( )
l HypUpdate( )
l HypUpdNode( )
Upgrading Hyperion Enterprise SE CodeYou must upgrade your Hyperion Enterprise SE code so that you can compile it. Use the newTOOLKIT.BAS include file or the TOOLKIT.H file for C in your code. You should also upgradeit to work with the larger applications and, record signatures, and IDs in Hyperion Enterprise.
282 Converting from Hyperion Enterprise SE
Note: Steps 1 and 2 in the following procedure are mandatory. Step 3 is strongly recommendedto support the larger applications, record signatures, and IDs in Hyperion Enterprise. Theundocumented functions supported in Hyperion Enterprise emulate HyperionEnterprise SE as much as possible. However, when you replace them with new Hyp...( )or new Ent...( ) functions, you must adjust for differences in Hyperion Enterprise. Formore information, see “Upgrading Functions” on page 289 and “Changes to HyperionEnterprise Tables” on page 297.
ä To upgrade Hyperion Enterprise SE code:
1 Redefine all application handles to Hyperion Enterprise Retrieve application handles. You cannotrecompile your code until you perform this step. For more information, see “Redefine ApplicationHandles” on page 283.
2 Convert 16-bit programs to 32-bit programs. For more information, see “Converting 16-bit Programs to32-bit Programs” on page 284.
Note: If you used the 32-bit version of the Hyperion Enterprise API and your programs arewritten in Microsoft Visual Basic, you must replace the function declarations in yourcode with the function declarations in the new TOOLKIT.BAS file.
3 Upgrade functions by performing the following tasks:
l Replace each obsolete Hyperion Enterprise SE function with the corresponding newHyp...( ) function. For a list of these functions, see “Replacing Obsolete Functions withNew Hyp...( ) Functions” on page 284. Alternatively, you can replace many of theobsolete Hyperion Enterprise SE functions with the corresponding new Ent...( )function. For a list of these functions, see “Replacing Obsolete Functions with New Ent...( ) Functions” on page 286.
l Upgrade specific functions as required. For more information, see “UpgradingFunctions” on page 289.
l Upgrade your code to adjust for changes to Hyperion Enterprise tables. For moreinformation, see “Changes to Hyperion Enterprise Tables” on page 297.
Redefine Application HandlesAny variable you used for an application handle (type HAPP in C) should now be a HyperionEnterprise Retrieve application handle (type HRETRIEVEAPP in C). This is the handle returnedby HypConstruct( ), HypMultiGet( ), and HypMultiDefault( ) and is used by all otherspreadsheet add-in functions and other supported functions.
Visual Basic Programming NoteIf you are using the 16-bit compiler in Hyperion Enterprise SE, both types of handles are Integers.You might want to rename these variables from hApp% to hRApp% to avoid confusing themwith the application handle, which is a Long variable, used by the new Ent...( ) functions.
Upgrading Hyperion Enterprise SE Code 283
If you are using the 32-bit compiler in Hyperion Enterprise SE, change these variables from Longto Integer.
C Programming NoteRedefine these variables as type HRETRIEVEAPP before you recompile your program. If youwere using the 32-bit compiler in Hyperion Enterprise SE, you must recompile because thefundamental type has changed from a long integer (DWORD) to a short integer. If you wereusing the 16-bit compiler, you must change the type to HRETRIEVEAPP and convert yourprogram to a 32-bit program.
Converting 16-bit Programs to 32-bit ProgramsSixteen-bit programs are no longer supported. You must convert your existing application to a32-bit program.
ä To convert a 16-bit program to a 32-bit program:
l If your program is written in Microsoft Visual Basic, you must replace the functiondeclarations in your code with the 32-bit function declarations in the new TOOLKIT.BASfile. The 32-bit function declarations use lib HACCESS32.DLL as the library name, not libHACCESS.DLL. They also use aliases and some different numeric types as described later.
l For programs written in C or other languages (except Visual Basic) you must link theprogram with HACCESS32.LIB, not HACCESS.LIB. For Microsoft Visual Basic, the 32-bitfunction declarations handle the linking.
l Some of the function arguments and return codes that were short integers (16 bits) in 16-bit programs are long integers (32-bit) in 32-bit programs. In C, these were defined as typeint, which compiles correctly in either case. In Microsoft Visual Basic, you must change themfrom type integer to type long. To see which variables to change, compare your old functiondeclarations with the new function declarations.
l Recompile the program with a 32-bit version of your compiler. For more information, see“Redefine Application Handles” on page 283.
Tip: The TOOLKIT.BAS file contains 32-bit and 16-bit function declarations. The 32-bitversion of Visual Basic uses the 32-bit declarations. The 16-bit version of Visual Basicuses the 16-bit declarations, which are no longer supported.
Replacing Obsolete Functions with New Hyp...( ) FunctionsSome Hyperion Enterprise SE functions have been cloned to handle the larger applications andIDs of Hyperion Enterprise. These are the differences between the obsolete Hyperion EnterpriseSE functions and their corresponding Hyperion Enterprise Hyp...( ) functions:
l All record signatures are 32-bit (long) in Hyperion Enterprise. In Hyperion Enterprise SE,most record signatures are 16-bit (short integer).
284 Converting from Hyperion Enterprise SE
l Strings often have to be allocated larger. For example, IDs (formerly known as short names)are mostly 20 characters (SIZELABEL) in Hyperion Enterprise. In Hyperion Enterprise SE,IDs are generally 8 characters.
l If you used a 32-bit compiler (link to the HEACCESS.DLL file) in Hyperion Enterprise SE,you will notice that most of the new functions return a short integer. The obsolete functionsgenerally returned a long integer for a 32-bit compiler in Hyperion Enterprise SE.
Table 48 lists the obsolete functions and the new Hyp...( ) functions with which you shouldreplace them.
Table 48 Obsolete Functions and New Hyp..( ) Functions
Obsolete Function New Function
AreValidLnkParams( ) “HypValidateLnkParams( ) - Check Link Parameters” on page 72 *
EntFormatNumber( ) “EntFormatNumber2( ) - Format Number” on page 188
HypAcctListAsk( ) “HypAcctListAskEx( ) - Select Account List” on page 28
HypCatAsk( ) “HypCatAskEx( ) - Select Category” on page 28
HypCatGetNumPeriods( ) “HypCatGetNumPeriodsEx( ) - Calculate Number of Periods in a Category” on page 83
HypCatGetPerShort( ) “HypCatGetPerShortEx( ) - Get Period ID in Category Frequency” on page 84
HypCatMapPeriod( ) “HypCatMapPeriodEx( ) - Map Period into Frequency” on page 84
HypEnum( ) “HypEnumEx( ) - Enumerate Records in a Table” on page 88
HypEnumAcctListEntries( ) “HypEnumAcctListEntriesEx( ) - Enumerate Accounts in Account List” on page 85
HypEnumAcctSig( ) “HypEnumEx( ) - Enumerate Records in a Table” on page 88
HypEnumNameListEntries( ) “HypEnumNameListEntriesEx( ) - Enumerate Entities in an Entity List” on page 90
HypFind( ) “HypFindEx( ) - Find Signature” on page 94
HypFindNameInOrg( ) “HypFindNameInOrgEx( ) - Find Node ID” on page 95
HypGetAcctSig( ) “HypFindEx( ) - Find Signature” on page 94*
HypGetCatPeriod( ) “HypGetCatPerFreq( ) - Get Period Number and Frequency in Category” on page 96
HypGetCatPeriodEx( ) “HypGetCatPerFreq( ) - Get Period Number and Frequency in Category” on page 96
HypGetPerView( ) “HypGetPerViewEx( ) - Get Frequency and View” on page 100
HypGetRptFreq( ) “HypQueryEx( ) - Query Hyperion Enterprise Tables” on page 105*
HypGetTopNode( ) “HypGetTopNodeEx( ) - Get Top Node” on page 101
HypHPCommit( ) “HypHPCommit2( ) - Write Data Buffers” on page 39
HypHPCUR( ) “HypHPCUREx( ) - Get Component Currency” on page 40
Upgrading Hyperion Enterprise SE Code 285
Obsolete Function New Function
HypHPKEY( ) “HypHPKEYEx( ) - Get Default Entity, Category, Account, or Period” on page 50
HypHPLogicCommit( ) “HypHPCommit2( ) - Write Data Buffers” on page 39
HypIsNameParent( ) “HypIsNameParentEx( ) - Check If Entity Is a Parent” on page 102
HypLock( ) “HypLockEx( ) - Select a Table” on page 103
HypNamAsk( ) “HypNamAskEx( ) - Select Entity” on page 67
HypNameListAsk( ) “HypNameListAskEx( ) - Select Entity List” on page 67
HypQryAcctListEntry( ) “HypQueryEx( ) - Query Hyperion Enterprise Tables” on page 105*
HypQryNameListEntry( ) “HypQueryEx( ) - Query Hyperion Enterprise Tables” on page 105*
HypQryNode( ) “HypQueryEx( ) - Query Hyperion Enterprise Tables” on page 105*
HypQryRptFreq( ) “HypQryRptFreqEx( ) - Query Reporting Frequency” on page 104
HypQuery( ) “HypQueryEx( ) - Query Hyperion Enterprise Tables” on page 105
HypQuerySig( ) “HypQueryEx( ) - Query Hyperion Enterprise Tables” on page 105*
HypUnLock( ) “HypUnLockEx( ) - Deselect a Table” on page 106
ValidateHypParams( ) “HypValidateParams( ) - Check Parameters” on page 73*
* Optional
Note: Although some changes are indicated as optional in the previous table, the obsoletefunctions are not documented in this guide.
The obsolete functions emulate Hyperion Enterprise SE behavior as much as possible. However,when you replace them with new Hyp...( ) functions, you must adjust for some specific differencein Hyperion Enterprise. For more information, see the Upgrade Specific Functions and “Changesto Hyperion Enterprise Tables” on page 297.
Many of these obsolete functions can be replaced with new Ent...( ) functions, if you prefer. Fora list, see the following topic.
Replacing Obsolete Functions with New Ent...( ) FunctionsTable 49 lists all the Hyperion Enterprise SE functions that you can replace with new Ent...( )functions. These new functions take hSelect as an argument instead of HRETRIEVEAPP. Formore information, see “Combining Spreadsheet Add-in Functions with Advanced Functions ”on page 113.
286 Converting from Hyperion Enterprise SE
Table 49 Hyperion Enterprise SE Functions and Corresponding Ent...( ) Functions
Hyperion Enterprise SE Functions Ent... ( ) Functions
DateConv( )* “EntDateConv( ) - Date Conversion and Calculate Period Number” on page 153
HypAcctAsk( )* “EntAcctAsk( ) - Select Account” on page 126
HypAcctListAsk( ) “EntAcctListAsk( ) - Select Account List” on page 126
HypCatAsk( ) “EntCatAsk( ) - Change Category” on page 138
HypCatGetNumPeriods( ) “EntCatGetNumPeriods( ) - Calculate Number of Periods in a Category” on page 138
HypCatGetPerShort( ) “EntCatGetPerShort( ) - Get Period Label” on page 139
HypCatMapPeriod( ) “EntCatMapPeriod( ) - Map Period into Frequency ” on page 140
HypConslidate( ) “EntConsolidate( ) - Consolidate” on page 141
HypDBExtract( ) “EntDataExtract( ) - Extract Data” on page 146
HypDBLoad( ) “EntUNCDataLoad( ) - Load Data” on page 264
HypDFOpen( ) “EntDataFileOpen( ) - Open Datafile” on page 152
HypDFClose( ) “EntUnSelect( ) - Deselecting Tables” on page 269
HypDFSave( ) “EntSave( ) - Save Table” on page 245
HypDFLogicExecute( ) “EntUpdate( ) - Update Record” on page 270
HypEnum( ) “EntEnum( ) - Enumerate Records in a Table” on page 167
HypEnumAcctListEntries( ) “EntEnum( ) - Enumerate Records in a Table” on page 167
HypEnumAcctSig( ) “EntEnum( ) - Enumerate Records in a Table” on page 167
HypEnumApplications( )* “EntEnumApplications( ) - Enumerate Applications” on page 178
HypEnumNameListEntries( ) “EntEnum( ) - Enumerate Records in a Table” on page 167
HypEnumOrgNames( )* “EntEnumOrgEntities( ) - Enumerate Nodes in an Organization” on page 178
HypEnumSubAcctSig( )* “EntEnumSubAcctSig( ) - Enumerate Subaccounts” on page 180
HypFind( ) “EntFind( ) - Find Signature” on page 182
HypFindNameInOrg( ) “EntFindEntityInOrg( ) - Find Node ID” on page 186
HypFreqAsk( )* “EntFreqAsk( ) - Select Frequency” on page 188
HypGetAcctSig( ) “EntFind( ) - Find Signature” on page 182
HypGetCatPeriod( ) “EntGetCatPerFreq( ) - Get Period Number and Frequency in Category” on page 193
HypGetCatPeriodEx( ) “EntGetCatPerFreq( ) - Get Period Number and Frequency in Category” on page 193
HypGetChild( )* “EntGetChild( ) - Get Child Node” on page 194
Upgrading Hyperion Enterprise SE Code 287
Hyperion Enterprise SE Functions Ent... ( ) Functions
HypGetNameSig( )* “EntGetEntitySig( ) - Get Entity Signature” on page 195
HypGetOrgLevel( )* “EntGetOrgLevel( ) - Get Level in Organization” on page 199
HypGetPerView( ) “EntGetPerView( ) - Get Frequency and View” on page 199
HypGetRptFreq( ) “EntQueryEx( ) - Query Information” on page 241
HypGetSibling( )* “EntGetSibling( ) - Get Sibling Node” on page 202
HypGetTopNode( ) “EntQueryEx( ) - Query Information” on page 241
HypIsNameParent( ) “EntIsEntityParent( ) - Check if an Entity is a Parent” on page 205
HypLock( ) “EntSelect( ) - Select a Table for Use” on page 252 and “EntSelectAdd( ) - Select an Additional Tablefor Use” on page 254
HypNamAsk( ) “EntEntityAsk( ) - Select Entity” on page 162
HypNameListAsk( ) “EntEntityListAsk( ) - Select Entity List” on page 163
HypPerAsk( )* “EntPerAsk( ) - Select Period” on page 239
HypQryAcctListEntry( ) “EntQueryEx( ) - Query Information” on page 241
HypQryNameListEntry( ) “EntQueryEx( ) - Query Information” on page 241
HypQryNode( ) “EntQueryEx( ) - Query Information” on page 241
HypQryRptFreq( ) “EntQryRptFreq( ) - Query Reporting Frequency” on page 240
HypQuery( ) “EntQueryEx( ) - Query Information” on page 241
HypQuerySig( ) “EntQueryEx( ) - Query Information” on page 241
HypUnLock( ) “EntUnSelect( ) - Deselecting Tables” on page 269
Optional. These Hyperion Enterprise SE functions are supported and documented in Chapter 2,“Spreadsheet Add-in Functions” and Chapter 3, “Table Functions”
The obsolete functions, those that are not marked as optional, emulate Hyperion Enterprise SEbehavior as much as possible. However, when you replace them with new Ent...( ) functions,you must adjust for some specific differences in Hyperion Enterprise. For more information,see “Upgrading Functions” on page 289 and “Changes to Hyperion Enterprise Tables” on page297.
Alternatively, you can replace the obsolete functions in this list with new Hyp...( ) functions. Formore information, see “Replacing Obsolete Functions with New Hyp...( ) Functions” on page284.
288 Converting from Hyperion Enterprise SE
Note: You should allocate a larger buffer for EntFreqAsk( ) for the returned frequency namethan for HypFreqAsk( ), although it is not likely that your application actually uses largerfrequency names. The buffer should be 2(SIZENAME+1) for EntFreqAsk( ) rather than2(OLDSIZENAME+1).
Upgrading FunctionsWhen you replace obsolete functions, you must adjust your code for differences in the HyperionEnterprise Release API. The following functions might need to be adjusted when you replacethem:
l HypLock( ) and HypUnLock( ) For more information, see “Upgrade HypLock( ) andHypUnLock( ) ” on page 289.
l HypFind( ) For more information, see “Upgrade HypFind( )” on page 289.
l HypQuery( ) For more information, see “Upgrade HypQuery( )” on page 290.
l HypQuerySig( ) For more information, see “Upgrade HypQuerySig( )” on page 293.
l HypQryNode( ) For more information, see “Upgrade HypQryNode( )” on page 294.
l HypQryAcctListEntry( ) and HypQryNameListEntry( ). For more information, see“Upgrade HypQryAcctListEntry( ) and HypQryNameListEntry( )” on page 295.
If you split account signatures into major and sub-account signatures, replace this code with thenew function EntAcctSplit( ). For more information, see “Replacing Split 32-bit Account andEntity Signatures” on page 297.
Upgrade HypLock( ) and HypUnLock( ) When you replace HypLock( ) and HypUnLock( ) with HypLockEx( ) and HypUnLockEx( ),you should use an OR operation with the ID_ASSOC constant rather than select associated tablesindividually. This locks all of the tables associated with the specified table, as in HyperionEnterprise SE. For more information, see “Associated Tables” on page 362.
In Hyperion Enterprise SE, the Books table (ID_BOOKS) is selected whenever you HypLock( )is called to select the Reports table (ID_REPORTS). To upgrade, call HypLockEx( ) to select theBooks table.
Upgrade HypFind( )When you replace calls to HypFind( ) with calls to HypFindEx( ) or EntFind( ), check whetheryou use HypFind( ) to find the frequency in the ID_FREQUENCY table. Hyperion Enterprisefrequencies are one character in length (M, D, W, Y, and so on.).
In Hyperion Enterprise SE, HypFind( ) uses only the first character of the frequency string thatyou pass it. For example, if you pass it frequency M or frequency M.PER, it returns the signaturefor frequency M in either case. In Hyperion Enterprise, the entire string is used. For example, ifyou pass frequency M.PER, an error (NONE) is returned because there is no such frequency.
Upgrading Functions 289
To find the record associated with an intercompany matching set, you should use tableID_ICSET, not ID_INTCODET. For more information, see “Changes to the IntercompanyDetail Table” on page 298.
Upgrade HypQuery( )When you upgrade calls to HypQuery( ) with the new calls to HypQueryEx( ) or EntQueryEx( )to handle the larger signatures and IDs of Hyperion Enterprise, you must be aware of thefollowing differences:
l Many query attributes that are valid in Hyperion Enterprise SE do not exist in HyperionEnterprise. For more information see “Obsolete Query Attributes” on page 290.
l Many query attributes return information of a different size (type) in Hyperion Enterprisethan in Hyperion Enterprise SE. For more information see “Upgrade HypQuery( )” on page290.
l In Hyperion Enterprise SE, it is possible to pass a length of zero to HypQuery( ) for the sizeof the return buffer for many queries. This works because the Hyperion Enterprise SE APIassumes that the buffer is the correct size and does not check the length argument, especiallyfor short integers. Hyperion Enterprise returns an error message, so you must pass the lengthin all cases.
Obsolete Query AttributesTable 50 lists obsolete query attributes and what you should use to replace them. The obsoletequery attributes do not work with HypQueryEx( ) or EntQueryEx( ).
Table 50 Obsolete Query Attributes
Table Obsolete Query Attribute New Query Attribute
ID_CATEGORY CAT_DISPLAYPER Query attribute was never functional.
ID_GROUP ACCT_GROUP GRPACCT_CHARTORDER
ID_GROUP ACCT_LEVEL Not applicable because accounts do not have levels.
ID_GROUP QRYFIRST GRPACCT_CHARTORDER
ID_INTCODET All in table For more information, see “Changes to the Intercompany DetailTable” on page 298.
ID_ROLLOVER All in table For more information, see “Changes to the Rollovers Table” onpage 300.
ID_SECCATTAB All in table For more informations, see “Obsolete Security Tables” on page302.
ID_SECCATDET All in table For more information, see “Obsolete Security Tables” on page302.
290 Converting from Hyperion Enterprise SE
Table Obsolete Query Attribute New Query Attribute
ID_SECNAMETAB All in table For more information, see “Obsolete Security Tables” on page302.
ID_SECNAMEDET All in table For more information, see “Obsolete Security Tables” on page302.
ID_SECHYPTAB All in table For more informations, see “Obsolete Security Tables” on page302.
ID_SECHYPDET All in table For more informations, see “Obsolete Security Tables” on page302.
ID_SECGRPTAB All in table For more information, see “Changes to the Security Group Table”on page 306.
ID_SECUSERTAB USERTAB_GROUP
USERTAB_PASSWORD
USERTAB_USERID
For more information, see “Changes to the Security Users Table”on page 306.
ID_SUBACCT
(obsolete table name - ID_SUBACCTHDR)
SUBTABLE_LEVEL Not applicable. Subaccounts do not have levels.
ID_SUBACCT
(obsolete table name - ID_SUBACCTHDR)
SUBTABLE_MULTILEVEL Not applicable. All sub-tables are potentially multilevel.
ID_SUBACCTDETAIL (obsolete tablename - ID_SUBACCTDET)
SIGNATURE Not applicable. The signature of the detail record is the sub-account signature.
ID_SUBACCTDETAIL (obsolete tablename - ID_SUBACCTDET)
QRYFIRST SUBTABLE_FIRSTDETAIL for table ID_SUBACCTHDR.
ID_SUBNAME ELIMINATIONS INTERCOMPANYSUB-NAME
Error.
Upgrade HypQuery( ) Query SizesHypQuery( ) compensates for query sizes that have changed. However, the new functionsHypQueryEx( ) and EntQueryEx( ) do not compensate for differences in query size. You shouldupdate your code to use the new query sizes.
The following query attributes are Integers (short in C) in Hyperion Enterprise SE and are allrecord signatures and long in Hyperion Enterprise. If you pass an Integer to query an item thatis an Integer in Hyperion Enterprise SE but is long in Hyperion Enterprise, the underlyingHyperion Enterprise API generates an error message.
l ACCT_GROUP
l ACCT_SUBACCT_TABLE
l BOTTOMLIST
Upgrading Functions 291
l CAT_FREQ
l CAT_PRIORSIG
l CHARTMETHOD
l COUNT
l CURRENCY
l QRYFIRST
l QRYNEXT
l REPORT_ID
l REPSET_ID
l ROLLOVER_CAT1 (ROLL_SRCCAT)
l ROLLOVER_CAT2 (ROLL_DESTCAT)
l SUBACCT_TABLE
l TOPLIST
The following query attributes are Integers (short in C) in Hyperion Enterprise SE and are onecharacter (Byte). The Hyperion Enterprise API does not set or clear the upper byte if passed anInteger for a Byte field, so you might get unexpected results.
l ACCT_IS_BALANCE
l ACCT_IS_INTERCO
l ACCT_SUBACCT_TYPE
l AUTORECALC
l CAT_FLOWYTD
l INTERCOMPANY
l JOURNALS
l LIST_DIRECTION
l SCALESCHED_BOLD
Although the following query attributes also retrieve only one byte now, Hyperion Enterpriseextends it to two bytes if wLen = 2.
l ACCT_IS_CONSOLIDATE
l ACCT_IS_CURRENCY
l ACCT_IS_SCALE
l ALLPERIODS
l CAT_SCALE
l SCHED_ITALIC
l SHOW_LOGIC
l SUBACCT_TYPE
292 Converting from Hyperion Enterprise SE
l SUBTABLE_IS_INTERCO
l SUPPNODATA
l USELABEL
You can pass a length of zero to HypQuery( ) for the size of the return buffer for many queriesin Hyperion Enterprise SE. This is not applicable in Hyperion Enterprise. The system returnsan error message.
Query attribute CODE retrieves a string in Hyperion Enterprise SE. The functionsHypQueryEx( ) and EntQueryEx( ) retrieve the signature of a code in Hyperion Enterprise. Ifyou want a string, you must query the codes table, ID_CODES, for the NAME of the code.
Upgrade HypQuerySig( )You can replace calls to HypQuerySig( ) with HypQueryEx( ) or EntQuery. If queries forattributes are a different size in Hyperion Enterprise than in Hyperion Enterprise SE,HypQuerySig( ) compensates for these changes. You must use an argument of the correct lengthwhen using HypQueryEx( ) or EntQueryEx( ).
Table 51 lists the Hyperion Enterprise equivalents for Hyperion Enterprise SE HypQuerySig( )query attributes.
Table 51 Upgrading HypQuerySig( ) Query Attributes
Hyperion Enterprise SE Query Attribute Hyperion Enterprise Equivalent
The NAME attribute returns the full account ID. The NAME attribute returns the ID of the major account only. Use the ACCT_FULLNAME attribute to get the full account ID.
The ACCT_LEVEL query attribute is valid for the Accountstable (ID_ACCOUNTS).
Accounts do not have levels. The ACCT_LEVEL query attribute for the accountstable (ID_ACCOUNTS) is not applicable and returns an error code.
The following query attributes retrieve an Integer (short inC) value:
l ACCT_GROUP
l ACCT_SUBACCT_TABLE
l CHARTMETHOD
l CURRENCY
l SUB-NAME
The following query attributes are record signatures and retrieve a Long (SIGNAin C) value:
l ACCT_GROUP
l ACCT_SUBACCT_TABLE
l CHARTMETHOD
l CURRENCY
l SUB-NAME
Upgrading Functions 293
Hyperion Enterprise SE Query Attribute Hyperion Enterprise Equivalent
The following query attributes retrieve an Integer (short inC) value:
l ACCT_IS_BALANCE
l ACCT_IS_CONSOLIDATE*
l ACCT_IS_CURRENCY*
l ACCT_IS_INTERCO
l ACCT_IS_SCALE*
l ACCT_SUBACCT_TYPE
l INTERCOMPANY
l JOURNALS
l SCALE
The following query attributes retrieve a byte.
l ACCT_IS_BALANCE
l ACCT_IS_CONSOLIDATE*
l ACCT_IS_CURRENCY*
l ACCT_IS_INTERCO
l ACCT_IS_SCALE*
l ACCT_SUBACCT_TYPE
l INTERCOMPANY
l JOURNALS
l SCALE
The query attribute CODE retrieves a string. The functions HypQueryEx( ) and EntQueryEx( ) retrieve the signature of a code.If you want a string, you must query the codes table, ID_CODES, for the NAMEof the code.
Although these retrieve only one byte in Hyperion Enterprise, the system retrieves two bytes ifwLen = 2.
Upgrade HypQryNode( )Instead of calling HypQryNode( ), you can call HypQueryEx( ) or EntQueryEx( ). Table 52 liststhe Hyperion Enterprise equivalents for Hyperion Enterprise SE HypQryNode( ) queryattributes.
Table 52 Upgrading HypQryNode( ) Query Attributes
Hyperon Hyperion Enterprise SE QueryAttribute Hyperion Enterprise Equivalent
ACQUIRED Not applicable.
CONSMETHOD Use table ID_NODES, attribute NODEBYPER_CONLOGIC.
DISPOSED Not applicable.
PCTOWNED Use table ID_NODES, attribute NODEBYPER_PCTOWNED.
ADDFLAG HIDEDEPS CHARTMETHODCODE CURRENCY DESCRIPTIONELIMINATIONS INTERCOMPANYJOURNALS NAME NAMEID NAMESIGPARENT SCALE SUB-NAME
Use the new Nodes table, ID_NODES, when you call HypQueryEx( ) or EntQueryEx( ). Thesequery attributes use the Entities (ID_NAMES) table. You must first query the Nodes table (ID_NODES) using query attribute NAMEID to get the signature of the entity, then use that entitysignature to query the Entities table (ID_NAMES) using the desired query attribute.
294 Converting from Hyperion Enterprise SE
Upgrade HypQryNode( ) Query SizesThe sizes of fields that you query differ from Hyperion Enterprise SE to Hyperion Enterprise.Table 53 lists Hyperion Enterprise SE query sizes for HypQryNode( ) and their HyperionEnterprise equivalents.
Table 53 Upgrading HypQryNode( ) Query Sizes
Hyperion Enterprise SE Query Size Hyperion Enterprise Query Size
The following query attributes retrieve an Integer(short in C) value:
l CHARTMETHOD
l CURRENCY
l SUB-NAME
The following query attributes retrieve a Long (SIGNA in C). HypQryNode( ) truncatesthe value to an Integer (short in C), as in Hyperion Enterprise SE. To be fully functionalin Hyperion Enterprise, you must use HypQueryEx( ) or EntQueryEx( ).
l CHARTMETHOD
l CURRENCY
l SUB-NAME
The following query attributes retrieve an Integer(short in C) value:
l ELIMINATIONS*
l HIDEDEPS*
l INTERCOMPANY
l JOURNALS
l SCALE
The following query attributes retrieve a Byte:
l ELIMINATIONS*
l HIDEDEPS*
l INTERCOMPANY
l JOURNALS
l SCALE
The query attribute CODE retrieves a string. The functions HypQueryEx( ) and EntQueryEx( ) retrieve the signature of a code. Ifyou want a string, you must query the Codes table, ID_CODES, for the NAME of thecode.
Although these retrieve only one byte, the system retrieves two bytes if wLen = 2.
Upgrade HypQryAcctListEntry( ) and HypQryNameListEntry( )You can replace calls to HypQryAcctListEntry( ) and HypQryNameListEntry( ) withHypQueryEx( ) or EntQueryEx( ). Use the tables ID_ACCTLISTENTRY orID_NAMELISTENTRY.
If query attributes are a different size in Hyperion Enterprise than in Hyperion Enterprise SE,HypQryAcctListEntry( ) and HypQryNameListEntry( ) compensate for these changes. You mustuse an argument of the correct length when using HypQueryEx( ) or EntQueryEx( ).
Table 54 lists the Hyperion Enterprise SE query attributes for HypQryAcctListEntry( ) andHypQryNameListEntry( ) and their Hyperion Enterprise equivalents.
Table 54 Upgrading HypQryAcctListEntry( ) and HypQryNameListEntry( ) Query Attributes
Hyperion Enterprise SE Query Attributes Hyperion Enterprise Equivalent
The following query attributes retrieve an Integer (short in C) value:
l NUM_CHART
The following query attributes retrieve a Long (SIGNA in C):
l NUM_CHART
Upgrading Functions 295
Hyperion Enterprise SE Query Attributes Hyperion Enterprise Equivalent
l NUM_CONSOL l NUM_CONSOL
l NUM_CURRENCY l NUM_CURRENCY
l NUM_GROUPS l NUM_GROUPS
l NUM_NAME l NUM_NAME
l NUM_ORGS l NUM_ORGS
l NUM_SUBNAMES l NUM_SUBNAMES
l NUM_SUBSTRUCTS
l NUM_TABLES
l QRYFIRST
l QRYNEXT
l NUM_SUBSTRUCTS
l NUM_TABLES
l QRYFIRST
l QRYNEXT
The following query attributes retrieve an Integer (short in C) value:
l ALL_DEPS
l BASE_NAMES
l CALC_ACCT*
l ELIM_NAMES
l IMMED_DEPS
l INPUT_ACCT*
l INTCO_NAMES
l JOURNAL_NAMES
l MULTI_ACCT*
l PARENT_NAMES
l SHOW_DETAIL*
l SINGLE_ACCT*
l SUBNAMES
l SUB_MULT*
l SUB_SINGLE*
The following query attributes retrieve a Byte:
l _DEPS
l BASE_NAMES
l CALC_ACCT*
l ELIM_NAMES
l IMMED_DEPS
l INPUT_ACCT*
l INTCO_NAMES
l JOURNAL_NAMES
l MULTI_ACCT*
l PARENT_NAMES
l SHOW_DETAIL*
l SINGLE_ACCT*
l SUBNAMES
l SUB_MULT*
l SUB_SINGLE*
The following query attributes retrieve an array of Integers (array ofshorts in C) value:
l CHART_DATA
l CONSOL_DATA
l ORG_DATA
l SUBNAME_DATA
l TABLE_DATA
l SUBSTRUCT_DATA
The following query attributes retrieve an array of Longs (array ofSIGNAs in C):
l CHART_DATA
l CONSOL_DATA
l ORG_DATA
l SUBNAME_DATA
l TABLE_DATA
l SUBSTRUCT_DATA
Query attribute CODE in table ID_NAMELISTENTRY retrieves the user-defined code specified as criteria for a dynamic entity list.
You can specify multiple codes for a dynamic entity list.
296 Converting from Hyperion Enterprise SE
Hyperion Enterprise SE Query Attributes Hyperion Enterprise Equivalent
Query attribute LEVELS in table ID_ACCTLISTENTRY Not applicable. You can filter dynamic account lists by codeinstead.
Although these retrieve only one byte, the system retrieves two bytes if wLen = 2.
If you upgrade to HypQueryEx( ) or EntQueryEx( ), observe the following guidelines to get thecodes associated with an entity list:
l Query the Entity List table for query attribute NUM_CODES to get the number of codesassociated with the entity list. The number retrieved is a long integer.
l Allocate a buffer large enough to hold an array of that many signatures (Long in Visual Basic,SIGNA in C).
l Query the Entity List table for query attribute CODE_DATA, passing it the address of thebuffer. It will fill the buffer with an array of code signatures.
l You can get the ID of each code by querying the new Codes table, ID_CODES, for the NAMEof the code, passing it the signature of the code.
Replacing Split 32-bit Account and Entity SignaturesIn Hyperion Enterprise SE, it is possible to split the 32-bit account signature to extract thesignatures of the major accounts and subaccounts. Similarly, it is possible to split the 32-bitentity signature to extract the sub-entity signature.
To get the major account and sub-account signatures in Hyperion Enterprise, useEntAcctSplit( ). To get the sub-entity signature in Hyperion Enterprise, call HypQueryEx( ) toquery the entity table (ID_NAME) for attribute SUB-NAME.
Changes to Hyperion Enterprise TablesWhen you replace obsolete functions with the new Hyp...( ) or Ent...( ) functions, you mustadjust your code for changes to the Hyperion Enterprise tables. The following tables havechanged from Hyperion Enterprise SE:
l Intercompany Detail Table (ID_INTCODET)
l Nodes Table (ID_NODES)
l Rollovers Table (ID_ROLLOVER)
l Security Group Table (ID_SECGRPTAB)
l Security User Table (ID_SECUSERTAB)
Renamed TablesThe table IDs for the tables shown in Table 55 have been renamed. The values of these tableshave not been changed.
Changes to Hyperion Enterprise Tables 297
Table 55 Renamed Tables
Table Name Hyperion Enterprise SE Hyperion Enterprise
Subaccount Header ID_SUBACCT ID_SUBACCTHDR
Subaccount Detail ID_SUBACCTDETAIL ID_SUBACCTDET
Report Sets ID_SETS ID_REPORT_SETS
Report Entries ID_REPSETS ID_REPORT_ENTRIES
Changes to the Intercompany Detail TableThe Intercompany Detail table, ID_INTCODET, has been split into two tables in HyperionEnterprise: ID_ICSET and ID_INTCODET.
The new table ID_ICSET contains the intercompany matching sets. Each record in this table hasthe set name and other information that applies to the whole set (such as the plug account). TheIntercompany Detail table, ID_INTCODET, contains the account pairs for each set.
These two types of records are mixed together in the Hyperion Enterprise SE table.
Upgrade HypEnum( ) for the Intercompany TableWhen you upgrade HypEnum( ) to HypEnumEx( ) or EntEnum(), you should continue to usetable ID_INTCODET.
Just as in Hyperion Enterprise SE, you can pass the signature of the group header record (nowin table ID_ICSET) to enumerate the detail records in that set only, or you can pass NONE toenumerate the detail records in all sets. Additionally, you can now enumerate just the sets bycalling HypEnumEx( ) or EntEnum( ) for table ID_ICSET.
Upgrade HypLock( ) and HypUnLock( ) for the Intercompany TableWhen you replace HypLock( ) and HypUnLock( ) with HypLockEx( ) and HypUnLockEx( ),or EntSelect( ), EntSelectAdd( ), and EntUnSelect( ), use table ID_ICSET and an OR operationwith the ID_ASSOC constant. This selects both tables.
Upgrade HypQuery( ) for the Intercompany TableWhen you upgrade HypQuery( ) to HypQueryEx( ) or EntQueryEx( ), some of the informationyou might be trying to get is in the group header record in table ID_ICSET, and some is in thedetail record in table ID_INTCODET. You can use HypFindEx( ) or EntFind( ) to get thesignature of the header record in table ID_ICSET. To get the signature of a detail record, see“Get the Detail Records for the Intercompany Table” on page 299.
Table 56 lists the HypQuery( ) Intercompany Detail table query attributes from HyperionEnterprise SE, the table ID, and the query attributes from Hyperion Enterprise.
298 Converting from Hyperion Enterprise SE
Table 56 Upgrading HypQuery( ) Intercompany Detail Table Query Attributes
Hyperion Enterprise SE Query Attribute Table ID Hyperion Enterprise Query Attribute
INTCO_GROUP_NAME ID_ICSET NAME
INTCO_PLUG ID_ICSET INTCO_PLUGSIG
INTCO_ACCT1 ID_INTCODET INTCO_ACCTSIG1
INTCO_ACCT2 ID_INTCODET INTCO_ACCTSIG2
QRYFIRST, Any table QRYFIRST
QRYNEXT QRYNEXT
Although the obsolete functions emulate the behavior of Hyperion Enterprise SE, the emulationis not perfect. If you continue to use the obsolete HypQuery( ) function, you must use thesignature returned from the obsolete HypFind( ) function to query information that is now intable ID_ICSET. You also must use a signature retrieved by the obsolete HypEnum( ) function(the signature of a detail record) to query information that is now in table ID_INTCODET.
Get the Detail Records for the Intercompany TableIn Hyperion Enterprise SE, the intercompany detail records follow the group header records,the record for the set, in the table. In Hyperion Enterprise, the header record and detail recordsare in separate tables.
To retrieve the first detail record in a set, call HypQueryEx( ) or EntQueryEx( ) using tableID_ICSET, the signature of the group header record for the set, and query attributeINTCO_GROUPSIG. This retrieves the signature of the first detail record for the set, in tableID_INTCODET.
To retrieve the next detail record in a set, call HypQueryEx( ) or EntQueryEx( ) using tableID_INTCODET, the signature of the current detail record, and query attributeINTCO_NEXTDET. If no more detail records are in the set, the signature retrieved will beNONE.
You can also use HypEnumEx( ) or EntEnum( ) to get the signatures of the detail records.
Changes to the Nodes TableOrganization structure information in Hyperion Enterprise is stored in nodes. Table 57 lists thechanges in the Nodes table from Hyperion Enterprise SE to Hyperion Enterprise.
Table 57 Changes in the Nodes Table
Hyperion Enterprise SE Hyperion Enterprise
Node information is stored in the namestable, ID_NAMES.
Node information is stored in a new table, ID_NODES.
Changes to Hyperion Enterprise Tables 299
Hyperion Enterprise SE Hyperion Enterprise
HypFindNameInOrg( ) returns an entitysignature.
HypFindNameInOrg( ) returns the node signature.
HypEnumOrgNames( ) passes an entitysignature to your callback function.
HypEnumOrgNames( ) passes a node signature to your callback function. Your callbackfunction can use the signature to call HypQryNode( ) because HypQryNode( ) expects a nodesignature. You cannot use the callback function signature to call HypQuerySig( ) orHypQueryEx( ) for table ID_NAMES because it is not an entity signature.
To get the appropriate entity signature from the node signature, query the nodes table, ID_NODES, using query attribute NAMEID or NAMESIG.
Changes to the Rollovers TableThe Rollovers table, ID_ROLLOVER, has been split into two tables, ID_ROLLOVER andID_ROLLSET. The ID_ROLLSET table contains the header information for the rollover sets,such as the rollover group ID and description. ID_ROLLOVER contains the details for eachrollover set. Each record contains the source and destination categories.
HypLock( ) and HypUnLock( )When you upgrade HypLock( ) and HypUnLock( ) to HypLockEx( ) and HypUnLockEx( ), orEntSelect( ), EntSelectAdd( ), and EntUnSelect( ), use table ID_ROLLSET and an OR operationwith the ID_ASSOC constant. This selects both tables.
HypEnum( )When you upgrade HypEnum( ) to HypEnumEx( ) or EntEnum( ), you should continue to usetable ID_ROLLOVER.
As in Hyperion Enterprise SE, you can pass the signature of the group header record (now intable ID_ROLLSET) to enumerate only the detail records in that rollover set, or you can passNONE to enumerate the detail records in all rollover sets.
Additionally, you can now enumerate just the rollover sets by calling HypEnumEx( ) orEntEnum( ) for the ID_ROLLSET table.
HypFind( )When you replace calls to HypFind( ) with HypFindEx( ) or Entfind( ) to find the recordassociated with a group ID, use table ID_ROLLSET rather than ID_ROLLOVER. The rolloverIDs are now in table ID_ROLLSET.
HypQuery( )When you upgrade HypQuery( ) to HypQueryEx( ) or EntQuery(), some of the desiredinformation is in the group header record in table ID_ROLLSET and some is in the detail recordin table ID_ROLLOVER.
300 Converting from Hyperion Enterprise SE
You can use HypFindEx() or EntFind() to get the signature of the header record in tableID_ROLLSET. For information on getting the signature of a detail record, see “Get the DetailRecords for the Rollovers Table” on page 301.
Table 58 Upgrading HypQuery( ) Rollovers Table Query Attributes
Hyperion Enterprise SE Query Attribute Table ID Hyperion Enterprise Query Attribute
ROLLOVER_CAT1 ID_ROLLOVER ROLL_SRCCAT
ROLLOVER_CAT2 ID_ROLLOVER ROLL_DESTCAT
ROLLOVER_NAME ID_ROLLSET NAME
QRYFIRST QRYNEXT Any table QRYFIRST QRYNEXT
Although the obsolete functions emulate the behavior of Hyperion Enterprise SE, the emulationis not perfect. If you continue to use the obsolete HypQuery( ) function, you have to use thesignature returned from obsolete HypFind( ), which is the signature of the group header recordin table ID_ROLLSET, to query information that's now in table ID_ROLLSET. You have to usea signature retrieved by the obsolete HypEnum( ) function, which is the signature of a detailrecord, to query information that is now in table ID_ROLLOVER.
Table 59 Upgrading HypQuery( ) Rollovers Table Query Sizes
Release 1.8 or 4SE Release 4
These query attributes retrieve an Integer (short in C) value: These query attributes now retrieve a Long (SIGNA in C) value.
ROLLOVER_CAT1
(or ROLL_SRCCAT)
ROLLOVER_CAT2
(or ROLL_DESTCAT)
QRYFIRST
QRYNEXT
The following query attributes retrieve an Integer (short in C) value in Hyperion Enterprise SE.These query attributes retrieve a Long (SIGNA in C) value in Hyperion Enterprise.
l ROLLOVER_CAT1 (orROLL_SRCCAT)
l ROLLOVER_CAT2 (or ROLL_DESTCAT)
l QRYFIRST
l QRYNEXT
Get the Detail Records for the Rollovers TableIn Hyperion Enterprise SE, the rollover detail records follow the group header records (therecord for the rollover set name) in the Rollovers table. In Hyperion Enterprise, the header recordand detail records are in separate tables.
Changes to Hyperion Enterprise Tables 301
To retrieve the first detail record in a rollover set, call HypQueryEx( ) or EntQueryEx( ) usingtable ID_ROLLSET, the signature of the group header record for the rollover set, and queryattribute ROLL_GROUPSIG. This retrieves the signature of the first detail record for the set, intable ID_ROLLOVER.
To retrieve the next detail record in a rollover set, call HypQueryEx( ) or EntQueryEx( ) usingtable ID_ROLLOVER, the signature of the current detail record, and query attributeROLL_NEXTDET. If no more detail records are in the set, the signature retrieved will be NONE.
Obsolete Security TablesTable 60 describes security tables that are obsolete in Hyperion Enterprise. The following securitytables do not exist in Hyperion Enterprise.
Table 60 Obsolete Security Tables
Table ID Description
ID_SECCATTAB Category access groups
ID_SECCATDET Category access details
ID_SECNAMETAB Entity access groups
ID_SECNAMEDET Entity access details
ID_SECHYPTAB Hyperion Enterprise task access groups
ID_SECHYPDET Hyperion Enterprise task access details
Obsolete Security Access Group TablesThe obsolete HypEnum( ), HypFind( ), and HypQuery( ) functions treat the obsolete securityaccess group tables (ID_SECCATTAB, ID_SECNAMETAB, and ID_SECHYPTAB) like theHyperion Enterprise SE security group table (ID_SECGRPTAB). The signature of a group inany of these tables is now the signature of a group in the user table, ID_SECUSERTAB. For moreinformation, see “Changes to the Security Group Table” on page 306.
If you use the COUNT query attribute for these tables, you want to retrieve the number of groups.However, if you upgrade to use HypQueryEx( ) or EntQueryEx( ), using tableID_SECUSERTAB, COUNT instead gets the total count of groups plus users in the user table.You should use the new query attribute SECUSER_NUM_GROUPS to get only the number ofgroups in the Security Users table (ID_SECUSERTAB).
Obsolete Security Access Detail TablesThe security access detail tables (ID_SECCATDET, ID_SECNAMEDET, and ID_SECHYPDET)do not exist in Hyperion Enterprise. You can specify most items in Hyperion Enterprise, notjust categories, entities, and tasks.
302 Converting from Hyperion Enterprise SE
These obsolete tables were most often used to query the current user's rights for the specifiedcategory, entity, or task. In this case, the access group signature passed to HypQuery( ) was -1or NONE.
To get current user rights to a category or entity, call HypQueryEx( ) or EntQueryEx( ) to querythe Categories or Entities table (ID_CATEGORY or ID_NAMES) using the query attributeUSER_RIGHTS. The buffer for the returned value should be an integer (short in C).
The easiest way to get the current user rights to a task is to change the HYPACC_... task accesscode to the equivalent SECTASK_... security task code, then call EntGetRightsToTask (hApp&,SECTASK_..., ...). This returns the security rights (SECURITY_MODIFY, SECURITY_VIEW,SECURITY_NONE, or the new SECURITY_RESTRICTED). Note that hApp& is the HyperionEnterprise application handle used for the Advanced Functions, not the Hyperion EnterpriseRetrieve application handle from HypConstruct( ). You should call HypGethApp( ) to get theproper hApp& value to use.
The obsolete HypLock( ) and HypUnLock( ) functions do not select or deselect the securityaccess detail tables because the tables no longer exist. However, in case your legacy programchecked error return codes, HypLock( ) still returns APILOCK_READONLY if the current userhas the security rights that are needed to select the table in Hyperion Enterprise SE.
Security Task CodesTable 61 lists the obsolete constants used for checking a user rights to particular tasks in HyperionEnterprise SE using the obsolete table ID_SECHYPDET and the corresponding security taskconstant to use in Hyperion Enterprise.
Table 61 Upgrading Security Task Codes
Hyperion Enterprise SE Security Task Hyperion Enterprise Security Task
HYPACC_ACCOUNTS SECTASK_CHARTOFACCTSMODULE
HYPACC_APPLICATION SECTASK_APPLICATIONMODULE
HYPACC_BOOKS SECTASK_BOOKSMODULE
HYPACC_CATEGORY SECTASK_CATEGORYMODULE
HYPACC_CONSOLIDATION SECTASK_CONSOLMODULE
HYPACC_DATABASE SECTASK_DATABASEMODULE
HYPACC_JOURNALS SECTASK_JOURNALSMODULE
HYPACC_LOGIC SECTASK_FORMULASMODULE
HYPACC_MAIL Not applicable.
HYPACC_NAMES SECTASK_ENTITIESMODULE
HYPACC_REPORTS SECTASK_REPORTSMODULE
HYPACC_ROLLOVERS SECTASK_ROLLOVERSETADMIN
Changes to Hyperion Enterprise Tables 303
Hyperion Enterprise SE Security Task Hyperion Enterprise Security Task
HYPACC_SCHEDULES SECTASK_SCHEDULESMODULE
HYPACC_SECURITY SECTASK_SECURITY
HYPACC_SYSTEMS Not applicable.
HYPACC_COA SECTASK_CHARTOFACCTSSETUP
HYPACC_SUBACCTAB SECTASK_SUBACCTTBLADMIN
HYPACC_ACCTCVTTAB SECTASK_ACCTCNVADMIN
HYPACC_ACCTLIST SECTASK_ACCTLISTADMIN
HYPACC_INTERCOMATCH SECTASK_INTERCOADMIN
HYPACC_NEWAPPS SECTASK_NEWAPPS
HYPACC_EDITAPPS SECTASK_APPLICATIONADMIN
HYPACC_BOOKEDITOR SECTASK_REPORTSCRIPTEDIT
HYPACC_BOOKCOMPILE SECTASK_REPORTSCRIPTEDIT
HYPACC_BOOKRUN SECTASK_RUNBOOKS
HYPACC_RUNINTERCO SECTASK_RUNINTERCO
HYPACC_DATAENTRY SECTASK_SCHEDDATAENTRY
HYPACC_LOADDATA SECTASK_LOADDATA
HYPACC_EXTRACTDATA SECTASK_EXTRACTDATA
HYPACC_UNLOCKDATA SECTASK_UNLOCKDATA
HYPACC_DEFINEFORMAT SECTASK_DATABASEADMIN
HYPACC_JOURCREATE SECTASK_JOURADMIN
HYPACC_JOURPOST SECTASK_POSTJOUR
HYPACC_JOUREDITPOST SECTASK_EDITJOUR
HYPACC_JOURREVERSE SECTASK_REVERSEJOUR
HYPACC_JOURUNPOST SECTASK_UNPOSTJOUR
HYPACC_JOURPRINT SECTASK_JOURREPORTS
HYPACC_LOGICADM SECTASK_METHODADMIN
HYPACC_MAILADM Not applicable.
HYPACC_NORGS SECTASK_ORGADMIN
304 Converting from Hyperion Enterprise SE
Hyperion Enterprise SE Security Task Hyperion Enterprise Security Task
HYPACC_NSUBSTRUCT SECTASK_SUBSTRADMIN
HYPACC_NCURRENCIES SECTASK_CURRENCYADMIN
HYPACC_NCONVTAB SECTASK_ENTITYCNVADMIN
HYPACC_NAMELIST SECTASK_ENTITYLISTADMIN
HYPACC_RSETMANAGER SECTASK_REPORTADMIN
HYPACC_RIMPORT SECTASK_REPORTSCRIPTEDIT
HYPACC_REDITOR SECTASK_REPORTSCRIPTEDIT
HYPACC_RCOMPILE SECTASK_REPORTSCRIPTEDIT
HYPACC_RRUN SECTASK_RUNREPORTS
HYPACC_ROLLRUN SECTASK_ROLLRUN
HYPACC_SDATAENTRY SECTASK_SCHEDDATAENTRY
HYPACC_SDEFINESCHED SECTASK_SCHEDADMIN
HYPACC_SECURITYADM SECTASK_SECURITY
HYPACC_SYSLOAD SECTASK_LOADAPP
HYPACC_SYSEXTRACT SECTASK_EXTRACTAPP
HYPACC_BOOKDEFINE SECTASK_REPORTSCRIPTEDIT
HYPACC_DEFROLLOVER SECTASK_ROLLOVERSETADMIN
HYPACC_EDITDATA SECTASK_SCHEDDATAENTRY
HYPACC_LOCKDATA SECTASK_LOCKDATA
HYPACC_OPEN SECTASK_OPENPERIOD
HYPACC_DEFREPORTS SECTASK_REPORTSCRIPTEDIT
HYPACC_CATADM SECTASK_CATADMIN
HYPACC_CONSOL SECTASK_CONSOL_ALL
HYPACC_EXTRACTOLOCK SECTASK_EXTRACTDATA
HYPACC_JOURREVIEW SECTASK_REVIEWJOUR
HYPACC_JOURALLOWSS SECTASK_UNBALANCEDJOUR
HYPACC_JOURALLOWUBWN SECTASK_BALANCEINENTITY
HYPACC_DATAJOURLOCK SECTASK_DATAJOURLOCK
Changes to Hyperion Enterprise Tables 305
Hyperion Enterprise SE Security Task Hyperion Enterprise Security Task
HYPACC_DATAJOURUNLOCK SECTASK_DATAJOURUNLOCK
HYPACC_GRW SECTASK_REPORTSCRIPTEDIT
Changes to the Security Group TableTable 62 lists the changes in the Security Group table (ID_SECGRPTAB) from HyperionEnterprise SE to Hyperion Enterprise.
Table 62 Changes in the Security Group Table
Hyperion Enterprise SE Hyperion Enterprise
Security groups are in the security group table, ID_SECGRPTAB.
Security groups are in the Security Users table, ID_SECUSERTAB.
Note: When upgrading HypEnum( ), HypFind( ), and HypQuery( ), use ID_SECUSERTAB instead of ID_SECGRPTAB.
Each security group is assigned a category access, nameaccess, and Hyperion Enterprise task access group. Queryattributes GRPTAB_NAME, GRPTAB_CAT, and GRPTAB_HYPE retrieve these groups.
The access groups and the query attributes GRPTAB_CAT, GRPTAB_NAME,and GRPTAB_HYPE do not exist in Hyperion Enterprise.
HypEnum( ) enumerates only groups. You cannot use HypEnumEx( ). Instead, call EntEnum( ) with table ID_SECUSERTAB.
Changes to the Security Users TableTable 63 lists the changes in the Security Users table from Hyperion Enterprise SE to HyperionEnterprise.
Table 63 Changes in the Security Users Table
Hyperion Enterprise SE Hyperion Enterprise
The Security users table, ID_SECUSERTAB,contains only users.
The user table contains both users and security groups.
HypEnum( ) enumerates only users. You cannot use HypEnumEx( ). Call EntEnum( ) with an apiStruct.
You use HypQuery( ) with query attributesUSERTAB_PASSWORD and USERTAB_USERIDto get the password and the user ID.
Use SECUSER_PASSWORD to get the password and SHORTNAME to get the user ID.
The USERTAB_GROUP query returns the user'ssecurity group.
A user can belong to more than one group, so query attribute USERTAB_GROUP doesnot exist in Hyperion Enterprise. Use the Security Group table, ID_SECGRPTAB, toenumerate the groups to which a user belongs.
The COUNT query attribute retrieves the numberof users in the table.
COUNT retrieves the total number of users and security groups in the Security Userstable. To get the number of users, use the new query attribute SECUSER_NUM_GROUPSto retrieve the number of groups in the table, then subtract this number from the totalretrieved from COUNT.
306 Converting from Hyperion Enterprise SE
6Callback Functions
In This Chapter
Callback Functions Overview... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Callback Function Syntax.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
This chapter provides information about using callback functions, hich are required byenumeration functions. It includes the following topics:
Callback Functions OverviewAll data enumeration functions require a user-provided callback function. The enumerationfunction calls the callback function for each item enumerated. You use the callback function todo whatever processing you wish to do for each item enumerated.
Additionally, some advanced functions use a callback function to provide status informationduring potentially long operations.
Here are the callback functions you should use for the Hyp...( ) data enumeration functions,and spreadsheet, add-in, or table functions that use callbacks:
l CALLBACK12
l CALLBACKAPP (or CALLBACK6)
l CALLBACKSTR
l DWCALLBACK
Here are the callback functions you should use for the Ent...( ) data enumeration functions andany other advanced functions that use callbacks:
l CALLBACKAPI
l CALLBACKAPP (or CALLBACK6)
l CALLBACKCREATE
l CALLBACKDBENUM
l CALLBACKDBLOAD
l CALLBACKJOUREXTRACT
l CALLBACKJOURLOAD
Callback Functions Overview 307
l CALLBACKLOGIC
l CALLBACKSECLOAD
l CALLBACKSEL
l CALLBACKSHARES
l CALLBACKUSERS
l CALLBACKVB
l CALLBACKVBNET
Most callback functions should typically return 0 (zero). They can return any non-zero value toabort enumeration or other operation. A non-zero value will be passed back as the return codefrom the API function.
Callback Function SyntaxThe following topics provide the syntax for individual callback functions.
CALLBACK12This callback function is used for enumeration of account list entries or entity list entries.
Related Functions:
“HypEnumAcctListEntriesEx( ) - Enumerate Accounts in Account List” on page 85.
“HypEnumNameListEntriesEx( ) - Enumerate Entities in an Entity List” on page 90.
Use this format:
Public Function MyFunc(ByVal hRApp As Integer, ByVal sigList As Long, ByVal sigEntry AsLong, ByVal lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
hRApp The Retrieve application handle
sigList The account list signature or entity list signature
sigEntry For HypEnumAcctListEntriesEx( ): the signature of the entry in the account list if the list is a fixed list, or the signature of the accountif the list is a dynamic list.
For HypEnumNameListEntriesEx( ): the signature of the entry in the entity list. This is not the entity signature. You can callHypQueryEx( ) with query attribute ENTRY_SIG to get the entity signature for this entry in the entity list entries table (ID_NAMELISTENTRY).
lParam User-defined data passed in the lParam argument
Return Codes:
308 Callback Functions
Code Meaning
0 Continue the operation
Non-zero Cancel the operation
Use this format for C:
short WINAPI MyFunc(HRETRIEVEAPP hRApp, SIGNA sigList, SIGNA sigEntry, LONGlParam)
CALLBACKAPIThis callback function is used for enumeration and status information.
Related Functions:
“EntConsolidate( ) - Consolidate” on page 141 “EntEnum( ) - Enumerate Records in a Table”on page 167 “EntEnumOrgEntities( ) - Enumerate Nodes in an Organization” on page 178“EntEnumSubAcctSig( ) - Enumerate Subaccounts” on page 180 “EntRunRollover( ) - RunRollover” on page 244.
Use this format:
Public Function MyFunc(ByVal hSelect As Long, ByVal sigRecd As Long, ByVal sigKey As Long,ByVal lParam As Long, apiS As APISTRUCT) as Integer
Variable Description
MyFunc The ID of your callback function
hSelect The table selection handle
sigRecd The record signature
sigKey NONE, or the key of a related table. For more information, see the “Related Tables” on page 363.
lParam User-defined data
apiS An apiStruct stucture
Return Codes:
Code Meaning
0 Continue the operation
Non-zero Cancel the operation
Use this format for C:
Short WINAPI MyFunc(HSELECT hSelect, SIGNA sigRecd, SIGNA sigKey, Long lParam,LPAPISTRUCT pApiS)
Callback Function Syntax 309
CALLBACKAPP (or CALLBACK6)This callback function is called for each application enumerated by EntEnumApplications( ) orHypEnumApplications( ).
Use this format:
Public Function MyFunc(ByVal lAddr As Long, ByVal lParam As Long) As Integer
Variable Description
MyFunc The ID of your callback function
lAddr The address of a C-style string that is the application name
lParam User-defined data
Return Codes:
Code Meaning
0 Continue the operation
Non-zero Cancel the operation
Use this format for C:
short WINAPI MyFunc(LPSTR szApp, LONG lParam)
CALLBACKCREATEThis callback function is called by EntCreateApplication( ) at the appropriate time for you toset the application defaults for the new application. EntCreateApplication( ) passes this callbackfunction the application handle (hAppl) for the new application so you can callEntUpdateDefault( ) to set the application defaults. The application is not fully created orinitialized, so do not use this hApp to do much else within the callback function.
Call EntUpdateDefault( ) using table ID_APPDEFAULT. For detailed information about queryattributes for this table, see the “ID_APPDEFAULT (Application Defaults Table) QueryAttributes” on page 372.
To set attributes in your callback function, run the New Application wizard in HyperionEnterprise to see what information is required. You must set all the information for which thewizard asks. Do not set any information for which the wizard does not ask, such as thecompressed files option. When Hyperion Enterprise creates an application, it uses the callbackfunction to set the following attributes, and your callback function should probably do likewise:
APP_EXPECTED_ACCTS APP_EXPECTED_ENTITIES APP_EXPECTED_CATSAPP_EXPECTED_REPORTS APP_DESC APP_DEVERASELOG APP_IS_ORGBYPERAPP_JOUR_AUTONUMBER APP_STORECONDETAIL APP_STORETRANDETAILAPP_USETURBO APP_JOUR_TOPLEVEL APP_IMPACTFUTURECAT APP_SUBACCTSIGAPP_INPUT_PCT APP_CONSOL_IS_PER APP_USE_CHILD_RATES
310 Callback Functions
For file-based applications, the callback function in Hyperion Enterprise also sets the followingattributes:
APP_PATH APP_DATADIR APP_INBOXDIR APP_OUTBOXDIR APP_REPORTDIR
For SQL applications, the callback function in Hyperion Enterprise also sets the followingattributes:
APP_PATH APP_INBOXDIR APP_OUTBOXDIR APP_REPORTDIR APP_SQL_SERVERAPP_SQL_DBNAME APP_ORA_LRG_TBLSPACE APP_ORA_IDX_TBLSPACEAPP_ORA_TMP_TBLSPACE On return from your callback function, EntCreateApplication()expects the following attributes to be set, among others:
APP_PATH APP_USETURBO APP_IS_ORGBYPER
Use this format:
Public Function MyFunc(ByVal hAppl As Long, ByVal lParam As Long) As Long
Variable Description
MyFunc The ID of your callback function
hAppl The application handle
lParam User-defined data
Return Codes:
Code Meaning
1 True. Continue the operation.
0 False. Cancel the operation.
Use this format for C:
BOOL WINAPI MyFunc(HAPP hAppl, LPARAM lParam)
CALLBACKDBENUM The callback function is passed to EntDataExtract( ) to enumerate accounts for the extract. Theaccount enumeration function is called multiple times by EntDataExtract( ).
You supply the lKey argument. EntDataExtract( ) provides fnCallback and lParam for its ownuse.
Use this format for C:
SHORT WINAPI MyFunc (LPARAM lKey, CALLBACKAPI fnCallback, LPARAM lParam);
Variable Description
MyFunc The ID of your callback function
Callback Function Syntax 311
Variable Description
lKey Your argument (pS->lParamEnumAcct passed to EntDataExtract( )).
fnCallback Function to call for each account
lParam Argument to pass to fnCallback function
Your enumeration function should call fnCallback for each account that should be extracted,like this:
wRet = (*fnCallback)(hSelect, sigAcct, (SIGNA) NONE, lParam, NULL);
You need to pass hSelect, the account signature, and lParam. The secondary key (NONE) andapiStruct (NULL) are not used by fnCallback function of EntDataExtract( ). The fnCallbackfunction returns 0 (zero) if ok, non-zero if you should abort the enumeration.
Return Codes:
Code Meaning
0 Successful
Non-zero Cancel the operation. Not yet implemented.
CALLBACKDBLOAD - For EntAppExtract( )This callback function is used for status information while extracting an application. For moreinformation, see “EntAppExtract( ) - Extract Application” on page 129 and“EntAppExtractVB( ) - Extract Application” on page 130.
Use this format:
Public Function MyFunc(ByVal addressofFileNameCString As Long, ByValaddressofMessageCString As Long, ByVal szEntity As Long, ByVal lStart As Long, ByVal lEnd AsLong, ByVal lTotal AsLong, ByVal lCurrent As Long, ByVal lParam As Long) As Integer
Variable Description
MyFunc The ID of your callback function
addressofFileNameCString Name of extract file
addressofMessageCString Status text
szEntity Unused
lStart Unuse
lEnd Unused
lTotal Unused
lCurrent Unused
312 Callback Functions
Variable Description
lParam The argument that you supplied for the callback function
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation. (Not implemented.)
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR addressofMessageCString, LPCSTRszEntity, long lStart, long lEnd, long lTotal, long lCurrent, long lParam);
CALLBACKDBLOAD - For EntAppLoad( )This callback function is used for status information while loading an application. For moreinformation, see “EntAppLoad( ) - Load Application” on page 132 and “EntAppLoadVB( ) -Load Application” on page 133.
Use this format:
Public Function MyFunc (ByVal addressofFileNameCString As Long, ByValaddressofMessageCString As Long, ByVal szEntity As Long, ByVal lStart As Long, ByVal lEnd AsLong, ByVal lTotal As Long, ByVal lCurrent As Long, ByVal lParam As Long) As Integer;
Variable Description
MyFunc The ID of your callback function
addressofFileNameCString Name of load file
addressofMessageCString Status text
szEntity Unused
lStart Unused
lEnd Unused
lTotal Size of load file. (in bytes)
lCurrent Current position in load file
lParam The argument you supplied for the callback function
Return Codes:
Callback Function Syntax 313
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation. (not implemented)
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szMsg, LPCSTR szEntity, long lStart,long lEnd, long lTotal, long lCurrent, long lParam)
CALLBACKDBLOAD - For EntDataExtract( )This callback function is used for status information while extracting data. For moreinformation, see “EntDataExtract( ) - Extract Data” on page 146.
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szCategory, LPCSTR szEntity, longlStart, long lEnd, long lTotal, long lCurrent, long lParam);
Variable Description
MyFunc The ID of your callback function
szFileName Name of extract file
szCategory Category being extracted
szEntity Entity being extracted
lStart First period (1-based)
lEnd Last period (1-based)
lTotal Total number of accounts selected to extract
lCurrent Number of accounts extracted
lParam The argument you supplied for the callback function
Return Codes:
Code Meaning
0 Continue the operation.
True Cancel the operation.
CALLBACKDBLOAD - For EntUNCDataLoad( )This callback function is used for status information while loading data. For more information,see “EntUNCDataLoad( ) - Load Data” on page 264.
314 Callback Functions
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szCategory, LPCSTR szEntity, longlStart, long lEnd, long lTotal, long lCur, long lParam);
Variable Description
MyFunc The ID of your callback function
szFileName Name of load file
szCategory Category being loaded
szEntity Entity being loaded
lStart First period (1-based)
lEnd Last period (1-based)
lTotal Total number of lines in load file
lCur Number of lines processed so far
lParam The argument that you supplied for the callback function
CALLBACKJOUREXTRACTThis callback function is used for status information in a journal extract. For more information,see “EntJournalExtract( ) - Extract Journal” on page 208 and “EntJournalExtractVB( ) - ExtractJournal” on page 210.
Use the format:
Public Function MyFunc(ByVal addressofFileNameCString As Long, ByValaddressofNameCString As Long, lTotal As Long, lCurrent As Long, lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
addressofFileNameCString The name of the extract file
addressofNameCString The name of journal being extracted
lTotal Not used.
lCurrent Not used.
lParam The argument you supplied for the callback function
Return Codes:
Callback Function Syntax 315
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szName, long lTotal, long lCurrent, longlParam)
CALLBACKJOURLOADThis callback function is used for status information in a journal load. For more information,see “EntJournalLoad( ) - Load Journal” on page 215 and “EntJournalLoadVB( ) - Load Journal”on page 217.
Use the format:
Public Function MyFunc(ByVal addressofFileNameCString As Long, ByValaddressofNameCString As Long, lTotal As Long, lCurrent As Long, lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
addressofFileNameCString The name of the load file
addressofNameCString The name of journal being loaded
lTotal The size of the load file. This argument is used to calculate the position for a meter bar control.
lCurrent The current position in the load file. This argument is used to calculate the position for a meter bar control.
lParam The argument that you supplied for the callback function
Return Codes:
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szName, long lTotal, long lCurrent, longlParam)
CALLBACKLOGICThis callback function is used for status information when exporting or importing logic. Formore information about exporting logic, see “EntLogicExport( ) - Export Formulas” on page
316 Callback Functions
223. For more information about importing logic, see “EntLogicImport( ) - Import Formulas”on page 227.
Use this format:
Public Function MyFunc(ByVal addressofFileNameCString As Long, ByValaddressOfMethodCString As Long, ByVal lTotal As Long, ByVal lCurrent As Long, ByVal lParamAs Long) As Integer
Variable Description
MyFunc The name of your callback function
addressofFileNameCString The name of the file being imported or exported
addressOfMethodCString The name of the method being imported or exported
lTotal The total number of files. Not used for logic export. This argument is used to calculate the position for a meterbar control.
lCurrent The number of files imported so far. Not used for logic export. This argument is used to calculate the positionfor a meter bar control.
lParam The argument you supplied for the callback function
Return Codes:
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szMethod, long ITotal, long ICurrent,long lParam)
CALLBACKSECLOADThis callback function is used for status information in a security load or extract. For moreinformation on security extract, see “EntSecurityExtract( ) - Extract Security” on page 246. Formore information about security load, see “EntSecurityLoad( ) - Load Security” on page 249.
Use this format:
Public Function MyFunc(ByVal addressOfFileNameCString As Long, ByValaddressOfTaskCString As Long, ByVal lCurrent As Long, ByVal lStart As Long, ByVal lEnd AsLong, ByVal lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
Callback Function Syntax 317
Variable Description
addressOfFileNameCString The name of the file being loaded or extracted
addressOfTaskCString The task being processed
lCurrent The current position. For a load, this is the position in the load file. For an extract, this is the task number.
lStart The start position in the load or extract file (0)
lEnd The total size of the load file, or the the total number of tasks being extracted
lParam The argument that you supplied for the callback function
For an extract, the number of tasks is the number of options you selected (bSecClass, bAcesRight,bUserAndGroup, bTask fields in the SECLOADSTRUCT).
Return Codes:
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
Use this format for C:
short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szTask, long lCurrent, long lStart,long lEnd, long lParam)
CALLBACKSELThis callback function is called for changes to the selected tables.
Related Functions:
“EntAppLoad( ) - Load Application” on page 132 “EntAppLoadVB( ) - Load Application” onpage 133 “EntAppendToCBChain( ) - Append to Callback Chain” on page 128“EntDeleteFromCBChain( ) - Delete from Callback Chain” on page 154 “EntSelect( ) - Select aTable for Use” on page 252 “EntSelectAdd( ) - Select an Additional Table for Use” on page254 “EntSelectTable( ) - Select a Table for Use” on page 255
Use this format:
Public Function MyFunc(ByVal hSelect As Long, ByVal wTabId As Integer, ByVal sigKey AsLong, ByVal lParam As Long, apiS As APISTRUCT) As Integer
Variable Description
MyFunc The ID of your callback function
hSelect The table selection handle
wTabId The table ID of the table that changed
318 Callback Functions
Variable Description
sigKey NONE, or the key of a related table. For more information, see the “Related Tables” on page 363.
lParam User-defined data
apiS NULL pointer unless wTabId = ID_DATAFILE. In this case, it will be an apiStruct structure with the sigParent, wType, sigName, andsigCat fields set so that you know which data file changed.
Your function should return a value of 0 (zero), unless you do not want the API to call any moreof the callback functions associated with the hSelect for this change.
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
Use this format for C:
short WINAPI MyFunc (HSELECT hSelect, short wTabld, SIGNA sigKey, LONG IParam,LPAPISTRUCT pApiS)
CALLBACKSHARESThis callback function is used for status information when loading shares. For more informationabout loading shares, see “EntSharesLoadVB( ) - Shares Load” on page 262 and“EntSharesLoad( ) - Shares Load” on page 261.
Use this format:
Public Function MyFunc(ByVal addressofFileNameCString As Long, ByValaddressofEntityCString As Long, ByVal lSize As Long, ByVal lPos As Long, ByVal lParam AsLong) As Integer
Variable Description
MyFunc The ID of your callback function
addressofFileNameCString Name of load or extract file
addressofEntityCString Number of records processed in the load file; empty string ("") on completion
lSize Size of the load file (bytes)
lPos Current position in load file (number of bytes)
lParam The argument you supplied for the callback function
Callback Function Syntax 319
For information and an example of how to convert the C-style strings, addressofFileNameCStringand addressofEntityCString, to Visual Basic strings, see “EntVBGetCStrLen( ) - Get Length of C-string” on page 275.
Use this format for C:
short WINAPI MyFunc(LPCSTR szFileName, LPCSTR szEntity, long lSize, long lPos, longlParam);
CALLBACKSTRThis callback function is used for enumeration of applications. For more information, see“HypMultiEnum( ) - Enumerate Open Applications” on page 65.
Use this format:
Public Function MyFunc(ByVal hRApp As Integer, ByVal lAddr As Long) As Long
Variable Description
MyFunc The ID of your callback function
hRApp The Hyperion Enterprise Retrieve application handle
lAddr The address of the C-style string that is the application name. See “EntVBGetCStrLen( ) - Get Length of C-string” on page 275.
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
Use this format for C:
“Callback Function Syntax” on page 308int WINAPI MyFunc(HRETRIEVEAPP hRApp,LPSTR szApp)
CALLBACKUSERSThis callback function is used to enumerate users who are using a particular application. Formore information, see “EntEnumUsersOnSystem( ) - Enumerate Users on System” on page181.
Use this format:
Public Function MyFunc(ByVal hApp As Long, UserInfo As Active_User_Info, ByVal lParamAs Long) As Integer
320 Callback Functions
Variable Description
MyFunc The ID of your callback function
hApp The application handle
UserInfo An ACTIVE_USER_INFO struct
lParam User-defined data
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
Use this format for C:
short WINAPI MyFunc (HAPP hApp, LPACTIVE_USER_INFO pUserInfo, LONG lParam)
CALLBACKVBThis callback function is used by both EntDataExtractVB2( ) and EntUNCDataLoadVB( ) toprovide status information while the task is executing.
Note: The functions EntVBCopyData ( ) and EntVBGetCStrLen( ) can be used to convert longcallback function arguments to their proper type.
Use this format:
Public Function MyFunc(ByVal lAddrFileName As Long, argStruct As CALLBACKSTRUCT,ByVal lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
lAddrFileName The address of a C-style string containing the file name of the extract or load file currently being processed
argStruct A structure (user-defined record type) containing the rest of the status information. For a description of the fields, seeCALLBACKSTRUCT in the TOOLKIT.BAS file.
lParam The argument that you supplied
Return Codes:
Callback Function Syntax 321
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
Use this format for C:
short WINAPI MyFunc(LPCSTR szFileName, CALLBACKSTRUCT * pArgStruct, LPARAMlParam)
DWCALLBACKThis callback function is used for enumeration.
Related Functions:
“HypEnumEx( ) - Enumerate Records in a Table” on page 88 “HypEnumOrgNames( ) -Enumerate Nodes in an Organization” on page 91 “HypEnumSubAcctSig( ) - EnumerateSubaccount Signatures” on page 92
Use this format:
Public Function MyFunc(ByVal hRApp As Integer, ByVal sigRecd As Long, ByVal lParam AsLong) As Integer
Variable Description
MyFunc The ID of your callback function
hRApp The Hyperion Enterprise Retrieve application handle
sigRecd The record signature
lParam User-defined data
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
Use this format for C:
short WINAPI MyFunc(HRETRIEVEAPP hRApp, SIGNA sigRecd, LONG lParam)
CALLBACKVBNETThis callback function is used for Visual Basic .NET platform to provide status information whilethe task is executing.
322 Callback Functions
EnumAppsCBThis callback function is used for enumeration of applications.
Related Function: EntEnumApplications( ) - Enumerate Applications
Use this format:
Public Delegate Function MyFunc(ByVal pszApp As String, ByVal lParam As IntPtr) As Short
Variable Description
MyFunc The ID of your callback function
pszApp The name of the application to open
lParam The argument for the Callback function.
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
DataExtractCallbackThis callback function is used for status information in data extraction.
Related Function:
“EntDataExtractVB2( ) - Extract Data ” on page 329
“EntDSMDataExtractVB( ) - Extract DSM Data” on page 333
Public Delegate Function MyFunc(ByVal addressOfFileNameCString As String, addressOfStructAs CALLBACKSTRUCT, ByVal lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
addressOfFileNameCString The address of a C-style string containing the file name of the extract file currently being processed
addressOfStruct The address of a CALLBACKSTRUCT type. For a description of the fields, see CALLBACKSTRUCT in theTOOLKIT.VB file.
lParam The argument that you supplied
Return Codes:
Code Meaning
0 Continue the operation.
Callback Function Syntax 323
Code Meaning
Non-zero Cancel the operation.
DataLoadCallbackThis callback function is used for status information in loading data.
Public Delegate Function MyFunc(ByVal szFileName As String, argStruct AsCALLBACKSTRUCT, ByVal lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
szFileName The load file name.
Note: If the file you specify already exists, the function appends to the existing file.
argStruct The address of a CALLBACKSTRUCT type. For a description of the fields, see CALLBACKSTRUCT in the TOOLKIT.VB file.
lParam The argument that you supplied
Return Codes:
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
EnumSubAcctCBThis callback function is used for enumeration of sub accounts.
Public Delegate Function MyFunc(ByVal hSelect As Integer, ByVal sigAcct As Integer, ByValsigNone As Integer, ByVal lParam As Integer, ByRef apiS As apiStruct) As Integer
Variable Description
MyFunc The name of your callback function
hSelect The table selection handle
sigAcct The account signature with which to start
sigNone The account signature with NONE to start at top of the organization
apiS The pointer to the apiStruct structure
Return Codes:
324 Callback Functions
Code Meaning
0 Continue the operation.
Non-zero Cancel the operation.
EnumJournalLoadCBThis callback function is used for enumeration of loaded journals
Use the format:
Public Delegate Function MyFunc(ByVal addressofFileNameCString As String, ByValaddressOfJourNameCString As String, fSize As Long, fPos As Long, lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
addressofFileNameCString The name of the load file
addressOfJourNameCString The name of journal being loaded
fSize The size of the load file.
fPos The current position in the load file.
lParam The argument that you supplied for the callback function
Return Codes:
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
SecLoadCallBackThis callback function is used for status information in a security load.
Related Function:
“EntSecurityLoadVB( ) - Load Security” on page 349
Use this format:
Public Delegate Function MyFunc(ByVal addressOfFileNameCString As String, ByValaddressOfTaskCString As String, ByVal lPosAs Long, ByVal lStart As Long, ByVal lEnd As Long,ByVal lParam As Long) As Integer
Callback Function Syntax 325
Variable Description
MyFunc The name of your callback function
addressOfFileNameCString The name of the file being loaded.
addressOfTaskCString The task being processed
lPos Current position in load file (number of bytes)
lStart The start position in the load file.
lEnd The total size of the load file.
lParam The argument that you supplied for the callback function
Return Codes:
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
SecExtrCallBackThis callback function is used for status information in security extraction.
Related Function:
“EntSecurityExtractVB( ) - Extract Security” on page 347
Use this format:
Public Delegate Function MyFunc(ByVal szFileName As String, ByVal szTask As String, ByVallPosAs Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lParam As Long) As Integer
Variable Description
MyFunc The name of your callback function
szFileName Name of extract file
szTask A short description of the task.
lPos Current position in load file (number of bytes)
lStart The start position in the load file.
lEnd The total size of the load file.
lParam The argument that you supplied for the callback function
Return Codes:
326 Callback Functions
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
JournalEntriesCallBackThis callback function is used for status information in journal entries
Use the format:
Public Delegate Function MyFunc(ByVal hSelect As Integer, ByVal sigJour As Integer, sigKeyAs Integer, lParam As IntPtr, lpApiStruct As apiStruct) As Integer
Variable Description
MyFunc The name of your callback function
hSelect The handle of the selected tables
sigJour The signature of the journal
sigKey The optional key (usually NONE). This is a required key if wTabId is one of the tables listed in “Related Tables” on page 363.
lParam Parameter to be passed back to the user-provided callback function
lpApiStruct NULL. This argument is not used.
Return Codes:
Code Meaning
0 Continue the operation.
TRUE Cancel the operation.
Callback Function Syntax 327
328 Callback Functions
7Specific Functions for Microsoft
Visual Basic.NET
In This Chapter
Hyperion Enterprise API's for Microsoft Visual Basic.NET .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
This chapter provides general information about the Hyperion Enterprise ApplicationPrograming Interface (API) and its use. If you migrate your custom-built code to VisualBasic.Net can use ToolKit.VB to communicate with Hyperion Enterprise API.
This chapter describes software prerequisites required to convert Visual Basic to VisualBasic.Net. Each of these Hyperion Enterprise Application Programing Interface (API) isdescribed in detail. Please read through this chapter carefully before converting to VisualBasic.Net.
Note: These functions are intended for Visual Basic .Net users.
Note: For more information about upgrading the Microsoft Visual Basic 6.0 to Microsoft VisualBasic .NET, see the following link: http://msdn.microsoft.com/en-us/vbasic/ms788236.aspx
Hyperion Enterprise API's for Microsoft VisualBasic.NETThese functions describe how to use the Hyperion Enterprise Application Programing Interface(API) on the Microsoft Visual Basic.NET.
EntDataExtractVB2( ) - Extract Data This function extracts data for the accounts in an account list or for all accounts. In some cases,you might need to select the ID_NAMELISTENTRY and ID_PSFDATA tables before callingEntDataExtractVB2( ).
Use this format:
Declare Function EntDataExtractVB2 Lib "HEAccess.dll" Alias "_EntDataExtractVB2@24"(ByVal hSelect As Integer, ByRef pS As DBEXTRACTSTRUCT,ByVal szExtractFile As String,
Hyperion Enterprise API's for Microsoft Visual Basic.NET 329
ByVal sigList As Integer, ByVal lpfnCallBack As DataExtractCallback, ByVal lParam As Integer)As Short
Variable Description
hSelect The handle of the selected tables
pS Structure with arguments for the data extract. All fields are required except hProcess.
pS.dwSize The size of this structure
pS.cDelim The field delimiter, which typically is a comma( , )
pS.cNeg The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ]
pS.cScale Scale of the data
pS.cView Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category’s defaultview.
pS.wDecimals Number of decimal places to extract
pS.wDSMType Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if notID_REGULAR
pS.wExtractFlags Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h)
pS.wOperation Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE
pS.dDataBy Data to use with wOperation
pS.bDataFileOpened Data file is currently opened (TRUE or FALSE); input and output
pS.hProcess Process handle returned when executing on server (DBE_REMOTE)
pS.lStartPeriod The first period to extract (0-based)
pS.lEndPeriod The last period to extract (0-based)
pS.sigAcctConv The account conversion table signature
pS.sigCat The category signature
pS.sigName The entity signature.
pS.sigNameConv Entity conversion table signature
pS.sigParent Parent if wDSMType is not ID_REGULAR
pS.sigNameList Entity list
pS.pApiDFA The address of an apiStruct set up for enum of entity list (if pS.sigNameList != NONE) and for queryingdata from datafile (data & status buffers allocated).
For more information, see “EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table)” on page173 and “Working with Data” on page 114.
pArgs.pApiDFA.sigName Entity signature
330 Specific Functions for Microsoft Visual Basic.NET
Variable Description
pArgs.pApiDFA.u_Dfa.bAutoRecalc For more information, see “Working with Data” on page 114
szExtractFile The path\name of extract file
sigList Signature of an account list; NONE for all accounts
lpfnCallback Your callback function for status information. For more information, see “CALLBACKVBNET” on page322.
lParam Argument for your callback function
Internally, EntDataExtractVB2( ) makes a local copy of the filename string, so it does not matterif Visual Basic.Net relocates the original during the callback function.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) At least one error occurred and they are listed in the error log for the application.
Example:
Dim acctList$, entity$, Cat$, per$, szFile$ Dim sigEntity&, sigCat&, sigAcctList&, lPer& Dim s As DBEXTRACTSTRUCT 'Dim hSelect& Dim flag%, ret% Dim apiS As apiStruct szFile$ = "c:\\test.dat" 'The path of the file Cat$ = "Actual" entity$ = "Us100" per$ = "2" 'dummy variable created for passing it as a parameter to entfind Dim api As apiStruct Call EntInitApiStruct(hApp, api)If hApp <> HYP_NONE Then glSelectH = HypGethSelect((hApp)) SelectAllTables() sigCat& = EntFind(glSelectH&, HYP_ID_CATEGORY, HYP_NONE, Cat$, api) sigEntity& = EntFind(glSelectH&, HYP_ID_NAMES, HYP_NONE, entity$, api)
lPer& = Val(per$) - 1
acctList$ = "DGROUP8" sigAcctList& = HYP_NONE If Len(acctList$) Then ret% = EntSelectAdd(HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, glSelectH&, APILOCK_READONLY, _ 0, 0, 0, 0)
Hyperion Enterprise API's for Microsoft Visual Basic.NET 331
sigAcctList& = EntFind(glSelectH&, HYP_ID_ACCTLIST, HYP_NONE, acctList$, api) flag% = 0 If True Then flag% = flag% Or DBE_CALC_ACCTS
Call EntInitApiStruct(hApp, apiS) apiS.sigName = sigEntity& apiS.u_Dfa.bAutoRecalc = 0‘Set the DBEXTRACTSTRUCT fieldss.dwSize = Len(s)s.cDelim = Asc(",")s.cNeg = Asc("-")s.cScale = 255 'use NONE for defaults.cView = Asc(FORMVIEW_CAT)s.wDecimals = HYP_NONEs.wDSMType = ID_REGULARs.wExtractFlags = flag%s.wOperation = HYP_NONEs.dDataBy = -1 'data to use with wOperation.s.bDataFileOpened = 0 'DataFile is currently opened (TRUE or FALSE); input and outputs.hProcess = 0 'Process handle returned when executing on server (DBE_REMOTE)s.lStartPeriod = lPer& 'first period to extract (0-based)s.lEndPeriod = lPer& 'last period to extract (0-based)s.sigAcctConv = HYP_NONE 'Account conversion table signatures.sigCat = sigCat& 'category signatures.sigName = sigEntity& 'entity signatures.sigNameConv = HYP_NONE 'Entity conversion table signatures.sigParent = HYP_NONE 'parent (if wDSMType is not ID_REGULAR)s.sigNameList = HYP_NONE 'Entity lists.fnEnumAcct = 0 'address of function to enumerate accounts (not used, just set to 0)s.lParamEnumAcct = 0 'your argument for fnEnumAcct functions.fnStatusCB = 0 'address of callback function for status information (not used, use lpfnCallback argument instead.)s.lParamStatus = 0 'your argument for fnStatusCB functions.pApiDFA = EntGetVarAddr(apiS) 'address of APISTRUCT; set signame field in apiStruct; EntDataExtract() may modify apiStructs.szExtractFile = 0 ‘Not used; use szExtractFile argument instead 'address of string - Path\name of extract file
ret% = EntDataExtractVB2(glSelectH&, s, szFile$, sigAcctList&, AddressOf MyCallBack, 0) ret% = MsgBox("Data extracted, return code = " & Str(ret%), vbOKOnly, "Data Extract") If Len(acctList$) Then glSelectH& = EntUnSelect(glSelectH&, HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, 0, ret%, api) End If End If End If DeSelectAllTables()End Sub'Callback function Public Function MyCallBack(ByVal addressOfFileNameCString As Long, _ ByRef addressOfStruct As Long, ByVal lParam As Long) As Integer
332 Specific Functions for Microsoft Visual Basic.NET
Dim szCaption$
'On Error Resume Next szCaption$ = "Now Extracting..." ' Call ProcessCallback(addressOfFileNameCString, addressOfStruct, szCaption$) MyCallBack = 0 End Function
EntDSMDataExtractVB( ) - Extract DSM DataThis function extracts consolidation detail from VB.NET Platform. The tables selected areID_NAMELIST ENTRY and ID_PSFDATA.
Use this format:
Declare Function EntDSMDataExtractVB Lib "HEAccess.dll" Alias"_EntDSMDataExtractVB@28" (ByVal hSelect As Integer, ByRef pS AsDBEXTRACTSTRUCT, ByVal szExtractFile As String, ByVal sigList As Integer, ByVallpfnCallBack As DataExtractCallback, ByVal lParam As Integer, ByRef pDSM AsDSMDBEXTRACTSTRUCT) As Short
Variable Description
hSelect The handle of the selected tables
pArgs Structure with arguments for the data extract. All fields are required except hProcess.
pArgs.dwSize The size of this structure
pArgs.cDelim The field delimiter, which typically is a comma( , )
pArgs.cNeg The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ]
pArgs.cScale Scale of the data.
pArgs.cView Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category’s defaultview.
pArgs.wDecimals Number of decimal places to extract
pArgs.wDSMType Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if notID_REGULAR
pArgs.wExtractFlags Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h)
pArgs.wOperation Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE
pArgs.dDataBy Data to use with wOperation
pArgs.bDataFileOpened Data file is currently opened (TRUE or FALSE); input and output
pArgs.hProcess Process handle returned when executing on server (DBE_REMOTE)
pArgs.lStartPeriod The first period to extract (0-based)
pArgs.lEndPeriod The last period to extract (0-based)
Hyperion Enterprise API's for Microsoft Visual Basic.NET 333
Variable Description
pArgs.sigAcctConv The account conversion table signature
pArgs.sigCat The category signature
pArgs.sigName The entity signature
pArgs.sigNameConv Entity conversion table signature
pArgs.sigParent Parent if wDSMType is not ID_REGULAR
pArgs.sigNameList Entity list
pArgs.pApiDFA The address of an apiStruct set up for enum of entity list (if pArgs.sigNameList != NONE) and for queryingdata from datafile (data & status buffers allocated)
pArgs.pApiDFA.sigName Entity signature
pArgs.pApiDFA.u_Dfa.bAutoRecalc See “Working with Data” on page 114.
szExtractFile The path name of extract file
sigList Signature of an account list; NONE for all accounts
lpfnCallback Your callback function for status information. For more information, see “CALLBACKVBNET” on page322.
lParam Argument for your callback function
dsm Structure with arguments for dsm extract
dsm.dwSize Size of this structure
dsm.wExtractFlags Data extract options flag.
Use any or all of these values:
DBE_DSM_TRANS Extract translation data
DBE_DSM_PROP Extract proportion data
DBE_DSM_CONTRIB Extract contribution data
DBE_DSM_ELIM Extract elimination data
DBE_DSM_TOPADJ Extract parent adjustment data
dsm.cSeperator Field delimiter (Default '|') used when extracting consolidation detail.
dsm.bXAFormat Extract using format (one field concatenated) or External format (3 fields).
dsm.bAllDeps The extract consolidation detail for all dependents. If not use list of immediate dependents.
dsm.bAllImmedDeps The extract consolidation detail for all immediate dependents. If not use list of immediate dependents.
dsm.iSelectedDependents Number of dependents selected. Use if both dsm.bAllDeps and dsm.bAllImmedDeps are false.
dsm.lpSelectedDepSigs List of selected dependents.
334 Specific Functions for Microsoft Visual Basic.NET
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
LOAD_CHECK_ERRORLOG (2) At least one error occurred and they are listed in the error log for the application.
Example:
Dim acctList$, entity$, cat$, per$, szFile$ Dim sigEntity&, sigCat&, sigAcctList&, lPer&, sigFreq& Dim s As DBEXTRACTSTRUCT Dim hSel& Dim flag%, ret% Dim apiS As apiStruct Dim apiStmp As apiStruct Dim sigArr(4) As Long Dim dsm As DSMDBEXTRACTSTRUCT szFile$ = RTrim("C:\\DSMDATA.DAT") 'The path of the file cat$ = RTrim("Actual") entity$ = RTrim("USDIV") per$ = RTrim("2") hSel& = HypGethSelect(hApp) sigCat& = EntFind(hSel&, HYP_ID_CATEGORY, HYP_NONE, cat$, apiStmp) lPer& = Val(per$) - 1 acctList$ = RTrim("DGROUP8") sigAcctList& = HYP_NONE
If Len(acctList$) Then ret% = EntSelectAdd(HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, hSel&, APILOCK_READONLY, 0, 0, 0, 0) sigAcctList& = EntFind(hSel&, HYP_ID_ACCTLIST, HYP_NONE, acctList$, apiStmp) End If
flag% = 0 flag% = flag% Or DBE_CALC_ACCTS flag% = flag% Or DBE_GLOBAL_ACCTS flag% = flag% Or DBE_SUPPRESS_ND flag% = flag% Or DBE_SUPPRESS_ZERO flag% = flag% Or DBE_EXTRACT_DERIVED
Call EntInitApiStruct(hApp, apiS) sigEntity& = EntFind(hSel&, HYP_ID_NAMES, HYP_NONE, "USDIV", apiStmp) apiS.sigName = sigEntity& '16 apiS.sigParent = 13 apiS.u_Dfa.bAutoRecalc = 0 s.dwSize = Len(s) s.cDelim = Asc(",") s.cNeg = Asc("-") s.cScale = 255 'use NONE for default s.cView = Asc(FORMVIEW_CAT) s.wDecimals = HYP_NONE s.wDSMType = ID_REGULAR '128
Hyperion Enterprise API's for Microsoft Visual Basic.NET 335
s.wExtractFlags = flag% '2078 'flag% s.wOperation = HYP_NONE s.dDataBy = -1 'data to use with wOperation. s.bDataFileOpened = 1 'DataFile is currently opened (TRUEor FALSE); input and output s.hProcess = 0 'Process handle returned when executingon server (DBE_REMOTE) s.lStartPeriod = 1 'first period to extract (0-based) s.lEndperiod = 1 'last period to extract (0-based) s.sigAcctConv = HYP_NONE 'Account conversion table signature s.sigCat = 0 'category signature s.sigName = sigEntity& '16 'entity signature s.sigNameConv = HYP_NONE 'Entity Conversion Table signature s.sigParent = sigEntity& '16 parent (if wDSMType is notID_REGULAR) s.sigNameList = HYP_NONE 'Entity list s.fnEnumAcct = 0 'address of function to enumerate accounts() s.lParamEnumAcct = 0 'your argument for fnEnumAcct function s.fnStatusCB = 0 'address of callback function for
s.pApiDFA = EntGetVarAddrApi(apiS) 'address of APISTRUCT; set signame field inapiStruct; EntDataExtract() may modify apiStructdsm.dwSize = 28 'Len(dsm) 'dsm.wExtractFlags = 1984 '0 dsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_TRANS dsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_PROP dsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_CONTRIB dsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_ELIM dsm.wExtractFlags = dsm.wExtractFlags Or DBE_DSM_TOPADJ dsm.cSeperator = Asc("|") dsm.bXAFormat = 1 dsm.bAllDeps = 0 dsm.bAllImmedDeps = 0 ' Set entity list signatures dsm.iSelectedDependents = 1 sigArr(0) = EntFind(hSel&, HYP_ID_NAMES, HYP_NONE, "us100", apiStmp) '33 'sigArr(1) = 15 'sigArr(2) = 16 'sigArr(3) = 18 dsm.lpSelectedDepSigs = EntGetVarAddrLong(sigArr(0)) ret% = EntDSMDataExtractVB(hSel&, s, szFile$, sigAcctList&, AddressOf DataExtractCallback, 0, dsm) ret% = MsgBox("Data extracted, return code = " & Str(ret%), vbOKOnly, "Data Extract") ' If Len(acctList$) Then hSel& = EntUnSelect(hSel&, HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, 0, ret%, apiStmp) End If End Sub
EntGetVarAddr( ) - Get Variable's AddressEntGetVarAddr( ) allows you to force Microsoft Visual Basic into assigning an address to avariable. The function returns the address of variable you pass to the function. You pass theargument by reference, so the function just returns the same address that you pass it. You can
336 Specific Functions for Microsoft Visual Basic.NET
use this function to set the address fields in an apiStruct structure, which is necessary for someother Hyperion Enterprise API functions.
Note: Do not use EntGetVarAddr( ) to get the address of a string.
Use this format:
Declare Function EntGetVarAddr Lib "heaccess.dll" Alias "_EntGetVarAddr@4" (ByRefpBufAs apiStruct) As Integer
Use this format to get the address of an API:
Declare Function EntGetVarAddrApi Lib "heaccess.dll" Alias "_EntGetVarAddr@4"(ByRefpBuf As apiStruct) As Integer
Use this format to get the address of a string value:
Declare Function EntGetVarAddrStr Lib "heaccess.dll" Alias "_EntGetVarAddr@4"(ByRefpBuf As String) As Integer
Use this format to get the address of a long value:
Declare Function EntGetVarAddrLong Lib "heaccess.dll" Alias "_EntGetVarAddr@4"(ByRefpBuf As Long) As Integer
Use this format to get the address of a double value:
Declare Function EntGetVarAddrdouble Lib "heaccess.dll" Alias "_EntGetVarAddr@4"(ByRefpBuf As Double) As Integer
Where pBuf is the address you pass to the function.
Return Codes:
Code Meaning
The address of the variable you passed to the function Successful
NONE Error occurred
Example:
apiS.lpimrData = EntGetVarAddr(dValue#)
Caution! Microsoft Visual Basic can relocate things in memory anytime you perform a stringoperation. This includes string assignments, string concatenation, and stringfunctions.
Behind-the-scenes string operations can also cause this problem. For example, if you pass a fixed-length string as a function argument, Visual Basic makes a temporary copy of the string andpasses the copy instead. Redimensioning an array (ReDim) can also cause Visual Basic to relocatethings in memory. Be very careful when using the EntGetVarAddr( ) function to get the addressof a dynamic array, which can move around in memory. You should get the address immediately
Hyperion Enterprise API's for Microsoft Visual Basic.NET 337
before using it and be sure you do not perform any operation that could cause Visual Basic torelocate items in memory. Otherwise, you can cause an intermittent but serious bug that isextremely difficult to find.
EntJournalExtractVB( ) - Extract JournalThis function extracts one or more journals. It uses an optional callback function that the APIcalls to send the current status of the journal extract. Before calling this function, you must selectthe following tables in read-only format:
l Default tables (ID_CATEGORY, ID_ORGANIZATION, ID_ACCOUNTS, and associatedtables.)
l ID_JOURNALS - the journals tables.
l ID_SECURITY - security tables.
EntJournalExtractVB() calls the function that Hyperion Enterprise uses to extract journals. Thefunction supports the two methods that Hyperion Enterprise uses for extracting journals: extractjournals for a single period or extract journals for all periods. To extract journals for a singleperiod, you specify the signatures of the particular journal(s) that you wish to extract (inlpJourData.SelectedJourSigs). To extract journals for all periods, you specify the criteria and theAPI function will find and extract all journals that match the criteria. Specifically, the APIfunction will internally enumerate journals, journal templates, or recurring journal templatesas indicated in lpJourData.sCheckedInclude; of those, it will extract the journals that match thecriteria indicated in lpJourData.lCheckedAttribTypeStatus.
Use this format:
Declare Function EntJournalExtractVB Lib "HEAccess.dll" Alias "_EntJournalExtractVB@24"(ByVal hSelect As Integer, ByRef lpJourData As JourExtrStruct, ByVal lpszExtFileName AsString, ByVal lpfnCallBack As Integer, ByVal lParam As Integer, ByRef lpApiStruct As apiStruct)As Short
Variable Description
hSelect The handle of the selected tables
lpJourData The structure with arguments for the journal extract
lpJourData.dwSize The size of this structure
lpJourData.hProcess When executing on the server, the API function returns the handle of the Task Status window processhere.
lpJourData.szDelimiter The field delimiter, which is typically an apostrophe ( ‘ ).
lpJourData.sCheckedInclude Bitmask for extracting journals (LOADEXT_JOURNALS), standard journal templates (LOADEXT_STANDARD), or recurring journal templates (LOADEXT_RECTMP). Indicates to the API function what tosearch if IpJourData.wOperation is JOUROP_EXTARCTALLPER.
lpJourData.sCurrentInclude Used internally by the API function. Set this to 0.
338 Specific Functions for Microsoft Visual Basic.NET
Variable Description
lpJourData.lCheckedAttribTypeStatus
Bitmask that holds the journal attribute, type, and status and two flags for the extract operation. Theattribute, type, and status determine which journals will be extracted when IpJourData.wOperation isJOUROP_EXTRACTALLPER. This field can be set to any combination of the following:
Attributes to be Extracted:
l JOURMASK_ALL_ATTRIB (include all atrributes)
l JOURMASK_ATTRIB_BALANCED (include balanced journals)
l JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals)
l JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals_
Journal Types to be Extracted:
l JOURMASK_ALL_TYPE (include all journal types)
l JOURMASK_TYPE_REGULAR (include regular journals)
l JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals)
l JOURMASK_TYPE_TOP_LEVEL (include parent journals)
Journal Status to be Extracted:
l JOURMASK_ALL_STATUS (include all statuses)
l JOURMASK_STATUS_UNPOSTED (include unposted journals)
l JOURMASK_STATUS_POSTED (include posted journals)
l JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals)
l JOURMASK_STATUS_REVIEWED (include reviewed journals)
l JOURMASK_STATUS_REVERSED (include reversed journals)
l JOURMASK_STATUS_LOCKED (include locked journals)
Template Types to be Extracted:
l JOURMASK_ALL_TEMPTYPE (include all template types)
l JOURMASK_TEMPTYPE_STANDARD (include all standard templates)
l JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)
Other Flags
l DBE_REMOTE (server-based extract)
l JOURE_APPEND (append to existing extract file)
lpJourData.lCurrentAttrib 0. Internal use.
lpJourData.wOperation Indicates the operation. Must be JOUROP_EXTRACTSINGLEPER or JOUROP_EXTRACTALLPER.
lpJourData.wFlags Used internally. Set this to 0.
lpJourData.lSelectedJourCount The number of signatures in lpJourData.SelectedJourSigs array. Use 0 if lpJourData.wOperation isJOUROP_EXTRACTALLPER. This must be at least one if lpJourData.wOperation is JOUROP_EXTRACTSINGLEPER.
Hyperion Enterprise API's for Microsoft Visual Basic.NET 339
Variable Description
lpJourData.SelectedJourSigs The address of an array of the signatures of the selected journals. To distinguish journals from journaltemplates, signatures of journals (not templates) should be combined with the JOUR_ENTRIES constantusing the "or" operator.
lpJourData.bExtractPasU True (1) to extract posted journal(s) as unposted, otherwise False.
lpJourData.wExtFlag Reserved for future use. Use 0.
lpszExtFileName The path and file name of the journal extract file.
lpfnCallBack The callback function for status information or null. This is not used if the DBE_REMOTE flag is set inlpJourData.lCheckedAttribTypeStatus.
lParam The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData.ICheckedAttribTypeStatus. For more information, see “CALLBACKJOUREXTRACT” on page 315.
lpApiStruct An apiStruct with the sigCat, lStartPeriod, and lEndPeriod fields set.
lpApiStruct->sigCat The signature of the category.
lpApiStruct->lStartPeriod The period number (starting with 0 for the first period.) Set this to 0 if lpJourData.wOperation is JOUROP_EXTRACTALLPER.
lpApiStruct->lEndPeriod The same as lpApiStruct.lStartPeriod.
Return Codes:
Code Meaning
Extract_NOERR (0) Successful
Extract_CANCELLED Cancelled by user
Extract_CHECK_ERRORLOG Errors occurred and are listed in ERROR.LOG.
Extract_CHECKBOTH Errors occurred and are listed in ERROR.LOG and the userid.ERR file.
Example:
Private Sub EntJournalExtractVB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EntJournalExtractVBbtn.Click
Dim apiStruct As apiStruct Dim lpfnCallBack As Long Dim lParam As Long Dim lPer As Long Dim hSelect& Dim jourData As JourExtrStruct Dim strFile As String Dim wRet As Integer Dim sigjour As Integer Dim sigjourArr() As Long strFile$ = "C:\\journal.jaf" 'The path of the file Call EntInitApiStruct(hApp, apiStruct) apiStruct.sigCat = 0
340 Specific Functions for Microsoft Visual Basic.NET
lPer& = 1 apiStruct.lStartPeriod = lPer& apiStruct.lEndperiod = lPer&
jourData.dwSize = 48 'Len(jourData) jourData.hProcess = 0 jourData.sCurrentInclude = 0 jourData.lCurrentAttrib = 0 jourData.wFlags = 0 jourData.wExtFlag = 0 jourData.cExtFileName = 0
jourData.szDelimiter = Asc("!") jourData.bExtractPasU = False
hSelect = HypGethSelect(hApp) wRet% = EntSelectAdd(HYP_ID_JOURNALS, 0, _ hSelect, APILOCK_READONLY, 0, 0, 0, 0) wRet% = EntSelectAdd(HYP_ID_SECCLASS, 0, _ hSelect, APILOCK_READONLY, 0, 0, 0, 0)
'wRet% = JourSinglePeriodStuff(jourData, sigjourArr) wRet% = JourAllPeriods(jourData)
'jourData.lCheckedAttribTypeStatus was set in JourSinglePeriodStuff() or JourAllPeriods().
'jourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or DBE_REMOTE
'jourData.lCheckedAttribTypeStatus = 282003205 ' 282003205 is local 282035973 is for remote 'No callback initially lParam = 0 lpfnCallBack = 0
wRet% = EntJournalExtractVB(hSelect&, jourData, strFile$, lpfnCallBack, lParam, apiStruct)
wRet% = MsgBox("Journal extracted, return code = " & Str(wRet%), vbOKOnly, "Journal Extract")
hSelect& = EntUnSelect(hSelect&, HYP_ID_SECCLASS, HYP_NONE, 0, wRet%, apiStruct) hSelect& = EntUnSelect(hSelect&, HYP_ID_JOURNALS, HYP_NONE, 0, wRet%, apiStruct) End Sub
EntJournalLoadVB( ) - Load JournalThis function executes a journal load. It requires a callback function that the API calls to sendthe current status of the journal load. In addition to the default tables, you must select the securitytables, the Journal Period Info table, and the Journal Entries table before calling this function.
Use this format:
Hyperion Enterprise API's for Microsoft Visual Basic.NET 341
Declare Function EntJournalLoadVB Lib "HEAccess.dll" Alias "_EntJournalLoadVB@24"(ByVal hSelect As Integer, ByRef lpJourData As JourLoadStruct, ByVal lpszLoadFileName AsString, ByVal lpfnCallBack As EnumJournalLoadCB, ByVal lParam As Integer, ByReflpApiStruct As apiStruct) As Short
Variable Description
hSelect The handle of the selected tables
lpJourData The structure with arguments for the journal load
lpJourData.dwSize The size of this structure
lpJourData.hProcess The handle of the Task Status window process. This returns the process handle when executing on theserver.
lpJourData.szDelimiter The field delimiter, which is typically a comma ( , )
lpJourData.sCheckedInclude Loads journals and standard or recurring journal templates
lpJourData.sCurrentInclude Indicates the type of journal or journal template.
lpJourData.lCheckedAttribTypeStatus
Bitmask that holds the journal attribute, type, and status. Can be set to any combination of the following:
Attributes to be Extracted
l JOURMASK_ALL_ATTRIB (include all atrributes)
l JOURMASK_ATTRIB_BALANCED (include balanced journals)
l JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals)
l JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals)
Journal Types to be Extracted
l JOURMASK_ALL_TYPE (include all journal types)
l JOURMASK_TYPE_REGULAR (include regular journals)
l JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals)
l JOURMASK_TYPE_TOP_LEVEL (include top-level journals)
Journal Status to be Extracted
l JOURMASK_ALL_STATUS (include all statuses)
l JOURMASK_STATUS_UNPOSTED (include unposted journals)
l JOURMASK_STATUS_POSTED (include posted journals)
l JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals)
l JOURMASK_STATUS_REVIEWED (include reviewed journals)
342 Specific Functions for Microsoft Visual Basic.NET
Variable Description
l JOURMASK_STATUS_REVERSED (include reversed journals)
l JOURMASK_STATUS_LOCKED (include locked journals)
Template Types to be Extracted
l JOURMASK_ALL_TEMPTYPE (include all template types)
l JOURMASK_TEMPTYPE_STANDARD (include all standard templates)
l JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)
l DBE_REMOTE (server-based extract)
lpJourData.lCurrentAttrib Holds the attribute.
lpJourData.lCurrentType Holds the type.
lpJourData.lCurrentStatus Holds the status.
lpJourData.buse18Format TRUE if load file is in Release 1.8 format, else False.
lpJourData.sAutoReversing Flags to check for posted and unposted autoreversing journals.
lpJourData.wExtFlag Reserved for future use.
szLoadFileName The path name of the journal load file.
fnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData.lCheckedAttribTypeStatus.
lParam The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData.lCheckedAttribTypeStatus.
lpApiStruct Structure containing the rest of the journal load arguments.
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
Non Zero Failure
Example:
Private Sub EntJournalLoadVBbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EntJournalLoadVBbtn.Click Dim jourData As JourLoadStruct Dim wRet% Dim hSelect As Integer Dim szFile$ Dim apiStr As apiStruct hSelect = HypGethSelect(hApp)
jourData.dwSize = 44 'LenB(jourData) 'should be 44
Hyperion Enterprise API's for Microsoft Visual Basic.NET 343
jourData.hProcess = 0 jourData.szDelimiter = 33 jourData.sCheckedInclude = LOADEXT_JOURNALS 'regular journals jourData.sCurrentInclude = 0 'Set attribute, type, and status jourData.lCheckedAttribTypeStatus = 0 jourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or JOURMASK_ALL_ATTRIB jourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or JOURMASK_TYPE_REGULAR jourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or JOURMASK_STATUS_UNPOSTED jourData.lCurrentAttrib = 0 jourData.lCurrentStatus = 0 jourData.buse18Format = 0 jourData.lpcLoadFileName = 0 'Pass szFile as function argument instead() 'Select the journals tables szFile$ = "C:\\myjourna.JAF" 'The path of the file wRet% = EntSelectAdd(HYP_ID_JOURNALS, 0, hSelect, APILOCK_READWRITE, 0, 0, 0, 0) wRet% = EntSelectAdd(HYP_ID_SECURITY Or HYP_ID_ASSOC, 0, hSelect, APILOCK_READONLY, 0, 0, 0, 0) 'wRet% = EntSelectAdd(HYP_ID_JOURNAL_PERIOD_INFO Or HYP_ID_ASSOC, 0, hSelect, APILOCK_READONLY, 0, 0, 0, 0) wRet% = EntJournalLoadVB(hSelect, jourData, szFile$, AddressOf MyCallBack, 0, apiStr) If wRet% <> 0 Then Call MsgBox("Cannot Load journal", MsgBoxStyle.OkOnly, "") Else Call MsgBox("Journal loaded successfully", MsgBoxStyle.OkOnly, "") End If End Sub
Public Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfJourNameCString As Long, ByVal fSize As Long, ByVal fPos As Long, ByVal lParam As Long) As Integer Dim wRet%, wLen% Dim szFile$, szJourName$ Dim szMsg$ ' Convert the C-style strings into Basic strings 'wLen% = EntVBGetCStrLenLong(addressOfFileNameCString&) ' szFile$ = Space(wLen%) szFile$ = Space(40) szFile$ = "C:\\myjourna.JAF" 'The path of the file 'wRet% = EntVBCopyStrLong(szFile$, addressOfFileNameCString, 45) 'wLen% = EntVBGetCStrLenLong(addressOfJourNameCString&) 'wLen% = EntVBGetCStrLenLong(addressOfJourNameCString&) szJourName$ = Space(6) ' wRet% = EntVBCopyStrLong(szJourName$, addressOfJourNameCString, 6) ' szMsg$ = "Now Loading " & szJourName$ & " From " & szFile$ szJourName$ = "test4" MyCallBack = 0 End Function
344 Specific Functions for Microsoft Visual Basic.NET
EntQueryDefault( ) - Query DefaultsEntQueryDefault( ) queries application or user defaults. It is not necessary to select the tablesbefore calling this function. For detailed information about query attributes you can use withHyperion Enterprise tables, see Appendix B, “Query Attributes.”
Use this format:
Declare Function EntQueryDefault Lib "HEAccess.dll" Alias "_EntQueryDefault@20" (ByValhApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal wLen As Short, ByRefpzBuf As Object) As Short
Use this format for querying a string value:
Declare Function EntQueryDefaultStr Lib "HEAccess.dll" Alias "_EntQueryDefault@20"(ByVal hApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal wLen AsShort, ByVal pzBuf As String) As Short
Use this format for querying a long value:
Declare Function EntQueryDefaultLn Lib "HEAccess.dll" Alias "_EntQueryDefault@20"(ByVal hApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal wLen AsInteger, ByRef pzBuf As Long) As Short
Variable Description
hApp The application handle
wTabId The table ID, which should be one of the following tables:
l ID_HAPP
l ID_APPDEFAULT
l ID_USERDEFAULT
wAttr The attribute for the field you are querying
wLen The length of pzBuf
pzBuf The buffer for the requested information
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Private Sub EntQueryDefaultbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EntQueryDefaultbtn.Click Dim hAppop As Integer Dim wRet As Short Dim isServerAvail As Long Dim ret As Short
Hyperion Enterprise API's for Microsoft Visual Basic.NET 345
Dim inumdec As Integer Dim le As Long Dim sOutbox$ hAppop = EntOpenApplication(AppName.Text, User.Text, Password.Text, wRet) If hAppop <> HYP_NONE Then ret = EntQueryDefaultLn(hAppop, HYP_ID_APPDEFAULT, HYP_APP_IS_ORGBYPER, 8, isServerAvail) Call MsgBox("is_obp_application " & isServerAvail) sOutbox$ = Space(256) ret = EntQueryDefaultStr(hAppop, HYP_ID_APPDEFAULT, HYP_APP_OUTBOXDIR, Len(sOutbox$), sOutbox$) Call MsgBox("Output box is " & sOutbox) le = Len(inumdec) ret = EntQueryDefaultLn(hAppop, HYP_ID_APPDEFAULT, HYP_APP_NUM_DECIMALS, 8, isServerAvail) Call MsgBox("Number of decimal places " & isServerAvail) ret = EntQueryDefaultLn(hAppop, HYP_ID_APPDEFAULT, HYP_APP_USE_CHILD_RATES, 8, isServerAvail) Call MsgBox("use child rates" & isServerAvail) EntCloseApplication(hAppop) End If End Sub
EntQueryEx( ) - Query InformationThis function queries a record in a table and retrieves the requested field (attribute) from therecord. For detailed information about query attributes you can use with Hyperion Enterprisetables, see Appendix B, “Query Attributes.”
Use this format:
Declare Function EntQueryEx Lib "HEAccess.dll" Alias "_EntQueryEx@32" (ByVal hSelect AsInteger, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer, ByValsigKey As Integer, ByVal wLen As Integer, ByRef pzBuf As Object, ByRef lpApiStruct AsapiStruct) As Short
Use this format for querying a string value:
Declare Function EntQueryExStr Lib "HEAccess.dll" Alias "_EntQueryEx@32" (ByValhSelect As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer,ByVal sigKey As Integer, ByVal wLen As Integer, ByVal pzBuf As String, ByRef lpApiStruct AsapiStruct) As Short
Use this format for querying a integer value:
Declare Function EntQueryExInt Lib "HEAccess.dll" Alias "_EntQueryEx@32" (ByValhSelect As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer,ByVal sigKey As Integer, ByVal wLen As Integer, ByVal pzBuf As Integer, ByRef lpApiStruct AsInteger) As Short
Variable Description
hSelect The handle of the selected tables
346 Specific Functions for Microsoft Visual Basic.NET
Variable Description
wTabId The table containing the record you want to query
wAttr The attribute for the field you are querying
sigRecd The signature of the record you want to query
sigKey NONE or the key of a related table. For more information, see “Related Tables” on page 363.
dwLen The length of pzBuf
pzBuf The buffer to return the requested information
apiS NULL or the address of an apiStruct structure with mor3 information
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
szAcct$ = Space(HYP_SIZEFULLACCT + 1) ret% = EntQueryExStr(hsel, HYP_ID_ACCOUNTS, HYP_NAME, 233, HYP_NONE, Len(szAcct$), szAcct$, api)
EntSecurityExtractVB( ) - Extract SecurityThis function executes a security extract. This function requires a callback function that the APIwill call to send current status of the extract.
If extracting security on a server (the DBE_REMOTE bit flag is set in lpSecData.wFlags), youmay want to know the process handle of the extract process so that you can track and monitorthe server processes that your program launches. The process handle returned atlpSecData.hProcess is the process handle of an instance of the Task Status window program,HComMgr.exe, running on the local client computer. For more information, see “Server Tasks”on page 121.
Use this format:
Declare Function EntSecurityExtractVB Lib "HEAccess.dll" Alias"_EntSecurityExtractVB@20" (ByVal hSelect As Integer, ByRef lpSecData As SecLoadStruct,ByVal lpszFileName As String, ByVal lpfnCallBack As SecExtrCallBack, ByVal lParam AsInteger) As Short
Variable Description
hSelect The handle of the selected tables
Hyperion Enterprise API's for Microsoft Visual Basic.NET 347
Variable Description
lpSecData The structure with arguments for the security extract
lpSecData.dwsize The size of this structure
lpSecData.cDelimiter The field delimiter, which typically is a comma ( , )
lpSecData.szFileName The path to the extract file
lpSecData.bSecClass TRUE to extract security classes; otherwise False
lpSecData.bAcesRight TRUE to extract access rights; otherwise False
lpSecData.bUserAndGroup TRUE to extract users and user groups; otherwise False
lpSecData.bTask TRUE to extract security tasks; otherwise False
lpSecData.wFlags Flags DBE_APPEND and DBE_REMOTE, as desired
lpSecData.phProcess The process handle returned when executing on a server
szFileName The path/filename of the extract file
lpfnCallBack The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpSecData.wFlags.
lParam The argument for the callback function
Example:
Private Sub EntSecurityExtractVBbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EntSecurityExtractVBbtn.Click
Dim s As SecLoadStruct, lParam& Dim flag%, ret%, szFile$, hSelect& Dim apist As apiStruct
szFile$ = "C:\\security123.sec" 'The path of the file
hSelect& = HypGethSelect(hApp) ret% = EntSelectAdd(HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, _ 0, 0, 0, 0)
s.bSecClass = True s.bAcesRight = True s.bUserAndGroup = True s.bTask = True
flag% = 0 'If chkServer.Value Then flag% = SetRemote(flag%) 'flag% = flag % DBE_REMOTE
s.dwSize = Len(s) s.cDelimiter = Asc("!") s.wFlags = flag%
348 Specific Functions for Microsoft Visual Basic.NET
s.szFileName = EntGetVarAddrStr(szFile$)
lParam& = 0 ret% = EntSecurityExtractVB(hSelect&, s, szFile$, _ AddressOf SecExtrCallBack, lParam&)
ret% = MsgBox("Security extracted, return code = " & Str(ret%), vbOKOnly, "Security Extract")
hSelect& = EntUnSelect(hSelect&, HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, 0, ret%, apist)
End Sub
Public Function SecExtrCallBack(ByVal szFileName As Long, _ ByVal szTask As Long, _ ByVal lPos As Long, ByVal lStart As Long, ByVal lEnd As Long, _ ByVal lParam As Long) As Integer 'no need to disp the status ret% = 0 End Function
EntSecurityLoadVB( ) - Load SecurityThis function requires a callback function that the API will call to send current status of the load.
If loading security on a server (the DB_REMOTE bit flag is set in lpSecData.wFlags), you maywant to know the process handle of the load process so that you can track and monitor the serverprocesses that your program launches. The process handle returned at lpSecData hProcess is theprocess handle of an instance of the Task Status window program, HCOMMGR.exe, running onthe local client computer. For more information, see “Server Tasks” on page 121.
Use this format:
Declare Function EntSecurityLoadVB Lib "HEAccess.dll" Alias "_EntSecurityLoadVB@20"(ByVal hSelect As Integer, ByRef lpSecData As SecLoadStruct, ByVal lpszFileName As String,ByVal lpfnCallBack As SecLoadCallBack, ByVal lParam As Integer) As Short
Variable Description
hSelect The handle of the selected tables
lpSecData The structure with arguments for the security load
lpSecData.dwsize The size of this structure
lpSecData.cDelimiter The field delimiter, which typically is a comma ( , )
lpSecData.szFileName The path to the load file
lpSecData.bSecClass TRUE to load security classes; otherwise False
lpSecData.bAcesRight TRUE to load access rights; otherwise False
Hyperion Enterprise API's for Microsoft Visual Basic.NET 349
Variable Description
lpSecData.bUserAndGroup TRUE to load users and user groups; otherwise False
lpSecData.bTask TRUE to load security tasks; otherwise False.
lpSecData.wFlags 0 or DB_REMOTE
lpSecData.phProcess The process handle eturned when executing on a server
szFileName The path/filename of the file to load
fnCallBack The callback function for status information. This is not used if the DB_REMOTE flag is set in lpSecData.wFlags.
lParam The argument for the callback function.
Return Codes:
Code Meaning
LOAD_NOERR (0) Successful
NONE Error occurred
LOAD_CANCELLED Cancelled by user
LOAD_CHECK_ERRORLOG Error occurred and listed in the error log
Example:
Private Sub EntSecLoadvbbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EntSecLoadvbbtn.Click Dim s As SecLoadStruct Dim szFile As String Dim flag%, wRet%, hSelect& Dim apist As apiStruct szFile$ = "c:\\security123.sec" 'The path of the file. hSelect& = HypGethSelect(hApp) wRet% = EntSelectAdd(HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READWRITE, 0, 0, 0, 0) s.bSecClass = True s.bAcesRight = True s.bUserAndGroup = True s.bTask = True s.dwSize = Len(s) s.cDelimiter = Asc("!") s.wFlags = 0 'local execution s.szFileName = 0 'Pass szFile$ as argument to function instead wRet% = EntSecurityLoadVB(hSelect&, s, szFile$, AddressOf MyCallBack, 0) ret% = MsgBox("Security Loaded, return code = " & Str(ret%), vbOKOnly, "Security Load") hSelect& = EntUnSelect(hSelect&, HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, 0, wRet%, apist) End Sub Public Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfTaskCString As Long, ByVal lPos As Long, ByVal lStart As Long, _ ByVal lEnd As Long, ByVal lParam As Long) As Integer
350 Specific Functions for Microsoft Visual Basic.NET
MyCallBack = 0 End Function
EntUpdate( ) - Update RecordThis function updates the value for a specified field in a record in a table. When you are finishedupdating data, you need to call EntSave( ) to actually save your changes. You must use theEntUpdateStr( ) function when updating a string value. EntUpdateStr( ) is a clone of thedeclaration for EntUpdate( ) adjusted for use with strings and declared in the ToolKit.VB file.
Caution! Use this function only for the Datafile table (ID_DATAFILE). Before you use thisfunction, read “Updating Data” on page 117 which describes how to use this functionto update data.
Use this format:
Declare Function EntUpdate Lib "HEAccess.dll" Alias "_EntUpdate@28" (ByVal hSelect AsInteger, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer, ByValsigKey As Integer, ByRef pzBuf As Object, ByRef lpApiStruct As apiStruct) As Short
Use this format for updating a string value:
Declare Function EntUpdateStr Lib "HEAccess.dll" Alias "_EntUpdate@28" (ByVal hSelect AsInteger, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer, ByValsigKey As Integer, ByVal pzBuf As String, ByRef lpApiStruct As apiStruct) As Short
Variable Description
hSelect The handle of the selected tables
wTabId The Datafile table, ID_DATAFILE
wAttr The attribute for the field you want to update. For valid attributes, see “Updating Data” on page 117.
sigRecd The signature of the record you want to update. For many ID_DATAFILE update attributes, you can use NONE.
sigKey NONE for table ID_DATAFILE
pzBuf The new value for the specified field. NULL for table ID_DATAFILE when the new values are in apiS
apiS An apiStruct structure with more information. Required for most ID_DATAFILE update attributes.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Hyperion Enterprise API's for Microsoft Visual Basic.NET 351
ret% = EntUpdateStr(hSelect&, HYP_ID_DATAFILE, HYP_DATAFILE_LOGICEXECUTE, HYP_NONE, HYP_NONE, vbNullString, apiS) 'when finished, save and deselect the table ret% = EntSave(hSelect&, HYP_NONE, HYP_NONE, apiS) If ret% <> HYP_NONE Then ret2% = MsgBox("Data updated successfully for category:Actual Entity:us100 Account:income2") hSelect& = EntUnSelect(hSelect&, HYP_ID_DATAFILE, HYP_NONE, 1, ret2%, apiS)
See “Updating Data” on page 117 for an example.
EntUpdateDefault( ) - Update DefaultsThis function updates application or user defaults. After you are finished updating values, callEntSaveDefault( ) to save your changes. You must use the EntUpdateDefaultStr( ) function whenquerying a string value. EntUpdateDefaultStr( ) is a clone of the declaration forEntUpdateDefault( ) adjusted for use with strings and declared in the ToolKit.VB file.
Use this format:
Declare Function EntUpdateDefault Lib "HEAccess.dll" Alias "_EntUpdateDefault@16"(ByVal hApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByRef pzBuf As Object)As Short
Use this format to update the application for a string value:
Declare Function EntUpdateDefaultStr Lib "HEAccess.dll" Alias "_EntUpdateDefault@16"(ByVal hApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal pzBuf As String)As Short
Use this format to update the application for a long value:
Declare Function EntUpdateDefaultInt Lib "HEAccess.dll" Alias "_EntUpdateDefault@16"(ByVal hApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal pzBuf As long)As Short
Variable Description
hApp The application handle
wTabId The table ID, which must be one of the following tables:
l ID_HAPP
l ID_APPDEFAULT
l ID_USERDEFAULT
wAttr The attribute that you are updating. Valid attributes for tables ID_APPDEFAULT and ID_USERDEFAULT are the same as the queryattributes for those table. The only valid attribute for ID_HAPP is HYP_HAPP_IS_SILENT. For more information on query attributes,see Appendix B, “Query Attributes.”
pzBuf The new value for the field
For the ID_APPDEFAULT table, the valid attributes are any of the query attributes with thefollowing exceptions:
352 Specific Functions for Microsoft Visual Basic.NET
l APP_NTDATADIR
l APP_NTINBOXDIR
l APP_NTOUTBOXDIR
l APP_NTREPORTDIR
l APP_SITE_SHIFTED
When you update the various application directories (APP_INBOXDIR, and so on), use the@APP macro where appropriate at the beginning of the path. EntQueryDefault( ) automaticallysubstitutes the application path for @APP unless you request query attributeAPP_NTINBOXDIR, and so on. For more information, see the Creating Applications chapterin the Hyperion Enterprise Administrator’s Guide.
Caution! Many of the application settings in table ID_APPDEFAULT should not be changedafter the application is created. Examine the Hyperion Enterprise Applicationmodule for any menu item or any edited fields. Do not change the application settingthat corresponds to a field that cannot be edited as it could corrupt your application.
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
wRet = EntUpdateDefaultStr(hopp, HYP_ID_APPDEFAULT, HYP_APP_OUTBOXDIR, sOutbox$) wRet = EntSaveDefault(hopp, HYP_ID_APPDEFAULT) If wRet <> HYP_NONE Then Call MsgBox("Output path updated as C:\\myoutbox", MsgBoxStyle.OkOnly, "") End If
EntVBCopyData( ) - Copy DataThis function is intended to copy data to Visual Basic.Net Platform. The arguments for somecallback functions are actually the address of a structure (user-defined type). If your callbackfunction declares the argument as type short, you can use EntVBCopyData( ) to copy thatstructure into a Visual Basic.NET variable of the correct type so that you can use it.
Use this format:
Public Function EntVBCopyData(ByRef dest As Object,ByVal pSource As Object, ByVal wLenAs Short) As Short
Hyperion Enterprise API's for Microsoft Visual Basic.NET 353
Use this format for copying a string value:
Declare Function EntVBCopyStr Lib "HEAccess.dll" Alias "_EntVBCopyData@12"(<MarshalAs(UnmanagedType.VBByRefStr)> _ ByRef dest As String, _<MarshalAs(UnmanagedType.LPStr)> _ ByVal pSource As String, _ ByVal wLen As Short) AsShort
Variable Description
Dest The destination buffer
lAddr The address of the source to copy
wLen The length to copy
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
Example:
Public Function EntVBCopyData(ByRef dest As Object, ByVal pSource As Object, ByVal wLen As Short) As Short
If dest.GetType().Equals(pSource.GetType()) Then dest = pSource End If
End Function
HypHPJOUR( ) - Get Journal Detail InformationThis function retrieves information about a journal detail record.
Use this format:
Declare Function HypHPJOUR Lib "HEAccess.dll" Alias "_HypHPJOUR@36" (ByValhRApp As Short, ByVal wAttr As Short, ByVal szJourName As String, ByVal sigJourDet AsInteger, ByVal sTableID As Short, ByVal szCat As String, ByVal szPerName As String, ByValwLen As Short, ByRef pzBuf As Object) As Short
Use this format to retrieves information about a journal as a double value:
Declare Function HypHPJOURdw Lib "HEAccess.dll" Alias "_HypHPJOUR@36" (ByValhRApp As Short, ByVal wAttr As Short, ByVal szJourName As String, ByVal sigJourDet AsInteger, ByVal sTableID As Short, ByVal szCat As String, ByVal szPerName As String, ByValwLen As Short, ByRef pzBuf As Double) As Short
354 Specific Functions for Microsoft Visual Basic.NET
Variable Description
hRApp A non-zero retrieve Hyperion Enterprise Retrieve application handle
wAttr A short integer specifying which journal attribute you want returned
szJourName The journal ID
sigJourDet The signature of the journal detail row from HypJourDetAsk( )
sTableID The ID of the table data is retrieved from, either ID_JOURNAL_ENTRIES or ID_JOURNAL_TEMPLATES
szCat The category ID.
szPerName A period string in the form mm/dd/yy, or a period number, such as “2,” or a period ID such as “Feb 0"
wLen The length of the pzBuf buffer
pzBuf The buffer to return the value requested
You must allocate the buffer (pzBuf argument) to the correct size before calling HypHPJOUR( ).The following table lists the valid journal attributes and their correct types and sizes.
Table 64 Journal Attributes
Attribute Description Type/String Size
JOUR_NO Journal number, or NONE (-1) as the journal number if there is no journal number. Long
JOUR_ST Journal status Integer (short in C)
JOUR_DS Journal description String SIZEJOURDESC+1
JOUR_EN Journal detail entity String SIZEFULLNAME+1
JOUR_AC Journal detail account String SIZEFULLACT+1
JOUR_DB Journal detail debit Double
JOUR_CR Journal detail credit Double
Return Codes:
Code Meaning
0 Successful
NONE Error occurred
HACC_BAD_CATEGORY Error occurred, invalid szCat
HACC_BAD_CODE Error occurred, invalid wAttr
HACC_BAD_JOURNAL Error occurred, invalid szJourName
HACC_BAD_PERIOD Error occurred, invalid szPerName
Hyperion Enterprise API's for Microsoft Visual Basic.NET 355
Code Meaning
HACC_BAD_SELECT Error occurred
HACC_BAD_TABLE Error occurred, invalid sTableID
356 Specific Functions for Microsoft Visual Basic.NET
ATable IDs
In This Appendix
Table Descriptions ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Tables of Default Settings ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Associated Tables... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Related Tables ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
This appendix provides information about the tables into which Hyperion Enterpriseapplications are organized.
Table DescriptionsTable 65 lists all of the Hyperion Enterprise table IDs, descriptions, and associated tables. Alltable IDs appear in the C language form ID_TABLENAME, as they appear in the TOOLKIT.Hfile.
If you are using Microsoft Visual Basic, insert HYP_ at the beginning of all table IDs. The correctMicrosoft Visual Basic form for a table ID, as shown in the TOOLKIT.BAS file, isHYP_ID_TABLENAME. If there is no corresponding table ID in the TOOLKIT.BAS file for oneof the tables listed, you can define your own constant for that table.
Note: If you have to use an apiStruct for a particular table, you must use the advanced functionsthat take the form Ent...( ).
Table 65 Hyperion Enterprise Table IDs
Table ID Name Special Considerations
ID_ACCOUNTS Accounts Not applicable.
ID_ACCTCONVERT Account conversion Pass the signature of an account conversion list in ID_ACCTCVTLIST as the key.
ID_ACCTCVTLIST Account conversion list
ID_ACCTLIST Account list
ID_ACCTLISTENTRY Account list entry Pass the signature of an account list as the key.
Table Descriptions 357
Table ID Name Special Considerations
ID_BOOK_ENTRIES Book entries Pass the signature of the book set as the key.
ID_BOOK_SETS Book sets
ID_BOOKS Books
ID_CATEGORY Categories
ID_CATEGORY_LINKS Category linkages Pass the signature of the method as the key.
ID_CODES Codes
ID_CURRENCY Currencies
ID_DATAFILE Data file For more information, see “Working with Data” on page 114.
ID_FORMATS Formats for data loadand data extract files
ID_FORMULAS Formulas Pass the signature of the method as the key.
ID_FREQUENCY Frequencies This table uses the constants FREQ_MONTH, FREQ_QUARTER, and so on as thefrequency signatures. These constants are defined in the TOOLINC.H file.
ID_GROUP Account groups
ID_ICSET Intercompany matchingsets
ID_INTCODET Intercompany detail Pass the signature of the intercompany set in ID_ICSET as the key.
ID_JOURNAL_DETAIL Journals detail Pass the signature of the journal in ID_JOURNALS as the key.*
ID_JOURNAL_HISTORY Journals history Pass the category signature as the key.*
ID_JOURNAL_HISTORY_DETAIL
Journals history details Pass the signature of the history journal in ID_JOURNAL_HISTORY as the key.*
ID_JOURNAL_PERIOD_INFO
Journal periodinformation
Pass the category signature as the key.*
ID_JOURNAL_TEMPLATES Journal templates Pass the category signature as the key.*
ID_JOURNAL_TEMPLATES_DETAIL
Journal templates detail Pass the signature of the journal template in ID_JOURNAL_TEMPLATES as thekey.*
ID_JOURNALS Journals Pass the category signature as the key.*
ID_LOGIC Methods The DEFCHARTLOGICSIG constant is the signature for the default chart logic. Seethe record signatures for various default logic methods in the TOOLINC.H file.
ID_LOGIC_CAT_ATTRIB Logic category attributes Pass the signature of the method as the key.
ID_NAMECONVERT Entity conversion Pass the signature of an entity conversion list in ID_NAMECVTLIST as the key.
ID_NAMECVTLIST Entity conversion list
358 Table IDs
Table ID Name Special Considerations
ID_NAMELIST Entity list
ID_NAMELISTENTRY Entity list entry Pass the signature of an entity list in ID_NAMELIST as the key.
ID_NAMES Entities To use this table, select all of its associated tables by selecting either ID_ORGANIZATION OR ID_ASSOC or ID_NAMES OR ID_ASSOC.
ID_NODES Nodes If the application is set to use dynamic organizations, you must pass a categoryas the key. You also must pass an apiStruct argument for some queries.
To use this table, select ID_ORGANIZATION OR ID_ASSOC.
ID_ORGANIZATION Organizations If the application is set up to use dynamic organizations, you have to pass acategory as the key when selecting this table.
ID_PERIOD Periods
ID_PRINT Printing
ID_PSFDATA PSF Data Pass a category as the key when selecting this table. Pass an apiStruct argumentfor other API functions.
ID_REPORT_ENTRIES Report entries in reportsets
Pass the signature of a report set as the key.
ID_REPORT_SETS Report sets
ID_REPORTS Reports
ID_ROLLOVER Rollovers Pass the signature of a rollover set as the key.
ID_ROLLSET Rollover sets
ID_RPTFREQ Reporting frequencies This table ID is valid only for the following functions:
l EntSelect( )
l EntUnSelect( )
l EntEnum( )
l EntQueryEx( )
l EntFind( )
l HypLockEx( )
l HypUnLockEx( )
l HypEnumEx( )
l HypQueryEx( )
l HypFindEx( )
Table Descriptions 359
Table ID Name Special Considerations
ID_RPTVIEW Reporting views This table ID is valid only for the following functions:
l EntSelect( )
l EntUnSelect( )
l EntEnum( )
l EntQueryEx( )
l EntFind( )
l HypLockEx( )
l HypUnLockEx( )
l HypEnumEx( )
l HypQueryEx( )
l HypFindEx( )
ID_RULES Rules
ID_RULESEXP Rule expressions Pass the rule signature as the key.
ID_RULESVAR Rule variables Pass the rule signature as the key.
ID_SCHEDULES Schedules
ID_SECCLASS Security class
ID_SECGRPTAB Security group This table is a matrix of security groups by users. Each cell in the matrix is arecord in the table. Use this table to find the members of each security group.
The key field in this table is a structure defined as type SECURGROUPKEY, nota string (usually the ID).
ID_SECRIGHTS Security rights This table is a matrix of users by security classes. Each cell in the matrix is arecord in the table. The table contains the users' explicit rights to each securityclass. The user can be an individual user or a group in the ID_SECUSERTAB.
If there is no record for a particular user and class, then the user does not haveexplicit rights to that class. However, the user might have implicit rights frommembership in a group.
The key field in this table is a structure defined as type SECURRIGHTSKEY, nota string (usually the ID).
ID_SECTASK Security task
ID_SECTASKFILTER Security task filter
ID_SECURITY Security This table ID is valid only for the following functions:
l EntSelect( )
l EntUnSelect( )
l HypLockEx( )
l HypUnLockEx( )
This table ID is used only with ID_ASSOC to select or deselect all the securitytables together. If you forget to use an OR operation with ID_ASSOC, only ID_SECUSERTAB is selected or deselected.
360 Table IDs
Table ID Name Special Considerations
ID_SECUSERTAB Security Users
ID_SERVER Server †
ID_SHARES Shares Each record in this table indicates how many shares of one entity's stock areowned by another entity. Special records contain the total number of sharesoutstanding for an entity and the total number of shares owned by another entity.
If the application is set up to use dynamic organizations, pass the category asthe key when selecting this table.The key field for this table, normally the ID, isnot a string. For more information, see the EntFind( ) function.
ID_SUBACCTDET Subaccount detail Pass the signature of a sub-account header as the key.
ID_SUBACCTHDR Subaccount header
ID_SUBNAME Subentities
ID_SUBSTRUCTURE Substructures
ID_SUGGEST_OWN Table that suggests theconsolidation methodand consolidationpercentage
ID_USE_METHODS Used methods Pass the signature of the method as the key.
ID_USERDEFFUNC Custom functions
* All of the journals tables require an apiStruct for most functions. Also, you have to use anapiStruct to select the following journals tables: ID_JOURNAL_DETAILID_JOURNAL_HISTORY_DETAIL ID_JOURNAL_PERIOD_INFOID_JOURNAL_TEMPLATES_DETAIL This means that you can use only theEntSelectTableAdd( ) function to select these tables. The apiStruct for the journals tables shouldinclude the following fields. sigCat, the category signature. lStartPeriod, the start time.lEndPeriod, the same period as lStartPeriod. Journals handle only one period at a time.
† If you have Hyperion Enterprise Server installed, you can also use the server table(ID_SERVER). This table ID is valid only for the following functions: HypQueryEx( )HypFindEx( ) HypEnumEx( ) EntQueryEx( ) EntFind( ) EntEnum( ) You cannot select theID_SERVER table. If you are using the client-server feature with Hyperion Enterprise Release,the API functions listed above forward the request to Hyperion Enterprise Server and return therequired information.
Tables of Default SettingsThe tables listed in Table 66 contain default settings and are used with several functions,including EntQueryDefault( ), EntUpdateDefault( ), and EntSaveDefault( ). You can also usethese tables with HypQueryEx( ), EntQueryEx( ), EntUpdate( ), and EntSave( ). You do notneed to select these tables. The tables are available when you open an application.
Tables of Default Settings 361
Table 66 Table IDs for Tables of Default Settings
Table ID Table Name
ID_HAPP Application Information
ID_APPDEFAULT Application Defaults
ID_USERDEFAULT User Defaults
Note: These tables IDs are defined in the toolinc.H file.
Associated TablesWhen you select or deselect a table, you can use the table ID combined with the ID_ASSOCconstant using an OR operation to simultaneously select the table and its associated tables. Hereis an example in Visual Basic:
HYP_ID_ORGANIZATION OR HYP_ID_ASSOC
Here is an example in the C language:
ID_ORGANIZATION | ID_ASSOC
You should use the ID_ASSOC constant rather than select tables individually. When you selector deselect a table using ID_ASSOC, the associated tables are also selected or deselected.Table 67 lists all of the associated tables for Hyperion Enterprise tables.
Many tables have associated internal tables, which are not listed here.
Table 67 Associated Tables
Table ID Associated Tables
ID_ACCOUNTS ID_GROUP ID_SUBACCTDET ID_SUBACCTHDR
ID_BOOKS ID_BOOK_ENTRIES ID_BOOK_SETS
ID_CATEGORY ID_FREQUENCY ID_PERIOD
ID_FORMULAS ID_CATEGORY_LINKS ID_LOGIC_CAT_ATTRIB ID_USE_METHODS
ID_FREQUENCY ID_PERIOD
ID_ICSET ID_INTCODET
ID_JOURNAL_TEMPLATES ID_JOURNAL_ENTRIES
ID_JOURNALS ID_JOURNAL_TEMPLATES ID_JOURNAL_PERIOD_INFO ID_JOURNAL_ENTERIES ID_JOURNALS selects anddeselects the associated tables even if you do not specify ID_ASSOC.
ID_LOGIC ID_CODES
ID_NAMES ID_CODES ID_CURRENCY ID_LOGIC ID_SUBNAME ID_SUBSTRUCTURE
362 Table IDs
Table ID Associated Tables
ID_NODES ID_SHARES,
ID_ORGANIZATION ID_CODES ID_CURRENCY ID_LOGIC ID_NAMES ID_NODES ID_SHARES ID_SUBNAME ID_SUBSTRUCTURE
ID_REPORTS ID_REPORT_ENTRIES ID_REPORT_SETS
ID_ROLLSET ID_ROLLOVER
ID_RULES ID_RULESEXP, ID_RULESVAR
ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK, ID_SECTASKFILTER ID_SECUSERTAB
ID_SECGRPTAB ID_SECCLASS ID_SECTASK ID_SECTASKFILTER ID_SECUSERTAB
ID_SECRIGHTS ID_SECCLASS ID_SECGRPTAB ID_SECTASK ID_SECTASKFILTER ID_SECUSERTAB
ID_SECTASK ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASKFILTER ID_SECUSERTAB
ID_SECTASKFILTER ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECUSERTAB
ID_SECURITY ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECTASKFILTER
ID_SECUSERTAB ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECTASKFILTER
Related TablesTable 68 lists the Hyperion Enterprise tables that are closely related. If you are using Visual Basic,insert HYP_ at the beginning of all table IDs. The correct Visual Basic form for a table ID, asshown in the TOOLKIT.BAS file, is HYP_ID_TABLENAME.
Table 68 Related Hyperion Enterprise Tables
Table Key Requirement
ID_ACCTCONVERT ID_ACCTCVTLIST
ID_ACCTLISTENTRY ID_ACCTLIST
ID_BOOK_ENTRIES ID_BOOK_SETS
ID_CATEGORY_LINKS ID_LOGIC
ID_FORMULAS ID_LOGIC
ID_INTCODET ID_ICSET
ID_JOURNAL_DETAIL ID_JOURNALS
ID_JOURNAL_HISTORY ID_CATEGORY
ID_JOURNAL_HISTORY _DETAIL ID_JOURNAL_HISTORY
ID_JOURNAL_PERIOD_INFO ID_CATEGORY
Related Tables 363
Table Key Requirement
ID_JOURNAL_TEMPLATES ID_CATEGORY
ID_JOURNAL_TEMPLATES _DETAIL ID_JOURNAL_TEMPLATES
ID_JOURNALS ID_CATEGORY
ID_LOGIC_CAT_ATTRIB ID_LOGIC
ID_NAMECONVERT ID_NAMECVTLIST
ID_NAMELISTENTRY ID_NAMELIST
ID_PSFDATA ID_CATEGORY
ID_REPORT_ENTRIES ID_REPORT_SETS
ID_ROLLOVER ID_ROLLSET
ID_RULESEXP ID_RULES
ID_RULESVAR ID_RULES
ID_SHARES ID_CATEGORY
ID_SUBACCTDET ID_SUBACCTHDR
ID_USE_METHODS ID_LOGIC
364 Table IDs
BQuery Attributes
In This Appendix
Query Attributes Overview ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Default Query Attributes ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Nondefault Query Attributes... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
This appendix lists all of the Hyperion Enterprise query attributes that you can use to queryHyperion Enterprise Version tables using EntQueryEx( ) or HypQueryEx( ) and their relatedfunctions.
Query Attributes OverviewHypQueryEx( ) does not handle an apiStruct, so if you need to use an apiStruct for a particularquery, you must use EntQueryEx( ). Most queries do not require an apiStruct but instead passNULL in EntQueryEx( ). The query attributes described in this chapter include those that requirean apiStruct and the fields to set in the apiStruct. For more information on using apiStructs,“Using an apiStruct Structure” on page 110.
Note: If you are using Visual Basic, insert HYP_ at the beginning of all table IDs. The correctVisual Basic form for a table ID as shown in the TOOLKIT.BAS file isHYP_ID_TABLENAME. If there is no corresponding table ID in the TOOLKIT.BAS filefor one of the tables listed, you can define your own constant for that table.
This chapter also describes the type of information returned by each query attribute. This is thetype that you should use for the pzbuf argument in query functions. For example, if a queryreturns type LONG, then pzbuf should also be type LONG. If you are programming in C, youneed to use a pointer to the stated type unless the type is inherently a pointer type. Table 69 liststhe different types in both Visual Basic and C.
Table 69 Visual Basic and C Types
Visual Basic Type C Type
Byte or one-character string char, UCHAR, or HYPBOOL.
HYPBOOL is used for Boolean values that are either True (1) or False (0).
Query Attributes Overview 365
Visual Basic Type C Type
Double double
Long long or LONG
Integer short
Long SIGNA, which is used for values that are record signatures
String LPSTR
For query attributes that retrieve strings, allocate your buffer to the following sizes:
l Use HYP_SIZELABEL+1 for IDs.
l Use HYP_SIZEDESC+1 for descriptions.
l Use HYP_SIZEFULLNAME+1 for entity IDs.
l Use HYP_SIZEFULLACCT+1 for account IDs.
Note: If you are programming in C, delete the HYP_.
For additional string sizes, see the TOOLKIT.BAS and TOOLINC.H files.
Default Query AttributesTable 70 lists all of the default query attributes that are applicable to most but not all HyperionEnterprise tables. Tables to which these query attributes do not apply are identified as such inthis chapter.
Table 70 Default Query Attributes
Query Description Type
COUNT Count of records in a table. VB: long C: long
DATETIME The time_t type is defined as the number of seconds since midnight January 1, 1970. InMicrosoft's Visual C, you use the localtime() function to convert the time_t value to a tm struct(another Microsoft C type) that has individual fields for the various components of the dateand time (day, month, year, hour, minute, and more). For more information, see Microsoft'sdocumentation (MSDN - Microsoft Developers' Network).
VB: Long C: time_t
DESC Description of records in a table. VB: String C: LPSTR
DESCRIPTION Description of records in a table. VB: String C: LPSTR
LOCK_MODE Lock mode for the table. For more information, “EntIsSelected( ) - Is Table Selected?” onpage 207.
VB: Integer C: short
MODIFIED Indicates whether the table has been updated. For more information, “EntIsModified( ) - IsTable Modified?” on page 206.
VB: Integer C: short
366 Query Attributes
Query Description Type
NAME ID. VB: String C: LPSTR
NUM_ELEMENTS Number of elements. VB: Long C: long
NUM_COLUMNS Number of columns. VB: Long C: long
QRYFIRST First record. VB: Long C: SIGNA
QRYNEXT Next record. VB: Long C: SIGNA
SECURITYCLASS Security class signature for the item. VB: Long C: SIGNA
SHORTNAME ID. VB: String C: LPSTR
TIME_STAMP Table timestamp. VB: Long C: Long
TIMESTAMP_CHK TRUE (1) if timestamp is different (table changed by another user, need to refresh), FALSE(0) otherwise.
VB: Byte C: HYPBOOL
USECOUNT Number of locks on table. Integer short
USER_RIGHTS Current user rights to access one of the following items: SECURITY_MODIFY, SECURITY_VIEW,SECURITY_NONE, or SECURITY_RESTRICTED.
VERIFYSIG Used to verify a signature. Returns NONE if the signature is invalid. See Note. VB: 0 C: NULL
Note: The VERIFYSIG query attribute returns zero if the signature is valid, or NONE if thesignature is invalid. The return code is the value returned from the query functionHypQueryEx( ) or EntQueryEx( ), not the value in the pzBuf argument. You can passNULL. This query attribute verifies only the user's access rights and checks if the recordis deleted. It does not verify that the signature is in a valid range.
Nondefault Query AttributesThe following topics describe the query attributes for tables that do not use the default queryattributes.
ID_ACCOUNTS (Accounts Table) Query AttributesThe default query NAME returns the account ID for only the major account. Use query attributeACCT_FULLNAME to retrieve the full account ID. Table 71 lists the query attributes for theAccounts table.
Table 71 ID_ACCOUNTS Table Query Attributes
Query Description VB Type C Type
ACCT_COA_SEQ_NUM Chart of accounts sequence number.
Nondefault Query Attributes 367
Query Description VB Type C Type
ACCT_COMBINE_VSIGS Get an account signature, given the signatures of the major account andsubaccounts. See Note 1.
Long SIGNA
ACCT_DECIMALS Number of decimals to display. Integer short
ACCT_FIRST_SUB_SIG Long SIGNA
ACCT_FULLNAME Get full account ID major.sub.subsub. String LPSTR
ACCT_GROUP Signature of the account group. Long SIGNA
ACCT_IS_BALANCE TRUE (1) if the specified account is a balance account, otherwise FALSE (0). Byte HYPBOOL
ACCT_IS_CONSOLIDATE Indicates whether the specified account is a consolidated account. Byte HYPBOOL
ACCT_IS_CURRENCY Indicates whether to apply currency translation. Byte HYPBOOL
ACCT_IS_DYNAMIC Indicates whether the account is a dynamic account. Byte HYPBOOL
ACCT_IS_INTERCO Indicates whether the account is an intercompany account. Byte HYPBOOL
ACCT_IS_MAJOR Indicates whether the account is a major account. Byte HYPBOOL
ACCT_IS_SCALE Indicates whether the account is a scaled account. Byte HYPBOOL
ACCT_IS_SINGLELEVEL Limits subaccounts to one level (TRUE (1)/FALSE (0)). Byte HYPBOOL
ACCT_IS_SUB TRUE (1) if account is first-level sub-account with no second-level sub-account(major.sub).
Byte HYPBOOL
ACCT_IS_SUBSUB TRUE (1) if account has second-level sub-account (major.sub.subsub) or elseFALSE (0).
Byte HYPBOOL
ACCT_IS_VALIDATED TRUE (1) if sub-account type is validated, as opposed to fixed or none, or elseFALSE (0).
Byte HYPBOOL
ACCT_NEXTCHARTORDER Next account in the chart-of-account order. Long SIGNA
ACCT_SPLIT_VSIGS Get major, sub-account, and subsubaccount signatures from an account signature.See Note 2.
Long SIGNA
ACCT_SUBACCT_TABLE Signature of the sub-account table Long SIGNA
ACCT_SUBACCT_TYPE Fixed, validated, or none. See SUBACTYPE_* in TOOLINC.H file. Influenced by typeof attached sub-account table
Byte char
ACCT_SUBACCTDESC Description of lowest level sub-account (if one exists). String LPSTR
ACCT_SUBACCTNAME ID of lowest-level sub-account (if one exists). String LPSTR
ACCT_TYPE Account type such as asset, liability, and so on. See ACTTYPE_* defines in TOOLINC.H file.
Integer short
CODE Signature of user-defined code. Long SIGNA
INTERCO_NAMESIG Get entity signature if bottom-level detail is intercompany sub-account. Long SIGNA
368 Query Attributes
Query Description VB Type C Type
LAST_ATTACHED_SUBTABLE Get lowest-level detail sub-account table for the account. Long SIGNA
Note: Use the ACCT_COMBINE_VSIGS query attribute to concatenate a major account, sub-account, and second-level sub-account and return the signature of the resulting account.To do this, set up an apiStruct with the fields shown in Table 72.
Table 72 Fields to Set Up an ApiStruct
Field Description
u_ApiQry.sigSub The signature of the first-level sub-account, or HYP_NONE (NONE in C).
u_ApiQry.sigSubSub The signature of the second-level sub-account, or HYP_NONE (NONE in C).
Call EntQueryEx( ) and pass it the signature of the major account as the sigRecd argument.Alternatively, you could pass the signature of an account with one sub-account level to whichyou want to concatenate a second-level sub-account. EntQueryEx( ) returns the signature of theresulting account in the pzBuf argument. EntQueryEx( ) returns one of the following codes:
Return Codes:
Code Meaning
ACCT_NOERR (0) Successful.
ACCT_FULL_0SUBSUSED (1) No signature returned because the input account already contains first- and second-level subaccounts.
ACCT_FULL_1SUBUSED (2) The input account already had a first-level sub-account, but the first-level sub-account was concatenatedfrom the apiStruct.
ACCT_SUBSNOTVALID (3) No signature returned because the input account contained an invalid combination.
NONE Other error such as table not selected, invalid account, and so on.
Note: The ACCT_SPLIT_VSIGS query attribute requires an apiStruct with the following fields:
Field Description
u_ApiQry.sigSub Set to HYP_NONE (NONE in C).
u_ApiQry.sigSubSub Set to HYP_NONE (NONE in C).
Call EntQueryEx( ) and pass it the account signature. The query returns the signature of themajor account in pzBuf argument. EntQueryEx( ) also returns the first- and second-level sub-account signatures that are part of table ID_SUBACCTDET in the apiStruct's u_ApiQry.sigSuband u_ApiQry.sigSubSub fields.
Nondefault Query Attributes 369
Note: You can use the EntAcctSplit( ) function, as an alternative.
ID_ACCTCONVERT (Account Conversion Table) QueryAttributesTable 73 contains individual entries for each account conversion list in tableID_ACCTCVTLIST. Each entry includes the Hyperion Enterprise account and thecorresponding external account name to convert. The default query attributes NAME andSHORTNAME return the external account name.
Table 73 ID_ACCTCONVERT Table Query Attributes
Query Description VB Type C Type
ACONV_ACCTNAME Hyperion Enterprise account ID. String LPSTR
ACONV_ACCTSIG Account signature. Long SIGNA
ACONV_ADD_SUB Add or subtract. Integer short
ID_ACCTCVTLIST (Account Conversion List Table) QueryAttributesTable 74 contains information about account conversion lists. The actual entries in each accountconversion list are stored in table ID_ACCTCONVERT.
Table 74 ID_ACCTCVTLIST Table Query Attributes
Query Description VB Type C Type
FIRST_ENTRY First entry in the account conversion table. Long SIGNA
LIST_DIRECTION Direction: E to extract from Hyperion Enterprise, L to load into Hyperion Enterprise, or B if valid inboth directions.
Byte char
ID_ACCTLIST (Account List Table) Query AttributesTable 75 contains information about the account lists in the application. The accounts in eachaccount list are stored in table ID_ACCTLISTENTRY.
Table 75 ID_ACCTLIST Table Query Attributes
Query Description VB Type C Type
FIRST_ENTRY Signature of the first detail record. Long SIGNA
LIST_TYPE List type: Fixed (F) or Dynamic (D). Integer short
370 Query Attributes
ID_ACCTLISTENTRY (Account List Entry Table) QueryAttributes This table contains the entries in the specified account list. If the record signature (sigRecd) isHYP_NONE (NONE in C) and the account list is a fixed account list, then the query functionsquery the first entry in the account list. If the record signature is HYP_NONE and the accountlist is dynamic, then the query functions query the criteria record for the account list. Use recordsignature for the criteria record.
The Account List Entry table contains a record for each entry in the each fixed account list anda criteria record for each dynamic or fixed list. The criteria record contains the criteria used tocreate the account list. Some query attributes apply only to fixed lists. Most query attributesapply only to criteria records. For more information, see “ID_NAMELISTENTRY (Entity ListEntry Table) Query Attributes” on page 395.
Table 76 lists all the query attributes that apply to fixed list entries. Default queries NAME,SHORTNAME, QRYNEXT, and QRYFIRST apply only to fixed lists.
Table 76 ID_ACCTLISTENTRY Query Attributes for Fixed List Entries
Query Description VB Type C Type
ENTRY_SIG Entity signature of list entry. Long SIGNA
FIRST_ENTRY Get signature of first entry. Long SIGNA
Table 77 lists all the query attributes that apply to criteria records.
Table 77 ID_ACCTLISTENTRY Table Query Attributes
Query Description VB Type C Type
CALC_ACCT Indicates whether accounts are calculated accounts. Byte char, HYPBOOL, orshort
CODE_DATA Selected codes.
Note: Use NUM_CODES to get size to allocate array.
Array of Longs Array of SIGNA
CRITERIA_TYPES String LPSTR
DYNVIEW_ACCOUNT Byte HYPBOOL
ENTRY_SIG The signature of the account. Long SIGNA
FIRST_ENTRY Gets the first record (same as QRYFIRST). Long SIGNA
GROUP_DATA Selected account groups.
Note: Use NUM_GROUPS to get the size to allocate the array.
Array of Longs Array of SIGNA
INPUT_ACCT Indicates whether accounts are input accounts. Byte HYPBOOL
MULTI_ACCOUNT Indicates whether accounts are multilevel accounts. Byte HYPBOOL
NUM_CODES Number of codes selected as criteria. Long long
Nondefault Query Attributes 371
Query Description VB Type C Type
NUM_GROUPS Number of defined groups selected as criteria. Long long
NUM_SUBACCTS Number of subaccounts selected as criteria. Long long
NUM_TABLES Number of sub-account tables selected as criteria. Long long
SHOW_DETAIL Indicates whether subaccounts should be shown for this account, TRUE(1) or FALSE (0).
Byte HYPBOOL
SINGLE_ACCT Indicates whether the accounts are single-level accounts. Byte HYPBOOL
SUB_MULT Indicates whether the subaccounts are multilevel subaccounts. Byte HYPBOOL
SUB_SINGLE Indicates whether the subaccounts are single-level subaccounts. Byte HYPBOOL
SUBACCT_DATA Selected subaccounts.
Note: Use NUM_SUBACCTS to get size to allocate array.
Array of Longs Array of SIGNA
TABLE_DATA Selected sub-account tables.
Note: Use NUM_TABLES to get the size to allocate the array.
Array of Longs Array of SIGNA
ID_APPDEFAULT (Application Defaults Table) QueryAttributesThe query attributes in Table 78 are used with EntQueryDefault( ), though you can use themwith HypQueryEx() or EntQueryEx( ). Default queries do not apply to this table.
Table 78 ID_APPDEFAULT Table Query Attributes
Query Description VB Type C Type
APP_ACCTFORLOCK Locking account. Long SIGNA
APP_ALWAYS_EXEC_TRANS Always execute translation methods. Byte HYPBOOL
APP_BALACCT Balance rate account. Long SIGNA
APP_BILLIONS Billions separator. String LPSTR
APP_CALENDAR Application calendar file name. String LPSTR
APP_CONSOL_IS_PER Consolidation is periodic. Byte HYPBOOL
APP_CURRENCY Application currency. Long SIGNA
APP_DATADIR Data directory with macro substitution. String LPSTR
APP_DECIMAL Decimal delimiter. String LPSTR
APP_DESC Application description. String LPSTR
APP_DRV_DLL Device driver DLL name such as HEFILE.DLL or SQL equivalent. String LPSTR
372 Query Attributes
Query Description VB Type C Type
APP_EXPECTED_ENTITIES Number of expected entities. Long long
APP_EXPECTED_REPORTS Number of expected reports. Long long
APP_EXPECTED_ACCTS Number of expected accounts. Long long
APP_EXPECTED_CATS Number of expected categories. Long long
APP_FLOACCT Flow rate account. Long SIGNA
APP_HOLDING_LOGIC Method for holding company. Long SIGNA
APP_ID Application ID. String LPSTR
APP_IMPACTFUTURECAT Impacts future categories. Byte HYPBOOL
APP_INBOXDIR Inbox directory (with macro substitution). String LPSTR
APP_INPUT_PCT Input ownership as percent, not as number of shares. Byte HYPBOOL
APP_IS_ORGBYPER Indicates whether application is set up to use dynamic organizations. Byte HYPBOOL
APP_ISBALACCTPVA Indicates whether the balance account is PVA. Byte HYPBOOL
APP_ISFLOACCTPVA Indicates whether the flow account is PVA. Byte HYPBOOL
APP_JOUR_AUTONUMBER Automatically numbers journal on save. Byte HYPBOOL
APP_JOUR_REVIEW Journals that must be reviewed. Byte HYPBOOL
APP_JOUR_RUN_LOGIC Calculate formulas when a journal is posted. Byte HYPBOOL
APP_JOUR_TOPLEVEL Allow top-level journal adjustments. Byte HYPBOOL
APP_MILLIONS Millions separator. String LPSTR
APP_NODVIMPLIED No dynamic view account implied calculations. Byte HYPBOOL
APP_NTDATADIR Data directory with no macro substitution. String LPSTR
APP_NTINBOXDIR Inbox directory with no macro substitution. String LPSTR
APP_NTOUTBOXDIR Outbox directory with no macro substitution. String LPSTR
APP_NTREPORTDIR Report directory with no macro substitution. String LPSTR
APP_NUM_DECIMALS Number of decimals to display. Integer short
APP_OUTBOXDIR Outbox directory with macro substitution. String LPSTR
APP_PATH Application path. String LPSTR
APP_REPORTDIR Report directory with macro substitution. String LPSTR
APP_SERVER Server name for client-server options. String LPSTR
Nondefault Query Attributes 373
Query Description VB Type C Type
APP_SITE Site number (0 - 14). Long SIGNA
APP_SITE_SHIFTED Site number bit-shifted to the high-order 4 bits. Long SIGNA
APP_STORECONDETAIL Store contribution detail. Byte HYPBOOL
APP_STORETRANDETAIL Store translation detail. Byte HYPBOOL
APP_SUBACCTSIG Unique sub-account signatures, that is, not shared. Byte HYPBOOL
APP_THOUSANDS Thousands separator. String LPSTR
APP_USE_CHILD_RATES Indicates whether non-global rates come from child. Byte HYPBOOL
APP_USE_MULTI_THREAD Indicates wether to use multithread support (TRUE (1) or FALSE (0)). Byte HYPBOOL
APP_USE_SERVER Indicates whether to use client-server options. Byte HYPBOOL
APP_USES_SYSTEM_NUM Use the default system setting for number format. Byte HYPBOOL
APP_USETURBO Indicates whether the system should use the ACE (Statutory Consolidation Engine). Byte HYPBOOL
Table 79 lists the query attributes for file-based applications. You can read, update, and savethese query attributes although they are currently not in use.
Table 79 Query Attributes for File-Based Applications
Query Description VB Type C Type
APP_SWAPDRIVE Swap drive. String LPSTR
APP_ISSWAPDRIVE Indicates whether user specified a swap drive. Long (32-bit) Integer (16-bit) HYPBOOL
APP_ISCOMPRESS Compress file options. Long (32-bit) Integer (16-bit) HYPBOOL
Table 80 lists the query attributes for SQL applications.
Table 80 Query Attributes for SQL Applications
Query Description VB Type C Type
APP_SQL_SERVER SQL server name. String LPSTR
APP_SQL_DBNAME SQL database name. String LPSTR
APP_NTWRK_PCKT_SIZE Maximum negotiated packet size for the SQL driver. Long long
ID_BOOK_ENTRIES (Book Entries Table) Query AttributesTable 81 lists the books included in each book set in table ID_BOOK-SETS.
374 Query Attributes
Table 81 ID_BOOK_ENTRIES Table Query Attributes
Query Description VB Type C Type
BOOK_ID Book signature within a book set. Long SIGNA
BOOKSET_ID Signature of the book set. Long SIGNA
NEXT_BOOK_SIG Next book signature within a book set. Long SIGNA
ID_BOOK_SETS (Book Sets Table) Query AttributesTable 82 contains information about book sets. The actual books in each book set are stored intable ID_BOOK_ENTRIES.
Table 82 ID_BOOK_SETS Table Query Attributes
Query Description VB Type C Type
BOOKSET_ID ID of a report set ID in a book set. Long SIGNA
ID_BOOKS (Books Table) Query AttributesTable 83 lists query attributes for the Books table.
Table 83 ID_BOOKS Table Query Attributes
Query Description VB Type C Type
BOOK_COMPILED_BOOK Help instructions length. String LPSTR
BOOK_SCRIPT Help instructions. String LPSTR
DOC_FILTER Document filter. Long long
DOC_TYPE_CD Document filter code. Byte char
ID_CATEGORY (Categories Table) Query AttributeTable 84 lists query attributes for the Category table.
Table 84 ID_CATEGORY Table Query Attributes
Query Description VB Type C Type
CAT_CVTLITFREQTOPER Convert literal frequency "Q1 03" to a period number inthe category. See Note 1.
Long long
Nondefault Query Attributes 375
Query Description VB Type C Type
CAT_DATEFROMPER Convert category period to calendar date. Array of threeIntegers
Array of three shorts. Onreturn, the first elementwith be the month, thesecond will be the day,and the third will be theyear.
CAT_FISCALYEARSTART Fiscal year start of the category based on period number. Long long
CAT_FLOWYTD Periodic or category-to-date flow. Byte HYPBOOL
CAT_FREQ Frequency index. Long SIGNA
CAT_GETPERANDYEAR Map lStartPeriod to period and year. CATMAP STRUCT LPCATMAP STRUCT
CAT_GETPERIOD Gets period based on frequency, period, and year. Long long See Note 2.
CAT_HASDATA Byte HYPBOOL
CAT_HASORG Indicates whether an organization exists in this category. Byte HYPBOOL
CAT_JOUR_RESTARTNUMON Restarts journal autonumber each period flag. Byte HYPBOOL
CAT_JOUR_STARTNUMBER Starting auto number for journals. Long long
CAT_MAPPERIOD Map period from FreqA to FreqB. See Note 3. Long long
CAT_NUMPERIODS Number of periods. Integer short
CAT_PATH Data path for this category with @APP translated. String LPSTR
CAT_PATH_NOT Data path for this category without @APP translated. String LPSTR
CAT_PER_LONG Gets date in the form "January 2003." String LPSTR
CAT_PER_SHORT Gets period label ("Jan 03"). See Note 4. String LPSTR
CAT_PRIORSIG Signature of the prior category. Long SIGNA
CAT_SCALE Scale. Byte char or short
CAT_SCALE_FACTOR Scale factor such as 1, 2, 3, and so on. Double double
CAT_STARTPER Period in which the category starts. Integer short
CAT_STARTYEAR Year in which the category starts. Integer short
CAT_STOREDET Stores consolidation detail. Byte HYPBOOL
CAT_VIEW View of data (VIEW_YTD or VIEW _PERIODIC.) Integer short
CODE User-defined code. Long SIGNA
The functions HypCatGetNumPeriodsEx( ) and EntCatGetNumPeriods( ) use a combinationof the CAT_NUMPERIODS and CAT_MAPPERIOD query attributes.
376 Query Attributes
Note: The CAT_CVTLITFREQTOPER query attribute requires an apiStruct with the fields inTable 85.
Table 85 Fields for apiStruct
Field Description
lpString The address of the literal frequency string. An example is "Q1 03.”
u_ApiQry.bFreq_Not_CatFreq TRUE (1) to allow frequencies other than the category's frequency, otherwise FALSE (0).
Note: The CAT_GETPERIOD query attribute requires an apiStruct with the fields shown inTable 86.
Table 86 Fields for apiStruct
Field Description
lStartPeriod The month.
u_ApiQry.sigFreq The frequency signature such as FREQ_MONTH.
u_ApiQry.sYear The year. For example, 2003.
Note: The CAT_MAPPERIOD query attribute requires an apiStruct with the fields inTable 87.
Table 87 Fields for apiStruct
Field Description
lStartPeriod The period number in Freq A.
u_ApiQry.sigFreq The frequency for lStartPeriod FREQ_MONTH, and so on. For example, Freq A. Use NONE for the default frequencyof the category.
u_ApiQry.sigAltFreq The desired frequency, for example, Freq B.
On return, pzBuf will be the period number in Freq B that is equivalent to the specified periodin Freq A.
For more information, see “EntCatMapPeriod( ) - Map Period into Frequency ” on page 140 or“HypCatMapPeriodEx( ) - Map Period into Frequency” on page 84.
Note: The CAT_PER_SHORT query attribute requires an apiStruct with the fields shown inTable 88.
Nondefault Query Attributes 377
Table 88 Fields for apiStruct
Field Description
lStartPeriod The period number.
u_ApiQry.sPeriod_View The frequency. Set to NONE to use the frequency of the category.
ID_CATEGORY_LINKS (Category Links Table) QueryAttributesTable 89 lists the query attributes for the Category Links table.
Table 89 ID_CATEGORY_LINKS Query Attributes
Query Description VB Type C Type
CATLINK_LINKCAT Category linkage Long SIGNA
CATLINK_MAINCAT Category signature Long SIGNA
ID_CODES (Codes Table) Query AttributesTable 90 lists query attributes for the Codes table.
Table 90 ID_CODES Query Attributes
Query Description VB Type C Type
CODES_TYPE See the CODE_TYPE_... definitions in the toolinc.h. file. Integer short
ID_CURRENCY (Currencies Table) Query AttributesTable 91 lists the query attributes for the Currencies table.
Table 91 ID_CURRENCY Table Query Attributes
Query Description VB Type C Type
CURR_SYMBOL The symbol for this currency, such as $, £, and so on. String LPSTR
MULFLAG The multiply/divide flag state. TRUE (1) if this currency is multiply. Integer short
ID_DATAFILE (Datafile Table) Query AttributesMost query attributes for the Datafile table require an apiStruct. For instructions on setting upan apiStruct, “Using an apiStruct Structure” on page 110. For more information about whichfields to set in the apiStruct, “Retrieving Data” on page 115. You might also need to set theu_Dfa.hLogic field in the apiStruct for some queries. The record signature (sigRecd argument)
378 Query Attributes
should generally be set to HYP_NONE (NONE in C). The queries return data values and statusvalues in the data buffer and status buffer that you set up in the apiStruct, where indicated.Table 92 lists the query attributes for the Datafile table.
Table 92 ID_DATAFILE Table Query Attributes
Query Description VB Type C Type
ACCT_TYPE Indicates whether the account is a calculated (LOGIC_CALC) orinput account (LOGIC_INPUT or LOGIC_LINPUT).
Integer short
DATAFILE_GETLOGICSTMT Get formula for account. String LPSTR
DATAFILE_ACCTHASDATA Get the number of periods out of the requested periods thatcontain data.
Integer short
DATAFILE_ACCTSIG Get the account signature. Long SIGNA
DATAFILE_GET Get data values. 0 NULL
DATAFILE_GETACCTLIST Get list of accounts from within datafile. Array of Long. Array of SIGNA.
DATAFILE_GET_BAS Get base value for a balance account. 0 NULL
DATAFILE_GET_BASFLO Get base value for a flow account.
DATAFILE_GET_CUM Get cumulative value. 0 NULL
DATAFILE_GET_OPE Get opening balance. 0 NULL
DATAFILE_GET_PRE Get previous value. 0 NULL
DATAFILE_GETSTATUS Get status of each period. 0 NULL
DATAFILE_ISPER_EJLCKABLE Indicates whether the period can be journal locked. Byte HYPBOOL
DATAFILE_ISPER_EJUNLCKABLE Indicates whether the period can be journal unlocked. Byte HYPBOOL
DATAFILE_ISPER_LCKABLE Indicates whether the period can be locked. Byte HYPBOOL
DATAFILE_ISPER_UNLCKABLE Indicates whether the period can be unlocked. Byte HYPBOOL
PARENT Get parent/child status for each requested period. Array of Integers Array of shorts
Note: Results for the following query attributes are returned in both the data buffer and thestatus buffer, the lpimrData and lpseStatus addresses in the apiStruct: DATAFILE_GETDATAFILE_GET_BAS DATAFILE_GET_BASFLO DATAFILE_GET_CUMDATAFILE_GET_OPE DATAFILE_GET_OPEMUST DATAFILE_GET_PREDATAFILE_GETSTATUS To interpret the status code for each period, see the DF_...status type definitions in the TOOLINC.H file.
Note: The ACCT_TYPE query attribute requires an apiStruct with the fields shown inTable 93.
Nondefault Query Attributes 379
Table 93 Fields for apiStruct
Field Description
sigCat The category signature.
sigName The entity signature.
u_Dfa.sigAcct The account signature.
The value returned in pzBuf is LOGIC_CALC, LOGIC_INPUT, or LOGIC_LINPUT.
Note: The DATAFILE_GETACCTLIST query attribute requires an apiStruct with the fieldsshown in Table 94.
Table 94 Fields for apiStruct
Field Description
u_ApiQry.pad Datafile enumeration filters. See 0, DF_FILTOUT_CALC, and DF_FILTOUT_NODATA, and the toolkit.bas file.
u_ApiQry.pad2 Number of entries that the buffer can hold.
Note: The last entry in the buffer will be set to NONE by this call, so allocate the buffer by((#ofAccts + 1) * sizeof(SIGNA)). The DATAFILE_GETACCTLIST query attribute waswritten exclusively to improve performance of data extract in Hyperion Enterprise. Itdoes not use the sigRecd, SigKey, or dwLen arguments to EntQueryEx(). It assumes thatthe buffer is large enough and does not check the size. You must allocate the buffer largeenough for one more than the number of records, otherwise you will overwrite memory.
ID_FORMATS (Formats Table) Query AttributesTable 95 lists the query attributes for the Formats table.
Table 95 ID_FORMATS Table Query Attributes
Query Description VB Type C Type
FORMAT_ACONVSIG Account conversion table signature. Long SIGNA
FORMAT_DECIMALS Number of decimals. Integer short
FORMAT_DELIMITER String delimiter. Byte UCHAR
FORMAT_EXTRACT_DERIVED Suppress ZEROS NODATA. Byte char
FORMAT_FILESPEC File spec (*.DAT). String LPSTR
FORMAT_NCONVSIG Name conversion table signature. Long SIGNA
FORMAT_NEG Negative delimiter. Byte UCHAR
380 Query Attributes
Query Description VB Type C Type
FORMAT_OPCODE Opcode (multiply, divide, or none). Byte char
FORMAT_OPERAND Operand (number used with opcode). Double double
FORMAT_SCALE Scale of the data. Integer short
FORMAT_SUPRESS Suppress ZEROS NODATA. Byte UCHAR
FORMAT_USE Format use LOAD / EXTRACT. Byte char
FORMAT_VIEW Data view, such as YTD, PER, CATEGORY. Byte char
ID_FORMULAS (Formulas Table) Query AttributesThis table contains the individual logic statements for each logic method stored in the Logictable (ID_LOGIC). Table 96 lists the query attributes for the Formulas table.
Table 96 ID_FORMULAS Table Query Attributes
Query Description VB Type C Type
FORMULA_ACCOUNT Account signature for formula. Long SIGNA
FORMULA_CAT_HAS_LOGIC Checks if a category has logic.
FORMULA_CATEGORY Category for this formula. Long SIGNA
FORMULA_COMMENT Comment for this statement. String LPSTR
FORMULA_COMMENT_SZ Size this comment. Long LONG
FORMULA_ERROR_CODE Error code (string resource). Long LONG
FORMULA_ERROR_SIG Formula signature that had error. Long SIGNA
FORMULA_STATEMENT The actual statement. String LPSTR
FORMULA_STATEMENT_SZ Size of this statement. Long LONG
ID_FREQUENCY (Frequencies Table) Query AttributesTable 97 lists the query attributes for the Frequencies table.
Table 97 ID_FREQUENCY Table Query Attributes
Query Description VB Type C Type
FREQ_BASEPERIOD Long SIGNA
FREQ_FISCALSAME Integer short
Nondefault Query Attributes 381
Query Description VB Type C Type
FREQ_FISCALSTART Integer short
FREQ_LITTOSIG Get frequency signature from period ID. See Note 1. Long SIGNA
FREQ_MAP_PERIODS See Note 3. Integer short
FREQ_NUMPERYEAR Number of frequency units in a year. Integer short
FREQ_PERLONG Description of the period in the frequency. See Note 4. String LPSTR
FREQ_PERSHORT ID of the period in the frequency. See Note 4. String LPSTR
FREQ_RPTFREQ Get associated reporting frequency. See Note 2. Long SIGNA
Note: The FREQ_LITTOSIG query attribute requires an apiStruct with the lpString field set tothe address of the literal period string, such as "Q1."
Note: The FREQ_RPTFREQ query attribute converts a Hyperion Enterprise frequency and viewto the corresponding reporting frequency. Pass the signature of the Hyperion Enterprisefrequency as the record signature (sigRecd argument). Pass the Hyperion Enterprise viewas the sigKey argument.
Note: The FREQ_MAP_PERIODS query attribute converts a period in one frequency to theequivalent period in another frequency. This query attribute requires an apiStruct withits u_ApiQry.sPeriod_Base field set to the signature of the base frequency, and itslStartPeriod field set to the period number (in the base frequency). The sigRecd argumentin EntQueryEx() or HypQueryEx() is the signature of the frequency to which you wantto map the period. On return, pzBuf will be the period number or the constantBAD_PERIOD. The return code is always 0. Also, see the CAT_MAPPERIOD queryattribute in the ID_CATEGORY Query Attributes table.
Note: For the FREQ_PERLONG and FREQ_PERSHORT query attributes, pass the periodnumber as the sigKey argument.
ID_GROUP (Account Groups Table) Query AttributesMost of the query attributes for this table are default values used when a new account is addedto the group. Table 98 lists the query attributes for the Account Groups table.
Table 98 ID_GROUPS Table Query Attributes
Query Description VB Type C Type
ACCT_DECIMALS Number of decimals to display. Integer short
382 Query Attributes
Query Description VB Type C Type
ACCT_IS_BALANCE Indicates whether the account is a balance account, TRUE (1) or FALSE (0). Byte HYPBOOL
ACCT_IS_CONSOLIDATE Indicates whether the account is a consolidation account, TRUE (1) or FALSE (0). Byte HYPBOOL
ACCT_IS_CURRENCY Indicates whether Currency translation should be applied, TRUE (1) or FALSE (0). Byte HYPBOOL
ACCT_IS_DYNAMIC Indicates whether the account is a dynamic account, TRUE (1) or FALSE (0). Byte HYPBOOL
ACCT_IS_SCALE Indicates whether the account is a scaled account, TRUE (1) or FALSE (0). Byte HYPBOOL
ACCT_IS_SINGLELEVEL Limit accounts to one level, TRUE (1) or FALSE (0). Byte HYPBOOL
ACCT_SUBACCT_TABLE Get sub-account signature. Long SIGNA
ACCT_SUBACCT_TYPE Get sub-account type: Fixed, Validated, or None. Byte char
ACCT_TYPE Type of account. Integer short
CODE Signature of user-defined code. Long SIGNA
GRPACCT_CHARTORDER Signature of first account in the group. Long SIGNA
ID_HAPP (Application Information Table) Query AttributesThe query attributes in Table 99 are used with EntQueryDefault( ). You can also use them withHypQueryEx( ) or EntQueryEx( ). Default queries do not apply to this table.
Table 99 ID_HAPP Table Query Attributes
Query Description VB Type C Type
HYP_HAPP_IS_SILENT Do not display error messages on screen. Intended for use by server applications whereit is not practical to display an error message.
Byte HYPBOOL
HYP_PASSWORD Password of the current user. String LPSTR
HYP_SERVER_AVAIL Indicates whether an application uses client-server options and the client-server DLL isavailable. TRUE (1) or FALSE (0).
Byte HYPBOOL
HYP_USERID User ID for the current user. String LPSTR
ID_ICSET (Intercompany Matching Sets Table) QueryAttributesThe intercompany accounts in each set are in the Intercompany Detail table (ID_INTCODET).Table 100 lists the query attributes for the Intercompany Matching Sets table.
Nondefault Query Attributes 383
Table 100 IC_ICSET Table Query Attributes
Query Description VB Type C Type
INTCO_GROUPSIG Signature of first detail record in table ID_INTCODET. Long SIGNA
INTCO_PLUGSIG Signature of plug account. Long SIGNA
ID_INTCODET (Intercompany Detail Table) Query AttributesThis table contains the pairs of intercompany accounts for each intercompany matching set inthe Intercompany Matching Sets table (ID_ICSET). Table 101 lists the query attributes for theIntercompany Detail table.
Table 101 ID_INTCODET Table Query Attributes
Query Description VB Type C Type
INTCO_ACCTSIG1 Signature of one intercompany account. Long SIGNA
INTCO_ACCTSIG2 Signature of the matching account. Long SIGNA
INTCO_NEXTDET Signature of the next detail record in the set, or NONE if no more details. Long SIGNA
ID_JOURNAL_DETAIL (Journals Detail Table) Query AttributesThis table contains the detail records for each journal in the Journals table (ID_JOURNALS).Default queries do not apply to this table. Table 102 lists the query attributes for the JournalsDetail table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOURERR_INVATTR is not defined in the TOOLINC.H file. You mustdefine it yourself. The value is 13.
Table 102 ID_JOURNAL_DETAIL Table Query Attributes
Query Description VB Type C Type
JOUR_ACCT_SIG Affected account. Long SIGNA
JOUR_CREDIT_AMOUNT Value entered in the credit column. Double double
JOUR_DEBIT_AMOUNT Value entered in the debit column. Double double
JOUR_DETAIL_IS_COMPLETE Byte HYPBOOL
JOUR_DETAIL_IS_DELETED TRUE (1) if the record is deleted. Byte HYPBOOL
JOUR_ENTITY_SIG Affected entity for this detail. Long SIGNA
384 Query Attributes
Query Description VB Type C Type
JOUR_JOURNAL_SIG Journal to which this detail applies. Long SIGNA
JOUR_NEXT_DET_SIG Next detail in the table. Long SIGNA
JOUR_NEXT_JRNL_DET_SIG Next detail for this journal. Long SIGNA
JOUR_OWNER_TABID Table ID of the detail's owner. Integer short
JOUR_PERIOD_NUM Period number to which the journal applies. Long long
The JOUR_JOURNAL_SIG, JOUR_NEXT_DET_SIG, JOUR_NEXT_JRNL_DET_SIG, andJOUR_OWNER_TABID query attributes require an apiStruct with the fields shown inTable 103.
For the JOUR_PERIOD_NUM query attribute, you do not need to specify the 1StartPeriod and1EndPeriod fields in the apiStruct, however you do need to specify the sigCat field in theapiStruct.
Table 103 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_JOURNAL_HISTORY (Journals History Table) QueryAttributesThe detail records for each journal history record are stored in the Journals History Detail table(ID_JOURNAL_HISTORY_DETAIL). Default queries do not apply to this table. Table 104 liststhe query attributes for the Journals History table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOURERR_INVATTR is not defined in the TOOLINC.H file. You mustdefine it yourself. The value is 13.
Table 104 ID_JOURNAL_HISTORY Table Query Attributes
Query Description VB Type C Type
JOUR_AFFECTED_PARENT Parent of entity to which the journal applies. Long SIGNA
JOUR_ATTRIB Specifies the journal as balanced or unbalanced. Byte UCHAR See Note 2below.
Nondefault Query Attributes 385
Query Description VB Type C Type
JOUR_AUTONUMBER The automatically generated journal number. Long long
JOUR_CODE_SIG The code signature. Long SIGNA
JOUR_CREATE_DATETIME local date and time of entry of user. Long time_t See Note 1below.
JOUR_CREATED_BY_USER_ID ID of the user who entered this journal. String LPSTR
JOUR_DETAIL_SIG The signature of the first detail for the journal. Long SIGNA
JOUR_DETAIL_TABID ID of the applicable detail table. Integer short
JOUR_ISBALANCED TRUE (1) if journal is balanced. Byte HYPBOOL
JOUR_ISCOMPLETE Byte HYPBOOL
JOUR_DIFFERENCE The difference between total debits and credits in the journal. Double double
JOUR_JOURNAL_NAME Name of journal (unique within category and period). String LPSTR
JOUR_JOURNAL_STATUS Specifies the journal status as Posted, Unposted, Reviewed,Edited, or Deleted.
Integer short
JOUR_PERIOD_NUM Period number to which the journal applies. Long long
JOUR_PERIODIC_FLAG TRUE (1) if post-periodic, or FALSE (0) if period-to-date. Byte HYPBOOL
JOUR_POST_DATETIME Local date and time of post. Long time_t See Note 1below.
JOUR_POSTED_BY_USER_ID ID of the user who posted this journal. String LPSTR
JOUR_REVIEWED_BY_USER_ID ID of the user who reviewed this journal. String LPSTR
JOUR_REVIEWED_DATETIME Local date and time of review. Long time_t See Note 1below.
JOUR_TOTAL_CREDITS Total of all journal detail credits. Double double
JOUR_TOTAL_DEBITS Total of all journal detail debits. Double double
JOUR_TYPE Specifies the journal type as Auto-Reversing, Top-level or Regular. Byte UCHAR
JOURHIST_NEXT_HIST_SIG First entry for this journal in the History Detail table. Long SIGNA
Note: The time_t type is defined as the number of seconds since midnight January 1, 1970. InMicrosoft's Visual C, you use the localtime() function to convert the time_t value to a tmstruct (another Microsoft C type) that has individual fields for the various componentsof the date and time (day, month, year, hour, minute, and more). For more information,see Microsoft's documentation (MSDN - Microsoft Developers' Network).
Note: The JOUR_ATTRIB query attribute returns the following constants:
386 Query Attributes
l JOUR_ATTRIB_BALANCED
l JOUR_ATTRIB_UNBALANCED
l JOUR_ATTRIB_BAL_BY_ENTITY
All query attributes for this table require an apiStruct with the fields shown in Table 105.
Table 105 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_JOURNAL_HISTORY_DETAIL (Journals History DetailTable) Query AttributesThis table contains the detail records for each journal history record in the Journals History table(ID_JOURNAL_HISTORY). Default queries do not apply to this table. Table 106 lists the queryattributes for the Journals History Detail table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOUERR_INVATTR is not defined in the TOOLINC.H file. You mustdefine it yourself. The value is 13.
Table 106 ID_JOURNAL_HISTORY_DETAIL Table Query Attributes
Query Description VB Type C Type
JOUR_ACCT_SIG Affected account. Long SIGNA
JOUR_CREDIT_AMOUNT Value entered in the credit column. Double double
JOUR_DEBIT_AMOUNT Value entered in the debit column. Double double
JOUR_DETAIL_IS_COMPLETE TRUE (1) if detail is complete. Byte HYPBOOL
JOUR_DETAIL_IS_DELETED TRUE (1) if record is deleted. Byte HYPBOOL
JOUR_ENTITY_SIG Affected entity for this detail. Long SIGNA
JOUR_JOURNAL_SIG Journal to which this detail applies. Long SIGNA
JOUR_NEXT_DET_SIG Next detail in the table. Long SIGNA
JOUR_NEXT_JRNL_DET_SIG Next detail for this journal. Long SIGNA
Nondefault Query Attributes 387
Query Description VB Type C Type
JOUR_OWNER_TABID Table ID of the detail's owner. Integer short
JOUR_PERIOD_NUM Period number to which the journal applies. Long long
All query attributes for this table require an apiStruct with the fields shown in Table 107.
Table 107 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_JOURNAL_PERIOD_INFO (Journal Period InformationTable) Query AttributesDefault queries do not apply to this table. You can pass HYP_NONE (NONE in C) as the recordsignature. Table 108 lists the query attributes for the Journal Period Information table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOURERR_INVATTR is not defined in the TOOLINC.H file. You mustdefine it yourself. The value is 13.
Table 108 ID_JOURNAL_PERIOD_INFO Table Query Attributes
Query Description VB Type C Type
JOURPER_IS_PERIOD_OPENED TRUE (1) if the period is open Byte HYPBOOL
JOURPER_NEXT_PERIOD_TO_OPEN Number of the next unopened period. Long long
JOURPER_PERIOD_NUMBER Period number to which the journal applies. Long long
All query attributes for this table require an apiStruct with the fields shown in Table 109.
Table 109 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
388 Query Attributes
ID_JOURNAL_TEMPLATES (Journal Templates Table) QueryAttributesThis table stores journal templates. The detail records for each journal template are stored inthe Journal Templates Detail table, ID_JOURNAL_TEMPLATES_DETAIL. Default queries donot apply to this table. Table 110 lists the query attributes for the Journals Templates table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOURERR_INVATTR is not defined in the toolinc.h file. You must defineit yourself. The value is 13.
Table 110 ID_JOURNAL_TEMPLATES Table Query Attributes
Query Description VB Type C Type
JOUR_AFFECTED_PARENT Parent of entity to which journal applies. Long SIGNA
JOUR_ATTRIB Specifies the journal as Balanced or Unbalanced. See Note 2 below. Byte UCHAR
JOUR_CODE_SIG The code signature. Long SIGNA
JOUR_CREATE_DATETIME User's local date and time of entry. Long time_t See Note 1below.
JOUR_CREATED_BY_USER_ID ID of the user who entered this journal. String LPSTR
JOUR_DETAIL_SIG The signature of the first detail for the journal template. Long SIGNA
JOUR_DETAIL_TABID ID of the applicable detail table. Integer short
JOUR_DIFFERENCE The difference between total debits and credits in the journal. Double double
JOUR_ISBALANCED TRUE (1) if journal is balanced. Byte HYPBOOL
JOUR_ISCOMPLETE Byte HYPBOOL
JOUR_JOURNAL_NAME Name of journal (unique within category and period). String LPSTR
JOUR_PERIODIC_FLAG TRUE (1) if post periodic, or FALSE (0) if period-to-date. Byte HYPBOOL
JOUR_TEMPLATE_TYPE Type of journal template (standard or recurring). See Note 3 below. Byte UCHAR
JOUR_TOTAL_CREDITS Total of all journal detail credits. Double double
JOUR_TOTAL_DEBITS Total of all journal detail debits. Double double
JOUR_TYPE Specifies the journal type as auto-reversing, top-level or regular. Byte UCHAR
Nondefault Query Attributes 389
Note: The time_t type is defined as the number of seconds since midnight January 1, 1970. InMicrosoft's Visual C, you use the localtime() function to convert the time_t value to a tmstruct (another Microsoft C type) that has individual fields for the various componentsof the date and time (day, month, year, hour, minute, and more). For more information,see Microsoft's documentation (MSDN - Microsoft Developers' Network).
Note: The JOUR_ATTRIB query attribute returns the following constants:
l JOUR_ATTRIB_BALANCED
l JOUR_ATTRIB_UNBALANCED
l JOUR_ATTRIB_BAL_BY_ENTITY
For more information on these constants, see the “ID_JOURNALS (Journals Table) QueryAttributes” on page 391.
Note: The JOUR_TEMPLATE_TYPE query attribute returns the following constants:
l JOUR_TEMPLATE_STANDARD (1)
l JOUR_TEMPTYPE_RECURRING (2)
The constants for the JOUR_TEMPLATE_TYPE query attribute are not defined in theTOOLINC.H file, so you must define them.
All query attributes for this table require an apiStruct with the fields shown in Table 111.
Table 111 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_JOURNAL_TEMPLATES_DETAIL (Journal Templates DetailTable) Query AttributesThis table contains the detail record for each journal template in the Journal Templates table(ID_JOURNAL_TEMPLATES). Default query attributes do not apply to this table. Table 112lists the query attributes for the Journal Templates Detail table.
390 Query Attributes
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOURERR_INVATTR is not defined in the toolinc.h file. You must defineit yourself. The value is 13.
Table 112 ID_JOURNAL_TEMPLATES_DETAIL Table Query Attributes
Query Description VB Type C Type
JOUR_ACCT_SIG Affected account. Long SIGNA
JOUR_CREDIT_AMOUNT Value entered in the credit column. Double double
JOUR_DEBIT_AMOUNT Value entered in the debit column. Double double
JOUR_DETAIL_IS_COMPLETE TRUE (1) if detail is complete. Byte HYPBOOL
JOUR_DETAIL_IS_DELETED TRUE (1) if record is deleted. Byte HYPBOOL
JOUR_ENTITY_SIG Affected entity for detail. Long SIGNA
JOUR_JOURNAL_SIG Journal to which this detail applies. Long SIGNA
JOUR_NEXT_DET_SIG Next detail in the table. Long SIGNA
JOUR_NEXT_JRNL_DET_SIG Next detail for this journal. Long SIGNA
JOUR_OWNER_TABID Table ID of the detail's owner. Integer short
JOUR_PERIOD_NUM Period number to which this journal applies. Long long
All query attributes for this table require an apiStruct with the fields shown in Table 113.
Table 113 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_JOURNALS (Journals Table) Query AttributesThe detail records for each journal are stored in the Journals Detail table,ID_JOURNAL_DETAIL. Table 114 lists the query attributes for the Journals table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return theerror code JOUERR_INVATTR if you use a query attribute that is not valid for thatparticular table. JOURERR_INVATTR is not defined in the toolinc.h file. You must defineit yourself. The value is 13.
Nondefault Query Attributes 391
Table 114 ID_JOURNALS Table Query Attributes
Query Description VB Type C Type
JOUR_AFFECTED_PARENT Used for parentadjustment only. Long SIGNA
JOUR_ATTRIB Specifies the journal as Balanced or Unbalanced. UCHAR
JOUR_AUTONUMBER The automatically generated journal number. Long long
JOUR_CODE_SIG The code signature. Long SIGNA
JOUR_CREATE_DATETIME Local date and time of entry of user. Long time_t See Notebelow.
JOUR_CREATED_BY_USER_ID ID of the user who entered this journal. String LPSTR
JOUR_DETAIL_SIG The signature of the first detail for the journal. Long SIGNA
JOUR_DETAIL_TABID ID of the applicable detail table. Integer short
JOUR_DIFFERENCE The difference between total debits and credits in the journal. Double double
JOUR_HIST_SIG The first entry for this journal in the Journal History table, ID_JOURNAL_HISTORY.
Long SIGNA
JOUR_ISBALANCED TRUE (1) if this journal is balanced. Byte HYPBOOL
JOUR_ISBALANCEDBYNAME TRUE (1) if this journal is balanced. Byte HYPBOOL
JOUR_ISCOMPLETE TRUE (1) if this journal is complete. Byte HYPBOOL
JOUR_ISEDITABLE TRUE (1) if this journal is editable. Byte HYPBOOL
JOUR_ISPOSTABLE TRUE (1) if this journal is postable. Byte HYPBOOL
JOUR_ISREVERSABLE TRUE (1) if this journal is reversible. Byte HYPBOOL
JOUR_ISREVIEWABLE TRUE (1) if this journal is reviewable. Byte HYPBOOL
JOUR_ISUNPOSTABLE TRUE (1) if this journal is unpostable. Byte HYPBOOL
JOUR_JOURNAL_NAME Name of journal, which is unique within category and period. String LPSTR
JOUR_JOURNAL_STATUS Specifies the journal status as Posted, Unposted, Reviewed, Edited,or Deleted.
Integer short
JOUR_PERIOD_NUM Period number to which the journal applies. Long long
JOUR_PERIODIC_FLAG TRUE (1) if post periodic, or FALSE (0) if period-to-date. Byte HYPBOOL
JOUR_POST_DATETIME Local date and time of post. Long time_t See Notebelow.
JOUR_POSTED_BY_USER_ID ID of the user who posted this journal. String LPSTR
JOUR_REVIEWED_BY_USER_ID ID of the user who reviewed this journal. String LPSTR
392 Query Attributes
Query Description VB Type C Type
JOUR_REVIEWED_DATETIME Local date and time of review. Long time_t See Notebelow.
JOUR_TOTAL_CREDITS Total of all journal detail credits. Double double
JOUR_TOTAL_DEBITS Total of all journal detail's debits. Double double
JOUR_TYPE Specifies the journal type as Auto-reversing, Parent or Regular. Byte UCHAR
Note: The time_t type is defined as the number of seconds since midnight January 1, 1970. InMicrosoft's Visual C, you use the localtime() function to convert the time_t value to a tmstruct (another Microsoft C type) that has individual fields for the various componentsof the date and time (day, month, year, hour, minute, and more). For more information,see Microsoft's documentation (MSDN - Microsoft Developers' Network). All of theconstants are defined in the toolinc.h file.
All query attributes for this table require an apiStruct with the fields shown in Table 115.
Table 115 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_LOGIC (Methods Table) Query AttributesThis table contains the available methods in the system. See the record signatures for variousdefault methods in the toolinc.h file. Table 116 lists the query attributes for the Methods table.
Table 116 ID_LOGIC Table Query Attributes
Query Description VB Type C Type
CODE User-defined code. Long SIGNA
INVALID Validate flag for methods. Byte char
LOGIC_TYPE Logic type: Chart or Consolidation. Integer short
NUM_NAMES Number of entities to view. Integer short
Nondefault Query Attributes 393
ID_LOGIC_CAT_ATTRIB (Logic Category Attributes Table)Query AttributesTable 117 lists the query attributes for the Logic Category Attribute table.
Table 117 ID_LOGIC_CAT_ATTRIB Table Query Attributes
Query Description VB Type C Type
CATATTR_ATTRIBUTE Category attributes Integer Word
CATATTR_CONSOL Consol option Byte Uchar
CATATTR_ELIM Elim option Byte Uchar
CATATTR_MAINCAT Signature of category these attributes apply to Long SIGNA
CATATTR_NOCONSOL NoConsol option Byte Uchar
CATATTR_NOELIM NoElim option Byte Uchar
CATATTR_NOROUND No rounding option Byte Uchar
CATATTR_NOTRANS Notrans option Byte Uchar
CATATTR_ROUND Rounding option Byte Uchar
CATATTR_TRANS TRANS option Byte Uchar
ID_NAMECONVERT (Entity Conversion Table) Query AttributesThis table contains the entries for each entity conversion list in the Entity Conversion List table(ID_NAMECVTLIST). Each entry includes the Hyperion Enterprise entity and the externalname used for conversion. The default query attributes NAME and SHORTNAME return theexternal name. Table 118 the query attributes for the Entity Conversion table.
Table 118 ID_NAMECONVERT Table Query Attributes
Query Description VB Type C Type
NCONV_ADD_SUB Add or subtract. Integer short
NCONV_HYPNAME Hyperion Enterprise entity. String LPSTR
NCONV_SIG Entity signature. Long SIGNA
ID_NAMECVTLIST (Entity Conversion Table) Query AttributesThis table contains information about the entity conversion lists in the application. The entriesfor each entity conversion table are stored in the Entity Conversion table(ID_NAMECONVERT). Table 119 lists the query attributes for the Entity Conversion table.
394 Query Attributes
Table 119 ID_NAMECVTLIST Table Query Attributes
Query Description VB Type C Type
FIRST_ENTRY First entry in the Entity Conversion table. Long SIGNA
LIST_DIRECTION Direction: E to extract from Hyperion Enterprise, L to load into Hyperion Enterprise, or B for bothdirections.
Byte char
ID_NAMELIST (Entity Table) Query AttributesThis table contains information about the entity lists in the application. The entities in eachentity list are stored in the Entity List Entry table (ID_NAMELISTENTRY). Table 120 lists thequery attributes for the Entity table.
Table 120 ID_NAMELIST Table Query Attributes
Query Description VB Type C Type
FIRST_ENTRY First entry in the Entity List Entry table, ID_NAMELISTENTRY. Long SIGNA
LIST_TYPE List type: F for fixed or D for dynamic. Integer short
ID_NAMELISTENTRY (Entity List Entry Table) Query AttributesThis table stores the entries in the entity list specified in the Entity List table (ID_NAMELIST)if it is a fixed list. If the record signature (sigRecd argument) is HYP_NONE (NONE in C) andthe entity list is a fixed list (as opposed to dynamic), then the query attributes will query the firstentry for the list.
The Entity List Entry table contains a record for each entry in a fixed list, and a criteria recordfor each entity list (fixed or dynamic). A dynamic entity list contains only a criteria record inthis table. The criteria record contains the criteria used to create the entity list.
Table 121 lists all the query attributes that apply to fixed list entries. Default queries NAME,SHORTNAME, QRYNEXT, and QRYFIRST apply only to fixed lists.
Table 121 ID_NAMELISTENTRY Query Attributes for Fixed List Entries
Query Description VB Type C Type
ENTRY_SIG Entity signature of list entry. Long SIGNA
FIRST_ENTRY Get signature of first entry. Long SIGNA
Table 122 lists all the query attributes that apply to criteria records.
Table 122 ID_NAMELISTENTRY Query Attributes for Criteria Records
Query Description VB Type C Type
ALL_DEPS Include all dependents. Byte HYPBOOL
Nondefault Query Attributes 395
Query Description VB Type C Type
BASE_NAMES Include base entities. Byte HYPBOOL
CHART_DATA Selected chart methods. Array of Longs Array of SIGNA
CODE_DATA Selected codes. Array of Longs Array of SIGNA
CONSOL_DATA Consolidation methods. Array of Longs Array of SIGNA
CURRENCY_DATA Selected currencies. Array of Longs Array of SIGNA
DUP_NAMES Allow duplicate entities. Byte HYPBOOL
ELIM_NAMES Include only elimination names. Byte HYPBOOL
IMMED_DEPS Include immediate dependents. Byte HYPBOOL
INTCO_NAMES Include only intercompany entities. Byte HYPBOOL
JOURNAL_NAMES Include only journal entities. Byte HYPBOOL
NAME_DATA Selected entities. Array of Longs Array of SIGNA
NUM_CHART Number of chart methods. Long long
NUM_CODES Number of codes. Long long
NUM_CONSOL Number of consolidation methods. Long long
NUM_CURRENCY Number of currencies. Long long
NUM_NAMES Number of entities specified. Long long
NUM_ORGS Number of organizations to view. Long long
NUM_SUBNAMES Number of subentities. Long long
NUM_SUBSTRUCTS Number of substructures. Long long
NUM_TRANS Number of translation methods. Long long
ORG_DATA Organization data. Array of Longs Array of SIGNA
PARENT_NAMES Include parent entities. Byte HYPBOOL
SUBNAMES Show subentities. Byte HYPBOOL
SUBNAME_DATA Selected subentities. Array of Longs Array of SIGNA
SUBSTRUCT_DATA Selected substructures. Array of Longs Array of SIGNA
TRANS_DATA Translation methods. Array of Longs Array of SIGNA
396 Query Attributes
ID_NAMES (Entities Table) Query AttributesFor all query attributes other than the default query attributes, you can suppress the sub-entityto get information about only the specified major entity component of the specified entity. Thisoption requires an apiStruct with the u_ApiQry.bSupSubNames field set to TRUE (1).Table 123 lists the query attributes for the Entities table.
Table 123 ID_NAMES Table Query Attributes
Query Description VB Type C Type
ALLOW_TOPADJ Indicates whether parent adjustments are allowed for this entity. TRUE(1) or FALSE (0).
Byte HYPBOOL
CHART_TOPADJ Signature of chart method for the parent adjustment. Long SIGNA
CHARTMETHOD Chart method signature. Long SIGNA
CODE User-defined code. Long SIGNA
CURRENCY Currency. Long SIGNA
DESC Get combination of entity and sub-entity descriptions. String LPSTR
ELIMINATIONS Indicates whether the entity is an elimination entity. TRUE (1) or FALSE(0).
Byte HYPBOOL
HOLDING_COMPANY Signature of holding company. Long SIGNA
INTERCOMPANY Indicates whether the entity is an intercompany entity. TRUE (1) orFALSE (0).
Byte HYPBOOL
JOURNALS Indicates whether the entity allows journals. TRUE (1) or FALSE (0). Byte HYPBOOL
NAME Get the concatenated entity.subentity ID. String LPSTR
NAME_COMBINE_VSIGS Get the signature of a given entity and sub-entity combination. SeeNote
Long SIGNA
NAME_ENT_CODES Returns the entity code by period from shares if there is one for theentity. See Note 2.
Long or Arrayof Longs
SIGNA or Arrayof SIGNA
NAME_IN_ORG Indicates whether the specified entity exists in the specifiedorganization. TRUE (1) or FALSE (0). See Note 3.
Byte HYPBOOL
NAME_IS_HOLDING_COMPANY
Indicates whether the entity is a holding company for an entity. TRUE(1) or FALSE (0).
Byte HYPBOOL
NAME_IS_JOURPOSTED Indicates whether the specified entity has a journal posted to it. TRUE(1) or FALSE (0).
Byte HYPBOOL
NAME_IS_JOURPARPOSTED Indicates whether the specified entity has a parent journal posted.TRUE (1) or FALSE (0).
Byte HYPBOOL
NAME_IS_VALID_FOR_DATA Indicates whether you can enter data for the entity. TRUE (1) or FALSE(0). See Note 4.
Byte HYPBOOL
NAME_MAJOR Returns just the major entity signature for this entity. Long SIGNA
Nondefault Query Attributes 397
Query Description VB Type C Type
NAME_PARENT_NODE Returns the node for this entity and parent combination. Long SIGNA
NAME_SPLIT_VSIGS Returns the major entity and sub-entity signatures for the entity. SeeNote 5.
Long SIGNA
NAMEWITHSUB Query for entities. If you send EUROFF and it has a substructure, returnsEUROFF.PTADJ.
Long SIGNA
PAR_CHILD_STAT Get status: Parent, Child, or Inactive. See Note 6. Integer short
PARENT Get status: Parent, Child, or Inactive. See Note 6. Integer short
PARENT_IN_ANY_CAT Returns PARENT_ACTIVE if the entity is a parent in any category. Integer short
SCALE Scaling. Byte char
SCALE_FACTOR Scale factor, such as 1000. Double double
STOREAUDITDET Indicates whether audit detail information is saved duringconsolidation. TRUE (1) or FALSE (0).
Byte HYPBOOL
SUB-NAME Subentity signature. Long SIGNA
SUBSTRUCT Associated substructure signature. NONE if no substructure. Long SIGNA
Note: The NAME_COMBINE_VSIGS query attribute requires an apiStruct with theu_ApiQry.sigSub field set to the signature of the sub-entity. On return, pzBuf containsthe resultant signature or NONE. The query function returns one of the following codes:
Return Codes:
Code Meaning
0 Successful.
NAME_FULL_0SUBSUSED The entity signature already had a sub-entity.
NAME_SUBSNOTVALID No sub-entity, or an invalid sub-entity was specified.
NONE No apiStruct, or any other error.
Note: Use the NAME_ENT_CODES query attribute to get the signature of the code associatedwith the entity regardless of whether it comes from the Entities table (ID_NAMES) orfrom the Shares table (ID_SHARES). This query attribute only requires an apiStruct ifyou want to get the entity code by period. Set the fields shown in Table 124 in the apiStruct:
398 Query Attributes
Table 124 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
If a range of periods is specified (lStartPeriod to lEndPeriod), then pzBuf must be large enoughfor one signature for each period. If the application is not set up to use dynamic organizations,then only one code signature is returned in pzBuf, regardless of whether you pass an apiStructspecifying the period.
Note: The NAME_IN_ORG query attribute requires an apiStruct with the sigName field set tothe signature of the organization.
Note: When using the NAME_IS_VALID_FOR_DATA query attribute, if the entity has anattached substructure, you can enter data only to an entity.subentity combination. Forexample, you could enter data for FRANCE.ADJ but not for FRANCE.NAME_IS_VALID_FOR_DATA returns TRUE (1) in pzBuf if the entity is such acombination or if no substructure is attached.
Note: The NAME_SPLIT_VSIGS query attribute requires an apiStruct with the signature of themajor entity returned in pzBuf, and the signature of the sub-entity returned inu_ApiQry.sigSub.
Note: When using the PAR_CHILD_STAT query attribute, if the entity is a parent entity,pzBuf is PARENT_ACTIVE on return. If the entity is a child entity, pzBuf returnsCHILD_ACTIVE. If the entity is not active in all specified periods, pzBuf returnsNAME_INACTIVE.
This query attribute requires an apiStruct if the application is set up to use dynamicorganizations. Set the fields shown in Table 125 in the apiStruct.
Table 125 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
lpseStatus NULL, or the address of the status buffer. This field must be large enough for an integer (short in C) for each period in thespecified range. If this field is not NULL, the values will be returned in the status buffer by period, instead of in pzBuf.
Nondefault Query Attributes 399
ID_NODES (Nodes Table) Query AttributesDefault query attributes do not apply to this table. If you specify a range of periods, the buffermust be large enough to hold the return values for all periods in the range. Table 126 lists thequery attributes for the Nodes table.
Table 126 ID_NODES Table Query Attributes
Query Description VB Type C Type
ADDFLAG Zero value indicates that data should be added to the parent, nonzero value indicatesthat data should be subtracted from the parent.
Integer short
CHILD Signature of child node. See Note. Long SIGNA
COUNT Count of items in the table. Long long
HIDEDEPS Hide dependents. Byte HYPBOOL
NAME_MAJOR Returns just the major entity signature for this entity. Long SIGNA
NAMEID Entity signature with implied sub-entity if one exists. Long SIGNA
NAMESIG Entity signature without implied sub-entity if one exists. Long SIGNA
NEXTPARENT Next parent. Long SIGNA
NODE_CONSOLIDATABLE Byte HYPBOOL
NODEBYPER_ACTIVE Zero value indicates that the node is inactive in the specified period or periods,otherwise the node is active.
Byte HYPBOOL
NODEBYPER_ACTIVE_OR Byte HYPBOOL
NODEBYPER_CONLOGIC Parent consolidation method to use when performing a consolidation of the child. Long SIGNA
NODEBYPER_ISACTIVE Byte HYPBOOL
NODEBYPER_ISACTIVE_OR Byte HYPBOOL
NODEBYPER_PCTCONSOL Parent percentage to consolidate of the child. Double double
NODEBYPER_PCTCONTROL Parent percentage control of the child. Double double
NODEBYPER_PCTOWNED Parents percentage ownership of the child. Double double
PARENT Parent node. Long SIGNA
SIBLING Signature of sibling node. Long SIGNA
TRANSMETHOD Parent translation method to use when performing a consolidation of the child. Long SIGNA
Note: If you want to suppress subentities with the CHILD query attribute, set theu_ApiQry.bSupSubNames field in the apiStruct to TRUE (1).
400 Query Attributes
If the application is set up to use dynamic organizations, all the query attributes for this tablerequire an apiStruct with the fields shown in Table 127.
Table 127 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
ID_ORGANIZATION (Organizations Table) Query AttributesTable 128 lists the query attributes for the Organizations table.
Table 128 ID_ORGANIZATION Table Query Attributes
Query Description VB Type C Type
SUBSTRUCT Substructure signature. Long SIGNA
TOPNODE Signature of top node in organization. Long SIGNA
For more information on the TOPNODE query attribute, see “HypGetTopNodeEx( ) - Get TopNode” on page 101.
ID_PERIOD (Periods Table) Query AttributesTable 129 lists the query attributes for the Periods table.
Table 129 ID_PERIOD Table Query Attributes
Query Description VB Type C Type
PER_DAYS Number of the day in the year. Integer short
PER_HALFYEARS Number of the half-year in the year. Integer short
PER_MONTHS Number of the month in the year. Integer short
PER_QUARTERS Number of the quarter in the year. Integer short
PER_TRIMESTERS Number of the trimester in the year. Integer short
PER_WEEKS Number of the week in the year. Integer short
PER_YEARS Year. Integer short
Nondefault Query Attributes 401
ID_PRINT (Printing Table) Query AttributesID_PRINT contains a record for each sample report provided in Hyperion Enterprise. Eachrecord contains page setup and page format information for that report. The page setup andpage format information is intended for use by Print Engine functions. The record for aparticular report may not necessarily exist, if the report has not been run by someone with writeaccess to the table. Table 130 lists the query attributes for the Printing table.
Table 130 ID_PRINT Table Query Attributes
Query Description VB Type C Type
PRINT_PAGEFORMAT Page format. Byte char
PRINT_PAGESETUP Page setup structure. Byte char
ID_PSFDATA (PSF Data Table) Query AttributesFor program status flags (PSF) table queries, you can do either of the following:
l Pass NONE as the record signature (sigRecd argument) and specify the entity, parent, andtype (e.g., ID_REGULAR,) in the apiStruct (sigName, sigParent, and wType fields.) The APIfunction will use this information to find the appropriate record in the PSF table.
l Pass the signature of the record in the PSF table (as the sigRecd argument.) If you know therecord signature from a previous call to EntFind() or EntEnum(), this is the more efficientmethod.
Table 131 lists the query attributes for the PSF Data table.
Table 131 ID_PSFDATA Table Query Attributes
Query Description VB Type C Type
PSF_GETSTATUS Get PSF status information.
PSF_GETSTATUSTEXT Get PSF status and text for one period.
PSF_NAME Entity signature. Long SIGNA
PSF_PARENT Parent entity signature. Long SIGNA
PSF_PUTSTATUS Put PSF status information
PSF_TYPE PSF type. See Note.
Note: The wType and PSF_TYPE query attributes return the following constants:
l ID_REGULAR
l ID_ELIMINATION
402 Query Attributes
l ID_TRANSLATION
l ID_PROPORTIONAL
l ID_CONTRIBUTION
l ID_ADJUSTMENT
All query attributes for this table require an apiStruct with the fields in Table 132.
Table 132 Fields for apiStruct
Field Description
lStartPeriod The starting period.
lEndPeriod The ending period.
sigName The entity signature.
sigParent The parent entity signature if sigType is not ID_REGULAR.
wType The type. Use the same constants as in the note above.
sigCat The category signature.
ID_REPORT_ENTRIES (Report Entries Table) Query AttributesThis table contains the reports for a given report set in the Report Sets table(ID_REPORT_SETS). Table 133 lists the query attributes for the Report Entries table.
Table 133 ID_REPORT_ENTRIES Table Query Attributes
Query Description VB Type C Type
NEXT_REPORT_SIG Next report signature within a report set. Long SIGNA
REPORT_ID Report ID within a report set. Long SIGNA
ID_REPORT_SETS (Report Sets Table) Query AttributesThe reports in a report set are stored in the Report Entries table (ID_REPORT_ENTRIES).Table 134 lists the query attributes for the Report Sets table.
Table 134 ID_REPORT_ENTRIES Table Query Attributes
Query Description VB Type C Type
REPSET_ID Signature of the first report in the set. Long SIGNA
ID_REPORTS (Reports Table) Query AttributesTable 135 lists the query attributes for the Reports table.
Nondefault Query Attributes 403
Table 135 ID_REPORTS Table Query Attributes
Query Description VB Type C Type
REPORT_COMPILED_RPT Byte char
REPORT_SCRIPT Byte char
ID_ROLLOVER (Rollovers Table) Query AttributesThis table contains the entries for each rollover set in the Rollover Sets table, ID_ROLLSET.Table 136 lists the query attributes for the Rollovers table.
Table 136 ID_ROLLOVER Table Query Attributes
Query Description VB Type C Type
ROLL_DESTCAT Destination category. Long SIGNA
ROLL_NEXTDET Next detail record. Long SIGNA
ROLL_SRCCAT Source category. Long SIGNA
ID_ROLLSET (Rollover Sets Table) Query AttributesThis table contains information about each rollover set. The entries for each rollover set arestored in the Rollovers table, ID_ROLLOVER. See the ROLL_... definitions in the toolinc.h file.Table 137 lists the query attributes for the Rollover Sets table.
Table 137 ID_ROLLSET Table Query Attributes
Query Description VB Type C Type
ROLL_DESTDATAOPT Get destination data options. Integer Short
ROLL_DESTOPT Get destination options - Same as Source or Yearly. Integer Short
ROLL_GROUPSIG Retrieve the group signature for the rollover set. Long SIGNA
ROLL_NUMPERCOPY Get the number of source periods to copy. Integer Short
ROLL_NUMPERINCR Get the number of periods to increment. Integer Short
ROLL_SRCDATAOPT Get source data options. Integer Short
ROLL_TYPE Rollover type: Year End or Periodic. Integer Short
ID_RPTFREQ (Reporting Frequencies Table) Query AttributesDefault queries do not apply to this table. For more information about reporting frequencies,see “Frequencies and Views” on page 20. Table 138 lists the query attributes for the ReportingFrequencies table.
404 Query Attributes
Table 138 ID_RPTFREQ Table Query Attributes
Query Description VB Type C Type
DESC Description. String LPSTR
NAME Label. The string must be large enough for at least SIZERPTFREQ + 1 characters. String LPSTR
RFQ_FREQ Get the Hyperion Enterprise frequency. Integer or Long short or SIGNA
RFQ_VIEW Get the Hyperion Enterprise view. Integer or Long short or SIGNA
SHORTNAME ID. String LPSTR
ID_RPTVIEW (Reporting Views Table) Query AttributesDefault queries do not apply to this table. Table 139 lists the query attributes for the ReportingViews table.
Table 139 ID_RPTVIEW Table Query Attributes
Query Description VB Type C Type
DESC Description. String LPSTR
NAME Label. String LPSTR
RFQ_FREQ Get the Hyperion Enterprise frequency associated with the reporting view Integer or Long short or SIGNA
RFQ_VIEW Get the Hyperion Enterprise view type associated with the reporting view. Integer or Long short or SIGNA
SHORTNAME ID. String LPSTR
ID_RULES (Update Rules Table) Query AttributesTable 140 lists the query attributes for the Update Rules table.
Table 140 ID_RULES Table Query Attributes
Query Description VB Type C Type
RULES_CHKACCOUNTSIGN Check the account sign during the update rule.
RULES_EXECUTEALWAYS Execute update rule always.
RULES_EXPRESSION Signature of first expression for this rule. Long SIGNA
RULES_INST_LENGTH Help instruction length.
RULES_INSTRUCTIONS Help instructions. See Note. String LPSTR
RULES_VARIABLES Signature of first variable for this rule. Long SIGNA
Nondefault Query Attributes 405
Note: When using the RULES_INSTRUCTIONS query attribute, first query the length of theitem, allocate a buffer large enough for the size of the query + 1, then query the item.
ID_RULESEXP (Update Rules Expressions Table) QueryAttributesThis table contains records for the expressions associated with a specific update rule in the UpdateRules table, ID_RULES. Table 141 lists the query attributes for the Update Rules Expressionstable.
Table 141 ID_RULESEXP Table Query Attributes
Query Description VB Type C Type
RULESEXP_DESTACCT Destination account for this update rule. See Note.
RULESEXP_DESTACCT_LENGTH The length of a destination account expression.
RULESEXP_ELIMEXP Elimination expression for this update rule. See Note. String LPSTR
RULESEXP_ELIMEXP_LENGTH The length of an elimination expression.
RULESEXP_IS_DELETED Deleted flag. Byte HYPBOOL
RULESEXP_NEXT_EXP Signature of the next expression. Long SIGNA
RULESEXP_PELIMEXP Partner elimination expression for this update rule. See Note. String LPSTR
RULESEXP_PELIMEXP_LENGTH The length of a partner elimination expression.
RULESEXP_PROPEXP Proportion expression for this update rule. See Note. String LPSTR
RULESEXP_PROPEXP_LENGTH The length of a proportional expression.
RULESEXP_RULEID Update rule signature. Long SIGNA
Note: When using RULESEXP_ELIMEXP and RULESEXP_PROPEXP, query the length of theitem, allocate a buffer large enough for the size of the query + 1, then query the item.
ID_RULESVAR (Rules Variables Table) Query AttributesThis table contains records for the variables associated with a specific update rule in the UpdateRules table, ID_RULES. Table 142 lists the query attributes for the Rules Variables table.
Table 142 ID_RULESVAR Table Query Attributes
Query Description VB Type C Type
RULESVAR_IS_DELETED Deleted flag. Byte HYPBOOL
RULESVAR_NEXT_VAR Signature of next variable. Long SIGNA
406 Query Attributes
Query Description VB Type C Type
RULESVAR_RULEID Signature of rule using this variable. Long SIGNA
RULESVAR_VAR_LENGTH Length of this variable.
RULESVAR_VARIABLE Text for this variable. See Note. String LPSTR
Note: When using the RULESVAR_VARIABLE query attribute, query the length of the item,allocate a buffer large enough for the size of the query + 1, then query the item.
ID_SCHEDULES (Schedules Table) Query AttributesTable 143 lists the query attributes for the Schedules table.
Table 143 ID_SCHEDULES Table Query Attributes
Query Description VB Type C Type
ACCTWIDTH Account cell width. Integer short
ALLPERIODS Display all/current period. Non-zero value to display all periods or zero to display only thecurrent period.
Byte HYPBOOL
AUTORECALC Calculate formulas automatically. Byte HYPBOOL
BOTTOMLIST Bottom account list. Long SIGNA
PERIODWIDTH Data cell width. Integer short
SCHED_BOLD Use bold font. Byte HYPBOOL
SCHED_FONTNAME Name of the font to use. String LPSTR
SCHED_FONTSIZE Size of the font to use. Integer short
SCHED_ITALIC Use italic font. Byte HYPBOOL
SHOWLOGIC Display Logic window. Byte HYPBOOL
SUPPNODATA Indicates whether accounts with no data should be suppressed. TRUE (1) or FALSE (0). Byte HYPBOOL
TOPLIST Top account list. Long SIGNA
USELABEL Display account IDs (1), or description (0). Byte HYPBOOL
ID_SECCLASS (Security Class Table) Query AttributesEvery entity, category, account, task, and so on is assigned to a security class. Query theappropriate table, such as ID_NAMES for entities, or ID_CATEGORY for categories, using theSECURITYCLASS query attribute. This query attribute returns the signature of the security classfor the item or task. Use this signature with query attribute SECCLASS_CURRENTRIGHTS to
Nondefault Query Attributes 407
query the Security Class table for the rights of the current user for the item or task. Possiblerights, returned in the pzBuf argument, are SECRIGHT_VIEW, SECRIGHT_RESTRICTED, orSECRIGHT_NONE. Table 144 lists the query attributes for the Security Class table.
Table 144 ID_SECCLASS Table Query Attributes
Query Description VB Type C Type
SECCLASS_CURRENTRIGHTS Current user rights for this class. Integer short
ID_SECGRPTAB (Security Group Table) Query AttributesThis table is a matrix of security groups by users. Each cell in the matrix is a record in the table.The security group field is the signature of the group in the Security Users table(ID_SECUSERTAB). The user field is the user signature of a member of the group, which couldbe an individual or another group.
You can find the first record a security group in the Security Group table by querying the SecurityUsers table (ID_SECUSERTAB) with query attribute SECUSER_FIRSTMEMBER. The queryfunctions return SECURERR_NOERR (0) for unsupported queries. Table 145 lists the queryattributes for the Security Group table.
Table 145 ID_SECGRPTAB Table Query Attributes
Query Description VB Type C Type
SECGRP_GROUPSIG Security group. Long SIGNA
SECGRP_NEXTSIG Signature of the next group member in the group table. Long SIGNA
SECGRP_USERSIG Member ID or signature of the group member in the Security Users table, ID_SECUSERTAB. Long SIGNA
ID_SECRIGHTS (Security Rights Table) Query AttributesThis table is a matrix of users by security classes. Each cell in the matrix is a record in the table.The user could be an individual user or a security group in the Security Users table(ID_SECUSERTAB). Table 146 lists the query attributes for the Security Rights table.
Table 146 ID_SECRIGHTS Table Query Attributes
Query Description VB Type C Type
SECRIGHTS_NEXTCLASS Next class signature. Long SIGNA
SECRIGHTS_RIGHTS Rights assigned. Integer short
SECRIGHTS_SECCLASS Security class. Long SIGNA
SECRIGHTS_USERSIG Rights user signature. Long SIGNA
408 Query Attributes
ID_SECTASK (Security Task Table) Query AttributesTable 147 lists the query attributes for the Security Task table.
Table 147 ID_SECTASK Table Query Attributes
Query Description VB Type C Type
SECTASK_SECCLASS Task security class. Long SIGNA
SECTASK_TASKFILTER Task filter. String LPSTR
ID_SECTASKFILTER (Security Task Filter Table) QueryAttributesTable 148 lists the query attributes for the Security Task Filter table.
Table 148 ID_SECTASKFILTER Table Query Attributes
Query Description VB Type C Type
SECFILTER_TASKFILTER Task signature Long SIGNA
ID_SECUSERTAB (Security Users Table) Query AttributesThis table contains the records for users and security groups. Use the Security Group table,ID_SECGRPTAB query attributes to find the members of a security group or enumerate theSecurity Group table. The query functions return SECURERR_NOERR (0) for unsupportedqueries. Table 149 lists the query attributes for the Security Users table.
Table 149 ID_SECUSERTAB Table Query Attributes
Query Description VB Type C Type
SECUSER_CLASSRIGHTS Rights to this class of the current user.
SECUSER_FIRSTMEMBER Returns the first member of a group, which is the signature in the ID_SECGRPTAB table. Long SIGNA
SECUSER_NUM_GROUPS Retrieves the count of security groups. Long long
SECUSER_PASSWORD User password. String LPSTR
SECUSER_STATE User state.
SECUSER_TYPECODE Users/Groups flag; SECURITY_GROUP if it is a group. Byte char
ID_SERVER (Server Table) Query AttributesQueries to this table are available only if the Hyperion Enterprise Server is installed on yoursystem. The default query attributes do not apply to this table. Table 150 lists the query attributesfor the Server table.
Nondefault Query Attributes 409
Table 150 ID_SERVER Table Query Attributes
Query Description VB Type C Type
NAME Server name. String LPSTR
SHORTNAME Server name.
SVR_MACHINE Machine name of server. String LPSTR
SVR_PORT Port number of Hyperion Enterprise service on the server. Integer short
ID_SHARES (Shares Table) Query AttributesEach record in this table specifies how many shares of one entity's stock are owned by anotherentity. Special record indicates the total number of shares issued by an entity and the totalnumber of its shares owned by other entities. Table 151 lists the query attributes for the Sharestable.
Table 151 ID_SHARES Table Query Attributes
Query Description VB Type C Type
SHARES_ENT_CODES Get the user-defined entity code. Long or Array of Longs SIGNA or array of SIGNA
SHARES_NONVOTING Number of shares. Double or array of Doubles double or array of doubles
SHARES_PERCENT_NONVOT
Number of shares or total number of sharesoutstanding.
Double or Array of Doubles double or array of doubles
SHARES_PERCENT_VOT Number of voting shares or total number ofvoting shares outstanding.
Double or Array of Doubles double or array of doubles
SHARES_SIGOWNED Entity signature of the owned entity of theshares.
Long SIGNA
SHARES_SIGOWNER Entity signature of the owner entity of theshares.
Long SIGNA
SHARES_TOT_ISSUED_NONVOT
Total number of outstanding shares for theentity. See Note.
Double or Array of Doubles double or array of doubles
SHARES_TOT_ISSUED_VOT
Total number of outstanding voting shares forthe entity. See Note.
Double or Array of Doubles double or array of doubles
SHARES_TOT_OWNED_NONVOT
Total number of shares that all other entitiesown for the entity. See Note.
Double or Array of Doubles double or array of doubles
SHARES_TOT_OWNED_VOT
Total number of voting shares that all otherentities own for the entity. See Note.
Double or Array of Doubles double or array of doubles
SHARES_ULTMETHOD Consolidation method. Long or Array or Longs SIGNA or array of SIGNA
SHARES_ULTPCTCONSOL Ultimate percent consolidated. Double or Array of Doubles double or array of doubles
SHARES_ULTPCTCTL Ultimate percent control. Double or Array of Doubles double or array of doubles
410 Query Attributes
Query Description VB Type C Type
SHARES_ULTPCTOWNED Ultimate percent ownership of this owner andowned entity pair.
Double or Array of Doubles double or array of doubles
SHARES_VOTING Number of voting shares. Double or Array of Doubles double or array of doubles
The following query attributes require an apiStruct, even if the application is not set up to usedynamic organizations. Set the sigName field in the apiStruct to the signature of the entity.
l SHARES_TOT_ISSUED_NONVOT
l SHARES_TOT_ISSUED_VOT
l SHARES_TOT_OWNED_NONVOT
l SHARES_TOT_OWNED_VOT
If the application is set up to use dynamic organizations, pass the category signature as thesigKey argument and set up an apiStruct for all queries with the fields shown in Table 152.
Table 152 Fields for apiStruct
Field Description
sigCat The category signature.
lStartPeriod The starting period.
lEndPeriod The ending period.
If you specify a range of periods, the buffer must be large enough to hold the return values forall periods in the range.
ID_SUBACCTDET (Subaccount Detail Table) Query AttributesThis table contains the subaccounts for each sub-account table in the Subaccount Header table(ID_SUBACCTHDR). Table 153 lists the query attributes for the Subaccount Detail table.
Table 153 ID_SUBACCTDET Table Query Attributes
Query Description VB Type C Type
SUBACCT_ALT_SIG Signature of currency or entity if alternate type is not SUB_ALT_TYPE_NORMAL. Long SIGNA
SUBACCT_ALT_SIG_TYPE Alternate type. See Note. Byte char
SUBACCT_NEXTDETAIL Signature of next detail sub-account record for the sub-account table. Long SIGNA
SUBACCT_REVSIGN Reverse the sign for this entry. Byte HYPBOOL
SUBACCT_TABLE Signature of the next level sub-account table, if any. Long SIGNA
SUBACCT_TYPE Subaccount type: Fixed, Validated, or None. Byte char
Nondefault Query Attributes 411
Query Description VB Type C Type
SUBACCT_VIA_ALTSIG The input signature is a currency or entity signature. Outputs the signature of the detailrecord.
Long SIGNA
Note: The SUBACCT_ALT_SIG_TYPE query attribute returns the following constants:
l SUB_ALT_TYPE_NORMAL
l SUB_ALT_TYPE_CURRENCY
l SUB_ALT_TYPE_INTCO
ID_SUBACCTHDR (Subaccount Header Table) QueryAttributesThis table contains information about sub-account tables. The entries in each sub-account tableare stored in the Subaccount Detail table (ID_SUBACCTDET). Table 154 lists the queryattributes for the Subaccount Header table.
Table 154 ID_SUBACCTHDR Table Query Attributes
Query Description VB Type C Type
SUBTABLE_FIRSTDETAIL Subaccount table first detail record. Long SIGNA
SUBTABLE_IS_INTERCO Indicates whether the sub-account table is intercompany. TRUE (1) or FALSE (0). Byte HYPBOOL
SUBTABLE_TYPE Subaccount table type. For more information, see the TOOLINC.H file. Integer short
Note: The record with signature 0 (SIG_SUBHDRCURRENCY constant in Toolnc.h) is thecurrency sub-account table. The record with signature 1(SIG_SUBHDRINTERCOMPANY constant) is the intercompany sub-account table.
ID_SUBNAME (Subentities Table) Query AttributesThis table contains information about subentities tables. The entries in each subentities tableare stored in the Subentities table (ID_SUBNAME). Table 155 lists the query attributes for theSubentities table.
Table 155 ID_SUBNAME Table Query Attributes
Query Description VB Type C Type
CHARTMETHOD Chart method signature. Long SIGNA
CODE User-defined code. Long SIGNA
CURRENCY Currency. Long SIGNA
412 Query Attributes
Query Description VB Type C Type
JOURNALS Indicates whether the sub-entity allows journals. TRUE (1) or FALSE (0). Byte HYPBOOL
PAR_CHILD_STAT Query for entities to get status if entity is a parent, child, or inactive. See Note. Integer short
PARENT Parent entity. Integer short
SCALE Scaling. Byte char
SUBSTRUCT Signature of attached substructure, or NONE if no substructure is attached. Long SIGNA
When using the PAR_CHILD_STAT query attribute, if the entity is a parent entity, pzBuf returnsPARENT_ACTIVE. If the entity is a child entity, pzBuf returns CHILD_ACTIVE. If the entityis not active in all of the specified periods, pzBuf returns NAME_INACTIVE.
This query attribute requires an apiStruct if the application is set up to use dynamicorganizations. Set the fields shown in Table 156 in the apiStruct:
Table 156 Fields for apiStruct
Field Description
sigCat The category signature
lStartPeriod The starting period
lEndPeriod The ending period
lpseStatus NULL, or the address of the status buffer
This field must be large enough for an integer (short in C) for each period in the range. If this field is not NULL, the valueswill be returned in the status buffer by period, instead of in pzBuf.
ID_SUBSTRUCTURE (Substructures Table) Query AttributesTable 157 lists the query attributes for the Substructures table.
Table 157 ID_SUBSTRUCTURE Table Query Attributes
Query Description VB Type C Type
SUBSTRUCT Substructure signature Long SIGNA
TOPNODE TopNode field Long SIGNA
ID_SUGGEST_OWN (Suggest Consolidation Method andPercentage Table) Query AttributesTable 158 lists the query attributes for the Suggest Consolidation Method and Percentage table.
Nondefault Query Attributes 413
Table 158 ID_SUGGEST_OWN Table Query Attributes
Query Description VB Type C Type
SUGGEST_OWN_BOT_INCLUSIVE TRUE (1) if the lower limit is to be included in the range. Byte HYPBOOL
SUGGEST_OWN_BOT_RANGE Get the lower limit of the percentage control range. Double double
SUGGEST_OWN_CONS_METHOD Use this consolidation method if the percentage control is within the range. Long SIGNA
SUGGEST_OWN_PCT_CONSOL Use this percentage consolidation if the consolidation method matches. Double double
SUGGEST_OWN_PCT_TYPE Type of percentage consolidation to use. See Note.
SUGGEST_OWN_TOP_INCLUSIVE TRUE (1) if the upper limit is to be included in the range. Byte HYPBOOL
SUGGEST_OWN_TOP_RANGE Get the upper limit of the percentage control range. Double double
Note: The SUGGEST_OWN_PCT_TYPE query attribute returns the following constants:
l SUGGEST_OWN_USE_NUMBER
l SUGGEST_OWN_USE_PCONTROL
l SUGGEST_OWN_USE_POWN
l SUGGEST_OWN_USE_POWNMIN
ID_USE_METHODS (Used Methods Table) Query AttributesTable 159 lists the query attributes for the Used Methods table.
Table 159 ID_USE_METHODS Table Query Attributes
Query Description VB Type C Type
USEMETHOD_CATSIG Signature of category use statement applies to Long SIGNA
USEMETHOD_METHODSIG Signature of method being used Long SIGNA
ID_USERDEFAULT (User Defaults Table) Query AttributesYou use the query attributes for this table with the EntQueryDefault( ) function although youcan also use them with HypQueryEx( ) or EntQueryEx( ). Default queries do not apply to thistable. Table 160 lists the query attributes for the User Defaults table.
Table 160 ID_USERDEFAULT Table Query Attributes
Query Description VB Type C Type
CURACCOUNT Current account. String LPSTR
414 Query Attributes
Query Description VB Type C Type
CURACCOUNTSIG Current account signature. Long SIGNA
CURCATEGORY Current category. String LPSTR
CURCATEGORYSIG Current category signature. Long SIGNA
CURFREQ Current frequency. String LPSTR
CURFREQSIG Current frequency signature. Long SIGNA
CURNAME Current entity. String LPSTR
CURNAMESIG Current entity signature. Long SIGNA
CURORG Current organization. String LPSTR
CURORGSIG Current organization signature. Long SIGNA
CURPERIOD Current period. String LPSTR
CURPERIODSIG Current period signature. Long SIGNA
CURSCALESIG Current scale signature. Long SIGNA
CURSCHEDULE Current schedule for data entry. String LPSTR
CURSCHEDULESIG Current schedule signature. Long SIGNA
CURVIEWSIG Current view. Long SIGNA
DELETEERRLOG Indicates whether previous error log file should be deleted. Integer short
ENTERKEY Enter key behavior. Integer short
ERROR_MODE Display error mode: Verbose, Terse, or All. See the ERR_NO_... definitions in thetoolinc.h file.
Integer short
SAVECHANGES Indicates whether changes to selection boxes should be saved on exit. Integer short
SECURITYCLASS Security class of current user. Long SIGNA
SHOWFOLDERS Integer short
SHOWPALETTE Indicates whether the palette should be displayed. Integer short
SHOWSTATBAR Indicates whether the status bar should be displayed. Integer short
SHOWTOOLBAR Indicates whether the toolbar should be displayed. Integer short
TRACE_FILE Output file for trace data. String LPSTR
TRACE_LEVEL Level of trace enabled. Integer short
USER_DEFAULTSECURITY Default security class for new elements. Long SIGNA
USER_ERRORASZERO Indicates whether an error should be displayed as zero in Hyperion Enterprise Retrieve. Byte HYPBOOL
Nondefault Query Attributes 415
Query Description VB Type C Type
USER_EXECUTEEXCEL Indicates whether Microsoft Excel should be executed after worksheet option. Byte HYPBOOL
USER_NODATAASZERO Indicates whether no data should be displayed as zero in Hyperion Enterprise Retrieve. Byte HYPBOOL
USER_SCALEHPVAL Indicates whether HPVAL values should be scaled in Oracle's Hyperion® Enterprise®Retrieve.
Byte HYPBOOL
USERPATH User path for error log file. String LPSTR
Table 161 lists additional query attributes for ID_USERDEFAULT for setting color preferences.
Table 161 ID_USERDEFAULT Table Query Attributes for Setting Color Preferences
Query Description VB Type C Type
DESKTOPBORDER Desktop border color. Long long
BACKGROUNDCOLOR Modeless dialog box background color. Long long
DIALOGBACKCOLOR Popup dialog background color. Long long
DIALOGTEXTCOLOR Dialog text (static) color. Long long
DIALOGCAPTIONTEXTCOLOR Dialog caption background color. Long long
DIALOGCAPTIONBACKCOLOR Dialog caption text color. Long long
TABLECAPTIONTEXTCOLOR Table column caption background color. Long long
TABLECAPTIONBACKCOLOR Table column caption text color. Long long
SELECTTEXTCOLOR Selected text color. Long long
SELECTBACKCOLOR Selected background color. Long long
INPUTTEXTCOLOR Input data text color. Long long
INPUTBACKCOLOR Input data background color. Long long
CALCTEXTCOLOR Calculated data text color. Long long
CALCBACKCOLOR Calculated data background color. Long long
PARENTTEXTCOLOR Parent data text color. Long long
PARENTBACKCOLOR Parent data background color. Long long
DERIVEDTEXTCOLOR Derived data text color. Long long
DERIVEDBACKCOLOR Derived data background color. Long long
ADMINMODIFYTEXTCOLOR System modify text color. Long long
ADMINMODIFYBACKCOLOR System modify background color. Long long
ADMINVIEWTEXTCOLOR System view text color. Long long
416 Query Attributes
Query Description VB Type C Type
ADMINVIEWBACKCOLOR System view background color. Long long
NAMESMODIFYTEXTCOLOR Entity modify text color. Long long
NAMESMODIFYBACKCOLOR Entity modify background color. Long long
NAMESVIEWTEXTCOLOR Entity view text color. Long long
NAMESVIEWBACKCOLOR Entity view background color. Long long
NAMESSELECTTEXTCOLOR Selected entity text color. Long long
NAMESSELECTBACKCOLOR Selected entity background color. Long long
NAMEISCONSOLTEXTCOLOR Valid consolidation range text color. Long long
NAMENOTCONSOLTEXTCOLOR Invalid consolidation range text color. Long long
NAMECONSOLBACKCOLOR Consolidation range background color. Long long
CONSOLOKCOLOR OK status text color. Long long
CONSOLNOTOKCOLOR Impacted status text color. Long long
NODATATEXTCOLOR NO DATA status text color. Long long
OTHERDATATEXTCOLOR DATA status text color. Long long
STATUSBACKCOLOR Status background color. Long long
ADMINRESTRICTTEXTCOLOR System restricted text color. Long long
ADMINRESTRICTBACKCOLOR System restricted background color. Long long
DYNVIEWTEXTCOLOR Dynamic view text color. Long long
DYNVIEWBACKCOLOR Dynamic view background color. Long long
ID_USERDEFFUNC (Custom Functions Table) QueryAttributesTable 162 lists the query attributes for the Custom Functions table.
Table 162 ID_USERDEFFUNC Table Query Attributes
Query Description VB Type C Type
UDF_CHART Indicates whether function is set up as a chart method function. Byte HYPBOOL
UDF_CONSOL Indicates whether function is set up as a consolidation method function. Byte HYPBOOL
UDF_NOTRANS Indicates whether function is set up as a translation function. Byte HYPBOOL
Nondefault Query Attributes 417
Query Description VB Type C Type
UDF_INSTRUCTION_LENGTH Retrieve the length of instructions. Integer short
UDF_EXPRESSION_LENGTH Retrieve the length of expression. Integer short
UDF_INSTRUCTIONS Retrieve instructions. See Note. String LPSTR
UDF_EXPRESSION Retrieve expression. See Note. String LPSTR
Note: For query attributes UDF_INSTRUCTIONS and UDF_EXPRESSION, you should querythe length of the item, allocate a string buffer large enough (queried size +1), then querythe item.
418 Query Attributes
Index
Numbers16-bit function declarations
function declarations, 1716-bit programs
converting to 32-bit, 284
Aaccount
checking if input account, 205retrieving default name of, 50selecting with ENTACCTASK( ), 126selecting with HYPACCTASK( ), 27
Account Conversion List table, 370Account Conversion table, 370account heading
retrieving, 45account labels, 34account list
enumerating accounts in, 85selecting with ENTACCTLISTASK( ), 126selecting with HYPACCTLISTASKEX( ), 28
Account List Entry table, 371Account List table, 370account signature
splitting into parts, 127account types
getting with EntGetAccountsInputType( ), 189account value
retrieving normal, 57retrieving special, 60retrieving using HypHPVAL2( ), 59
accountsenumerating in account lists, 85
Accounts Group table, 382Accounts table, 367advanced functions
alphabetical reference, 125
combining with spreadsheet add-in functions, 113consolidation detail values and, 25, 119deselecting tables with, 111for selection dialog boxes, 114opening an application with, 110organization structures and, 120related functions, 113retrieving data using, 115selecting tables with, 111tables and, 110updating data using, 117using tables with, 112using to work with data, 114using with Hyperion Enterprise INI file, 123
alphabetical referencetable functions, 82
apiStruct, 110in Visual Basic, 18initializing, 204use in selecting additional tables, 256use in selecting tables, 255
applicationclosing with ENTCLOSEAPPLICATION( ), 141closing with HYPDESTRUCT( ), 31creating with ENTCREATEAPPLICATION( ), 143opening, 110opening with ENTOPENAPPLICATION( ), 236opening with
ENTSERVEROPENAPPLICATION( ), 237opening with HYPCONSTRUCT( ), 29selecting default, 63
application .INI filegetting number in, 191reading text string in, 192
application defaultsquerying, 243saving, 245
Application Defaults table, 372
A B C D E F G H I J L M N O P Q R S T U V W
Index 419
application handle, 196retrieving, 277
application handlesredefining, 283retrieving multiple, 65
Application Information table, 383applications
closing multiple, 64enumerating with ENTENUMAPPLICATIONS( ),
178enumerating with HYPENUMAPPLICATIONS( ),
87logging onto, 66retrieving default handle, 63
Associated tables, 362
BBasic, 16better or worse
percent, 55value, 35
Book Entries table, 374Book Sets table, 375Books table, 375buffers
data, 39
CC, 16C++, 16C-string
retrieving length of, 275calculate number of periods in a category, 138calculated account determination, 37calculating
percent change, 56the number of periods in a category, 83
callback chainappending to, 128deleting from, 154
Callback functions, 18in Visual Basic, 18
callback functionsCALLBACK12, 308CALLBACK6, 310CALLBACKAPI, 309
CALLBACKAPP, 310CALLBACKCREATE, 310CALLBACKDBENUM, 311CALLBACKDBLOAD, 312, 313, 314CALLBACKJOUREXTRACT, 315CALLBACKJOURLOAD, 316CALLBACKLOGIC, 316CALLBACKSECLOAD, 317CALLBACKSEL, 318CALLBACKSTR, 320CALLBACKUSERS, 320CALLBACKVB, 321CALLBACKVBNET, 322
CALLBACK12, 308CALLBACK6, 310CALLBACKAPI, 309CALLBACKAPP, 310CALLBACKCREATE, 310CALLBACKDBENUM, 311CALLBACKDBLOAD, 312, 313, 314CALLBACKJOUREXTRACT, 315CALLBACKJOURLOAD, 316CALLBACKLOGIC, 316CALLBACKSECLOAD, 317CALLBACKSEL, 318CALLBACKSTR, 320CALLBACKUSERS, 320CALLBACKVB, 321Categories table, 375category
calculating the number of periods in, 83description, 38frequency, 43getting period and frequency in, 193retrieving default name of, 50retrieving period number and frequency in, 96selecting with ENTCATASK( ), 138selecting with HYPCATASKEX( ), 28
changes to Hyperion Enterprise tables, 297obsolete security tables, 302
checkinglink parameters, 72parameters, 73
child node, 194getting with HYPGETCHILD( ), 97
classificationsof functions, 280
A B C D E F G H I J L M N O P Q R S T U V W
420 Index
closingapplications, 31
Codes table, 378combining spreadsheet add-in functions with
advanced functions, 113component currency, 40component full entity description, 44consolidating
with ENTCONSOLIDATE( ), 141consolidation detail values, 25, 119constants
in visual basic, 17conversion
16-bit programs to 32-bit, 284converting a string to double, 137converting from Hyperion Enterprise SE to Hyperion
Enterprise, 297copying
data, 276, 353strings, 276
Currencies table, 378currency
description, 36currency label, 40Custom Functions table, 417
Ddata
loading, 264, 266retrieving with advanced functions, 115storing, 51updating with advanced functions, 117
data buffers, 39flushing, 42
data buffers, writing with HYPHPCOMMIT2( ), 39data retrieval functions, 25data update functions, 26datafile
opening with ENTDATAFILEOPEN( ), 152Datafile table, 378date conversion, 82
ENTDATECONV( ), 153DATECONV( ), 82default application
selecting, 63default application handle, 63default journal, 32
default journal category, 33default journal period, 34default query attributes, 366default settings
discarding changes, 156tables of, 361
derived value, 40deselecting
tables, 269detaching logic, 222detailed storage model
defined, 25, 119discard logic, 223discarding changes
in default settings, 156in tables, 155
DWCALLBACK, 322
EEnt...( ), 281Entacctask( ), 126Entacctlistask( ), 126Entacctsplit( ), 127Entappendtocbchain( ), 128Entappextract( ), 129Entappextractvb( ), 130Entappload( ), 132Entapploadvb( ), 133Entasciitodouble( ), 137Entcatask( ), 138Entcatgetnumperiods( ), 138Entcatgetpershort( ), 139Entcatmapperiod( ), 140Entcloseapplication( ), 141Entconsolidate( ), 141Entcreateapplication( ), 143Entdataextract( ), 146Entdataextractvb( ), 148Entdatafileopen( ), 152Entdateconv( ), 153Entdeletefromcbchain( ), 154Entdiscardchanges( ), 155Entdiscarddefault( ), 156EntDSMDataExtractVB(), 158Ententityask( ), 162Ententitylistask( ), 163EntEnum( )
A B C D E F G H I J L M N O P Q R S T U V W
Index 421
using with ID_SECGRPTAB, 175using with ID_SECRIGHTS, 176using with ID_SECTASK, 176with ID_SECUSERTAB, 176with ID_SHARES, 176with ID_SUBACCTDET, 177
Entenum( ), 167using with ID_ACCTLISTENTRY, 168using with ID_INTCODET, 170using with ID_JOURNAL_DETAIL, 171using with ID_JOURNAL_HISTORY, 172using with ID_JOURNAL_TEMPLATES, 172using with ID_JOURNALS, 170using with ID_NAMELISTENTRY, 173using with ID_NAMES, 174using with ID_NODES, 174using with ID_ROLLOVER, 175using with ID_RPTVIEW, 175
EntEnumApplications( ), 178EntEnumOrgEntities( ), 178EntEnumSubAcctSig( ), 180EntEnumUsersOnSystem( ), 181EntFind( ), 182
using with ID_ACCTCONVERT, 183using with ID_INTCODET, 183using with ID_NAMECONVERT, 184using with ID_NAMES, 184using with ID_SECGRPTAB, 185using with ID_SECRIGHTS, 185using with ID_SHARES, 185using with the Journals Tables, 183
EntFindEntityInOrg( ), 186additional example, 186
EntFormatNumber( ), 188EntFreqAsk( ), 188EntGetAccountsInputType( ), 189EntGetActiveModule( ), 191EntGetAppProfileLong( ), 191EntGetAppProfileString( ), 192EntGetCatPerFreq( ), 193EntGetChild( ), 194, 195EntGetEntitySig( ), 195EntGetHappFromSelect( ), 196EntGetLastError( ), 197EntGetLastErrorByHApp( ), 198EntGetOrgLevel( ), 199EntGetPerView( ), 199
EntGetProfileLong( ), 200EntGetProfileString( ), 201EntGetRightsToTask( ), 201ENTGETSIBLING( )
additional example, 203EntGetSibling( ), 202, 203EntGetVarAddr( ), 203EntInitApiStruct( ), 204EntIsAccountInput( ), 205EntIsEntityParent( ), 205EntIsModified( ), 206EntIsSelected( ), 207Entities
checking if a parent, 205getting signature of, 195retrieving default, 50selecting, 67, 162
entitieschecking if parent, 102enumerating in an entity list, 90enumerating in an organization, 91getting signatures for, 98
Entities table, 397Entity code, 41Entity Conversion List table, 394Entity Conversion table, 394entity label, 52entity list
enumerating entities in, 90selecting, 67, 163
Entity List Entry table, 395Entity List table, 395entity signature, 195EntJournalExtract( ), 208EntJournalExtractVB( ), 210EntJournalLoad( ), 215EntJournalLoadVB( ), 217EntLogicAttach( ), 220EntLogicDetach( ), 222EntLogicDiscard( ), 223EntLogicExport( ), 223EntLogicExportVB( ), 225EntLogicImport( ), 227EntLogicImportVB( ), 229EntMessageVB( ), 232EntMsgLogTaskEndTime( ), 233EntMsgLogTaskStartTime( ), 234
A B C D E F G H I J L M N O P Q R S T U V W
422 Index
EntMsgLogTime( ), 236EntOpenApplication( ), 236EntOpenServerApplication( ), 237EntPageExtract( ), 238EntPageLoad( ), 239EntPerAsk( ), 239EntQryRptFreq( ), 240EntQuery( ), 241EntQueryDefault( ), 243EntQueryEx( ), 241, 243EntQueryExStr( ), 243EntRegisterMsgBox( ), 244EntRunRollover( ), 244EntSave( ), 245EntSaveDefault( ), 245EntSecurityExtract( ), 246EntSecurityExtractVB( ), 247EntSecurityLoad( ), 249EntSecurityLoadVB( ), 250EntSelect( ), 252EntSelectAdd( ), 254EntSelectTable( ), 255EntSelectTableAdd( ), 256, 257EntSetActiveModule( ), 258EntUNCDataLoad( ), 264EntUNCDataLoad( ) - Load Data, 264EntUNCDataLoadVB( ), 266EntUnSelect( ), 269EntUpdate( ), 270EntUpdateDefault( ), 271EntVBCopyData( ), 276EntVBCopyStr( ), 276EntVBGetCStrLen( ), 275EntWriteAppProfileLong( ), 272EntWriteAppProfileString( ), 273EntWriteProfileLong( ), 274EntWriteProfileString( ), 274enumerating
accounts with HypEnumAcctListEntriesEx( ), 85applications, 87applications with EntEnumApplications( ), 178entities with HypEnumNameListEntriesEx( ), 90nodes in an organization, 178open applications, 65records in a table, 88, 167sub-account signatures, 92subaccounts, 180
users on system, 181
FFALSE
defined, 17flow account determination, 43flow accounts, 43flushing data buffers, 42Formats table, 380fortran, 16frequencies and views, 20Frequencies table, 381frequency
getting with EntGetPerView( ), 199selecting with EntFreqAsk( ), 188selecting with HypFreqAsk( ), 32
frequency and viewgetting with HypGetPerViewEx( ), 100
functionclassifications of, 280
functionsEnt...(), 281EntAcctAsk( ), 126EntAcctListAsk( ), 126EntAcctSplit( ), 127EntAppendToCBChain( ), 128EntAsciiToDouble( ), 137EntCatAsk( ), 138EntCatGetNumPeriods( ), 138EntCatGetPerShort( ), 139EntCatMapPeriod( ), 140EntCloseApplication( ), 141EntConsolidate( ), 141EntCreateApplication( ), 143EntDataExtract( ), 146EntDataFileOpen( ), 152EntDataLoad( ), 264EntDataLoadVB( ), 266EntDateConv( ), 153EntDeleteFromCBChain( ), 154EntDiscardChanges( ), 155EntDiscardDefault( ), 156EntEntityAsk( ), 162EntEntityListAsk( ), 163EntEnum( ) in, 167EntEnumApplications( ), 178EntEnumOrgEntities( ), 178
A B C D E F G H I J L M N O P Q R S T U V W
Index 423
EntEnumSubAcctSig( ), 180EntEnumUsersOnSystem( ), 181EntFind( ), 182EntFindEntityInOrg( ), 186EntFormatNumber( ), 188EntFreqAsk( ), 188EntGetActiveModule( ), 191EntGetAppProfileLong( ), 191EntGetAppProfileString( ), 192EntGetCatPerFreq( ), 193EntGetChild( ), 194, 195EntGetEntitySig( ), 195EntGetHappFromSelect( ), 196EntGetLastError( ), 197EntGetOrgLevel( ), 199EntGetPerView( ), 199EntGetProfileLong( ), 200EntGetProfileString( ), 201EntGetRightsToTask( ), 201EntGetSibling( ), 202, 203EntGetVarAddr( ), 203EntInitApiStruct( ), 204EntIsAccountInput( ), 205EntIsEntityParent( ), 205EntIsModified( ), 206EntIsSelected( ), 207EntLogicAttach( ), 220EntLogicDetach( ), 222EntLogicDiscard( ), 223EntOpenApplication( ), 236EntOpenServerApplication( ), 237EntPerAsk( ), 239EntQryRptFreq( ), 240EntQuery( ), 241EntQueryDefault( ), 243EntRegisterMsgBox( ), 244EntRunRollover( ), 244EntSave( ), 245EntSaveDefault( ), 245EntSelect( ), 252EntSelectAdd( ), 254EntSelectTable( ), 255EntSelectTableAdd( ), 256, 257EntSetActiveModule( ), 258EntUnSelect( ), 269EntUpdate ( ), 270EntUpdateDefault( ), 271
EntVBCopyData( ), 276EntVBCopyStr( ), 276EntVBGetCStrLen( ), 275EntWriteAppProfileLong( ), 272EntWriteAppProfileString( ), 273EntWriteProfileLong( ), 274EntWriteProfileString( ), 274for spreadsheet, 280from previous versions, 281HypEnum( ), 298HypFind( ), 289HypGethApp( ), 277HypGethSelect( ), 277HypQryAcctListEntry(), 295HypQryNameListEntry(), 295HypQryNode( ), 294HypQuery( ), 290HypQuerySig( ), 293HypSethSelect( ), 278HypUnlock( ), 298HypUnlock(), 298registering, 244replacing obsolete, 286unsupported in Release 4, 282upgrading, 289
Functions for Microsoft Visual Basic.NET Platform:EntQueryEx( ), 346Entdataextractvb( ), 329EntDSMDataExtractVB(), 333EntGetVarAddr( ), 336EntJournalExtractVB( ), 338EntJournalLoadVB( ), 341EntQueryEx( ), 345EntSecurityExtractVB( ), 347EntSecurityLoadVB( ), 349EntUpdate( ), 351EntUpdateDefault( ), 352EntVBCopyData( ), 353HypHPJOUR( ), 354
Ggetting the detail records for the Intercompany Table,
299getting the detail records for the Rollovers table, 301
A B C D E F G H I J L M N O P Q R S T U V W
424 Index
HHACCESS32.LIB
import library file, 20handles
redefining, 283header files, 279Hyp...( )
functions for selecting tables, 79Hyp...( ) functions
supported in Hyperion Enterprise, 280, 281HypAcctAsk( ), 27HypAcctListAskEx( ), 28HypCatAskEx( ), 28HypCatGetNumPeriodsEx( ), 83HypCatGetPerShortEx( ), 84HypCatMapPeriodEx( ), 84HypConstruct( ), 23, 29HypConstructEx( ), 30HypDestruct( ), 23, 31HYPENT.INI file
getting number in, 200getting string in, 201writing number to, 274writing string to, 274
HypEnum( )upgrading for the intercompany table, 298
HypEnumAcctListEntriesEx( ), 85HypEnumApplications( ), 87HypEnumEx( ), 88HypEnumNameListEntriesEx( ), 90HypEnumOrgNames( ), 91HypEnumSubAcctSig( ), 92Hyperion Enterprise frequencies, 20Hyperion Enterprise SE
upgrading code to Hyperion Enterprise, 282Hyperion Retrieve
functions for, 280HypFind( ) function
upgrading, 289HypFindEx( ), 94HypFindNameInOrgEx( ), 95HypFreqAsk( ), 32HypGetCatPerFreq( ), 96HypGetChild( ), 97HypGetDefJour( ), 32HypGetDefJourCat( ), 33HypGetDefJourPer( ), 34
HypGethApp( )function, 277
HypGethSelect( )function, 277
HypGetNameSig( ), 98HypGetOrgLevel( ), 99HypGetPerViewEx( ), 100HypGetSibling( ), 101HypGetTopNodeEx( ), 101HypHPACC( ), 34HypHPBET( ), 35HypHPCAD( ), 36HypHPCAL( ), 37HypHPCDE( ), 38HypHPCommit2( ), 39HypHPCUREx( ), 40HypHPDRV( ), 40HypHPECO( ), 41HypHPFlush( ), 42HypHPFLW( ), 43HypHPFRE( ), 43HypHPFUL( ), 44HypHPHEA( ), 45HypHPINC( ), 46HypHPINP( ), 47HypHPJOUR( ), 48HypHPKEYEx( ), 50HypHPLNK( ), 51HypHPNAM( ), 52HypHPOWN( ), 53HypHPPBE( ), 55HypHPPCH( ), 56HypHPSCA( ), 56HypHPVAL( ), 57HypHPVal( )
setting return behavior of, 71HypHPVAL2( ), 59HypHPVALEx( ), 60HypIsNameParentEx( ), 102HypJourAsk( ), 62HypJourDetAsk( ), 62HypLock()
upgrading, 289, 298HypLockEx( ), 103HypMultiAsk( ), 63HypMultiDefault( ), 63HypMultiDeinit( ), 64
A B C D E F G H I J L M N O P Q R S T U V W
Index 425
HypMultiEnum( ), 65HypMultiGet( ), 65HypMultiInit( ), 66HypNamAskEx( ), 67HypNameListAskEx( ), 67HypPerAsk( ), 68HypQryNode( )
upgrading query sizes, 295HypQryNode()
upgrading, 294HypQryRptFreqEx( ), 104HypQuery( )
upgrading, 290upgrading to HypQuery() for Intercompany Table,
298HypQueryEx( ), 105HypQuerySig()
upgrading, 293HypSetDefJour( ), 69HypSetDefJourCat( ), 69HypSetDefJourPer( ), 70HypSethSelect( ), 278HypSetMVMode( ), 71HypSetProgramName( ), 71HypUnLock()
upgrading, 289, 298HypUnLockEx( ), 106HypValidateLnkParams( ), 72HypValidateParams( ), 73HypValidateParamsEx( ), 74HypValReturn( ), 75
IID_ACCOUNTS, 367ID_ACCTCONVERT, 370ID_ACCTCVTLIST, 370ID_ACCTLIST, 370ID_ACCTLISTENTRY, 371ID_APPDEFAULT, 372ID_BOOK_ENTRIES, 374ID_BOOK_SETS, 375ID_BOOKS, 375ID_CATEGORY, 375ID_CODES, 378ID_CURRENCY, 378ID_DATAFILE, 378ID_FORMATS, 380
ID_FREQUENCY, 381ID_GROUP, 382ID_HAPP, 383ID_ICSET, 383ID_INTCODET, 384ID_JOURNAL_DETAIL, 384ID_JOURNAL_HISTORY, 385ID_JOURNAL_HISTORY_DETAIL, 387ID_JOURNAL_PERIOD_INFO, 388ID_JOURNAL_TEMPLATES, 389ID_JOURNAL_TEMPLATES_DETAIL, 390ID_JOURNALS, 391ID_LOGIC, 393ID_NAMECONVERT, 394ID_NAMECVTLIST, 394ID_NAMELIST, 395ID_NAMELISTENTRY, 395ID_NAMES, 397ID_NODES, 400ID_ORGANIZATION, 401ID_PERIOD, 401ID_PRINT, 402ID_PSFDATA, 402ID_REPORT_ENTRIES, 403ID_REPORT_SETS, 403ID_REPORTS, 403ID_ROLLOVER, 404ID_ROLLSET, 404ID_RPTFREQ, 404ID_RPTVIEW, 405ID_RULES, 405ID_RULESEXP, 406ID_RULESVAR, 406ID_SCHEDULES, 407ID_SECCLASS, 407ID_SECGRPTAB, 408ID_SECRIGHTS, 408ID_SECTASK, 409ID_SECTASKFILTER, 409ID_SECUSERTAB, 409ID_SERVER, 409ID_SHARES, 410ID_SUBACCTDET, 411ID_SUBACCTHDR, 412ID_SUBNAME, 412ID_SUBSTRUCTURE, 413ID_SUGGEST_OWN, 413
A B C D E F G H I J L M N O P Q R S T U V W
426 Index
ID_USERDEFAULT, 414ID_USERDEFFUNC, 417import library
linking programs to, 20include files, 19, 279
TOOLKIT.BAS, 19TOOLKIT.H, 19
income account determination, 46INI file
using advanced functions with, 123writing number to, 272writing string to, 273
initializingapiStruct, 204
input account determination, 47Intercompany Detail table, 384
changes to, 298getting detail records for, 299
Intercompany Matching Sets table, 383
Jjournal detail information, 48Journal Period Information table, 388Journal Templates Detail table, 390Journal Templates table, 389journals
retrieving detail information for, 48selecting, 62selecting detail, 62setting default, 69
Journals Detail table, 384Journals History Detail table, 387Journals History table, 385Journals table, 391
Llanguages supported, 16last error
retrieving, 197last value retrieval
return status of, 75level
getting in organization, 199link parameters
checking, 72list functions, 24, 25, 26
locking tables, 103logging off multiple applications, 64logging onto multiple applications, 66logic
attaching, 220detaching, 222discard, 223
Logic table, 393
Mmapping a period into a frequency, 84message boxes
registering, 244multiple applications
closing, 64logging onto, 66managing, 24managing with spreadsheet add-in functions, 24opening with spreadsheet add-in functions, 24
Nnode ID
finding with EntFindEntityInOrg( ), 186node signatures
getting with HypFindNameInOrgEx( ), 95nodes
enumerating with EntEnumOrgEntities( ), 178enumerating with HypEnumOrgNames( ), 91
Nodes table, 400changes to, 299
non-zerodefined, 20
NONEdefined for return codes, 20
numberformatting with EntFormatNumber( ), 188getting in HYPENT.INI file, 200writing to application .INI file, 272writing to HYPENT.INI file, 274
Oobsolete Ent...( ) functions
replacing with new Ent...( ) functions, 125obsolete query attributes, 290obsolete security access detail tables, 302obsolete security access group tables, 302
A B C D E F G H I J L M N O P Q R S T U V W
Index 427
obsolete security tables, 302security access details, 302security access groups, 302
openingapplication, 29
Org-by-period, 120organization
child node in, 194enumerating nodes in, 91sibling node in, 202
organization structuresand advanced functions, 120and Hyp...( ) functions, 81
organizationsgetting levels in, 99getting the top node ID in, 101
Organizations table, 401ownership
retrieving information on, 53
Pparameters
checking, 73parent entity
checking if entity is, 102Pascal, 16passing addresses, 18percent better or worse, 55percent change
calculating, 56period
mapping into frequency, 140mapping into frequency with
HypCatMapPeriodEx( ), 84retrieving default name of, 50selecting with EntPerAsk( ), 239
period labelgetting in category frequency, 84retrieving, 139
periodsselecting with HypPerAsk( ), 68
Periods table, 401Printing table, 402program name
retrieving with EntGetActiveModule( ), 191programs
linking to import libraries, 20
PSF Data table, 402
Qquery
Hyperion Enterprise tables, 105reporting frequency, 104
query attributesCategory Links Table, 378default, 366Formulas Table, 381ID_ACCOUNTS, 367ID_ACCTCONVERT, 370ID_ACCTCVTLIST, 370ID_ACCTLIST, 370ID_ACCTLISTENTRY, 371ID_APPDEFAULT, 372ID_BOOK_ENTRIES, 374ID_BOOK_SETS, 375ID_BOOKS, 375ID_CATEGORY, 375ID_CODES, 378ID_CURRENCY, 378ID_DATAFILE, 378ID_FORMATS, 380ID_FREQUENCY, 381ID_GROUP, 382ID_HAPP, 383ID_ICSET, 383ID_INTCODET, 384ID_JOURNAL_DETAIL, 384ID_JOURNAL_HISTORY, 385ID_JOURNAL_HISTORY_DETAIL, 387ID_JOURNAL_PERIOD_INFO, 388ID_JOURNAL_TEMPLATES, 389ID_JOURNAL_TEMPLATES_DETAIL, 390ID_JOURNALS, 391ID_LOGIC, 393ID_NAMECONVERT, 394ID_NAMECVTLIST, 394ID_NAMELIST, 395ID_NAMELISTENTRY, 395ID_NAMES, 397ID_NODES, 400ID_ORGANIZATION, 401ID_PERIOD, 401ID_PRINT, 402ID_PSFDATA, 402
A B C D E F G H I J L M N O P Q R S T U V W
428 Index
ID_REPORT_ENTRIES, 403ID_REPORT_SETS, 403ID_REPORTS, 403ID_ROLLOVER, 404ID_ROLLSET, 404ID_RPTFREQ, 404ID_RPTVIEW, 405ID_RULES, 405ID_RULESEXP, 406ID_SCHEDULES, 407ID_SECCLASS, 407ID_SECGRPTAB, 408ID_SECRIGHTS, 408ID_SECTASK, 409ID_SECTASKFILTER, 409ID_SECUSERTAB, 409ID_SERVER, 409ID_SHARES, 410ID_SUBACCTDET, 411ID_SUBACCTHDR, 412ID_SUBNAME, 412ID_SUBSTRUCTURE, 413ID_SUGGEST_OWN, 413ID_USERDEFAULT, 414ID_USERDEFFUNC, 417Logic Category Attributes Table, 394obsolete, 290Rules Variables table, 406Used Methods Table, 414
queryingapplication defaults, 243records in table, 241user defaults, 243
Rrecords
enumerating, 167related tables
advanced and Hyp... ( ) functions, 363advanced functions, 113
renamed tables, 297replacing
split 32-bit account signatures, 297replacing obsolete, 284Report Entries table, 403Report Sets table, 403Reporting Frequencies table, 404
reporting frequency, 20frequency and view for, 199querying, 240
reporting views, 20Reporting Views table, 405Reports table, 403retrieving
account heading, 45account or sub-account labels, 34application handle, 196, 277category description, 38category frequency, 43child node, 97component currency, 40component full entity description, 44currency description, 36data, 115default labels, 50entity code, 41entity signatures, 98frequency in category, 96number in application .INI file, 191period number and frequency, 193period number in category, 96scale, 56sibling node, 101special account value, 60table selection handle, 277the default journal, 32the default journal category, 33the default journal period, 34
retrieving datawith spreadsheet add-in functions, 25
return status of HypHPVal, 75Rollover Sets table, 404rollovers
executing, 244Rollovers table, 404
changes to, 300getting detail records for, 301
Rules Expressions table, 406Rules table, 405
Ssaving
defaults, 245tables, 245
A B C D E F G H I J L M N O P Q R S T U V W
Index 429
scaleretrieving, 56
Schedules table, 407Security Class table, 407Security Group table, 408
changes to, 306security rights
getting current user's, 201Security Rights table, 408Security task codes, 303Security Task Filter table, 409Security Task table, 409Security User table
changes to, 306Security Users table, 409Select Account dialog box, 27selecting
account, 27account list, 28additional tables, 254, 256category, 28entities, 67entity list, 67frequency, 32journal detail, 62journals, 62periods, 68tables, 103, 252, 255
selecting tablesusing advanced functions, 111using Hyp...( ) functions, 79
selection callbacks, 112selection dialog boxes
advanced functions for, 114with spreadsheet add-in functions, 24
server applicationopening, 237
Server table, 409set active module, 258setting
default journal, 69default journal category, 69default journal period, 70return behavior of HypHPVal( ), 71table selection handle, 278
shares ownedretrieving information on, 53
Shares table, 410sibling node, 101, 202signatures
enumerating sub-account, 92finding, 94, 182finding node, 95
single application management, 23single applications
managing with spreadsheet add-in functions, 23opening with spreadsheet add-in functions, 23
spreadsheet add-in functionscombining with advanced functions, 113for multiple application management, 24for retrieving data, 25for single application management, 23for updating data, 26for using selection dialog boxes, 24
spreadsheetsfunctions for, 280
SpyWorks, 18storing data values, 51string
converting to a double, 137getting in HYPENT.INI file, 201writing to application .INI file, 273writing to HYPENT.INI file, 274
strings, 17in return codes, 20in Visual Basic, 17
sub-account labels, 34Subaccount Detail table, 411Subaccount Header table, 412subaccounts
enumerating signatures withHypEnumSubAcctSig( ), 92
enumerating with EntEnumSubAcctSig( ), 180Subentities table, 412Substructures table, 413suggest consolidation method and percentage table,
413supported languages, 16
Ttable functions
alphabetical reference, 82combining spreadsheet add-in functions with, 113for deselecting, 79
A B C D E F G H I J L M N O P Q R S T U V W
430 Index
for selecting, 79table selection handle
retrieving, 277setting, 278
tablesand advanced functions, 110associated, 362changes to conversion from Hyperion Enterprise SE
to Hyperion Enterprise, 297checking if modified, 206checking if selected, 207deselecting, 106, 111deselecting using Hyp...( ) functions, 79deselecting with EntUnselect( ), 269discarding changes, 155enumerating records, 167enumerating records in, 88of default settings, 361querying records in, 241renamed in Release 4, 297saving with EntSave( ), 245selecting, 103, 111selecting additional, 254, 256selecting using Hyp...( ) functions, 79selecting with EntSelect( ), 252selecting with EntSelectTable( ), 255selection callbacks and, 112using an apiStruct with, 110using Hyp...( ) functions with, 80
TOOLINC.Hinclude file, 19
TOOLKIT.BASinclude file, 19
TOOLKIT.Hinclude file, 19
top node ID, 101TRUE
defined, 17
Uunlocking tables, 106unsupported functions, 282updating
data, 117defaults, 271records, 270
updating data
with spreadsheet add-in functions, 26upgrade HypQuery( )
obsolete query attributes, 290upgrading
for the intercompany table, 298functions, 289Hyperion Enterprise SE to Hyperion Enterprise,
282HypFind( ), 289HypLock(), 289HypQryAcctListEntry() function, 295HypQryNameListEntry() function, 295HypQryNode() function, 294HypQryNode() query sizes, 295HypQuery( ) functions, 290HypQuery() for Intercompany Table, 298HypQuery() query sizes, 291HypQuerySig() function, 293HypUnlock(), 289
user defaultsquerying, 243saving, 245
User Defaults table, 414users
enumerating with EntEnumUsersOnSystem( ),181
users in Application reportsetting program name in, 71
using an apiStruct structure, 18, 110using tables
with advanced functions, 112with Hyp...( ) functions, 80
Vvalue
calculating derived, 40values
calculating percent better or worse, 55calculating the better or worse, 35storing, 51
variablegetting address of, 203
vbNULLString, 17view
getting with EntGetPerView( ), 199Visual Basic, 16
32-bit function declarations, 17
A B C D E F G H I J L M N O P Q R S T U V W
Index 431
programming notes, 16
Wworking with data
using advanced functions, 114writing
data buffers, 39number to application .INI file, 272number to application HYPENT.INI file, 274string to application .INI file, 273string to application HYPENT.INI file, 274
A B C D E F G H I J L M N O P Q R S T U V W
432 Index