Sie sind auf Seite 1von 432

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 and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed 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 decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change 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 customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer 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 or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. 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 affiliates disclaim 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 their respective owners. This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, 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
iii

Contents

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

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 Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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

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) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 ID_JOURNAL_PERIOD_INFO (Journal Period Information Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 ID_JOURNAL_TEMPLATES (Journal Templates Table) Query Attributes . . . . . . . . 389 ID_JOURNAL_TEMPLATES_DETAIL (Journal Templates Detail Table) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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) Query Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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

1
In This Chapter

About Hyperion Enterprise API

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 Hyperion Enterprise Application Programing Interface (API) and its use.

Hyperion Enterprise API Overview


The Hyperion Enterprise API functions give you high-level access to Hyperion Enterprise data from any program. The Hyperion Enterprise API functions are contained in the HEACCESS.DLL file. This guide is written primarily for Visual Basic programmers. It describes how to use the available API functions for Hyperion Enterprise, and includes sample code for each function and C equivalents of each function. It also describes how to convert your Hyperion Enterprise SE HEACCESS programs for use in Hyperion Enterprise.

How to Use This Guide


In 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 as spreadsheets. These functions are the easiest to use. They all take the form Hyp...( ). For more information, see Chapter 2, Spreadsheet Add-in Functions Table functions that are optimized for use with applications such as spreadsheets. These functions 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 advanced functions and all take the form Hyp...( ). For more information, see Chapter 3, Table Functions
l

Advanced functions that use the full power of the underlying Hyperion Enterprise API functions. These functions generally call the Hyperion Enterprise API functions directly. They all take the form Ent...( ). For more information, see Chapter 4, Advanced Functions 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 from Hyperion Enterprise SE

In general, you should start with the spreadsheet add-in functions and basic functions for working with tables, because these functions are easy to use and have relatively little impact on system data. In addition to the groups of functions listed, this guide also includes information in the appendixes about Table IDs and Query Attributes.

Languages Supported
The Hyperion Enterprise API supports programming languages that can interact with Windows DLL files. The following programming languages are supported:
l

Visual Basic C C++ Basic Fortran Pascal

We provide include files that work with Microsoft Visual Basic Release 5.0 and Microsoft Visual C++ Version 5.0. Other Basic and C compilers should work but might require minor changes to the include files or examples. Other languages require you to make your own include file.

Visual Basic Programming Notes


Chapters 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 Constants Strings Passing Addresses Callback Functions in Visual Basic

16

About Hyperion Enterprise API

Using an apiStruct Structure in Visual Basic

Function Declarations
Include the TOOLKIT.BAS file in your program, not the TOOLKIT.H file. You can avoid memory problems 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 declarations only. The 32-bit declarations use Lib HACCESS32.DLL. The obsolete 16-bit functions use Lib HACESS.DLL.

Constants
Many constants are preceded with HYP_ in the TOOLKIT.BAS file. For example, use HYP_NONE instead of NONE. If you cannot find a constant in TOOLKIT.BAS, locate it in the TOOLKIT.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 using Visual Basic, insert HYP_ at the beginning of all table IDs. The correct Visual Basic form for a table 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 0 respectively, not the usual Visual Basic definitions -1 and 0.
Tip: You can avoid memory problems by copying only the definitions you need instead of

including the entire TOOLKIT.BAS file.

Strings
Strings are returned as C-style strings. Visual Basic programmers should first allocate a string large enough for the value to be returned, then pass the string address to the API function. On return, search for the zero character in the string. This marks the end of the string. Truncate the string at the zero character. You can also write a function to search for the zero character because you will need to do it frequently. Here is an example:
'Function to convert C string to Visual Basic string Private Function CToBStr(szStr$) As String Dim 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 is easiest 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 a string 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 pass NULL as the address of a string.

Passing Addresses
Function declarations usually handle the passing of addresses automatically. For more information, see EntGetVarAddr( ) - Get Variable's Address on page 203. This function is useful when you need set the value of a field in a structure to an address.

Callback Functions in Visual Basic


A number of the Hyperion Enterprise API functions use callback functions. One argument to the API function is the address of a function that you want the API to call. You provide the function and pass its address to the Hyperion Enterprise API function. Enumeration functions, in particular, use callback functions. For every record enumerated, for example, the HypEnumEx( ) function, will call the function you specified, so that you can do whatever you need to do with the record. Visual Basic version 5.0 supports callback functions. Use Visual Basics Address of function to pass the address of your callback function to the Hyperion Enterprise API function. If one of the arguments in your callback function is the address of a C-style string, you can use EntVBGetCStrLen( ) and EntVBCopyData( ) to copy the C-style string into a typical Visual Basic string. Visual Basic Version 4.0 does not handle callback functions. It will not give you the address of a function or pass it to another function. Other products allow you to use callback functions in Visual Basic. One such product is SpyWorks, made by Desaware, Inc. SpyWorks provides a control for callback functions. You simply add one of these controls to your program. One of the properties of the control is the function type. You set this property to the appropriate function type that you need, depending on what type arguments and return values you need for your callback function. You customize the function provided for that function type. Another property, the ProcAddress property, gives you the function address that you pass to the Hyperion Enterprise API function. The functions EntVBCopyData( ) and EntVBGetCStrLen( ) can be used to convert the SpyWorks callback 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 Basic


Many of the advanced functions for working with tables have an argument that is a structure called an apiStruct. This structure is defined in the TOOLKIT.BAS file and is used to pass more information 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 apiStruct argument. 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 want to write a function to do this so you can force the argument to be zero or Null when it is not actually an apiStruct. If you use a callback function that receives an apiStruct as an argument and your callback function declares the argument as type long instead of type APISTRUCT, you can use the EntVBCopyData function to convert your argument to an apiStruct. Make sure the argument is not zero before you call EntVBCopyData.

Modify Non-Visual Basic Programs


You must modify any non-Visual Basic (VB) programs to initialize COM at the beginning of your program before calling any Hyperion Enterprise API functions. You do this by calling Microsoft's CoInitialize () function in Microsoft's OLE32.DLL. In addition, call CoUninitialize () at the end of your program.

Include Files
Hyperion Enterprise provides two include files:
l

TOOLKIT.BAS, for working with Microsoft Visual Basic TOOLKIT.H, for working with C and C++

TOOLKIT.H was developed and used with Microsoft Visual C++. TOOLKIT.H includes TOOLINC.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 symbolic constants, such as FREQ_DAY, FREQ_WEEK, and FREQ_MONTH, to represent system frequencies. The include files, TOOLKIT.BAS, TOOLKIT.H, and TOOLINC.H, list all symbolic constants, their values, and a description. Here is an example of the type of information in TOOLKIT.BAS:
Global Global Global Global Const Const Const Const HYP_ID_ORGANIZATION = 0 Organization HYP_ID_CATEGORY = 1 Category HYP_ID_FREQUENCY = 2 Frequency HYP_ID_ACCOUNTS = 3 Accounts

Here is an example of the type of information in TOOLKIT.H and TOOLINC.H:


#define #define #define #define ORGANIZATION ID_CATEGORY ID_FREQUENCY ID_ACCOUNTS 0 1 2 3 //Organization //Category //Frequency //Accounts

Modify Non-Visual Basic Programs

19

The include files also contain function declarations.

Linking Programs to an Import Library


To use the Hyperion Enterprise functions, you must link your programs to the HEACCESS.LIB import library file.

Return Codes
In 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 on local copies of parameters. The only exception to this rule is when a pointer is specifically intended 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, which are also defined in the TOOLKIT.BAS and TOOLKIT.H files or in theTOOLINC.H file.

Frequencies and Views


Many functions described in this guide use Hyperion Enterprise frequencies, reporting frequencies, and reporting views as inputs or outputs.

Hyperion Enterprise Frequencies


Table 1 lists the frequencies that come from the LOAD.PER file you use when you install and set up applications in Hyperion Enterprise. For more information, see the Setting Up Applications chapter in the Hyperion Enterprise Administrators Guide.
Table 1

Hyperion Enterprise Frequencies Description Daily Weekly Monthly Quarterly Trimester Half-yearly Yearly

Frequency D W M Q T H Y

20

About Hyperion Enterprise API

Table 2 lists the reporting frequencies that you can use in Hyperion Enterprise API functions.
Table 2

Reporting Frequencies Description Daily periodic Daily Daily category-to-date Weekly periodic Weekly category-to-date Monthly periodic Monthly category-to-date Quarterly periodic Quarterly category-to-date Trimester periodic Trimester category-to-date Half-yearly periodic Half-yearly category-to-date Yearly

Frequency DAI DAY DYDT WEE WYTD MON YTD QUA QYTD TRI TYTD HAL HYTD YEA

Reporting Views
Table 3 lists the reporting views that you can use in Hyperion Enterprise API functions.
Table 3

Reporting Views Description Periodic Week to date Month to date Quarter to date Trimester to date Half-year to date Category to date

View PER WTD MTD QTD TTD HTD CTD

Frequencies and Views

21

View YTD

Description Year to date

22

About Hyperion Enterprise API

2
In This Chapter

Spreadsheet Add-in Functions

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, including syntax and examples.

Overview of Spreadsheet Add-in Functions


Spreadsheet add-in functions are the most commonly used functions in the Hyperion Enterprise API system. They are optimized for spreadsheet applications, such as Hyperion Enterprise Retrieve, 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 spreadsheet add-in functions are the safest functions to use because they have relatively little impact on your system data. All of these functions take the form Hyp...( ). Virtually all of the spreadsheet add-in functions require an argument, which is a Hyperion Enterprise Retrieve application handle (type HRETRIEVEAPP for C programmers). Hyperion Enterprise Retrieve is Hyperion Enterprise's spreadsheet add-in product. You get this handle by calling HypConstruct( ) to open and initialize the application, or by calling HypMultiGet( ) or HypMultiDefault( ).

Single Application Management Functions


You use single application management functions to open and close individual Hyperion Enterprise applications. Table 4 lists the single application management functions.

Overview of Spreadsheet Add-in Functions

23

Table 4

Single Application Management Functions Description Opens an application before you can call any other functions for that application. Closes an application when you are finished using it before the program ends.

Function HypConstruct( ) HypDestruct( )

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 type HRETRIEVEAPP, a handle to a Hyperion Enterprise Retrieve application. You can open a maximum of 20 (MAX_OPEN_APPS) applications at one time.

Multiple Application Management Functions


You use multiple application management functions to work with multiple applications and perform 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 Description Used to select an application from the list of open applications and make it the default application. Gets the handle of the default application. Closes multiple applications when you are finished using them before the program ends. Enumerates applications. Gets the Hyperion Enterprise Retrieve application handle. Opens multiple applications simultaneously, as listed in a file.

Function HypMultiAsk( ) HypMultiDefault( ) HypMultiDeinit( ) HypMultiEnum( ) HypMultiGet( ) HypMultiInit( )

Selection Dialog Box Functions


You use selection dialog box functions to access the API standard selection dialog boxes. These dialog boxes allow you to select accounts, account lists, categories, frequencies, entities, and periods. Selection dialog box functions work only if you open an application using HypConstruct( ) or HypMultiInit( ). Table 6lists the Selection dialog box functions.
Table 6

Selection Dialog Box Functions Description Used to select an account. Used to select an account list. Used to select a category.

Function HypAcctAsk( ) HypAcctListAskEx( ) HypCatAskEx( )

24

Spreadsheet Add-in Functions

Function HypFreqAsk( ) HypJourAsk( ) HypJourDetAsk( ) HypNamAskEx( ) HypNameListAskEx( ) HypPerAsk( )

Description Used to select a frequency. Used to select a journal. Used to select a journal detail. Used to select an entity. Used to select an entity list. Used to select a period.

Data Retrieval Functions


You 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 values

such as contribution, proportional, adjustment, or currency translation values. You can also use HypHPVAL2 in either case.
Table 7

Data Retrieval Functions Description Retrieves a data value from the Hyperion Enterprise database. Retrieves a data value from the Hyperion Enterprise database. Retrieves a specific value from the Hyperion Enterprise database. Sets HypValReturn( ) behavior. Validates parameters for HypHPVAL( ). Validates parameters for HypHPVALEx( ). Determines the status of the last data retrieval.

Function HypHPVAL( ) HypHPVAL2( ) HypHPVALEx( ) HypSetMVMode( ) HypValidateParams( ) HypValidateParamsEx( ) HypValReturn( )

Consolidation Detail Values with Spread Sheet Add In Function


Hyperion Enterprise applications can store consolidation detail, such as eliminations, adjustments, currency-translated values, or the amounts that an entity contributed to its parent entity during consolidation. You might see this feature referred to in the header files as the Detailed Storage Model (DSM.)

Data Retrieval Functions

25

ID_TRANSLATION_FORCE is similar to ID_TRANSLATION with the exception that it is valid even when the parent and child entities use the same currency. When the currencies are the same, the data is not translated and a translation datafile table does not exist. In this case, if you use ID_TRANSLATION, you get an error code, because a translation datafile table does not exist. If you use ID_TRANSLATION_FORCE instead, then it will access the regular data (type ID_REGULAR) when the parent and child use the same currency, instead of returning an error code. Warning: Do not select the ID_TRANSLATION_FORCE type of datafile table if there is a possibility that the ID_REGULAR datafile table may already be selected for the specified category and entity. Similarly, do not select the ID_REGULAR type of datafile table if the ID_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 Description Parent adjustment values Contribution values Elimination values Proportion values Translation values Translation or child if same currency

Code ID_ADJUSTMENT ID_CONTRIBUTION ID_ELIMINATION ID_PROPORTIONAL ID_TRANSLATION ID_TRANSLATION_FORCE

Note: Do not try to update any consolidation detail values. These values are read-only. These

values are written by Hyperion Enterprise during consolidation as a record of how the consolidated numbers were calculated.

Data Update Functions


You use data update functions to update Hyperion Enterprise data. Table 9 lists the data update functions.
Table 9

Data Update Functions Description Writes data buffers (save to disk) without calculating formulas. Clears data buffers. Stores data values into buffers (in memory). Checks HypHPLNK( ) parameters.

Function HypHPCommit2( ) HypHPFlush( ) HypHPLNK( ) HypValidateLnkParams( )

26

Spreadsheet Add-in Functions

Generally, you can update Hyperion Enterprise data by performing these tasks:
l

Call HypHPFlush( ) to clear the data buffers. Call HypHPLNK( ) for each data value you want to write. HypHPLNK( ) writes the data to the buffers only. 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 saving data with a later call to HypHPCommit2( ).

Alphabetical Function Reference


This topic includes a list of all spreadsheet add-in functions in alphabetical order.

HypAcctAsk( ) - Select Account


This function calls the Hyperion Enterprise Select Account dialog box and retrieves the account you select. If you select Cancel, no account is retrieved. Use this format: Declare Function HypAcctAsk Lib heaccess.dll Alias _HypAcctAsk@8 (ByVal hRApp As Integer, ByVal szAcct As String) As Long
Variable Description hRApp szAcct A non-zero Hyperion Enterprise Retrieve application handle from HypMultiGet( ) or HypConstruct( ) 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 0 None Meaning Successful 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 List


This 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 if you 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(ByVal hRApp As Integer, ByVal szAcctList As String) As Integer
Variable hRApp Description 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+1 characters (or SIZENAME+1 in C).

Return Codes:
Code 0 NONE Meaning Successful 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 Category


This function calls the Hyperion Enterprise Select Category dialog box and retrieves the category you select. If you select Cancel, no category is retrieved. Use this format: Declare Function HypCatAskEx Lib heaccess.dll Alias _HypCatAskEx@8(ByVal hRApp As Integer, ByVal szCat As String) As Integer
Variable Description hRApp szCat A nonzero Hyperion Enterprise Retrieve application handle from HypMultiGet( ), HypConstruct( ), or HypMultiDefault( ) The pointer to the buffer to return the category ID. The buffer should be large enough for at least HYP_SIZELABEL+1 characters (or SIZECAT+1 in C).

28

Spreadsheet Add-in Functions

Return Codes:
Code 0 NONE Meaning Successful 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 Application


This function opens the named Hyperion Enterprise application. The Hyperion Enterprise application ID must appear in the HYPENT.INI file. If the system returns a zero, then hRApp contains a non-zero Hyperion Enterprise Retrieve application handle that you can use to access application information with other spreadsheet function calls. A maximum of 20 (MAX_OPEN_APPS) applications can be open at one time. Call HypDestruct( ) to close the application when you are finished using it, before the program ends. If the application you open with HypConstruct( ) is the application specified in HYPENT.INI with the parameter AppID = , the default is set to this application. HypMultiDefault( ) returns this application until you select a different one in HypMultiAsk( ). Use this format: Declare Function HypConstruct Lib heaccess.dll Alias _HypConstruct@16(hRApp As Integer, ByVal szApp As String, ByVal szUser As String, ByVal szPassword As String) As Long
Variable hRApp szApp szUser Description The address for the Hyperion Enterprise Retrieve application handle. The handle will be placed here by the function The name of the application to open The user ID to use for logging onto the application

szPassword The password to use for logging on to the application

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Alphabetical Function Reference

29

Code HACC_BAD_CODE HACC_BAD_PASSWORD HACC_BAD_USERID HACC_ERROR_USER_LOCKED HACC_ERROR_SELECT_FAILED HACC_BAD_OPENAPP (16) HACC_TOOMANY_APPS (15) HACC_BAD_CODE

Meaning Invalid argument Invalid password Invalid user ID User ID is locked Error selecting table Error opening application Too many applications open Invalid argument

Example:
'Open the TAX application ret& = 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, LPSTR szPassword )

HypConstructEx( ) - Open an Application


This function opens the named Hyperion Enterprise application. The Hyperion Enterprise application name must appear in the HYPENT.INI file. HypConstructEx( ) is an extension of HypConstruct( ), and contains an extra argument that indicates whether the program is running on a server or on a client computer. Use this format: Declare Function HypConstructEx Lib heaccess.dll Alias _HypConstructEx@20(hRApp As Integer, ByVal szApp As String, ByVal szUser As String, ByVal szPassword As String, szServerFlag As Long) As Long
Variable hRApp szApp szUser Description The address for the Hyperion Enterprise Retrieve application handle. The handle will be placed here by the function. The name of the application to open 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 0 NONE HACC_BAD_CODE HACC_BAD_OPENAPP HACC_BAD_PASSWORD HACC_BAD_USERID HACC_ERROR_USER_LOCKED HACC_ERROR_SELECT_FAILED HACC_TOOMANY_APPS

Meaning Successful Error occurred Invalid argument Error opening application Invalid password Invalid user ID User ID is locked Error selecting table To many applications open

Example:
'Open the TAX application ret& = 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 Application


This function closes any application you opened using HypConstruct( ) or HypMultiInit( ). Use this format: Declare Function HypDestruct Lib heaccess.dll Alias _HypDestruct@4(ByVal hRApp As Integer) As Long Where hRApp is the non-zero Hyperion Enterprise Retrieve application handle from HypConstruct( ). Return Codes:
Code 0 Meaning 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% = 0 End If End 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 the frequency 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 the reporting 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 about frequencies and views, see Frequencies and Views on page 20. Use this format: Declare Function HypFreqAsk Lib heaccess.dll Alias _HypFreqAsk@8(ByVal hRApp As Integer, ByVal szFreq As String) As Long
Variable Description hRApp szFreq A nonzero Hyperion Enterprise Retrieve application handle from HypMultiGet( ) or HypConstruct( ) 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 0 NONE Meaning Successful 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 Journal


This function gets the signature of the default journal. This default is normally selected in the Journal 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 table the journal is in. You can use the JOUR_ENTRIES constant to test if the bit flag is set. If the JOUR_ENTRIES bit flag is set, then the journal is in the regular journals table, otherwise it is in the journals templates table. For more information, see HypJourAsk( ) - Select Journal on page 62. Example:
sigJour& = HypGetDefJour(hRApp%) If (sigJour& And JOUR_ENTRIES) <> 0 Then wTableID% = HYP_ID_JOURNAL_ENTRIES sigJour& = sigJour& And (Not JOUR_ENTRIES) Else wTableID% = HYP_ID_JOURNAL_TEMPLATES End If

Use this format: Declare Function HypGetDefJour Lib heaccess.dll Alias _HypGetDefJour@4(ByVal hRApp As Integer) As Long Where hRApp is the non-zero Hyperion Enterprise Retrieve application handle from HypConstruct( ). Return Codes:
Code Signature of the default journal NONE Meaning Successful Error occurred

Use this format for C: SIGNA WINAPI HypGetDefJour( HRETRIEVEAPP hRApp)

HypGetDefJourCat( ) - Get Default Journal Category


This function gets the signatures of the default journal category. This default is normally selected in the Journal selection box. For more information, see HypJourAsk( ) - Select Journal on page 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 from HypConstruct( ). Return Codes:

Alphabetical Function Reference

33

Code Signature of the default journal category NONE

Meaning Successful Error occurred

Use this format for C: SIGNA WINAPI HypGetDefJourCat( HRETRIEVEAPP hRApp)

HypGetDefJourPer( ) - Get Default Journal Period


This function gets the signatures of the default journal period. This default is normally selected in the Journal selection box. For more information, see HypJourAsk( ) - Select Journal on page 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 from HypConstruct( ). Return Codes:
Code Signature of the default journal period NONE Meaning Successful Error occurred

Use this format for C: SIGNA WINAPI HypGetDefJourPer( HRETRIEVEAPP hRApp)

HypHPACC( ) - Get Account or Subaccount ID


This function retrieves the account or sub-account ID, based on the codes in Table 10.
Table 10

HypHPACC( ) Account and Subaccount Label Return Codes ID Returned Full account ID. Major account ID. First-level sub-account ID. Second-level sub-account label heading.

Code ACC_ACC ACC_AMJ ACC_AS1 ACC_AS2

Use this format:


34
Spreadsheet Add-in Functions

Declare Function HypHPACC Lib heaccess.dll Alias _HypHPACC@16(ByVal hRApp As Integer, ByVal szAcct As String, ByVal code As Long, ByVal retbuf As String) As Long

Variable Description hRApp szAcct code The Hyperion Enterprise Retrieve application handle from HypConstruct( ). The ID of the account. 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 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT

Meaning Successful Error occurred, invalid szAcct 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 Value


Given two values for an account, this function calculates the difference between the two values where the amount that value two is better or worse than value one. The sign of the better or worse value is based on whether the supplied account is an expense, asset, income, or liability account. Use this format: Declare Function HypHPBET Lib heaccess.dll Alias _HypHPBET@20(ByVal hRApp As Integer, ByVal szAcct As String, value2 As Double, value1 As Double, dretval As Double) As Long

Alphabetical Function Reference

35

Variable Description hRApp szAcct value2 value1 dretval The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The ID of the account to use The later time period value The earlier time period value The buffer in which the result is returned

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct 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 Description


This function retrieves the currency description for a specified entity. Use this format: Declare Function HypHPCAD Lib heaccess.dll Alias _HypHPCAD@12(ByVal hRApp As Integer, 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 0 Meaning Successful

36

Spreadsheet Add-in Functions

Code HACC_BAD_NAME HACC_BAD_SELECT

Meaning Error occurred, invalid szEntity 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 As Integer, 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 szAcct wCal The category ID The account ID The buffer in which the result is returned

Return Codes:
Code 0 HACC_BAD_NAME HACC_BAD_CATEGORY HACC_BAD_ACCOUNT HACC_BAD_SELECT NONE Meaning Successful Error occurred, invalid szEntity Error occurred, invalid szCat Error occurred, invalid szAcct Error occurred 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 Description Specifies whether the account is a calculated account. Specifies whether the account is not a calculated account. Specifies whether an error occurred.

Value HPCAL_CALC_CALC_ACCT (1) HPCAL_NOT_CALC_ACCT (-1) 0

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 Description


This function retrieves the full category description of the specified category. Use this format: Declare Function HypHPCDE Lib heaccess.dll Alias _HypHPCDE@12(ByVal hRApp As Integer, ByVal szCat As String, ByVal szRetbuf As String) As Long
Value hRApp szCat Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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 0 HACC_BAD_CATEGORY HACC_BAD_SELECT Meaning Successful Error occurred, invalid szCat 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 Buffers


This function commits (saves) all changes made using the HypHPLNK( ) function call since either the last commit or the last flush of the write buffers. HypHPCommit2( ) writes data to the database that was submitted using the HypHPLNK( ) call, and includes arguments to execute logic and check security. When the argument fCheckSecurity is set to TRUE (1), the HypHPCommit2( ) function will commit changes only if the current user has the security right to export data from Hyperion Enterprise Retrieve. All data is cleared from the buffer once it is committed. Use this format: Declare Function HypHPCommit2 Lib heaccess.dll Alias _HypHPCommit2@12(ByVal hRApp As Integer, ByVal fDoLogic As Long, ByVal fCheckSecurity As Long) As Integer
Value hRApp fDoLogic Description The non-zero Hyperion Enterprise Retrieve application handle from HypConstruct( ) or HypMultiGet( ) TRUE (1) to execute logic, otherwise FALSE (0)

fCheckSecurity TRUE (1) to check security, otherwise FALSE (0)

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Note: When an error occurs, part of the data submitted by HypHPLNK( ) might be written to

the database. Example:


If SetHypValue$ <> "" Then Exit Function rc& = HypHPCommit2(hRApp%, 1, 1) If rc& <> 0 Then SetHypValue$ = "Error in HypHPCommit2 Exit Function End If End Function

" & Str$(rc&)

Use this format for C: int WINAPI HypHPCommit2(HRETRIEVEAPP hRApp, BOOL fDoLogic, BOOL fCheckSecurity)
Alphabetical Function Reference

39

HypHPCUREx( ) - Get Component Currency


This function retrieves the ID of the currency for the supplied entity. Use this format: Declare Function HypHPCUREx Lib heaccess.dll Alias _HypHPCUREx@12(ByVal hRApp As Integer, ByVal szEntity As String, ByVal szRetbuf As String) As Integer
Value hRApp Description 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+1 in C)

Return Codes:
Code 0 HACC_BAD_NAME HACC_BAD_SELECT Meaning Successful Error occurred, invalid szEntity Error occurred

Example:
Public Function GetEntityCurrency(Entity As String) As String Dim rc As Integer Dim RetBuffer As String RetBuffer$ = SPACE (HYP_SIZELABEL+1) rc% = HypHPCUREx(hRApp%, Entity$, RetBuffer$) If rc% = -1 Then GetEntityCurrency$ = "Error in HypHPCUREx" Else GetEntityCurrency$ = CToBStr(RetBuffer$) End If End Function

Use this format for C: short WINAPI HypHPCUREx( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPSTR szRetbuf)

HypHPDRV( ) - Calculate Derived Value


Given two values for an account, this function returns the derived value. For flow accounts, the two 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 As Integer, ByVal szAcct As String, value2 As Double, value1 As Double, dretval As Double) As Long
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 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct 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 Code


This 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 As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szPerName As String, ByVal wLen As Integer, ByVal szCode As String) As Integer
Variable hRApp szEntity szCat Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The entity ID The category ID

szPerNam The period date ("02/28/03"), or the period ID ("Feb 03"), or the period number ("2") wLen szCode The length of the szCode buffer The buffer to return to the code

Alphabetical Function Reference

41

Return Codes:
Code 0 HACC_BAD_NAME HACC_BAD_CATEGORY HACC_BAD_SELECT Meaning Successful Error occurred, invalid szEntity Error occurred, invalid szCat 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 Buffers


This function clears the internal Hyperion Enterprise read-access or write-access buffers. HypHPFlush( ) discards any data submitted by HypHPLNK( ) that is not yet committed. You can also use this function to force a reload from the disk of the read-access data buffers. It is not necessary 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 As Integer, 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 flush write buffers)

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Example:
wMask% = HACC_FLUSH_WRITE rc& = 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 a flow account, it is a balance account. Use this format: Declare Function HypHPFLW Lib heaccess.dll Alias _HypHPFLW@12(ByVal hRApp As Integer, 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 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct Error occurred

On return, the value of iFlag is a value shown in Table 12.


Table 12

Possible Values of iFlag Description Specifies whether the account is a flow account. Specifies whether the account is not a flow account. Specifies whether an error occurred.

Value 1 -1 0

Example:
ret& = HypHPFLW(hRApp%, "SALES", isFlow&)

Use this format for C: int WINAPI HypHPFLW( HRETRIEVEAPP hRApp, LPCSTR szAcct, int FAR * piFlag)

HypHPFRE( ) - Get Category Frequency


This function retrieves the default reporting frequency of the specified category. For a list of reporting 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 As Integer, ByVal szCat As String, ByVal szRetbuf As String) As Long
Variable Description hRApp szCat The Hyperion Enterprise Retrieve application handle from HypConstruct( ). 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 0 HACC_BAD_CATEGORY HACC_BAD_SELECT Meaning Successful Error occurred, invalid szCat 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 Description


This function retrieves the description of the specified entity. You can specify these codes to retrieve various forms of this description:
l

FUL_FUL returns the fully qualified entity.sub-entity description. FUL_FNA returns the major entity description only. FUL_FSN returns the sub-entity description only.

Use this format: Declare Function HypHPFUL Lib heaccess.dll Alias _HypHPFUL@16(ByVal hRApp As Integer, 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 0 HACC_BAD_NAME HACC_BAD_SELECT Meaning Successful Error occurred, invalid szEntity 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, LPSTR szRetbuf)

HypHPHEA( ) - Get Account Heading


This function retrieves the description for a specified account. You can specify one of the retrieval codes in Table 13.
Table 13

HypHPHEA( ) Account Codes Description Retrieves the full description, including first-level and second-level subaccounts. Retrieves the major account heading only. Retrieves the first-level sub-account heading only. Retrieves the second-level sub-account heading only.

Code HEA_HEA HEA_HMJ HEA_HS1 HEA_HS2

Use this format: Declare Function HypHPHEA Lib heaccess.dll Alias _HypHPHEA@16(ByVal hRApp As Integer, ByVal szAcct As String, ByVal iCode As Long, ByVal szRetbuf As String) As Long
Alphabetical Function Reference

45

Variable Description hRApp szAcct iCode The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The account ID 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+1 in C).

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct 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, LPSTR szRetbuf)

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 As Integer, ByVal szAcct As String, iFlag As Long) As Long
Variable Description hRApp szAcct iFlag The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The account ID The buffer to return the result

46

Spreadsheet Add-in Functions

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct Error occurred

On return, the value of iFlag is a value shown in Table 14.


Table 14

Possible Values of iFlag Description Specify whether the account is an income account. Specifies whether the account is not an income account. Specifies whether an error occurred.

Value 1 -1 0

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 As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, wFlag As Integer) As Long
Variable Description hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( ).

szEntity The pointer to the entity ID szCat szAcct wFlag The pointer to the category ID The pointer to the account ID The pointer to the buffer to return the result

Return Codes:
Alphabetical Function Reference

47

Code 0 NONE HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_NAME HACC_BAD_SELECT

Meaning Successful Error occurred Error occurred, invalid szAcc Error occurred, invalid szCat Error occurred, invalid szEntity Error occurred

On return, the value of wFlag is value shown in Table 15.


Table 15

Possible Values of wFlag Description Specifies whether the account is an input account. Specifies whether the account is not an input account. Specifies whether an error occurred.

Value HPINP_INPUT_ACCT (1) HPINP_NOT_INPUT_ACCT (-1) 0

Example:
'Codes used by HypHPINP( ) Global Const HPINP_INPUT_ACCT = 1 Global 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 Information


This function retrieves information about a journal detail record. Use this format: Declare Function HypHPJOUR Lib heaccess.dll Alias _HypHPJOUR@36(ByVal hRApp As 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 As Integer, pzBuf As Any) As Integer
Variable hRApp wAttr Description A non-zero retrieve Hyperion Enterprise Retrieve application handle A short integer specifying which journal attribute you want returned

48

Spreadsheet Add-in Functions

Variable

Description

szJourName The journal ID sigJourDet sTableID szCat The signature of the journal detail row from HypJourDetAsk( ) The ID of the table data is retrieved from, either ID_JOURNAL_ENTRIES or ID_JOURNAL_TEMPLATES 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 pzBuf The length of the pzBuf buffer 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 Description Journal number, or NONE (-1) as the journal number if there is no journal number. Journal status Journal description Journal detail entity Journal detail account Journal detail debit Journal detail credit Type/String Size Long Integer (short in C) String SIZEJOURDESC+1 String SIZEFULLNAME+1 String SIZEFULLACT+1 Double Double

Attribute JOUR_NO JOUR_ST JOUR_DS JOUR_EN JOUR_AC JOUR_DB JOUR_CR

Return Codes:
Code 0 NONE HACC_BAD_CATEGORY HACC_BAD_CODE HACC_BAD_JOURNAL HACC_BAD_PERIOD HACC_BAD_SELECT HACC_BAD_TABLE Meaning Successful Error occurred Error occurred, invalid szCat Error occurred, invalid wAttr Error occurred, invalid szJourName Error occurred, invalid szPerName Error occurred 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, or Period


This function returns the ID of the default entity, category, account, or period from the specified application. Use this format: Declare Function HypHPKEYEx Lib heaccess.dll Alias _HypHPKEYEx@12(ByVal hRApp As Integer, ByVal szKey As String, ByVal szRetbuf As String) As Integer
Variable Description hRApp szKey The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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 Buffer Size HYP_SIZEFULLNAME+1 or SIZEFULLNAME+1 in C HYP_SIZELABEL+1 or SIZECAT+1 in C HYP_SIZEFULLACCT+1 or SIZEFULLACCT+1 in C HYP_SIZEDESC or SIZEDESC in C long or SIZEOF(SIGNA) in C

Key ENTITY or NAME CATEGORY ACCOUNT PERIOD ORGANIZATION

Return Codes:
50
Spreadsheet Add-in Functions

Code 0 NONE

Meaning Successful Error occurred

Example:
Public Sub GetHyperionDefaults(Entity As String, Category As String, Account As String, Period As String) Dim rc% Dim RetBuffer As String * 127 rc% = 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 Values


This function stores data values for the specified input criteria. The value is stored in an internal data buffer and not in the actual data file until a HypHPCommit2( ) call is made. This means that 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 As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriod As 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 szAcct The category ID 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), and view is a reporting view. For more information about frequencies, see Frequencies and Views on page 20

Alphabetical Function Reference

51

Variable Description fScale dp Not used (pass zero) The floating point number being submitted

Return Codes:
Code 0 NONE HACC_BAD_NAME HACC_BAD_CATEGORY HACC_BAD_FREQUENCY HACC_BAD_ACCOUNT HACC_BAD_SELECT DFERR_BADPERIOD Meaning Successful Error occurred Error occurred, invalid szEntity Error occurred, invalid szCat Error occurred, invalid szFreq Error occurred, invalid szAcct Error occurred Error occurred

Example:
rc& = HypHPLNK(hRApp%, Entity$, Cat$, Acct$, Per$, M.PER, 0, TheValue#) If rc& <> 0 Then SetHypValue = "Error in HypHPLNK - " & Str$(rc&) Exit Function End 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 ID


This function retrieves the ID of the specified entity, based on a retrieval code shown in Table 18.
Table 18

HypHPNAM( ) Entity Retrieval Codes Entities Retrieved The major entity and sub-entity (Entity.Subentity) Only the major entity Only the sub-entity

Code NAM_NAM NAM_NNA NAM_NSN

52

Spreadsheet Add-in Functions

Use this format: Declare Function HypHPNAM Lib heaccess.dll Alias _HypHPNAM@16(ByVal hRApp As Integer, 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 0 HACC_BAD_NAME HACC_BAD_SELECT Meaning Successful Error occurred, invalid szEntity 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, LPSTR szRetbuf)

HypHPOWN( ) - Get Shares Owned


This function retrieves information on shares and ownership of companies, such as the total shares 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 hRApp As Integer, ByVal szParent As String, ByVal szChild As String, ByVal szCat As String, ByVal szPeriod 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 dretval The code for the information you want to retrieve. For more information, see the wCode Ultimate Ownership Values table. 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 the specified child entity. These include shares directly owned and shares indirectly owned, which are owned by other companies that the parent partly or wholly owns.
Table 19

wCode Ultimate Ownership Values Information Retrieved Ultimate percent ownership Ultimate percent control Ultimate percent consolidated

Value SHARES_ULTPCTOWNED SHARES_ULTPCTCTL SHARES_ULTPCTCONSOL

Use the wCode values in Table 20 to retrieve the parent entity's direct ownership of the specified child 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 Hyperion Enterprise.
Table 20

wCode Direct Ownership Values Information Retrieved Direct ownership (number of shares owned) Direct control (number of voting shares owned)

Value SHARES_NONVOTING SHARES_VOTING

Use the wCode values in Table 21 to retrieve various totals for calculation of percentages.
Table 21

wCode Percentage Calculation Values Information Retrieved The total number of outstanding shares The total number of outstanding voting shares The total number of shares owned by other entities The total number of voting shares owned by other entities

Value SHARES_TOT_ISSUED_NONVOT SHARES_TOT_ISSUED_VOT SHARES_TOT_OWNED_NONVOT SHARES_TOT_OWNED_VOT

Return Codes:
54
Spreadsheet Add-in Functions

Code 0 NONE HACC_BAD_CATEGORY HACC_BAD_CODE HACC_BAD_SELECT

Meaning Successful Error occurred Error occurred, invalid szCat Error occurred, invalid wCode 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 Worse


Given two values for an account, this function returns the percentage by which the later time period value is better or worse than the earlier time period value. The sign of the result is based on 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 As Integer, ByVal szAcct As String, value2 As Double, value1 As Double, dretval As Double) As Long
Variable Description hRApp szAcct value2 value1 dretval The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The account The later time period value The earlier time period value The buffer to return the floating point number

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct 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 Change


This function returns the percentage change between two values. Use this format: Declare Function HypHPPCH Lib heaccess.dll Alias _HypHPPCH@16(ByVal hRApp As Integer, value1 As Double, value2 As Double, dretval As Double) As Long
Variable Description hRApp value1 value2 dretval The Hyperion Enterprise Retrieve application handle from HypConstruct( ) One value. Another value The buffer to return the floating point number

Return Codes:
Code 0 Meaning Successful

Example:
ret& = HypHPPCH(hRApp%, 200.0, 100.0, pctDif#)

Use this format for C: int WINAPI HypHPPCH( HRETRIEVEAPP hRApp, const double FAR * pdValue1, const double FAR * pdValue2 double FAR * pdRetval)

HypHPSCA( ) - Get Scale


This 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 As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, dretval As Double) 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 szAcct dretval The category ID The account ID The buffer to return the scaling factor

If the account is a non-scalable account, then the function argument dretval will be one. If the category has a scale factor, dretval will be the category scale factor. Otherwise, dretval will be the entity scale factor. For example, if the category scale is 3, then the scaling factor referred to in dretval is 1000. If there is no scaling or if there is an error, the scaling factor returned in dRetVal is 1. Return Codes:
Code 0 NONE HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_NAME HACC_BAD_SELECT Meaning Successful Error occurred Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szEntity Error occurred

Example:
ret& = HypHPSCA(hRApp%, "EuroDiv", "ACTUAL", "SALES", scale#)

Use this format for C: int WINAPI HypHPSCA( HRETRIEVEAPP hRApp, LPCSTR szEntity, LPCSTR szCat, LPCSTR szAcct, double FAR * pdRetval)

HypHPVAL( ) - Retrieve Normal Account Value


This function retrieves a data value from the Hyperion Enterprise database based on the specified entity, category, account, period, and frequency. You can use the DateConv( ) function to calculate 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( ) scales system-generated derived values for periods that have no data.
Note: Use HypHPVAL( ) to retrieve a data value. Use HypHPVALEx( ) to get special values

such as contribution, proportional, adjustment, or currency translation values. You can also use HypHPVAL2 in either case.
Alphabetical Function Reference

57

Use this format: Declare Function HypHPVAL Lib heaccess.dll Alias _HypHPVAL@32 (ByVal hRApp As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriod As 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 szAcct The category ID The account ID

szPeriod A period date (02/08/03), a period label (Feb 03"), or a period number (2) szFreq fScale dretval 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. TRUE (non-zero) to scale the data, otherwise FALSE (zero) The buffer to return the floating point number

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_NAME HACC_BAD_SELECT HACC_BAD_FREQUENCY RET_NA HACC_DATAFILE_ERR Meaning Successful Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szEntity Error occurred Error occurred, invalid szFreq Data not available (no data) 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, LPCSTR szAcct, LPCSTR szPeriod, LPCSTR szFreq, BOOL fScale, double FAR * pdRetval)
58
Spreadsheet Add-in Functions

HypHPVAL2( ) - Retrieve Normal Account Value


This function is a clone of HypHPVAL( ) and HypVALEX customized specifically to improve the efficiency of Hyperion Enterprise. HypHPVAL2( ) includes an option to internally call HypValReturn( ) 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 special

values 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 As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriod As String, ByVal szFreq As String, ByVal szParent As String, ByVal wType As Integer, ByVal fScale As Long, ByVal fUseMVMode As Long, dVal As Double) As Integer
Variable hRApp szEntity szCat szAcct szPeriod szFreq szParent wType Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The entity label The category label The account label A period date (02/08/03), a period label (Feb 03"), or a period number (2) 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 the Frequencies and Views on page 20. The parent entity label, or NULL if wType = ID_REGULAR The code for the type of data to retrieve. Should be one of the following:
l l l l l l l

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)

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 0 HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_NAME HACC_BAD_SELECT HACC_BAD_FREQUENCY RET_NA HACC_DATAFILE_ERR

Meaning Successful Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szEntity Error occurred Error occurred, invalid szFreq Data not available (no data) 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, BOOL fScale, BOOL fUseMVMode, double FAR * pdVal)

HypHPVALEx( ) - Retrieve Special Account Value


This function retrieves a data value from the Hyperion Enterprise database based on the specified entity, category, account, period, and frequency. You can use the DateConv( ) function to calculate the proper period number to use with HypHPVALEx( ) and HypHPVAL( ).
Note: Use HypHPVAL( ) to retrieve a normal data value. Use HypHPVALEx( ) to get special

values 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 hRApp As Integer, ByVal szEntity As String, ByVal szCat As String, ByVal szAcct As String, ByVal szPeriod 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 szAcct The category ID 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 dretval TRUE (nonzero) to scale the data, otherwise FALSE (zero) The buffer to return the floating point number

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_NAME HACC_BAD_SELECT HACC_BAD_FREQUENCY RET_NA HACC_DATAFILE_ERR Meaning Successful Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szEntity Error occurred Error occurred, invalid szFreq Data not available (no data) 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, SBOOL fScale, double FAR * pdRetval)

HypJourAsk( ) - Select Journal


This function displays a dialog box for choosing a journal. Your selection becomes the default journal that will be used by the Journal Detail dialog box. This also sets the default category and period for the Journal Detail dialog box. Use this format: Declare Function HypJourAsk Lib heaccess.dll Alias _HypJourAsk@8(ByVal hRApp As Integer, 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 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI HypJourAsk( HRETRIEVEAPP hRApp, LPSTR szRetbuf)

HypJourDetAsk( ) - Select Journal Detail


This function displays the Journal Detail dialog box. You should first use HypJourAsk( ) to choose a journal, then call HypJourDetAsk( ) to select a detail record from that journal. HypJourDetAsk() uses the default category and period set by HypJourAsk(). For more information, see HypJourAsk( ) - Select Journal on page 62. Use this format: Declare Function HypJourDetAsk Lib heaccess.dll Alias _HypJourDetAsk@8(ByVal hRApp As Integer, sig As Long) As Integer
62
Spreadsheet Add-in Functions

Variable Description hRApp sig The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The buffer to return the journal detail record signature

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI HypJourDetAsk (HRETRIEVEAPP hRApp, SIGNA * psig)

HypMultiAsk( ) - Select Default Application


This function calls the Select Application dialog box, which lists the applications opened by HypConstruct( ) 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 Multiple Applications 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 0 Meaning Successful

Example:
ret& = HypMultiAsk()hRApp% = HypMultiDefault() 'hRApp% is the selected app

Use this format for C: int WINAPI HypMultiAsk( void )

HypMultiDefault( ) - Get Default Handle


This function returns the Hyperion Enterprise Retrieve application handle of the default application. 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( ) As Integer Return Codes:
Code Hyperion Enterprise Retrieve application handle 0 NONE Meaning Successful No applications are open 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 Applications


You use this function to log off Hyperion Enterprise. This function closes and de-initializes all Hyperion 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 by HypConstruct( ) 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 0 Meaning 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 Applications


This function calls the supplied function address once for each open application in the system and returns the Hyperion Enterprise Retrieve application handle and the ID of each open application. 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 lpCallback As 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 szApp The Hyperion Enterprise Retrieve application handle 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 Handle


This function retrieves the correct Hyperion Enterprise Retrieve application handle to use for a given 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 handle

only after initializing applications 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. Use this format: Declare Function HypMultiGet Lib heaccess.dll Alias _HypMultiGet@4(ByVal szApp As String) As Integer Where szApp is the name of the application for which a Hyperion Enterprise Retrieve application handle is requested. If a null string, the system returns the default Hyperion Enterprise Retrieve application handle from HypMultiDefault( ). Return Codes:
Alphabetical Function Reference

65

Code Hyperion Enterprise Retrieve application handle NULL

Meaning Successful 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 Applications


This function opens multiple applications based on the contents of an application list file by calling 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 ending the program. For more information, see HypConstruct( ) - Open an Application on page 29 or 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 Hyperion Enterprise Retrieve, as shown in this example.
app [, user [, password]]

Use this format: Declare Function HypMultiInit Lib heaccess.dll Alias _HypMultiInit@8(ByVal szFName As 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 0 NONE Meaning Successful Error occurred

Example:
'Initialize applications in HPAPP.DAT ret& = 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 Entity


This function calls the Hyperion Enterprise Select Entity dialog box and retrieves the entity selected 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 hRApp As 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 0 NONE Meaning Successful 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 List


This function calls the Hyperion Enterprise Select Entity List dialog box and retrieves the entity list 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 0 NONE Meaning Successful 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 Period


This function calls the Hyperion Enterprise Select Period dialog box and retrieves the period selected 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 As Integer, fWantDate As Long, ByVal szRetbuf As String) As Long
Variable hRApp Description 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 value of fWantDate to zero. For example, if you specify 1 for fWantDate, and you are trying to retrieve the 13th month of a 13-month accounting year, Hyperion Enterprise changes the value of fWantDate 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 0 NONE

Meaning Successful 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, LPSTR szRetbuf )

HypSetDefJour( ) - Set Default Journal


This function changes the default journal associated with an application. This default is normally set in the Journal selection dialog box. For more information, see HypJourAsk( ) - Select Journal on page 62. You need to set the default journal before you can call HypJourDetAsk( ). For more information about the HypJourDetAsk function, see HypJourDetAsk( ) - Select Journal Detail on page 62. Use this format: Declare Function HypSetDefJour Lib heaccess.dll Alias _HypSetDefJour@8 (ByVal hRApp As Integer, ByVal sigDefJour As Long) As Integer
Variable hRApp Description The Hyperion Enterprise Retrieve application handle from HypConstruct( )

sigDefJour The signature of the journal

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: SBOOL WINAPI HypSetDefJour(HRETRIEVEAPP hRApp, SIGNA sigDefJour)

HypSetDefJourCat( ) - Set Default Journal Category


This function changes the default journal category associated with an application. This default is 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 HypJourDetAsk function, see HypJourDetAsk( ) - Select Journal Detail on page 62. Use this format: Declare Function HypSetDefJourCat Lib heaccess.dll Alias _HypSetDefJourCat@8 (ByVal hRApp As Integer, ByVal sigDefJourCat As Long) As Integer
Variable hRApp Description The Hyperion Enterprise Retrieve application handle from HypConstruct( )

sigDefJourCat The signature of the category

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: SBOOL WINAPI HypSetDefJourCat(HRETRIEVEAPP hRApp, SIGNA sigDefJourCat)

HypSetDefJourPer - Set Default Journal Period


This function changes the default journal period associated with an application. This default is normally set in the Journal selection dialog box (HypJourAsk( )). You need to set the default journal before you can call HypJourDetAsk( ). For more information about the HypJourDetAsk function, see HypJourDetAsk( ) - Select Journal Detail on page 62. Use this format: Declare Function HypSetDefJourPer Lib heaccess.dll Alias _HypSetDefJourPer@8 (ByVal hRApp As Integer, ByVal sigDefJourPer As Long) As Integer
Variable hRApp Description The Hyperion Enterprise Retrieve application handle from HypConstruct( )

sigDefJourPer The signature of the period

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C:


70
Spreadsheet Add-in Functions

SBOOL WINAPI HypSetDefJourPer(HRETRIEVEAPP hRApp, SIGNA sigDefJourPer)

HypSetMVMode( ) - Set HypVal Return Behavior


This function controls the behavior of the HypValReturn( ) function. HypValReturn( ) returns a 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 iMode As 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 0 1 2 Result Returned An error code 0 if data is not available, otherwise an error code 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 Application Report


Use this function to specify the text that will be displayed as the program name in the Hyperion Enterprise Users in Application report. Call this function before you open an application. All applications opened using HypConstruct( ) or HypMultiInit( ) after calling HypSetProgramName( ) will use the text specified in the szProgram argument. Applications opened using the advanced function EntOpenApplication( ) are not affected by HypSetProgramName( ). For more information, see HypMultiInit( ) - Log on to Multiple Applications 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 Enterprise User in Application report. Return Codes:
Code 0 NONE Meaning Successful 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 Parameters


This function determines whether the parameters you plan to supply to the HypHPLNK( ) call for 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( ) - Store Data Values on page 51. Use this format: Declare Function HypValidateLnkParams Lib heaccess.dll Alias _HypValidateLnkParams@24 (ByVal hRApp As Integer, ByVal szEntity As String, ByVal szCat 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 szAcct szPer szFreq The category ID The account ID The period date (02/08/03), a period ID (Feb 03"), or a period number (2) A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (M, Q, and so on), and view is a reporting view. For more information about frequencies, see Frequencies and Views on page 20

Return Codes:
72
Spreadsheet Add-in Functions

Code 0 HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_FREQUENCY HACC_BAD_NAME HACC_BAD_PERIOD HACC_BAD_SELECT

Meaning All parameters are valid Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szFreq Error occurred, invalid szEntity Error occurred, invalid szPer 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 Parameters


This function checks that the entity, category, account, period, and frequency are valid. You can use this function to test the arguments you plan to use with HypHPVAL( ). HypValidateParams( ) is similar to HypValidateLnkParams( ), except that the account does not have 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 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 szAcct szPer szFreq The category ID The account ID A period date (02/08/03), a period label (Feb 03"), or a period number (2) A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (M, Q, and so on), and view is a reporting view. For more information about frequencies, see Frequencies and Views on page 20.

Alphabetical Function Reference

73

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_FREQUENCY HACC_BAD_NAME HACC_BAD_PERIOD HACC_BAD_SELECT Meaning All parameters are valid Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szFreq Error occurred, invalid szEntity Error occurred, invalid szPer 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, LPCSTR szCat, LPCSTR szAcct, LPCSTR szPer, LPCSTR szFreq)

HypValidateParamsEx( ) - Check Parameters


This function checks that the entity, category, account, period, frequency, and are valid. You can 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 As String, ByVal szPer As String, ByVal szFreq As String, ByVal szParent As String, wType As Integer) As Integer
Variable Description hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )

szEntity The entity label szCat szAcct szPer szFreq The category label The account label A period date (02/08/03), a period label (Feb 03"), or a period number (2) A reporting frequency, or a string in the form freq.view, where freq is a Hyperion Enterprise frequency (M, Q, and so forth), and view is a reporting view. For more information about frequencies, see the Frequencies and Views topic in the About Hyperion Enterprise 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 l l l l l l

ID_REGULAR ID_PROPORTIONAL ID_ELIMINATION ID_CONTRIBUTION ID_ADJUSTMENT ID_TRANSLATION ID_TRANSLATION_FORCE

Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_CATEGORY HACC_BAD_FREQUENCY HACC_BAD_NAME HACC_BAD_PERIOD HACC_BAD_SELECT Meaning All parameters are valid Error occurred, invalid szAcct Error occurred, invalid szCat Error occurred, invalid szFreq Error occurred, invalid szEntity Error occurred, invalid szPer 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, LPCSTR szCat, LPCSTR szAcct, LPCSTR szPer, LPCSTR szFreq, LPCSTR szParent, WORD wType)

HypValReturn( ) - Return Status of Last Value Retrieval


This function returns a value that indicates the status of the last HypHPVAL( ) or HypHPVALEx( ) data retrieval functions and the following other functions:
l

HypHPACC( ) HypHPBET( ) HypHPCAD( ) HypHPCAL( )


Alphabetical Function Reference

75

HypHPCDE( ) HypHPCUREx( ) HypHPDRV( ) HypHPECO( ) HypHPFLW( ) HypHPFRE( ) HypHPFUL( ) HypHPHEA( ) HypHPINC( ) HypHPINP( ) HypHPJOUR( ) HypHPKEYEx( ) HypHPNAM( ) HypHPOWN( ) HypHPPBE( ) HypHPPCH( ) HypHPSCA( )

You use HypValReturn( ) to get more detailed information about the error returned by any of the functions listed above. Call HypValReturn( ) immediately after calling the function that returned 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 RET_OK (0) RET_NA (-1) HACC_BAD_...( >= 10 ) Meaning The request was successful. A value is not available. The request was valid, but no data was found in the database. An error occurred. The request was not valid for the current structure of the database. See the TOOLKIT.BAS or TOOLKIT.H file for specific error codes, or see the topics for the individual functions.

Example:
ValRet& = HypValReturn( ) Select Case ValRet& Case Ret_NA RetString$ = "Data not available" Case HACC_BAD_ACCOUNT RetString$ = "Bad Account" Case Ret_OK RetString$ = "OK"

76

Spreadsheet Add-in Functions

Case Else RetString$ = "Error" End Select

Use this format for C: int WINAPI HypValReturn( void )

Alphabetical Function Reference

77

78

Spreadsheet Add-in Functions

3
In This Chapter

Table Functions

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 retrieve information from the tables into which Hyperion Enterprise applications are organized.

Table Functions Overview


Information about Hyperion Enterprise applications is organized into tables. For example, an account table lists the accounts in the chart of accounts and their attributes, and a categories table lists the categories in the application and their attributes. This chapter describes how to retrieve the information you want from the tables using functions in the Hyperion Enterprise API. Table functions are designed to be used with the spreadsheet add-in functions described in Chapter 2, Spreadsheet Add-in Functions and are alternatives to the more advanced functions described 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 the HypConstruct( ) function. If you open multiple applications, you can get the handle from HypMultiGet( ) or HypMultiDefault( ). For more information, see Single Application Management Functions on page 23 or Multiple Application Management Functions on page 24.

Select and Deselect Tables Using Hyp...( ) Functions


Before you can access any information in a table, you must first select the table by calling the HypLockEx( ) function. This function tells the Hyperion Enteprise API that you plan to use the table 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 the table. Many tables have other tables associated with them. In Hyperion Enterprise SE, these associated tables are available when you select the main table. For example, the currencies and entities tables are available when you select the organizations table. In Hyperion Enterprise, you can select associated 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. You should always use HYP_ID_ASSOC to select or deselect the associated tables rather than selecting or 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 an application, the organization (ID_ORGANIZATION), category (ID_CATEGORY), and account (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 the previous tables. If an application was set up with dynamic organizations, you should reselect the organization table (ID_ORGANIZATION) and its associated tables, whenever you change categories. Pass the 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...( ) Functions


After you select a table using the HypLockEx( ) function, you can use the functions listed in Table 22 to retrieve information from the selected table.
Table 22

Functions to Use after Selecting a Table with HypLockEx( ) Description Enumerates the records in the table. Finds a specific record in the table. Retrieves information about a specific record.

Function HypEnumEx( ) HypFindEx( ) HypQueryEx( )

Each record in the table is identified by a unique value called a signature. You specify the signature when 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 retrieve information. You can get the signature of a specific record by calling HypFindEx( ). If you use HypEnumEx( ) to enumerate the records in a table, the function returns the signature of each record.

80

Table Functions

Related Tables and Hyp...( ) Functions


Some tables are related to another table. Whenever you select, access, or deselect a table to which another table is closely related, you must specify a record in the related table. For example, the account list entries table (ID_ACCTLISTENTRY) contains information about the records in an account list. You must specify an account list by passing the account list's signature (in the account list table, ID_ACCTLIST). You pass the signature of the related record as the sigKey argument when you use one of the following functions:
l

HypEnumEx( ) - Enumerate Records in a Table HypFindEx( ) - Find Signature HypLockEx( ) - Select a Table HypQueryEx( ) - Query Hyperion Enterprise Tables HypUnLockEx( ) - Deselect a Table
Note: Because the key is an argument to HypLockEx( ), you must select the related table

before you can select the dependent table. For a listing of related Hyperion Enterprise tables, see Related Tables on page 363.

Organization Structures and Hyp...( ) Functions


Table 23 lists the functions that retrieve information about an organization structure.
Table 23

Functions To Use To Retrieve Organization Information Description Enumerates nodes in an organization. Finds a node in an organization. Gets the signature of a child node. Gets the organization level of a node. Gets the signature of the next sibling node in an organization. Gets the signature of the top node in an organization. Checks if a specified entity is a parent entity.

Function HypEnumOrgNames( ) HypFindNameInOrgEx( ) HypGetChild( ) HypGetOrgLevel( ) HypGetSibling( ) HypGetTopNodeEx( ) HypIsNameParentEx( )

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 about a 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, not the signature of an entity. You can retrieve the signature of the entity by querying the Nodes table using the HypQueryEx( ) function and query attribute NAMESIG. If an application was set up with dynamic organizations, the organization structure can vary by category and period. These functions have no way of specifying the category or period. They use the current category and period. You should use the advanced functions that take the form Ent...( ) if an application uses dynamic organizations. 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 Conversion


Given a period in one category, for example the reference category, DateConv( ) calculates the equivalent period in another category and reporting frequency, for example, the base category and 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 As Integer, 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 hRApp iMethod Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) One of the following codes:
l l

DCONV_CMO, which resets the calculated period each year 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 szFreq szBaseCat The number of periods by which to offset the result The ID of the base reporting frequency The ID of the base category

Return Codes:

82

Table Functions

Code Period number BAD_PERIOD

Meaning Successful 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, LPSTR szRefPeriod, short iOffset, LPSTR szFreq, LPSTR szBaseCat);

HypCatGetNumPeriodsEx( ) - Calculate Number of Periods in a Category


This function calculates the number of periods in a category for any given frequency. Given a category in one frequency and a different frequency, this function returns the number of available periods. 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, ByVal sigFreq As Long) As Integer
Variable Description hRApp sigCat sigFreq The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The category signature The frequency signature

Return Codes:
Code Number of periods that category sigCat has for frequency sigFreq NONE Meaning Successful Error occurred

Example:
sigCat& = HypFindEx(hRApp% HYP_ID_CATEGORY, HYP_NONE, "ACTUAL") sigFreq& = FREQ_QUARTER numPer% = HypCatGetNumPeriodsEx(hRApp%, sigCat&, sigFreq&)

Use this format for C:


Table Functions Alphabetical Reference

83

short WINAPI HypCatGetNumPeriodsEx(HRETRIEVEAPP hRApp, SIGNA sigCat, SIGNA sigFreq);

HypCatGetPerShortEx( ) - Get Period ID in Category Frequency


This 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, ByVal sigPer As Long, ByVal sigFreq As Long, ByVal cchTag As Integer, ByVal pzTag As String) As Integer
Variable Description hRApp sigCat sigPer sigFreq cchTag pzTag The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The category signature The period number in the specified category The frequency, or HYP_NONE (NONE in C) to use the specified category's frequency. The length of the pszTag buffer. The buffer to return the period ID.

Return Codes:
Code Length of the result string 0 Meaning Successful Error occurred

Example:
szPer$ = SPACE(10) 'arbitrary size ret% = 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, SIGNA sigPer, SIGNA sigFreq, short cchTag, char * pzTag);

HypCatMapPeriodEx( ) - Map Period into Frequency


This function maps a period in a given frequency into the corresponding period in another frequency.
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 sigCat sigFreq sigPer The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The category signature The frequency signature for 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 (NONE in C) to use the category's default frequency.

Return Codes:
Code Period signature for frequency BAD_PERIOD Meaning Successful 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 to Monthly and get March (3). The function would then map the Monthly (3) to weeks and come up with W13, because the last week in March is Week 13. This is useful if you are trying to build a report based on weeks, but you need to get the corresponding values from two categories that have different frequencies. Use this format for C: SIGNA WINAPI HypCatMapPeriodEx(HRETRIEVEAPP hRApp, SIGNA sigCat, SIGNA sigFreq, SIGNA sigPer, SIGNA sigAltFreq);

HypEnumAcctListEntriesEx( ) - Enumerate Accounts in Account List


This function enumerates all accounts in the specified account list, calling a user-supplied callback function for each account in the account list. For a dynamic list, HypEnumAcctListEntriesEx( ) passes the account signature to the callback function. For a fixed list, the signature passed to the callback function is the signature of the entry in the Account List Entries 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 Entries

table (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 hRApp sigList Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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 0 Non-zero value NONE Meaning Successful Returned from callback function to terminate enumeration 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 'Error ret% = HypLockEx(hRApp%, HYP_ID_ACCTLISTENTRY,sigList&, APILOCK_READONLY) If ret% <> APILOCK_READONLY Then Return 'Error lParam& = listType% ret% = HypEnumAcctListEntriesEx(hRApp%, sigList&, AddressOf EnumAcctListEntriesCB, lParam&) ret% = HypUnLockEx(hRApp%, HYP_ID_ACCTLISTENTRY, sigList&, 0) . . . 'Callback function, whatever you named it Public Function EnumAcctListEntriesCB(ByVal hRApp%, ByVal sigList&, ByVal sigEntry&, ByVal lParam&) As Integer 'We passed the list type in lParam in this example If 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 id szAcct$ = 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 enumeration EnumAcctListEntriesCB% = 0 End Function

Use this format for C: short WINAPI HypEnumAcctListEntriesEx(HRETRIEVEAPP hRApp, SIGNA sigList, CALLBACK12 lpCallBack, LONG lParam);

HypEnumApplications( ) - Enumerate Applications


This function enumerates all Hyperion Enterprise applications that have been set up on the current machine using the New Application or Add Application command in Hyperion Enterprise. HypEnumApplications( ) reads the HYPENT.INI file and enumerates applications using a callback function. Use this format: Declare Function HypEnumApplications Lib heaccess.dll Alias_HypEnumApplications@8 (ByVal lpfnCallBack As Long, ByVal lParam As Long) As Integer
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 0 1 Non-zero value Meaning Successful Error occurred or no applications listed Returned from callback function to terminate enumeration

Example:
ret% = HypEnumApplications(AddressOf EnumAppsCallback, lParam&) . .

Table Functions Alphabetical Reference

87

. 'Callback function Public Function EnumAppsCallback(laddr as Long, ByVal lParam&) As Integer Copy C string to B string wLen% = EntVBGetCStrLen( lAddr&) szApp$=Space (wLen%) ret%=EntVBCopyStr(szApp$, lAddr&, wLen%) If UCASE(szApp$) <> "DEFAULT" Then ret% = MsgBox("Application: " & szApp$) End If EnumAppsCallback% = 0 'continue enumeration End Function

Use this format for C: short WINAPI HypEnumApplications(CALLBACKAPP lpCallBack, LONG lParam);

HypEnumEx( ) - Enumerate Records in a Table


This function enumerates the signatures of all records in a specified table using a user-provided callback function. For each record in the table wTabId, HypEnumEx( ) passes the signature to the specified callback function. You can stop the enumeration by returning a non-zero value from the callback function. Use this format: Declare Function HypEnumEx Lib heaccess.dll Alias _HypEnumEx@20(ByVal hRApp As Integer, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal lpCallback As Long, ByVal lParam As Long) As Integer
Variable hRApp wTabId sigKey Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The table for which signatures are enumerated. For a complete list of table IDs, see Appendix A, Table IDs. 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, which

begin 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( ) Function To Use HypEnumAcctListEntriesEx( ) HypEnumOrgNames( ) HypEnumSubAcctSig( ) HypEnumNameListEntriesEx( ) EntEnum( ) EntEnum( ) EntEnum( ) EntEnum( ) HypHPVAL( ) to get the data values for each account after enumerating accounts. EntEnum( ) EntEnum( ) EntEnum( ) EntEnum( ) EntEnum( ) EntEnum( ) EntEnum( ) NA

Table ID_ACCTLISTENTRY ID_NODES ID_SUBACCTDET ID_NAMELISTENTRY ID_SECGRPTAB ID_SECUSERTAB ID_SECRIGHTS ID_SHARES ID_DATAFILE ID_JOURNAL_DETAIL ID_JOURNAL_HISTORY ID_JOURNAL_HISTORY_DETAIL ID_JOURNAL_TEMPLATES ID_JOURNAL_TEMPLATES_DETAIL ID_JOURNAL_PERIOD_INFO ID_JOURNALS ID_PSFDATA

Return Codes:
Code 0 NONE Non-zero value Meaning Successful Error occurred 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 an Entity List


This function enumerates all entities within the specified entity list. The function calls the users lParam 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 hRApp sigList Description The Hyperion Enterprise Retrieve application handle from HypConstruct 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 0 NONE Non-zero value Meaning Successful Error occurred Returned from callback function to terminate enumeration

Example:
ret% = HypLockEx(hRApp%, HYP_ID_NAMELIST, HYP_NONE, APILOCK_READONLY) If ret% <> APILOCK_READONLY Then Return 'Error sigList& = HypFindEx(hRApp%, HYP_ID_NAMELIST, HYP_NONE,szList$) If sigList& <> HYP_NONE Then ret% = HypLockEx(hRApp%, HYP_ID_NAMELISTENTRY, sigList&, APILOCK_READONLY) If ret% = APILOCK_READONLY Then 'ok ret% = HypEnumNameListEntriesEx(hRApp%, sigList&, AddressOf EnumEntityListEntriesCB, 0) ret% = HypUnLockEx(hRApp%, HYP_ID_NAMELISTENTRY, sigList&, 0) End If End If ret% = HypUnLockEx(hRApp%, HYP_ID_NAMELIST, HYP_NONE, 0) .

90

Table Functions

. . 'Callback function, whatever you named it Public Function EnumEntityListEntriesCB(ByVal hRApp%, ByVal sigList&, ByVal sigEntry&, ByVal lParam&) As Integer ret% = HypQueryEx(hRApp%, HYP_ID_NAMELISTENTRY, ENTRY_SIG, sigEntry&, sigList&, 4, sigEntity&) 'Display entity label szEntity$ = 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 enumeration EnumEntityListEntriesCB% = 0 End Function

Use this format for C: short WINAPI HypEnumNameListEntriesEx(HRETRIEVEAPP hRApp, SIGNA sigList, CALLBACK12 lpCallback, LONG lParam);

HypEnumOrgNames( ) - Enumerate Nodes in an Organization


Organization information is stored in the Nodes table (ID_NODES). Each record in the table is called a node. HypEnumOrgNames( ) enumerates all nodes in an organization. Nodes are enumerated 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 on page 81.
Note: If the application was set up to use dynamic organizations, we recommend that you use

the advanced functions. For more information, see Organization Structures and Advanced 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 As Long, ByVal wMask As Integer) As Integer

Variable hRApp sigNode

Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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 wMask

Description Any combination of the following selection flags:


l l l l l l

ENUM_DEP, which enumerates immediate dependents only (ENUM_DEP must be used alone.) ENUM_CON, which enumerates all parent entities below the specified node ENUM_BAS, which enumerates all base entities below the specified node ENUM_UNOWNED, which enumerates all unowned entities ENUM_SUBNAME, which includes all subentities ENUM_ALL, which enumerates base and parent entities and subentities below sigNode

Return Codes:
Code 0 NONE Non-zero value Meaning Successful Error occurred 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 it Public Function EnumOrgCB(hSelect&, sigNode&, sigKey&, lParam&, apiS) As Integer 'Get & display entity ID ret% = 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 enumeration EnumOrgCB% = 0 End Function

Use this format for C: short WINAPI HypEnumOrgNames(HRETRIEVEAPP hRApp, SIGNA sigNode, short DWCALLBACK lpCallBack, LONG lParam, WORD wMask);

HypEnumSubAcctSig( ) - Enumerate Subaccount Signatures


This function enumerates a series of sub-account signatures for a specified major account. Use this 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 As Long) As Integer
Variable hRApp sigAcct Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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 0 None Non-zero value Meaning Successful Error occurred Returned from callback function to terminate enumeration

Example:
ret% = HypEnumSubAcctSig(hRApp%, sigAcct&, AddressOf EnumSubAcctCB, 0) . . . 'Callback function Public Function EnumSubAcctCB(ByVal hRApp%, ByVal sigAcct&, ByVal lParam&) As Integer szAcct$ = 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 If EnumSubAcctCB% = 0 End Function

Use this format for C: short WINAPI HypEnumSubAcctSig(HRETRIEVEAPP hRApp, SIGNA sigAcct, DWCALLBACK lpCallback, SIGNA lParam);
Table Functions Alphabetical Reference

93

HypFindEx( ) - Find Signature


This function searches a specified table (wTabId) using a given search string and returns the signature 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( ) Function to Use EntFind( ) NA See the note that follows this table. EntFind( ) EntFind( ) EntFind( ) EntFind( ) EntFind( ) EntFind( ) EntFind( ) EntFind( ) HypGetNameSig( ) HypFindNameInOrgEx( ) NA EntFind( )

Table ID_ACCTCONVERT ID_DATAFILE ID_INTCODET ID_JOURNAL_DETAIL ID_JOURNAL_HISTORY ID_JOURNAL_HISTORY_DETAIL ID_JOURNAL_TEMPLATES ID_JOURNAL_TEMPLATES_DETAIL ID_JOURNAL_PERIOD_INFO ID_JOURNALS ID_NAMECONVERT ID_NAMES ID_NODES ID_PSFDATA ID_SHARES

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 desired intercompany matching set, then call HypQueryEx( ) with query attribute INTCO_GROUPSIG (and table ID_ICSET) to get the signature of the first detail record in table ID_INTCODET. You get subsequent detail records by calling HypQueryEx( ) for each 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 than a string:
l

For the ID_SECRIGHTS table, use the SECURRIGHTSKEY struct. 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 As Integer, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal szKey As String) As Long
Variable Description hRApp wTabId sigKey szKey The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The ID of the table you want to search. For a complete list of table IDs, see Appendix A, Table IDs. 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. The string for which you are searching

Return Codes:
Code The signature NONE Meaning Successful 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 ID


This function returns the node signature of a particular entity instance (node) in a specified organization. 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 a unique node signature. 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 use

the advanced functions. For more informations, see Organization Structures and Advanced Functions on page 120. Use this format: Declare Function HypFindNameInOrgEx Lib heaccess.dll Alias_HypFindNameInOrgEx@16 (ByVal hRApp As Integer, ByVal sigOrg As Long, ByVal sigNode As Long, ByVal sigEntity As Long) As Long
Table Functions Alphabetical Reference

95

Variable Description hRApp sigOrg The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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 Node signature of the specified entity NONE Error occurred because the name is not in the specified organization Meaning Successful

Example:
ret% = HypHPKEYEx(hRApp%, "ORGANIZATION", sigOrg&) 'Get sigOrg& If ret% = 0 Then sigNode& = HypFindNameInOrgEx(hRApp%, sigOrg&, HYP_NONE, sigEntity&) End If

Use this format for C: SIGNA WINAPI HypFindNameInOrgEx(HRETRIEVEAPP hRApp, SIGNA sigOrg, SIGNA sigNode, SIGNA sigEntity);

HypGetCatPerFreq( ) - Get Period Number and Frequency in Category


This 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) As Long
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 Period number NONE Meaning Successful 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, SIGNA sigCat, SIGNA * psigFreq);

HypGetChild( ) - Get Child Node


This 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 use

the advanced functions. For more information, see Organization Structures and Advanced Functions on page 120. Use this format: Declare Function HypGetChild Lib heaccess.dll Alias _HypGetChild@12(ByVal hRApp As Integer, ByVal sigNode As Long, ByVal fExpandSubentities As Long) As Long
Variable hRApp sigNode Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The signature of the child node

fExpandSubentities One of the following:


l l

1 = True. Retrieve the attached substructure. 0 = False. Do not retrieve the attached substructure.

Return Codes:
Table Functions Alphabetical Reference

97

Code Signature of the child node NONE

Meaning Successful Error occurred

Example:
sigChild& = HypGetChild(hRApp%, sigNode&, 1)

Use this format for C: SIGNA WINAPI HypGetChild(HRETRIEVEAPP hRApp, SIGNA sigNode, BOOL fExpandSubentities);

HypGetNameSig( ) - Get Entity Signature


This function returns an entity signature based on the application handle, entity, and sub-entity criteria code you provide.Table 26 shows three possible sub-entity criteria codes.
Table 26

Subentity Criteria Codes for HypGetNameSig( ) Signature Returned The signature for an entity.subentity combination, even if only the entity is specified The signature for an explicit entity only. For entities with subentities, this code returns an error because the explicit entity is not considered a valid entity. The signature for an explicit entity only, regardless of whether the entity has subentities associated with it

Code NAME_IMPLICIT NAME_EXPLICIT NAME_ADMIN

For example, suppose the entity ITALY has a substructure TRAN. If you set the sub-entity criteria code to NAME_IMPLICIT, the function returns the signature for ITALY.TRAN because that is where the data is stored. If you set the code to NAME_EXPLICIT, the function call fails because ITALY by itself is not considered a valid entity. If you use NAME_ADMIN, the function returns the signature for ITALY because no data is associated with that entity. Use this format: Declare Function HypGetNameSig Lib heaccess.dll Alias _HypGetNameSig@12(ByVal hRApp As Integer, ByVal szEntity As String, ByVal fImpliedSubEntities As Integer) As Long
Variable hRApp szEntity Description The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The entity for which to search

fImpliedSubEntities One of the following codes:


l l l

NAME_IMPLICIT NAME_EXPLICIT NAME_ADMIN

98

Table Functions

Return Codes:

Code Entity signature NONE

Meaning Successful Error occurred

Example:
'Next line sigEntity& 'Next line sigEntity& 'Next line sigEntity& returns signature Italy.Tran = HypGetNameSig(hRApp%, "Italy", NAME_IMPLICIT) returns HYP_NONE = HypGetNameSig(hRApp%, "Italy", NAME_EXPLICIT) returns signature of Italy only = HypGetNameSig(hRApp%, "Italy", NAME_ADMIN)

Use this format for C: SIGNA WINAPI HypGetNameSig(HRETRIEVEAPP hRApp, LPSTR szEntity, short fImpliedSubEntities);

HypGetOrgLevel( ) - Get Level in Organization


This function returns the organization level of the specified 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 use

the advanced functions. For more information, see Organization Structures and Advanced Functions on page 120. Use this format: Declare Function HypGetOrgLevel Lib heaccess.dll Alias _HypGetOrgLevel@16(ByVal hRApp As Integer, ByVal sigTopNode As Long, ByVal sigTarget As Long, ByVal nLevel As Integer) As Integer

Variable hRApp

Description 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 nLevel The signature of the node for which you want to know the organization level Usually 0, or one level less than the level of sigTopNode

Return Codes:f
Table Functions Alphabetical Reference

99

Code Organization level 0

Meaning Successful Error occurred

Example:
ret% = HypHPKEYEx(hRApp%, "ORGANIZATION", sigOrg&) 'Get sigOrg& If ret% = 0 Then sigTop& = HypGetTopNodeEx(hRApp%, sigOrg&) If sigTop& = HYP_NONE Then ret% = HYP_NONE End If If ret% = 0 Then nLevel% = HypGetOrgLevel(hRApp%, sigTop&, sigTarget&, 0) If nLevel% = 0 Then ret% = HYP_NONE 'error End If

Use this format for C: short WINAPI HypGetOrgLevel(HRETRIEVEAPP hRApp, SIGNA sigTopNode, SIGNA sigTarget, short nLevel);

HypGetPerViewEx( ) - Get Frequency and View


This 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 szFreq sigFreq iView The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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. The place to return the frequency for the specified reporting frequency The place to return the view for the specified reporting frequency (VIEW_YTD or VIEW_PERIODIC)

Return Codes:
Code 0 NONE Meaning Successful 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 Sibling


This 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 hRApp As 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 Signature of the next sibling node NONE Meaning Successful Error occurred

Example:
sigSibling& = HypGetSibling(hRApp%, sigNode&)

Use this format for C: SIGNA WINAPI HypGetSibling(HRETRIEVEAPP hRApp, SIGNA sigNode);

HypGetTopNodeEx( ) - Get Top Node


This function returns the signature of the top node in an organization. You can then use the top node signature in conjunction with HypEnumOrgNames( ) to create a list of all entities within an 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 use

the advanced functions. For more information, see Organization Structures and Advanced Functions on page 120. Use EntQueryEx( ) with the Organization table (ID_ORGANIZATION) and query attribute TOPNODE to get the node signature of the top 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 sigOrg The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The organization signature

Return Codes:
Code Signature of the top node in the organization NONE Meaning Successful Error occurred

Example:
ret% = HypHPKEYEx(hRApp%, "ORGANIZATION", sigOrg&) If ret% = 0 Then sigTop& = HypGetTopNodeEx(hRApp%, sigOrg&) End If 'Get sigOrg&

Use this format for C: SIGNA WINAPI HypGetTopNodeEx(HRETRIEVEAPP hRApp, SIGNA sigOrg);

HypIsNameParentEx( ) - Check If Entity Is a Parent


This 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 use

the advanced functions. For more information, see Organization Structures and Advanced 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 in the 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 displaying children in certain organization views. Return Codes:
Code TRUE (1) FALSE (0) Meaning The entity is a parent. The entity is not a parent.

Example:
isParent% = HypIsNameParentEx(hRApp%, sigEntity&, HYP_NONE) If isParent% Then ret% = MsgBox("Unable to put data in parent company") End If

Use this format for C: SBOOL WINAPI HypIsNameParentEx(HRETRIEVEAPP hRApp, SIGNA sigEntity, SIGNA sigOrg);

HypLockEx( ) - Select a Table


This function selects one or more specified tables. A table must be selected before you can access its 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 should deselect 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 operation

to 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( ) Function To Use EntDataFileOpen( ) EntSelectTableAdd( ) EntSelectTableAdd( ) EntSelectTableAdd( ) EntSelectTableAdd( )

Table ID_DATAFILE ID_JOURNAL_DETAIL ID_JOURNAL_HISTORY_DETAIL ID_JOURNAL_TEMPLATE_DETAIL ID_JOURNAL_PERIOD_INFO

Use this format:


Table Functions Alphabetical Reference 103

Declare Function HypLockEx Lib heaccess.dll Alias _HypLockEx@16(ByVal hRApp As Integer, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal wAttr As Integer) As Integer
Variable Description hRApp wTabId sigKey wAttr The Hyperion Enterprise Retrieve application handle from HypConstruct( ) 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. A key record (usually NONE). If this is required, you must select the table that contains the key before you can select the table specified by wTabId. For more information, see Appendix A, Table IDs. APILOCK_READONLY, which selects the table as read-only

Return Codes:
Code NONE APILOCK_READONLY Meaning Access to table denied. 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, short wAttr);

HypQryRptFreqEx( ) - Query Reporting Frequency


This function retrieves the reporting frequency that corresponds to a specified Hyperion Enterprise frequency and view. You can retrieve the ID or the description of the reporting frequency. 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 As Integer, ByVal wMax As Integer, ByVal pzbuf As String) As Integer
Variable Description hRApp sigFreq The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The frequency, such as FREQ_MONTH or FREQ_QUARTER

104 Table Functions

Variable Description wView wAttr wMax pzBuf The view associated with the specified frequency, such as VIEW_YTD or VIEW_PERIODIC NAME to retrieve the ID or DESC to retrieve the description of the reporting frequency The length of the wAttr buffer 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 0 NONE Meaning Successful 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 Tables


This function allows you to query a Hyperion Enterprise table and retrieve information about an 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 when querying a string value. HypQueryExStr(), declared in the TOOLKIT.BAS file, is a clone of the declaration for HypQueryEx() adjusted for use with strings. Use this format: Declare Function HypQueryEx Lib haccess.dll (ByVal hRApp As Integer, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal sigRecd As Long, ByVal sigKey As Long, ByVal wLen As Integer, pzBuf As Any) As Integer
Variable Description hRApp wTabId wAttr The Hyperion Enterprise Retrieve application handle from HypConstruct( ) The ID of the table you want to query. For a complete list of table IDs, see Appendix A, Table IDs. The field of the record you want to query. This can be any query attribute listed for the table identified in wTabId that does not require an apiStruct.

Table Functions Alphabetical Reference 105

Variable Description sigRecd The record number you want to query. sigKey wLen pzBuf 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. The length of pzBuf. The buffer to return the requested information. This argument should be type-appropriate for the query. For more information, see Appendix B, Query Attributes.

Return Codes:
Code 0 NONE Meaning Successful 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, SIGNA sigRecd, SIGNA sigKey, short wLen, void FAR * pzBuf);

HypUnLockEx( ) - Deselect a Table


This function deselects a table that was selected with the HypLockEx( ) function. All selected tables should be deselected before calling either HypMultiDeinit( ) or HypDestruct( ) to close an application.
Note: You can use the table ID combined with the ID_ASSOC constant using an OR operation

to 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 hRApp As Integer, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal bDiscard As Integer) As Integer
Variable Description hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )

106 Table Functions

Variable Description wTabId sigKey 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 all selected tables and use the OR operation with the table ID and ID_ASSOC to deselect all associated tables also. 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 0 NONE Meaning Successful 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

4
In This Chapter

Advanced Functions

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 Overview


Most of the advanced functions of the Hyperion Enterprise API make direct calls to the underlying Hyperion Enterprise API functions that are used by the Hyperion Enterprise product itself. The advanced functions give you access to the full power and capability of Hyperion Enterprise. Most advanced functions require a handle to the tables that you have selected, called the hSelect of 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 an hSelect. You get the application handle, called an hApp, when you open an application by calling EntOpenApplication( ).
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. Select the tables. For more information, see Select and Deselect Tables using Advanced Functions on page 111. Perform the desired operation. Deselect the tables. Close the application.

If you opened an application with the spreadsheet add-in functions HypConstruct( ) or HypMultiInit( ), see Combining Spreadsheet Add-in Functions with Advanced Functions on page 113 for instructions on retrieving the hApp and the hSelect, so that you can use the advanced functions.

Opening an Application
You must call the EntOpenApplication( ) function to open an application before you can call any other functions for that application. EntOpenApplication( ) gives you a handle to the application. In C, this handle is defined as type HAPP. You must call the EntCloseApplication( ) function to close the application when you are finished using that application, before the program ends. Unlike the spreadsheet add-in function HypConstruct( ), EntOpenApplication( ) does not select any tables. You must select one or more tables before you can do much with the application.

Tables and Advanced Functions


Information about Hyperion Enterprise applications is organized into tables. This section describes how to work with tables to get whatever information you want.

Using an apiStruct Structure


Many of the advanced functions for working with tables have an argument that is a structure called an apiStruct. This structure is defined in the TOOLKIT.BAS and TOOLINC.H files. It is used 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 of type APISTRUCT, initialize the structure by calling the EntInitApiStruct( ) function, then set the 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 using

Spyworks, see EntVBCopyData( ) - Copy Data on page 276 to convert the SpyWorks long argument to an apiStruct. Example:
'get ID of category's period 1 ("Jan 03", for example) DIM apiS As APISTRUCT Call EntInitApiStruct(hApp&, apiS) apiS.lStartPeriod = 1 apiS.u_ApiQry.sPeriod_View = HYP_NONE 'use category's frequency szPeriod$ = 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 Functions


After you open a Hyperion Enterprise application, you must select the tables that you want to access. When you select a table, the Hyperion Enterprise API prepares the table for access.Use the following guidelines when selecting tables:
l

To select your first table, open the application with EntOpenApplication( ), then call EntSelect( ). To select more tables, call EntSelectAdd( ). You pass hSelect, which is the handle of the selected tables that you received when you selected the first table via EntSelect( ), to EntSelectAdd( ). You can select as many tables as you like. When you are finished using a table, call EntUnSelect( ) to deselect the table. You can tell EntUnSelect( ) to deselect all selected tables, if you prefer, with one call. You should deselect all selected tables before your program ends.

Many tables have other tables associated with them. 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. You should always use HYP_ID_ASSOC to select or deselect the associated tables rather than selecting or deselecting the tables individually. For more information, see Associated Tables on page 362.
Tip: Select the category, organization, and account tables and their associated tables. Many

functions assume that these tables are available. For best performance, select the category table 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 should pass 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 to another 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 Hyperion Enterprise API to call your function to update a display or something else you have read from the table whenever the table has been changed. For more information, see Selection Callbacks on page 112.

Selection Callbacks
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 Hyperion Enterprise API to call your function whenever the table is changed, or if you want to update a display 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 the callback functions for all of the tables you select are associated with hSelect, which is the handle to the selected tables. You can also specify a callback function after you have selected a table, by calling EntAppendToCBChain( ). You can instruct the API to stop using a callback function by calling EntDeleteFromCBChain( ). Whenever any selected table changes, the Hyperion Enterprise API will call all of the callback functions associated with that hSelect handle. It passes to your callback function the table ID of the table that changed. For more information, see CALLBACKSEL on page 318.

Using Tables with Advanced Functions


To get information from a table, you select the table then use the functions described in Table 28.
Table 28

Advanced Functions Used with Tables Description Enumerates the records in the table. Finds a specific record in the table. Retrieves information about a specific record.

Function EntEnum( ) EntFind( ) EntQueryEx( )

Each record in the table is identified by a unique value called a signature. You specify the signature when 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 can also get the record signatures by using EntEnum( ). EntEnum( ) enumerates and returns the signatures of all the records in a table. These functions work with most tables. There are many other specialized advanced functions for retrieving specific information from specific tables.

112 Advanced Functions

Related Tables and Advanced Functions


Some tables are so closely related to another table that you must specify a record in the related table 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 must specify 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 the following API functions:
l

EntDiscardChanges( ) - Discard Changes EntEnum( ) - Enumerate Records in a Table EntFind( ) - Find Signature EntIsModified( ) - Is Table Modified? EntIsSelected( ) - Is Table Selected? EntQueryEx( ) - Query Information EntSave( ) - Save Table EntSelectAdd( ) - Select an Additional Table for Use EntSelectTable( ) - Select a Table for Use EntSelectTableAdd( ) - Select an Additional Table for Use EntUnSelect( ) - Deselecting Tables
Note: Because the sigKey is an argument to EntSelectAdd( ) you must select the related table

before 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 with Advanced Functions


Most of the advanced functions use either hApp or hSelect as the argument. hApp is returned when you open a Hyperion Enterprise software application. hSelect is returned when you select a table. By contrast, the spreadsheet add-in functions use hRApp as an argument. HRApp is the handle 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 functions you 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 Description Gets the hApp associated with a Hyperion Enterprise Retrieve application. Returns the hSelect handle associated with a Hyperion Enterprise Retrieve application. Changes the hSelect handle associated with a Hyperion Enterprise Retrieve application.

Function HypGethApp( ) HypGethSelect( ) HypSethSelect( )

You must call HypSethSelect( ) whenever you perform any action that could potentially change the hSelect handle, such as EntUnSelect( ).

Selection Dialog Box Functions


You use selection dialog box functions to access the API standard selection dialog boxes. These dialog boxes allow you to select accounts, account lists, categories, frequencies, entities, and periods. Table 30 lists the selection dialog box functions:
Table 30

Selection Dialog Box Functions Description Used to select an account. Used to select an account list. Used to select a category. Used to select an entity. Used to select an entity list. Used to select a frequency. Used to select a period.

Function EntAcctAsk( ) EntAcctListAsk( ) EntCatAsk( ) EntEntityAsk( ) EntEntityListAsk( ) EntFreqAsk( ) EntPerAsk( )

Working with Data


Hyperion Enterprise data values are stored in the Datafile table, ID_DATAFILE. Unlike other tables, you select this table by calling EntDataFileOpen( ), not EntSelect( ). You specify the category 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, or erase the selected datafile table. When you are finished working with the table, use the EntUnSelect( ) function to deselect the Datafile table. After you select the datafile table, you must set up an apiStruct structure for use with the other API 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 Description The category signature. The entity signature. NONE normally (if wType is ID_REGULAR). ID_REGULAR for normal data. For more information, see Consolidation Detail Values on page 119.

Field sigCat sigName sigParent wType

Retrieving Data
After 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 (NONE in C) as the record signature for EntQueryEx( ). Before you can call EntQueryEx( ), you must allocate two buffers and set more fields in the apiStruct. The size of the two buffers depends on the number of periods that you want. One buffer is for data values, which must be large enough for one data value (type double) for each period. The other buffer is for status information, which must be an integer (two bytes) for each period. Table 32 lists the fields you need to set in the apiStruct.
Table 32

apiStruct fields for Retrieving Data Description The category signature. The entity signature. NONE normally (if wType is ID_REGULAR). ID_REGULAR for normal data. For more information, see Consolidation Detail Values on page 119. The first period desired (0-based). The last period desired (0-based). The address of your data buffer. The address of your status buffer. The account signature. NONE for default frequency, or the signature of desired frequency. The automatic recalculation of formulas when getting data. Must be 1 (TRUE) or 0 (False). 1 (TRUE) for periodic data, or 0 (False) for category-to-date or other to-date data.

Field sigCat sigName sigParent wType lStartPeriod lEndPeriod lpimrData lpseStatus u_Dfa.sigAcct u_Dfa.iFreq u_Dfa.bAutoRecalc u_Dfa.bPeriodic

Working with Data 115

Field u_Dfa.sViewType

Description 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 u_Dfa.wRndFlag

The accumulate frequency. This is needed only if u_Dfa.sViewType is VIEWTYPE_TODATE. 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 and lpseStatus 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 from EntQueryEx( ), your data buffer (apiStruct.lpimrData) will contain the data values that you requested, one for each period. Your status buffer (apiStruct.lpseStatus) will contain a status value for each period. The status value PS_OK (see the TOOLINC.H file) indicates that the data for that period is in your data buffer; PS_NODATA indicates that there is no data for that account and period. Example:
DIM apiS As APISTRUCT ret% = 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_NONE apiS.wType = ID_REGULAR apiS.lStartPeriod = 0 apiS.lEndPeriod = 0 'let's just get the first period apiS.lpimrData = EntGetVarAddr(dValue#) apiS.lpseStatus = EntGetVarAddr(wStatus%) apiS.u_Dfa.sigAcct = sigAcct& apiS.u_Dfa.bPeriodic = 0 apiS.u_Dfa.iFreq = HYP_NONE apiS.u_Dfa.sViewType = HYP_NONE ret% = 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 Data
To update data, you must request read-write access when you select the Datafile table. Use APILOCK_READWRITE instead of APILOCK_READONLY when you call the EntDataFileOpen( ) function. You also must allocate two buffers, one for the data and one for status information. The size of these buffers depends on the number of periods that you want to update. You fill the data buffer with one data value (type double) for each period that you want to update. Fill the status buffer with 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 Description The category signature. The entity signature. NONE. ID_REGULAR. The first period to update. The last period to update. The address of your data buffer. The address of your status buffer. The account signature. NONE for the default frequency, or the frequency signature. 1 (TRUE) for periodic data, or 0 (False) for category-to-date data. NONE or the signature of the categorys default frequency. NONE, or one of the following codes: VIEWTYPE_YTD for category-to-date VIEWTYPE_PER for periodic

Field sigCat sigName sigParent wType lStartPeriod lEndPeriod lpimrData lpseStatus u_Dfa.sigAcct u_Dfa.iFreq u_Dfa.bPeriodic u_Dfa.sigAccumFreq u_Dfa.sViewType

Visual Basic programmers can use the EntGetVarAddr( ) function to set the lpimrData and lpseStatus fields to the addresses of the buffers. When your setup is complete, call the EntUpdate( ) function to update the data values. You can also use EntUpdate( ) to calculate formulas, clear existing data, or erase the selected datafile table, 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 Description 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 specific account signature. Erases the selected datafile table. Calulates formulas. To execute through the last period with data, set the lEndPeriod field in the apiStruct to HYP_NONE (NONE in C). To use the lEndPeriod field as the start, you can set the lStartPeriod field to HYP_NONE . Setting both to HYP_NONE effectively calculates formulas for all periods with data. Set the u_Dfa.sigAcct field in the apiStruct to HYP_NONE. Produces zero data except for calculated accounts. Updates a data value. Sets periods explicit journal locked. Sets periods explicit journal unlocked. Sets periods locked. Sets periods unlocked.

Attribute DATAFILE_CLEAR

DATAFILE_ERASE DATAFILE_LOGICEXECUTE

DATAFILE_NODATAFLOW DATAFILE_PUT DATAFILE_SETPER_EJLCKED DATAFILE_SETPER_EJUNLCK DATAFILE_SETPER_LCKED DATAFILE_SETPER_UNLCK

Example:
Global Const PS_OK = 0 DIM apiS As APISTRUCT ret% = EntDataFileOpen(hSelect&, ID_REGULAR, sigCat&, sigEntity&, HYP_NONE, APILOCK_READWRITE, 1) If ret% = APILOCK_READWRITE THEN 'ok dValue# = 100.35 wStatus% = PS_OK EntInitApiStruct(hApp&, apiS) apiS.sigCat = sigCat& apiS.sigName = sigEntity& apiS.wType = ID_REGULAR apiS.lStartPeriod = 0 apiS.lEndPeriod = 0 'let's just update the first period apiS.lpimrData = EntGetVarAddr(dValue#) apiS.lpseStatus = EntGetVarAddr(wStatus%) apiS.u_Dfa.sigAcct = sigAcct& apiS.u_Dfa.bAutoRecalc = 0; apiS.u_Dfa.iFreq = HYP_NONE apiS.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_NONE apiS.lStartPeriod = HYP_NONE apiS.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 Values


Hyperion Enterprise applications can store consolidation detail, such as eliminations, adjustments, currency-translated values, or the amounts that an entity contributed to its parent entity during consolidation. You might see this feature referred to in the header files as the Detailed Storage Model (DSM). ID_TRANSLATION_FORCE is similar to ID_TRANSLATION with the exception that it is valid even when the parent and child entities use the same currency. When the currencies are the same, the data is not translated and a translation datafile table does not exist. In this case, if you use ID_TRANSLATION, you will get an error code, since a translation datafile table does not exist. If you use ID_TRANSLATION_FORCE instead, then it will access the regular data (type ID_REGULAR) when the parent and child use the same currency, instead of returning an error code. Warning: Do not select the ID_TRANSLATION_FORCE type of datafile table if there is a possibility that the ID_REGULAR datafile table may already be selected for the specified category and entity. Similarly, do not select the ID_REGULAR type of datafile table if the ID_TRANSLATION_FORCE type may already be selected. To read these consolidation detail values, follow the instructions in Retrieving Data on page 115 with the following exceptions:
l

Set the sigParent field in the apiStruct to the signature of the parent entity. Set the wType field in the apiStruct to one of the codes in Table 35.

Table 35

wType Codes Description Parent adjustment values. Contribution values.

Code ID_ADJUSTMENT ID_CONTRIBUTION

Working with Data 119

Code ID_ELIMINATION ID_PROPORTIONAL ID_TRANSLATION ID_TRANSLATION_FORCE

Description Elimination values. Proportion values. Translation values. Translation or child if same currency.

Do not try to update any consolidation detail values. These values are read-only. These values are written by Hyperion Enterprise during consolidation as a record of how the consolidated numbers were calculated.

Organization Structures and Advanced Functions


Table 36 lists the advanced functions you should use to get information about an organization structure.
Table 36

Advanced Functions to Use with Organizations Description Enumerates nodes in an organization. Finds a node in an organization. Gets the signature of a child node. Gets the organization level of a node. Gets the signature of the next sibling node in an organization. Checks if a specified entity is a parent entity.

Function EntEnumOrgEntities( ) EntFindEntityInOrg( ) EntGetChild( ) EntGetOrgLevel( ) EntGetSibling( ) EntIsEntityParent( )

Before you call these functions, you should select the Categories table (ID_CATEGORY), then the Organizations table (ID_ORGANIZATION) with all of their associated tables. For applications that were set up to use dynamic organizations, you should pass the category signature as the key when you select the Organizations table. For more information about selecting 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 about a 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 the signature of an entity. You can get the signature of the entity by querying the nodes table using the EntQueryEx( ) function and query attribute NAMESIG. You can get the signature of the top node in an organization by calling EntQueryEx( ) with the organizations table (ID_ORGANIZATION) and query attribute TOPNODE.
120 Advanced Functions

If an application was set up to use dynamic organizations, the organization structure can vary by category and period. In this case, use EntEnum( ), EntFind( ), and EntQueryEx( ) to get information 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 and lEndPeriod fields) filled in. Set the lEndPeriod field to the same value as lStartPeriod. Pass this apiStruct to EntEnum( ), EntFind( ), and EntQueryEx( ) to get information about the organization structure. For more information about apiStructs, see Using an apiStruct Structure on page 110. Code written for organizations that vary by category and period should also work for organizations that do not vary. The API ignores any unnecessary information.

Setting the Point of View


Be sure to set the point of view before calling most API functions to execute a task. Set the current organization, 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 Tasks
There are several process that you can run on the application server instead of the client workstation using Hyperion Enterprise Application Server. Table 37 lists functions that can be executed on the server if the application uses Hyperion Enterprise Application Server:
Table 37

Server-based Functions Functions EntConsolidate( ) EntUNCDataLoad( ) EntUNCDataLoadVB( ) Where To Find More Information
l

Server-Based Process Consolidation Load Data

EntConsolidate( ) - Consolidate on page 141 EntUNCDataLoad( ) - Load Data on page 264 EntUNCDataLoadVB( ) - Load Data on page 266 EntDataExtract( ) - Extract Data on page 146 EntDataExtractVB2( ) - Extract Data on page 148 EntDSMDataExtract( ) - Extract DSM Data on page 156 EntDSMDataExtractVB( ) - Extract DSM Data on page 158 EntLogicImport( ) - Import Formulas on page 227 EntLogicImportVB( ) - Import Formulas on page 229

l l

Extract Data

EntDataExtract( ) EntDataExtractVB2( ) EntDSMDataExtract( ) EntDSMDataExtractVB( )

l l l l

Load Formulas

EntLogicImport( ) EntLogicImportVB( )

l l

Setting the Point of View 121

Server-Based Process Extract Formulas

Functions EntLogicExport( ) EntLogicExportVB( )

Where To Find More Information


l l

EntLogicExport( ) - Export Formulas on page 223 EntLogicExportVB( ) - Export Formulas on page 225 EntJournalLoad( ) - Load Journal on page 215 EntJournalLoadVB( ) - Load Journal on page 217 EntJournalExtract( ) - Extract Journal on page 208 EntJournalExtractVB( ) - Extract Journal on page 210 EntAppLoad( ) - Load Application on page 132 EntAppLoadVB( ) - Load Application on page 133 EntAppExtract( ) - Extract Application on page 129 EntAppExtractVB( ) - Extract Application on page 130 EntSecurityLoad( ) - Load Security on page 249 EntSecurityLoadVB( ) - Load Security on page 250 EntSecurityExtract( ) - Extract Security on page 246 EntSecurityExtractVB( ) - Extract Security on page 247 EntEntityListLock( ) - Lock Data on page 164 EntEntityListUnLock( ) - Unlock Data on page 166 EntSharesExtract( ) - Shares Extract on page 258 EntSharesExtractVB( ) - Shares Extract on page 259 EntSharesLoad( ) - Shares Load on page 261 EntSharesLoadVB( ) - Shares Load on page 262 EntLogicCompile( ) - Compile Logic on page 221

Load Journals

EntJournalLoad( ) EntJournalLoadVB( )

l l

Extract Journals

EntJournalExtract( ) EntJournalExtractVB( )

l l

Load Application

EntAppLoad( ) EntAppLoadVB( )

l l

Extract Application

EntAppExtract( ) EntAppExtractVB( )

l l

Load Security

EntSecurityLoad( ) EntSecurityLoadVB( )

l l

Extract Security

EntSecurityExtract( ) EntSecurityExtractVB( )

l l

Lock Data Unlock Data Extract Shares

EntEntityListLock( ) EntEntityListUnlock( ) EntSharesExtract( )

l l

Load Shares

EntSharesLoad( ) EntSharesLoadVB( )

l l

Compile Logic

EntLogicCompile( )

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 constant named ...._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 the API to call) to pass status information back to you while the task is executing. However, when you select the option to execute the task on the server, the callback function is not used. You should pass NULL as the address of your callback function. The API creates an instance of Hcommgr.exe running on the client computer to display status information about the task running 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 shows the 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) and change the declaration to pass the argument ByRef instead of ByVal. For example, when you call EntConsolidate( ), 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 argument ByRef instead of ByVal. Once you have the handle, you can use the Microsoft function WaitForSingleObject( ) to wait for this instance of hcommgr.exe to end. You can then use the Microsoft function GetExitCodeProcess( ) 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 but errors 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 task on the server. For instance, if the connection gets dropped, the task continues to execute on 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 terminate hcommgr.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 tables beyond the usual default tables, unless the API needs special tables in order to pass information to the server. For some tasks, such as data load, the server needs read/write access to specific tables. Do not select these tables within your call because that prevents the server from having read/write access, causing the task to fail.

Hyperion Enterprise INI File Functions


You use the Hyperion Enterprise INI file functions to read from and write to application .INI files. The functions in Table 38 are used to read and write values in Hyperion Enterprise's hypent.ini file.
Table 38

Advanced Functions to Use with the Hypent.ini File Description Reads an integer. Reads a text value. Writes an integer. Writes a text value.

Function EntGetProfileLong EntGetProfileString EntWriteProfileLong EntWriteProfileString

Hyperion Enterprise INI File Functions 123

The functions in Table 39 are used to read and write values in a file-based Hyperion Enterprise application's INI file (appl.ini).
Table 39

Advanced Functions to Use with Application INI Files Description Reads an integer. Reads a text value. Writes an integer. Writes a text value.

Function EntGetAppProfileLong EntGetAppProfileString EntWriteAppProfileLong EntWriteAppProfileString

Because Hyperion Enterprise SQL applications do not have an application INI file, you should use the EntQueryDefault( ) function, for both SQL and file-based applications, to read the values that Hyperion Enterprise stores in a file-based application's .INI file. You can use the EntUpdateDefault( ) and EntSaveDefault( ) functions to update these values.

Security
The underlying Hyperion Enterprise API checks the users rights to access items, such as categories, entities, or accounts. However, the API does not check the users rights to execute tasks, such as consolidation, data load, or data extract. It is the responsibility of the programmer to check the users rights to execute tasks. To check the current users rights to execute a task, call the EntGetRightsToTask( ) function. To check the current users rights to access an item such as a category or an entity, first find the item 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 for the 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 EntFind( ) and ID_SECRIGHTS (Security Rights Table) on page 185 EntEnum( ) and ID_SECTASK (Security Task Table) on page 176 EntEnum( ) and ID_SECUSERTAB (Security User Table) on page 176 EntEnum( ) and ID_SECGRPTAB (Security Group Table) on page 175 EntEnum( ) and ID_SECRIGHTS (Security Rights Table) on page 176 Default Query Attributes on page 366 ID_SECCLASS (Security Class Table) Query Attributes on page 407 ID_SECGRPTAB (Security Group Table) Query Attributes on page 408 ID_SECRIGHTS (Security Rights Table) Query Attributes on page 408 ID_SECTASK (Security Task Table) Query Attributes on page 409

124 Advanced Functions

ID_SECTASKFILTER (Security Task Filter Table) Query Attributes on page 409 ID_SECUSERTAB (Security Users Table) Query Attributes on page 409

API Functions for Hyperion Enterprise Security


Security in Hyperion Enterprise uses the generic API functions used for all the other tables. It does 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 would use for security information, besides EntGetRightsToTask( ), would be EntQueryEx( ). Hyperion Enterprise has query attributes for getting the security class or the current user's rights for 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 security tables than Hyperion Enterprise SE, but they can all be accessed through the same API functions that are used for all other tables. See the EntEnum( ) - Enumerate Records in a Table on page 167 for more information on subtopics on enumerating various security tables.

Replacing Obsolete Ent...( ) Functions with New Ent... ( ) Functions


Table 40 lists all of the Ent...( ) functions that have been replaced with new Ent...( ) function for this release of Hyperion Enterprise. While you can continue to use the obsolete functions, these are not documented in this guide.
Table 40

Obsolete Hyperion Enterprise Ent...( ) Functions and Corresponding New Ent...( ) Functions New Function EntDataExtractVB2( ) EntUNCDataLoad( ) EntUNCDataLoadVB( ) EntFormatNumber2( ) EntQueryEx( ) EntQueryExStr( )

Old Function EntDataExtractVB( ) EntDataLoad( ) EntDataLoadVB( ) EntFormatNumber( ) EntQuery( ) EntQueryStr( )

Advanced Functions Alphabetical Reference


This 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 more information, see Select and Deselect Tables using Advanced Functions on page 111.
Replacing Obsolete Ent...( ) Functions with New Ent...( ) Functions 125

You do not need to select ID_APPDEFAULT, because it is always available when you have an application handle (hApp argument). For more information, see Tables of Default Settings on page 361. Only use APILOCK_READWRITE to select the tables specified for the function. Do not use EntSelect() to select ID_SECCLASS. Use EntSelectAdd(). EntSelect() is only for the first selected table.

EntAcctAsk( ) - Select Account


This function calls the Hyperion Enterprise Select Account dialog box and retrieves the account you select. If you select Cancel, no account is retrieved. Use this format: Declare Function EntAcctAsk Lib "heaccess.dll" Alias "_EntAcctAsk@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 account ID. The buffer should be large enough for at least HYP_SIZEFULLACCT+1 (SIZEFULLACCT+1 in C) characters.

Return Codes:
Code 0 NONE Meaning Successful 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 List


This function displays a dialog box you use to select an account list. EntAcctListAsk( ) returns the 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 hSelect As 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 0 NONE Meaning Successful 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 Parts


Given an account signature, this function returns the signatures of the major account and subaccounts. Use this format: Declare Function EntAcctSplit Lib "heaccess.dll" Alias "_EntAcctSplit@20" (ByVal hSelect As Long, ByVal sigAcct As Long, sigMajor As Long, sigSub As Long, sigSubSub As Log) As Integer
Variable hSelect sigAcct sigMajor sigSub Description The handle of the selected tables The account signature for which you want major account and sub-account signatures The buffer to return the major account signature The buffer to return the first-level sub-account signature

sigSubSub The buffer to return the second-level sub-account signature

Return Codes:
Code 0 Meaning Successful

Advanced Functions Alphabetical Reference 127

Code NONE

Meaning Error occurred

Example:
ret% = EntAcctSplit(hselect&, sigAcctIn&, sigMajor&, sigSub1&, sigSub2&) If ret% = 0 Then Msg$ = "Major: " & sigMajor& & " sub1: " & sigSub1& & "sub2: " & sigSub2& Else msg$ = "Error " End If ret2% = MsgBox(msg$)

Use this format for C: short WINAPI EntAcctSplit(HSELECT hSelect, SIGNA sigAcct, SIGNA * psigMajor, SIGNA * psigSub, SIGNA * psigSubSub);

EntAppendToCBChain( ) - Append to Callback Chain


This function appends a callback function to the chain of callback functions associated with the hSelect argument variable. This callback function is called if any table in the hSelect block changes. 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, ByVal lParam As Long) As Integer
Variable hSelect Description 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 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntAppendToCBChain(HSELECT hSelect, CALLBACKSEL SelCallback, LONG lParam);
128 Advanced Functions

EntAppExtract( ) - Extract Application


This function extracts 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 callback function used for EntDataExtract( ). For more information, see CALLBACKDBLOAD - For EntAppExtract( ) on page 312. However, the szCategory argument to the callback function is used for a status message rather than for the category name. The szEntity, iStart, iEnd, iTot , and iCur arguments are not used.
Note: If you are a Visual Basic programmer, use EntAppExtractVB( ) instead of

EntAppExtract( ). Use this format for C: short WINAPI EntAppExtract(HAPP hApp, LPAPPLOADSTRUCT pArgs)
Variable hApp pArgs pArgs->dwSize pArgs->cDelim pArgs->szFile pArgs->dwOptions Description The application handle Structure with arguments for the application extract The size of this structure. The field delimiter, which typically is a comma ( , ) The path and file name to the extract file Option bit flags. See APPL_... in the TOOLINC.H file for details

pArgs->dwMoreOptions 0, reserved for future use pArgs->fnStatusCB pArgs->lParamStatus pArgs->fnSelectCB pArgs->lParamSelect pArgs->hProcess pArgs->bLoad The callback function for status or NULL. This is used only when not executing on a server. The argument for fnStatusCB Intended for future use. Intended for future use. The handle of the Task Status window process. This returns the process handle when executing on the server. Returns TRUE if anything was extracted, otherwise FALSE.

Return Codes:
Code 0 LOAD_CHECK_ERRORLOG Meaning Successful Errors occurred and are listed in the error log.

Advanced Functions Alphabetical Reference 129

Code NONE

Meaning Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.

For an example, see EntAppExtractVB( ) - Extract Application on page 130.

EntAppExtractVB( ) - Extract Application


If you are a Visual Basic programmer, use this function instead of EntAppExtract(). This function extracts 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 callback function used for EntDataExtract( ). For more information, see CALLBACKDBLOAD - For EntAppExtract( ) on page 312. However, the szCategory argument to the callback function is used for a status message rather than for the category name. The szEntity, iStart, iEnd, iTot, and iCur arguments are not used. Use this format: Declare Function EntAppExtractVB Lib "heaccess.dll" Alias "_EntAppExtractVB@12" (ByVal hApp As Long, pArgs As APPLOADSTRUCT, ByVal szExtractFile As String) As Integer

Variable hApp pArgs pArgs.dwSize pArgs.cDelim pArgs.dwOptions

Description The application handle Structure with arguments for the application extract The size of this structure The field delimiter, which typically is a comma ( , ) Option bit flags. See APPL_... in the TOOLINC.H file for details.

pArgs.dwMoreOptions 0, reserved for future use pArgs.fnStatusCB pArgs.lParamStatus pArgs.fnSelectCB pArgs.lParamSelect pArgs.hProcess pArgs.bLoad szExtractFile The callback function for status or NULL. This is used only when not executing on a server. The argument for fnStatusCB Reserved for future use. Reserved for future use. The handle of the Task Status window process. This returns the process handle when executing on the server. Returns TRUE if anything was extracted, otherwise FALSE The path and file name of the extract file

Return Codes:

130 Advanced Functions

Code 0 LOAD_CHECK_ERRORLOG NONE

Meaning Successful Errors occurred and are listed in the error log. Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.

Note: EntUnSelect0( ) in this example is declared similar to EntUnSelect( ) but its declaration

allows passing 0 in place of the apiStruct. For more information, see Visual Basic Programming Notes on page 16. Example:
Private Sub ApplicationExtract(hSelect As Long,szFile As String) Dim s As APPLOADSTRUCT Dim wRet% Dim hApp& 'set up struct s.dwSize = LenB(s) s.cDelim = Asc("!") s.szFile = 0 s.dwOptions = SetOptionFlags() s.fnStatusCB = FuncPtrToLong(AddressOf MyCallback) s.lParamStatus = 0 s.fnSelectCB = 0 hApp& = EntGetHappFromSelect(hSelect&) 'unselect all tables hSelect& = 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 addressOfFileNameCString wLen% = EntVBGetCStrLen(addressOfFileNameCString) szFileName$ = Space(wLen%) wRet% = EntVBCopyStr(szFileName$, addressOfFileNameCString, wLen%) 'Get szMessage$ from addressOfMessageCString wLen% = EntVBGetCStrLen (addressOfMessageCString) szMessage$ = Space(wLen%) wRet% = EntVBCopyStr(szMessage$, addressOfMessageCString, wLen%) 'display message szMessage$ = "File: [" & szFileName$ & "]"& Chr(13) & Chr(13) & "[" & szMessage$ & "]" wRet% = MsgBox(szMessage$, vbOKOnly, "Now Extracting...") MyCallback = 0 End Function 'return 0

'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 Application


This function loads 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 callback function used for EntDataLoad( ). For more information, see CALLBACKDBLOAD - For EntAppLoad( ) on page 313. However, the szCategory argument to the callback function is used for a status message rather than for the category name. The szEntity, iStart, and iEnd arguments are not used. The iTot and iCur arguments, useful for a progress bar, refer to the total number of bytes in the load file (total and processed so far), not to the number of accounts. The pArgs->fnSelectCB callback function is used if you want to be notified when changes to the categories 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 hApp pArgs pArgs->dwSize pArgs->cDelim pArgs->szFile pArgs->dwOptions

Description The application handle Structure with arguments for the application extract The size of this structure The field delimiter, which typically is a comma ( , ) The path and file name to the load file Option bit flags. See APPL_... in the TOOLINC.H file for details.

pArgs->dwMoreOptions 0, reserved for future use pArgs->fnStatusCB pArgs->lParamStatus pArgs->fnSelectCB pArgs->lParamSelect pArgs->hProcess pArgs->bLoad The callback function for status or NULL. This is used only when not executing on a server. The argument for fnStatusCB The function to call when the category table changes, or NULL. Use this argument when executing locally only. (Not used when executing on a server.) The argument for fnSelectCB The handle of the Task Status window process. This returns the process handle when executing on the server. Returns TRUE if anything was loaded; otherwise FALSE

Return Codes:
Code 0 LOAD_CHECK_ERRORLOG NONE Meaning Successful Errors occurred and are listed in the error log. Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.

EntAppLoadVB( ) - Load Application


If you are a Visual Basic programmer, use this function instead of EntAppLoad( ). This function loads 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 callback function used for EntDataLoad( ). For more information, see CALLBACKDBLOAD - For EntAppLoad( ) on page 313. However, the szCategory argument to the callback function is used for a status message rather than for the category name. The szEntity, iStart, and iEnd arguments are not used. The iTot and iCur arguments, useful for a progress bar, refer to the total number of bytes in the load file (total and processed so far), not to the number of accounts. The pArgs.fnSelectCB callback function is used if you want to be notified when changes to the categories 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" (ByVal hApp As Long, pArgs As APPLOADSTRUCT, ByVal szLoadFile As String) As Integer
Variable hApp pArgs pArgs.dwSize pArgs.cDelim pArgs.szFile pArgs.dwOptions Description The application handle Structure with arguments for the application extract The size of this structure The field delimiter, which typically is a comma ( , ) NULL. Use szLoadFile instead. Option bit flags. See APPL_... in the TOOLINC.H file fordetails.

pArgs.dwMoreOptions 0, reserved for future use pArgs.fnStatusCB pArgs.lParamStatus pArgs.fnSelectCB pArgs.lParamSelect pArgs.hProcess pArgs.bLoad szLoadFile The callback function for status or NULL. This is used only when not executing on a server. The argument for fnStatusCB The function to call when the category table changes, or NULL. Use this argument when executing locally only. The argument for fnSelectCB The handle of the Task Status window process. This returns the process handle when executing on the server. Returns TRUE if anything was loaded, otherwise FALSE The path name of the file to load

Return Codes:
Code 0 LOAD_CHECK_ERRORLOG NONE Meaning Successful Errors occurred and are listed in the error log. Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.

Use this format for C: short WINAPI EntAppLoadVB(HAPP hApp, LPAPPLOADSTRUCT pArgs, LPCSTR szLoadFile); Example:
Note: EntUnSelect0( ) in this example is declared similar to EntUnSelect( ) but its declaration

allows passing 0 in place of the apiStruct. For more information, see Visual Basic Programming 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 struct s.dwSize = LenB(s) s.cDelim = Asc("!") s.szFile = 0 s.dwOptions = SetOptionFlags() s.fnStatusCB = FuncPtrToLong(AddressOf MyCallback) s.lParamStatus = 0 s.fnSelectCB = 0 hApp& = EntGetHappFromSelect(hSelect&) 'unselect all tables hSelect& = 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, ByVal unused1 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 addressOfFileNameCString wLen% = EntVBGetCStrLen(addressOfFileNameCString) szFileName$ = Space(wLen%) wRet% = EntVBCopyStr(szFileName$, addressOfFileNameCString, wLen%) 'Get szMessage$ from addressOfMessageCString wLen% = EntVBGetCStrLen(addressOfMessageCString) szMessage$ = Space(wLen%) wRet% = EntVBCopyStr(szMessage$, addressOfMessageCString, wLen%) 'display message szMessage$ = "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.dwOptions Private Function SetOptionFlags() As Long Dim dwOptions& dwOptions& = 0 If chkEntities.Value Then 'do entities, orgs, and currencies dwOptions& = dwOptions& dwOptions& = dwOptions& dwOptions& = dwOptions& APPL_SUBENTITY dwOptions& = dwOptions& APPL_SUBSTRUCTURE dwOptions& = dwOptions& dwOptions& = dwOptions& dwOptions& = dwOptions& dwOptions& = dwOptions& End If If chkAccts.Value Then Or APPL_ORGANIZATION Or APPL_ENTITY Or APPL_ENTITYLIST Or APPL_ENTITYCONVERSION Or Or APPL_ENTOWNERSHIP Or Or Or Or Or APPL_INTERCODEPEND APPL_CURRENCY APPL_ENTITYCODE APPL_SUBENTOWNERSHIP

'do accounts

dwOptions& = dwOptions& Or APPL_ACCOUNT Or APPL_ACCOUNTLIST dwOptions& = dwOptions& Or APPL_SUBACCOUNT Or APPL_ACCOUNTCONVERSION dwOptions& = dwOptions& Or APPL_INTERCOACCT End If If chkReports.Value Then 'do books and reports dwOptions& = dwOptions& Or APPL_REPORT Or APPL_BOOK End If If chkCat.Value Then 'do categories and rollovers dwOptions& = dwOptions& Or APPL_CATEGORY Or APPL_ROLLOVER End If If chkLogic.Value Then 'do methods, custom functions, and update rules dwOptions& = dwOptions& Or APPL_METHOD End If If chkCodes.Value Then 'do codes table dwOptions& = dwOptions& Or APPL_CODE End If If chkFormats.Value Then 'do formats table dwOptions& = dwOptions& Or APPL_FORMAT End If

136 Advanced Functions

If chkSchedules.Value Then 'do schedules table dwOptions& = dwOptions& Or APPL_SCHEDULE End If If chkAppOptions.Value Then 'do application options & consol method table dwOptions& = dwOptions& Or APPL_CONSOLASSIGN dwOptions& = dwOptions& Or APPL_APPDEFAULT End 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 Double


This function converts a string to a number. The string can contain the decimal point character and thousands separator specified in the application settings. Use this format: Declare Function EntAsciiToDouble Lib "heaccess.dll" Alias "_EntAsciiToDouble@12" (ByVal hApp As Long, ByVal szBuf As String, ByVal pzRest As Long) As Double
Variable Description hApp szBuf pzRest The application handle The string to convert On return, a pointer to the place in szBuf immediately following the number. (This argument can be useful if you are programming in C, but it does not apply to Microsoft Visual Basic.)

Return Codes:
Code Numeric value 0 Meaning Successful 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 Category


This function calls the Select Category dialog box and retrieves the category you select. If you select 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 0 NONE Meaning Successful 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 a Category


This function calculates the number of periods in a category for any given frequency. Given a category in one frequency and a different frequency, this function returns the number of available periods. 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 sigFreq As Long) As Integer
138 Advanced Functions

Variable Description hSelect The handle of the selected tables sigCat sigFreq The category signature The frequency signature

Return Codes:
Code Number of periods that category sigCat has for frequency sigFreq NONE Meaning Successful Error occurred

Example:
sigCat& = EntFind(hSelect&, HYP_ID_CATEGORY, HYP_NONE, "ACTUAL", 0) sigFreq& = FREQ_QUARTER numPer% = EntCatGetNumPeriods(hSelect&, sigCat&, sigFreq&)

Use this format for C: short WINAPI EntCatGetNumPeriods(HSELECT hSelect, SIGNA sigCat, SIGNA sigFreq);

EntCatGetPerShort( ) - Get Period Label


For a given period within a category, this function returns the period ID in the specified frequency. 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 sigPer sigFreq cchTag pzPer The category signature The period number in the category The frequency signature, or HYP_NONE (NONE in C) to use the category's frequency The length of the pzPer buffer The buffer to return the period ID

Return Codes
Advanced Functions Alphabetical Reference 139

Code The length of the string 0

Meaning Successful Error occurred

Example:
szPer$ = SPACE(10) 'arbitrary size rc% = 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, SIGNA sigFreq, 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" (ByVal hSelect As Long, ByVal sigCat As Long, ByVal sigFreq As Long, ByVal sigPer As Long, ByVal sigAltFreq As Long) As Long
Variable Description hSelect sigCat sigFreq sigPer The handle of the selected tables The category signature The frequency signature for 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 Period signature for the frequency BAD_PERIOD Meaning Successful Error occurred

Example: Suppose you know that you want the first period of quarterly data within a category, and you need 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 map Q1 to Monthly and get March (3). The function would then map the Monthly (3) to weeks, and come up with W13, because the last week in March is Week 13. This is useful if you are trying to build a report based on weeks, but you need to get the corresponding values from two categories 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 Application


This function closes an application. Use this format: Declare Sub EntCloseApplication Lib "heaccess.dll" Alias "_EntCloseApplication@4" (ByVal hApp As Long) Where hApp is the handle of the application. Example:
Public Sub CloseApplication( ) If hApp& <> 0 Then EntCloseApplication hApp& hApp& = 0 End If End Sub

Use this format: VOID WINAPI EntCloseApplication(HAPP hApp);

EntConsolidate( ) - Consolidate
This function is used to consolidate. Select the Category, Organization, and Accounts tables and their associated tables before calling EntConsolidate( ). Also select the PSF table (ID_PSFDATA), passing the category as the sigKey argument and specifying APILOCK_READWRITE as the wAttr argument. Be sure to set the point of view before calling EntConsolidate( ) to execute a task. Set the current organization, category, and entity. For more information, see Setting the Point of View on page 121. Use this format: Declare Function EntConsolidate Lib "heaccess.dll" Alias "_EntConsolidate@24" (ByVal hSelect As Long, ByVal cConsType As Integer, ByVal sigTopNode As Long, ByVal ConsolCB As Long, ByVal lParam As Long, apiS As APISTRUCT) As Integer

Advanced Functions Alphabetical Reference 141

Variable hSelect

Description 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 the CONSOL_REMOTE constant for whatever consolidation type you select to consolidate on the server. sigTopNode The signature of the top node for consolidation ConsolCB lParam apiS The callback function. NULL if CONSOL_REMOTE is set in cConstType. For more information, see CALLBACKAPI on page 309. The argument for the ConsolCB callback function. However, if CONSOL_REMOTE is set in cConsType, the callback function is not used, and lParam is assumed to be a buffer for a process handle if it is not NULL. A pointer to an apiStruct with more information. Set sigCat to the category signature, and lStartPeriod and lEndPeriod to the starting and ending periods of the range to consolidate.

The callback function provides status information. The sigRecd argument is the signature of the parent entity currently being processed. The sigKey argument is the signature of the child entity currently being consolidated into the parent entity. The apiStruct argument is the same as the apiStruct you passed to EntConsolidate( ), except the lStartPeriod and lEndPeriod fields indicate the periods currently being processed. Your callback function should return 0 to continue, or 1 to cancel consolidation. Return Codes:
Code 0 NONE Meaning Successful Error occurred

If you are consolidating on a server (CONSOL_REMOTE flag is set in the argument variable cConsType), you might want to know the process handle of the consolidation process so that you can track and monitor the consolidation processes your program launches. You can retrieve the process handle by setting the argument variable lParam to a HANDLE variable before calling EntConsolidate( ). The handle returned 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. Example:
Dim lpAPIStruct As apiStruct 'Set the current POV wRet% = 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 table wRet% = EntSelectAdd(HYP_ID_PSFDATA Or HYP_ID_ASSOC, sigCat&, hSelect&, APILOCK_READWRITE, 0, 0, 0, 0) If wRet% <> APILOCK_READWRITE Then Exit Function Call EntInitApiStruct(hApp&, lpAPIStruct) lpAPIStruct.sigCat = sigCat& lpAPIStruct.lStartPeriod = lStartPeriodSig lpAPIStruct.lEndperiod = lEndPeriodSig wRet% = EntConsolidate(hSelect&, iConsolidateFlags, sigTopNode&, AddressOf(MyCallBack), lParam, lpAPIStruct)

Use this format for C: short WINAPI EntConsolidate(HSELECT hSelect, HYPBOOL cConsType, SIGNA sigTopNode, CALLBACKAPI ConsolCB, LONG lParam, LPAPISTRUCT pApiS);

EntCreateApplication( ) - Create Application


This function creates an application. The application opens automatically, so you do not have to call EntOpenApplication( ). Call EntCloseApplication( ) to close the application when you are 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 running EntCreateApplication() in the VB debugging environment, that is the directory where VB.EXE is 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 message routine. 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 As String, 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 szAppId szAppDesc szDLL Description The application ID The application description The file driver (HEFILE or HESQL)

Advanced Functions Alphabetical Reference 143

Variable szCal

Description 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 lParam wRet sigSite The pointer to the callback function. For more information, see CALLBACKCREATE on page 310. The argument for the lpCallback callback function The buffer to return the error code NONE, or the signature of the site

Use the callback function to define the application settings at the appropriate time in the creation process. To use a conversion file to create the application, set the first character of the application description to 0x01 (numeric 1, not the ASCII code for '1', i.e. not "1") and pass the conversion filename as the szCal argument. After successfully calling EntCreateApplication(), you should call EntSaveDefault() for table ID_APPDEFAULT and for table ID_USERDEFAULT. Return Codes:
Code Handle (hApp) of the new application NONE Meaning Successful Error occurred

EntCreateApplication() currently sets the defaults in Table 41before it calls your callback function.
Table 41

Defaults set by EntCreateApplication() Value TRUE for file-based application, FALSE for SQL "," "," "," "." 6 0

Attribute APP_USE_MULTI_THREAD APP_BILLIONS APP_MILLIONS APP_THOUSANDS APP_DECIMAL APP_NUM_DECIMALS APP_USES_SYSTEM_NUM

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 String Dim sDesc As String Dim sUserName As String Dim sUserPass As String Dim sCal As String Dim sDLL As String Dim sigSite As Long Dim lParam As Long Dim hApp As Long Dim 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 Long Dim nRC As Integer Dim sReport As String Dim sOutbox As String Dim sInbox As String Dim 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 Data


This function executes a data extract. You must provide a function to enumerate the accounts for which you want to extract data. In some cases, you might need to select the ID_NAMELISTENTRY and ID_PSFDATA tables before calling EntDataExtract( ).
Note: This function can be used with any language except Visual Basic. Use

EntDataExtractVB2( ) for Visual Basic applications. C programmers might also prefer to use EntDataExtractVB2( ). If extracting data on a server (the DBE_REMOTE bit flag is set in pS->wExtractFlags), you might want to know the process handle of the extract process so that you can track and monitor the server processes that your program launches. The process handle returned at pS - > 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.
146 Advanced Functions

Use this format for C: short WINAPI EntDataExtract(HSELECT hSelect, LPDBEXTRACTSTRUCT pS)
Variable hSelect pS pS->dwSize pS->cDelim pS->cNeg pS->cScale pS->cView pS->wDecimals pS->wDSMType pS->wExtractFlags pS->wOperation pS->dDataBy pS->bDataFileOpened pS->hProcess pS->lStartPeriod pS->lEndPeriod pS->sigAcctConv pS->sigCat pS->sigName pS->sigNameConv pS->sigParent pS->sigNameList pS->szExtractFile pS->-pApiDFA Description The handle of the selected tables Pointer to struct with arguments for the data extract. All fields are required except hProcess. The size of this structure The field delimiter, which typically is a comma( , ) The negative delimiter, which typically is a dash or apostrophe (- or ) Scale of the data Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category's default view. Number of decimal places to extract. Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if not ID_REGULAR. data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h). FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE. Data to use with wOperation. Data file is currently opened (TRUE or FALSE); input and output. Process handle returned when executing on server (DBE_REMOTE). The first period to extract (0-based). The last period to extract (0-based). The account conversion table signature. The category signature. The entity signature. Name conversion table signature. Parent for wDSMType. Entity list. The path name of extract file. The apiStruct set up for enum of entity list (if pS->sigNameList != NONE) and for querying data from datafile (data and status buffers allocated). For more information, see EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table) on page 173 and Working with Data on page 114.

Advanced Functions Alphabetical Reference 147

Variable pS->pApiDFA->sigName

Description Entity signature.

pS->pApiDFA-> u_Dfa.bAutoRecalc For more information, see Working with Data on page 114. pS->fnEnumAcct pS->lParamEnumAcct pS->fnStatusCB pS->lParamStatus Callback function to enumerate accounts. For more information, see CALLBACKDBENUM on page 311. Your arguments for fnEnumAcct. 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. The argument for fnStatusCB.

Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred 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 calling EntDataExtractVB2( ).
Note: This function is intended for Visual Basic users, although other programmers can also

use 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 hSelect pArgs pArgs.dwSize pArgs.cDelim pArgs.cNeg pArgs.cScale pArgs.cView pArgs.wDecimals pArgs.wDSMType pArgs.wExtractFlags pArgs.wOperation pArgs.dDataBy pArgs.bDataFileOpened pArgs.hProcess pArgs.lStartPeriod pArgs.lEndPeriod pArgs.sigAcctConv pArgs.sigCat pArgs.sigName pArgs.sigNameConv pArgs.sigParent pArgs.sigNameList pArgs.pApiDFA

Description The handle of the selected tables Structure with arguments for the data extract. All fields are required except hProcess. The size of this structure The field delimiter, which typically is a comma( , ) The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ] Scale of the data Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the categorys default view. Number of decimal places to extract Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if not ID_REGULAR Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h) Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE Data to use with wOperation Data file is currently opened (TRUE or FALSE); input and output Process handle returned when executing on server (DBE_REMOTE) The first period to extract (0-based) The last period to extract (0-based) The account conversion table signature The category signature The entity signature. Entity conversion table signature Parent if wDSMType is not ID_REGULAR Entity list The address of an apiStruct set up for enum of entity list (if pArgs.sigNameList != NONE) and for querying data from datafile (data & status buffers allocated). For more information, see EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table) on page 173 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 sigList lpfnCallback lParam

Description Signature of an account list; NONE for all accounts Your callback function for status information. For more information, see CALLBACKVB on page 321. Argument for your callback function

Internally, EntDataExtractVB2( ) makes a local copy of the filename string, so it does not matter if Visual Basic relocates the original during the callback function. Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred 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 signature If 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% = 0 If chkCalc.Value Then flag% = flag% Or DBE_CALC_ACCTS If chkGlobal.Value Then flag% = flag% Or DBE_GLOBAL_ACCTS If chkSupNoData.Value Then flag% = flag% Or DBE_SUPPRESS_ND If chkSupZero.Value Then flag% = flag% Or DBE_SUPPRESS_ZERO If 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 fields s.dwSize = LenB(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 s.wExtractFlags = flag% s.wOperation = HYP_NONE s.dDataBy = -1 'data to use with wOperation.

150 Advanced Functions

s.bDataFileOpened = 0 'DataFile is currently opened (TRUE or FALSE); input and output s.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 signature s.sigCat = sigCat& 'category signature s.sigName = sigEntity& 'entity signature s.sigNameConv = HYP_NONE 'Entity conversion table signature s.sigParent = HYP_NONE 'parent (if wDSMType is not ID_REGULAR) s.sigNameList = HYP_NONE 'Entity list s.fnEnumAcct = 0 'address of function to enumerate accounts (not used, just set to 0) s.lParamEnumAcct = 0 'your argument for fnEnumAcct function s.fnStatusCB = 0 'address of callback function for status information (not used, use lpfnCallback argument instead.) s.lParamStatus = 0 'your argument for fnStatusCB function s.pApiDFA = EntGetVarAddr(apiS) 'address of APISTRUCT; set signame field in apiStruct; EntDataExtract() may modify apiStruct s.szExtractFile = 0 Not used; use szExtractFile argument instead This example uses SpyWorks for the callback function ret% = EntDataExtractVB2(hSelect&, s, szFile$, sigAcctList&, cbkExtract.ProcAddress, 0) If LenB(acctList$) Then hSelect& = EntUnSelect0(hSelect&, HYP_ID_ACCTLIST Or HYP_ID_ASSOC, HYP_NONE, 0, ret%, 0) End If . . . The SpyWorks function callback Private 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 lval1 wLen% = 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% EndSub Function 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% = 0 End Function

Note: EntFind0 ( ), EntQueryExStr0( ), and EntUnSelect0 ( ) in this example have declarations

similar to EntFind( ), EntQueryExStr( ), and EntUnSelect( ), but are adjusted to allow passing 0 in place of the apiStruct. For more information, see Visual Basic Programming Notes on page 16. Use this format for C: EntDataExtractVB2(HSELECT hSelect, LPDBEXTRACTSTRUCT pArgs, LPCSTR szExtractFile, SIGNA sigList, CALLBACKVB lpfnCallback, LPARAM lParam);

EntDataFileOpen( ) - Open Datafile


This function selects the Datafile table for a specified entity, category, and parent. This function must be used for each category, entity combination. The Datafile table stores the account values for each period for the specified category, entity. Call EntUnSelect( ) to deselect this table when you are finished using it. Warning: Do not select the ID_TRANSLATION_FORCE type of datafile table if there is a possibility that the ID_REGULAR datafile table may already be selected for the specified category and entity. Similarly, do not select the ID_REGULAR type of datafile table if the ID_TRANSLATION_FORCE type may already be selected. Use this format: Declare Function EntDataFileOpen Lib "heaccess.dll" Alias "_EntDataFileOpen@28" (ByVal hSelect As Long, ByVal wType As Integer, ByVal sigCat As Long, ByVal SigEntity As Long, ByVal sigParent As Long, ByVal wAttr As Integer, ByVal bCreate As Integer) As Integer
Variable Description hSelect wType sigCat The handle of the selected tables See the following table 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 l l

APILOCK_READONLY to open table read-only APILOCK_READWRITE to open table for update 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. Description Adjustments Contribution Elimination Proportion Standard table Rollovers Translations Translation or child if same currency

Field wType ID_ADJUSTMENT ID_CONTRIBUTION ID_ELIMINATION ID_PROPORTIONAL ID_REGULAR ID_ROLLOVERS ID_TRANSLATION ID_TRANSLATION_FORCE

Return Codes:
Code wAttr NONE APILOCK_MULTIUSER Meaning Returns the actual rights granted Error occurred 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, SIGNA sigEntity, SIGNA sigParent, short wAttr, BOOL bCreate);

EntDateConv( ) - Date Conversion and Calculate Period Number


Given a period in one category (the reference category), EntDateConv( ) calculates the corresponding 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 hSelect As 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 hSelect wMethod szRefCat Description The handle of the selected tables DCONV_CMO for the current period ignoring the year, or DCONV_CUR for the current period The reference category ID

szRefPeriod The reference period (a period in the reference category) iOffset szFreq szBaseCat The number of the period offset from the reference period The ID of the base reporting frequency. For more information about reporting frequencies and views, see Frequencies and Views on page 20. The base category ID

Return Codes:
Code Period number BAD_PERIOD Meaning Successful 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 Chain


This function deletes a callback function from the chain of callback functions associated with the 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, ByVal lParam As Long) As Integer
154 Advanced Functions

Variable hSelect

Description 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 function to the chain of callback functions.

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntDeleteFromCBChain(HSELECT hSelect, CALLBACKSEL lpCallback, LONG lParam);

EntDiscardChanges( ) - Discard Changes


This function discards changes made to one or more tables by EntUpdate( ) or EntUpdateDefault( ). 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 sigKey apiS 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. NONE, or the key of a related table. For more information, see Related Tables on page 363. NULL, or a pointer to an apiStruct

Return Codes:
Code 0 NONE Meaning Successful 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 Default


This function discards changes made to default settings by EntUpdateDefault( ). Call this function before calling EntSaveDefault( ) or you cannot discard your changes. Use this format: Declare Function EntDiscardDefault Lib "heaccess.dll" Alias "_EntDiscardDefault@8" (ByVal hApp As Long, ByVal wTabId As Integer) As Integer
Variable Description hApp wTabId The application handle The table ID, such as ID_APPDEFAULT or ID_USERDEFAULT. For more information, see Tables of Default Settings on page 361.

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntDiscardDefault(HAPP hApp, short wTabId);

EntDSMDataExtract( ) - Extract DSM Data


This function extracts consolidation detail from C. The tables selected are ID_NAMELIST ENTRY 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 hSelect pS Description The handle of the selected tables Pointer to struct with arguments for the data extract. All fields are required except hProcess.

156 Advanced Functions

Variable pS->dwSize pS->cDelim pS->cNeg pS->cScale pS->cView pS->wDecimals pS->wDSMType pS->wExtractFlags pS->wOperation pS->dDataBy pS->bDataFileOpened pS->hProcess pS->lStartPeriod pS->lEndPeriod pS->sigAcctConv pS->sigCat pS->sigName pS->sigNameConv pS->sigParent pS->sigNameList pS->szExtractFile pS->-pApiDFA pS->pApiDFA->sigName

Description The size of this structure The field delimiter, which typically is a comma( , ) The negative delimiter, which typically is a dash or apostrophe (- or ) Scale of the data Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the category's default view. Number of decimal places to extract Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if not ID_REGULAR data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h) FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE Data to use with wOperation Data file is currently opened (TRUE or FALSE); input and output Process handle returned when executing on server (DBE_REMOTE) The first period to extract (0-based) The last period to extract (0-based) The account conversion table signature The category signature The entity signature Name conversion table signature Parent for wDSMType Entity list The path name of extract file The apiStruct set up for enum of entity list (if pS->sigNameList != NONE) and for querying data from datafile (data and status buffers allocated) Entity signature

pS->pApiDFA->u_Dfa.bAutoRecalc See Working with Data on page 114. pS->fnEnumAcct pS->lParamEnumAcct Callback function to enumerate accounts. For more information, see CALLBACKDBENUM on page 311. Your arguments for fnEnumAcct

Advanced Functions Alphabetical Reference 157

Variable pS->fnStatusCB pS->lParamStatus pDsm pDsm->dwSize pDsm->wExtractFlags

Description 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. The argument for fnStatusCB Structure with arguments for dsm extract Size of this structure Data extract options flag. Use a combination of any or all of these values:

DBE_DSM_TRANS DBE_DSM_PROP DBE_DSM_CONTRIB DBE_DSM_ELIM DBE_DSM_TOPADJ pDsm->cSeperator pDsm->bXAFormat pDsm->bAllDeps pDsm->bAllImmedDeps pDsm->iSelectedDependents pDsm->lpSelectedDepSigs

Extract translation data Extract proportion data Extract contribution data Extract elimination data Extract parent adjustment data Field delimiter (Default '|') used when extracting consolidation detail Extract using format(one field concatenated) or External format (three fields) Extract consolidation detail for all dependents. If not use list of immediate dependents. Extract consolidation detail for all dependents. If not use list of immediate dependents. Number of dependents selected List of selected dependents

Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred At least one error occurred and they are listed in the error log for the application.

EntDSMDataExtractVB( ) - Extract DSM Data


This function extracts consolidation detail from VB. The tables selected are ID_NAMELIST ENTRY 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, ByVal lParam As Long, dsm As DSMDBEXTRACTSTRUCT) As Integer

Variable hSelect pArgs pArgs.dwSize pArgs.cDelim pArgs.cNeg pArgs.cScale pArgs.cView pArgs.wDecimals pArgs.wDSMType pArgs.wExtractFlags pArgs.wOperation pArgs.dDataBy pArgs.bDataFileOpened pArgs.hProcess pArgs.lStartPeriod pArgs.lEndPeriod pArgs.sigAcctConv pArgs.sigCat pArgs.sigName pArgs.sigNameConv pArgs.sigParent pArgs.sigNameList pArgs.pApiDFA pArgs.pApiDFA.sigName

Description The handle of the selected tables Structure with arguments for the data extract. All fields are required except hProcess. The size of this structure The field delimiter, which typically is a comma( , ) The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ] Scale of the data. Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the categorys default view. Number of decimal places to extract Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if not ID_REGULAR Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h) Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE Data to use with wOperation Data file is currently opened (TRUE or FALSE); input and output Process handle returned when executing on server (DBE_REMOTE) The first period to extract (0-based) The last period to extract (0-based) The account conversion table signature The category signature The entity signature Entity conversion table signature Parent if wDSMType is not ID_REGULAR Entity list The address of an apiStruct set up for enum of entity list (if pArgs.sigNameList != NONE) and for querying data from datafile (data & status buffers allocated) Entity signature

Advanced Functions Alphabetical Reference 159

Variable

Description

pArgs.pApiDFA.u_Dfa.bAutoRecalc See Working with Data on page 114. szExtractFile sigList lpfnCallback lParam dsm dsm.dwSize dsm.wExtractFlags The path name of extract file Signature of an account list; NONE for all accounts Your callback function for status information. For more information, see CALLBACKVB on page 321. Argument for your callback function Structure with arguments for dsm extract Size of this structure Data extract options flag. Use any or all of these values: DBE_DSM_TRANS DBE_DSM_PROP DBE_DSM_CONTRIB DBE_DSM_ELIM DBE_DSM_TOPADJ dsm.cSeperator dsm.bXAFormat dsm.bAllDeps dsm.bAllImmedDeps dsm.iSelectedDependents dsm.lpSelectedDepSigs Extract translation data Extract proportion data Extract contribution data Extract elimination data Extract parent adjustment data Field delimiter (Default '|') used when extracting consolidation detail. Extract using format (one field concatenated) or External format (3 fields). The extract consolidation detail for all dependents. If not use list of immediate dependents. The extract consolidation detail for all immediate dependents. If not use list of immediate dependents. Number of dependents selected. Use if both dsm.bAllDeps and dsm.bAllImmedDeps are false. List of selected dependents.

Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred At least one error occurred and they are listed in the error log for the application.

Example:
Private Sub DSMExtract Dim 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 apiStruct Dim sigArr(4) As Long Dim dsm As DSMDBEXTRACTSTRUCT szFile$ = 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 Then ret% = MsgBox("Please select application, category, entity, period, and filename first.", vbOKOnly, "Error!") Exit Sub End If hSelect& = 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$) - 1 acctList$ = RTrim(frmMain.lblAcctList.Caption) sigAcctList& = HYP_NONE If 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 If flag% = 0 If chkCalc.Value Then flag% = flag% Or DBE_CALC_ACCTS If chkGlobal.Value Then flag% = flag% Or DBE_GLOBAL_ACCTS If chkSupNoData.Value Then flag% = flag% Or DBE_SUPPRESS_ND If chkSupZero.Value Then flag% = flag% Or DBE_SUPPRESS_ZERO If chkDerived.Value Then flag% = flag% Or DBE_EXTRACT_DERIVED hApp& = HypGethApp(frmMain.ghRApp%) Call EntInitApiStruct(hApp&, apiS) apiS.sigName = sigEntity& apiS.u_Dfa.bAutoRecalc = 0 s.dwSize = LenB(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 s.wExtractFlags = flag% s.wOperation = HYP_NONE s.dDataBy = -1 'data to use with wOperation. s.bDataFileOpened = 0 'DataFile is currently opened (TRUE or FALSE); input and output s.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 signature s.sigCat = sigCat& 'category signature

Advanced Functions Alphabetical Reference 161

s.sigName = sigEntity& 'entity signature s.sigNameConv = HYP_NONE 'Entity Conversion Table signature s.sigParent = HYP_NONE 'parent (if wDSMType is not ID_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 status information s.lParamStatus = 0 'your argument for fnStatusCB function s.pApiDFA = EntGetVarAddr(apiS) 'address of APISTRUCT; set signame field in apiStruct; EntDataExtract() may modify apiStruct dsm.dwSize = LenB(dsm) dsm.wExtractFlags = 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 = 4 sigArr(0) = 14 sigArr(1) = 15 sigArr(2) = 16 sigArr(3) = 18 dsm.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 If Unload Me End 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 Entity


This function is used to display an entity selection box and retrieve the entity you select. If you select Cancel, no entity is retrieved. Use this format:
162 Advanced Functions

Declare Function EntEntityAsk Lib "heaccess.dll" Alias "_EntEntityAsk@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 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 0 NONE Meaning Successful 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 List


This 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" (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 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 0 Meaning Successful

Advanced Functions Alphabetical Reference 163

Code NONE

Meaning 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 Data


This function locks data for an entity list. EntEntityListLock() utilizes an optional callback function, which the API will call to report the status of the routine. You should have one of the default tables selected prior to calling EntEntityListLock(). Use this format: Declare Function EntEntityListLock Lib "heaccess.dll" Alias "_EntEntityListLock@12" (ByVal hSelect As Long, lpLockData As EListLockStruct, ByVal lpApiStruct As ApiStruct) As Integer
Variable hSelect lpLockData lpLockData.dwSize lpLockData.sigNameList lpLockData.dwFlags lpLockData.sigCat lpLockData.lStartPeriod lpLockData.lEndPeriod Description The handle of the selected tables The structure with arguments for the routine The size of this structure The signature of the entity list to lock Option Bit Flags. Currently only DB_REMOTE to denote server processing. Category signature Zero-based start period Zero-based end period

lpLockData.sigNameOpenDatafile Denotes that the datafile has been opened and is read-write with this signature, and that the API does not need to open the datafile with this signature. lpLockData.fnCallBack lpLockData.lParam lpLockData.lNthStatusCallback lpLockData.hProcess IpApiStruct The callback function for status or NULL. This is used only when not executing on a server. The argument for fnCallBack The API will call fnCallBack every nth entity The handle of the task status window process. This returns the process handle when executing on the server. NULL. This argument is for API compatibility.

164 Advanced Functions

Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred 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 = 0 If 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 Sub Public 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% = 0 End Function

Note: EntEntityListLock0 () and EntEntityListUnlock0 () in this example have declarations

similar to EntEntityListLock () and EntEntityListUnlock () but are adjusted to allow passing 0 in place of the apistruct. For more information, see Visual Basic Programming Notes on page 16.

EntEntityListUnLock( ) - Unlock Data


This function unlocks data for an entity list. EntEntityListUnLock() utilizes an optional callback function, which the API will call to report the status of the routine. You should have one of the default 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) As Integer
Variable hSelect lpUnLockData lpUnLockData.dwSize lpUnLockData.sigNameList lpUnLockData.dwFlags lpUnLockData.sigCat lpUnLockData.lStartPeriod lpUnLockData.lEndPeriod Description The handle of the selected tables The structure with arguments for the routine The size of this structure The signature of the entity list to unlock Option Bit Flags; currently only DB_REMOTE to denote server processing Category signature Zero-based start period Zero-based end period

lpUnLockData.sigNameOpenDatafile Denotes that the datafile has been opened and is read-write with this signature, and that the API does not need to open the datafile with this signature. lpUnLockData.fnCallBack lpUnLockData.lParam The callback function for status if not executing on a server, or NULL. This is used only when not executing on a server. The argument for fnCallBack

166 Advanced Functions

Variable lpUnLockData.lNthStatusCallback lpUnLockData.hProcess lpApiStruct

Description The API calls fnCallBack every nth entity. The handle of the task status window process. This returns the process handle when executing on the server. NULL. This argument is not used.

Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred 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 Table


This function enumerates the signatures of all records in a specified table using a user-provided callback function. For each record in the table wTabId, EntEnum( ) passes the record signature to the specified callback function. You can stop the enumeration by returning a non-zero value from the callback function. For many tables, you can filter the enumeration by setting apis, u_ApiEnum.dwMask to specific constants appropriate for the table. Look in ToolInc.h for the constants.
Tip: Pass NULL for the apis argument unless you really need an apistruct for the particular table

or are trying to filter the enumeration. Otherwise, the API may think you are trying to filter the enumeration and may find that no records meet the criteria you unintentionally specified. 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 As Long, apiS As APISTRUCT) As Integer
Variable hSelect Description The handle of the selected tables

Advanced Functions Alphabetical Reference 167

Variable wTabId sigKey

Description The table for which signatures are enumerated. It can be of the valid table IDs listed in the missing link. NONE or the key of a related table. This is a required key if wTabId is a related table. For more information, see the Related Tables on page 363.

lpCallBack A pointer to a user-provided callback function. For more information, see CALLBACKAPI on page 309. lParam apiS The Parameter to be passed back to the user-provided callback function (lpCallBack) NULL or a pointer to an apiStruct

Return Codes:
Code 0 NONE Other value Meaning Successful Error occurred 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 passing 0 in place of the apiStruct. For more information, see Visual Basic Programming Notes on page 16. Use this format for C: short WINAPI EntEnum(HSELECT hSelect, short wTabId, SIGNA sigKey, CALLBACKAPI lpCallBack, 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 signature of a record in the Account List Entries table (ID_ACCTLISTENTRY). You can call EntQueryEx( ) with query attribute ENTRY_SIG (table ID_ACCTLISTENTRY) to get the account signature. You can call EntQueryEx( ) for the Account List table (ID_ACCTLIST) using query 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 callback function are reversed. The first signature is the list signature. The second signature is the entry signature for a fixed list, or the account signature for a dynamic list. When you call EntEnum() to enumerate table ID_ACCTLISTENTRY for a dynamic account list:
168 Advanced Functions

If your callback function returns ACCTLIST_DONTEXPANDSUBS (defined in Toollnc.h), EntEnum() will not enumerate the subaccounts (if any) for that account (the account that was passed to your callback function). In the apiStruct (if any) passed to your callback function, the u_ApiEnum.dwMask field indicates the indent level: 0 for a major account, 1 for a first-level sub-account, 2 for the second level (subsubaccount).

EntEnum( ) and ID_CODES


When enumerating table ID_CODES, you can filter account codes or entity codes. To use this option, you have to initialize an apiStruct and set its u_ApiEnum.dwMask field to either CODE_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_DATAFILE


When you use EntEnum() to enumerate the records in a datafile table, it normally checks security, skips any totally blank records (no data in any period), and skips any old records for which the account has been changed to a dynamic view account. The u_ApiEnum.dwMask field in the apiStruct specifies an optional filter for skipping particular types 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 Description Skips any account that does not have a logic statement. It does not test logic statements to see if logic makes an account an input account. Skips any account that has a logic statement, unless the logic statement makes it an input account. It does not skip other kinds of calculated accounts, such as major accounts that are the sum of their subaccounts, or accounts in the global account group when the entity isn't the global entity. Skip accounts that have a logic statement that specifically makes them an input account. Skip accounts with implied logic, such as major accounts that are the sum of their subaccounts. Skip accounts that have no data in the specified periods. You must set the lStartPeriod and lEndPeriod fields in the apiStruct.

Option DF_FILTOUT_INP DF_FILTOUT_CALC

DF_FILTOUT_LINP DF_FILTOUT_LOGIMP DF_FILTOUT_ NODATA

Advanced Functions Alphabetical Reference 169

Option DF_FILTOUT_ NODATA_FROM_ PER0

Description Skip accounts that have no data from the first period (period 0) through the period specified in the lEndPeriod field in the apiStruct. This is the same as DF_FILTOUT_NODATA except that it uses 0 for the start period regardless of what is in the lStartPeriod field in the apiStruct.

EntEnum() passes to your callback function the same sigKey, lParam, and apiStruct arguments that 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 (NONE in 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 fields shown in Table 43.
Table 43

EntEnum() apiStruct Fields - Jourals Table Description The category signature. The period number. The period number (same as lStartPeriod). 0 to enumerate all.

Field sigCat lStartPeriod lEndPeriod u_ApiEnum.dwMask

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 journals that meet specific criteria by setting the mask field to indicate which journals to include. The mask 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 mask must include each of these parts. For example, if you want to filter on journal status, you must specify a mask for type and attribute as well. If a mask is specified and one of its components is zero, the enumeration will not run. Example:
Dim apiS As APISTRUCT Call EntInitApiStruct(hApp&, apiS) apiS.sigCat = sigCat apiS.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 and balanced apiS.u_ApiEnum.dwMask = JOURMASK_STATUS_POSTED Or JOURMASK_TYPE_REGULAR Or JOURMASK_ATTRIB_BALANCED ret% = EntEnum(hSelect&, HYP_ID_JOURNALS, HYP_NONE, callback.ProcAddress, lParam&, apiS) 'enumerate all autoreversing journals in specified category and period. apiS.u_ApiEnum.dwMask = JOURMASK_TYPE_AUTOREVERSING Or JOURMASK_ALL_STATUS Or JOURMASK_ALL_ATTRIB ret% = 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 the test. 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. This enumerates all entries in the detail table for that particular journal. Set up an apiStruct with the fields shown in Table 44.
Table 44

EntEnum() apiStruct Fields - Journals Detail Table Description The category signature. The signature of either the journal or the first detail record for the journal. The table ID to which sigJournal applies. Not used (no filtering).

Field sigCat u_ApiEnum.sigJournal u_ApiEnum.sJournalTableID u_ApiEnum.dwMask

EntEnum() apiStruct Fields - Journals Detail Table


Example:
Dim apiS As APISTRUCT Call EntInitApiStruct(hApp&, apiS) apiS.sigCat = sigCat apiS.u_ApiEnum.sigJournal = sigJournal apiS.u_ApiEnum.sJournalTableID = HYP_ID_JOURNALS ret% = EntEnum(hSelect&, HYP_ID_JOURNAL_DETAIL, sigJournal, callback.ProcAddress, lParam&, apiS) 'or ... apiS.u_ApiEnum.sigJournal = sigFirstJournalDetail apiS.u_ApiEnum.sJournalTableID = HYP_ID_JOURNAL_DETAIL ret% = EntEnum(hSelect&, HYP_ID_JOURNAL_DETAIL, sigJournal, callback.ProcAddress, lParam&, apiS)

Advanced Functions Alphabetical Reference 171

EntEnum( ) and ID_JOURNAL_HISTORY_DETAIL (Journals History Detail Table)


Set the sigKey argument to the signature of the journal to which the history applies. This enumerates all entries in the journals history table for that particular journal. Set up an apiStruct with the fields shown in Table 45.
Table 45

EntEnum() apiStruct Fields - Journals History Detail Table Description The category signature. The signature of either the journal or the first history. The table ID to which sigJournal applies. Not used (no filtering).

Field sigCat u_ApiEnum.sigJournal u_ApiEnum.sJournalTableID u_ApiEnum.dwMask

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 apiStruct with its table ID. All entries for a given journal are enumerated if the signature of the first history record for the journal is specified in u_ApiEnum.sigJournal in the apiStruct. If u_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 fields shown in the following table.
Table 46

EntEnum() apiStruct Fields - Journals Template Table Description The category signature. 0 to enumerate all.

Field sigCat u_ApiEnum.dwMask

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 field in the apiStruct to 0, which is the default value. Alternatively, you can enumerate only the journal templates that meet specific criteria, by setting the mask field to indicate which journal templates to include. The mask is broken down into three parts: the mask for template type, the mask for journal type, and the mask for journal attribute. If you want to specify a mask for the enumeration, your mask must include each of these parts, for example, if you want to filter on template type, you must specify a mask for type and attribute as well. If a mask is specified and one of its components is 0, the enumeration will not run. Example:
172 Advanced Functions

Dim apiS As APISTRUCT Call EntInitApiStruct(hApp&, apiS) apiS.sigCat = sigCat 'enumerate all journal templates for category apiS.u_ApiEnum.dwMask = 0 ret% = EntEnum(hSelect&, HYP_ID_JOURNAL_TEMPLATES, HYP_NONE, callback.ProcAddress, lParam&, apiS) 'enumerate all standard templates that are both regular and balanced apiS.u_ApiEnum.dwMask = JOURMASK_TEMPTYPE_STANDARD or JOURMASK_TYPE_REGULAR or JOURMASK_ATTRIB_BALANCED ret% = 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_ATTRIB ret% = 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 callback function are reversed. The first signature is the list signature. The second signature is the entry signature. 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 following table in the apiStruct. If you do not pass an apiStruct, the API function will use the current category and the current period.
Field sigCat lStartPeriod lEndPeriod u_ApiQry.bSupSubNames Description The category signature. If this is NONE, the API will use the current category. The starting period (0-based). The ending period (0-based). 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 its u_ApiEnum.uUseFixedListCriteria field to ENUM_FIXEDLIST_CRITERIA (constant defined in ToolInc.h) to enumerate the entities that match the criteria from which the fixed list was built instead 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 the entity whose parents you wish to enumerate. To do this, set up an apiStruct with the u_ApiEnum.dwMask field set to ENUM_PARENTS_ABOVE. For applications that are set up to use dynamic organizations, also set the fields shown in the following table in the apiStruct.
Field sigCat lStartPeriod lEndPeriod lpseStatus Description The category signature (the number of periods in the category is used to size an internal buffer). The starting period. The ending period. The address of the buffer to return status information. The buffer must be large enough for an integer (short in C) for each period 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 some fields in the apiStruct when passing it to your callback function. The lStartPeriod field indicates the first period for which the entity is a parent of the specified entity. The status buffer has a value of 1 for each period for which the entity has children (because an entity can be a parent in one 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 to NONE (HYP_NONE in Visual Basic) to enumerate all nodes that are active in the specified periods. Set up an apiStruct with the fields shown in the following table.
Field u_ApiEnum.bNameSig u_ApiEnum.dwMask Description 1 (TRUE) if sigKey is an entity signature, FALSE if sigKey is a node signature. Use the following codes:
l l l l l l

ENUM_ALL to enumerate all children below. ENUM_DEP (ENUM_IMMED_DEPS) to enumerate immediate dependents only. ENUM_CON (ENUM_PARENT) to enumerate only parents below sigKey. ENUM_BAS (ENUM_BASE) to enumerate only base entities below. ENUM_UNOWNED to enumerate unowned entities. ENUM_SUBNAME to include all subentities.

If the application is set up to use dynamic organizations, also set the fields shown in the following table in the apiStruct.
174 Advanced Functions

Field sigCat lStartPeriod lEndPeriod lpseStatus

Description The category signature. The starting period. The ending period. 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 the node 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 enumerate only the reporting views appropriate for that frequency. Set sigKey to HYP_NONE (NONE in C) 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 enumerate the detail records in a rollover set. You can also set sigKey to HYP_NONE (NONE in C) to enumerate 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 Using an apiStruct Structure on page 110. Unlike most tables, you cannot enumerate all of the records in the security group table. Select one of the following enumeration options:
l

To enumerate the groups to which a user belongs, pass the user signature (in table ID_SECUSERTAB) as the sigKey argument. Set the u_ApiEnum.bSecUserGroupCode field in the apiStruct to SECURITY_USER (defined in the TOOLINC.H file). 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 field in the apiStruct to SECURITY_GROUP (defined in the TOOLINC.H file).

You must select the user table (ID_SECUSERTAB) before calling EntEnum( ) for the security group table. We recommend using an OR operation to select table ID_SECURITY and all of its associated security tables rather than selecting the tables individually. The signature passed to your callback function is the signature of a cell in the table ID_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 page 408.

EntEnum( ) and ID_SECRIGHTS (Security Rights Table)


To use EntENum() with ID_SECRIGHTS, you need to setup an apiStruct. To enumerate the classes 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 to SECURITY_USER. To enumerate the users in a security class, set the sigKey argument to the class signature (in table ID_SECCLASS). Set the u_ApiEnum.bSecUserGroupCode field in the apiStruct to SECURITY_CLASS. You can also set the u_ApiEnum.bSecUserGroupCode field in the apiStruct to SECURITY_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 table ID_SECTASKFILTER, set the sigKey argument to the signature of the security task filter. To enumerate 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 the u_ApiEnum.bSecUserGroupCode field in the apiStruct to one of the following codes:
l

SECURITY_USER enumerate only users (not groups) SECURITY_GROUP enumerate only groups 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 sigName Description The entity signature or NONE.

176 Advanced Functions

Field u_ApiEnum. dwMask

Description 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 the entity. SHARES_WHOOWNSME to enumerate shares of a specific entity owned by other entities. Set the sigName field to the signature of the entity. SHARES_OWNER_GLOBAL to enumerate shares owned of the global entity. Set sigName to NONE. SHARES_ALL_WHOIOWN to enumerate shares owned by any entity. Set sigName to NONE. Note: These constants are defined in the Toolinc.h file.

l l

Optionally, you can use the OR operation with the constant SHARES_INC_NON_INTCO and the mask field to include non-intercompany entities. This is only relevant for SHARES_WHOIOWN, SHARES_WHOOWNSME, and SHARES_ALL_WHOIOWN. If the application is set up to use dynamic organizations, also set the fields shown in the following table in the apiStruct.
Field sigCat lStartPeriod lEndPeriod Description The category signature. The starting period. The ending period.

Example:
Dim apiS As APISTRUCT 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.dwMask = SHARES_WHOOWNSME apiS.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 table ID_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 must set up an apiStruct. Set the u_ApiEnum.bSubAcctDet field in the apiStruct to ENUMSAD_BYACCOUNT to indicate that the sigKey argument is an account signature. Alternatively, use EntEnumSubAcctSig( ). For more information, see Using an apiStruct Structure on page 110.
Advanced Functions Alphabetical Reference 177

EntEnumApplications( ) - Enumerate Applications


This function enumerates all Hyperion Enterprise applications that have been set up using the New Application or Add Application command in Hyperion Enterprise. EntEnumApplications( ) reads the HYPENT.INI file and enumerates applications using a callback 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 0 1 Other Meaning Successful Error occurred or no applications are listed Value returned from your callback function

Example:
ret% = EntEnumApplications(AddressOf EnumAppsCallback, lParam&) . . . 'Your callback function Public Function EnumAppsCallback(ByVal lAddr As Long, ByVallParam&) As Integer Copy C string to B string wLen% = EntVBGetCStrLen( lAddr& szApp$=Space (wLen%) ret%=EntVBCopyStr(szApp$, lAddr&, wLen%) If UCASE(szApp$) <> "DEFAULT" Then ret% = MsgBox("Application: " & szApp$) End If EnumAppsCallback% = 0 "Continue enumeration End Function

Use this format for C: short WINAPI EntEnumApplications(CALLBACKAPP lpCallback, LONG lParam);

EntEnumOrgEntities( ) - Enumerate Nodes in an Organization


This function enumerates all of the nodes in a given organization using a user-provided callback function, 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 organization in the order in which they appear in the organization. You can use EntQueryEx( ) to query the Nodes table for the entity for each node. For more information about nodes and organization structures, see Organization Structures and 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 As Long, ByVal wMask As Integer) As Integer
Variable hSelect sigNode Description The handle of the selected tables 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 wMask The parameter to be passed back to the user-provided callback function Use the following codes:
l l l l l l

ENUM_IMMED_DEPS Enumerate immediate dependents only. ENUM_PARENT Enumerate parent entities below sigNode. ENUM_BASE Enumerate base entities. ENUM_ALL Enumerate base and parent entities and subentities. ENUM_UNOWNED Enumerate unowned entities. 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 that you want the organization structure for the current category and period. If you do not want this information, use EntEnum( ) instead of EntEnumOrgEntities( ). Enumerate ID_NODES and specify 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 the u_ApiEnum.bNameSig field to FALSE (0). Return Codes:
Code 0 NONE Other Meaning Successful Error occurred 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 function Public Function EnumOrgCB(ByVal hSelect&, ByVal sigNode&, ByVal sigKey&, ByVal lParam&, apis as ApiStruct) As Integer 'Get & display entity ID ret% = 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 enumeration EnumOrgCB% = 0 End Function

Use this format for C: short WINAPI EntEnumOrgEntities(HSELECT hSelect, SIGNA sigNode, CALLBACKAPI lpCallback, LONG lParam, WORD wMask);

EntEnumSubAcctSig( ) - Enumerate Subaccounts


This function enumerates a series of sub-account signatures for a specified major account. Use this 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 As Long) As Integer
Variable hSelect sigAcct Description The handle of the selected tables 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 0 NONE Other

Meaning Successful Error occurred Value returned from your callback function

Example:
ret% = EntEnumSubAcctSig(hSelect&, sigAcct&, AddressOf EnumSubAcctCB, 0) . . . 'Callback function, whatever you named it Public Function EnumSubAcctCB(ByVal hSelect&, ByVal sigAcct&, ByVal sigNone&, ByVal lParam&,apiS As APISTRUCT) As Integer szAcct$ = 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 If EnumSubAcctCB% = 0 End Function

Use this format for C: short WINAPI EntEnumSubAcctSig(HSELECT hSelect, SIGNA sigAcct, CALLBACKAPI lpCallback, LONG lParam);

EntEnumUsersOnSystem( ) - Enumerate Users on System


This function enumerates users and programs that are currently using a given application. For each 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, ByVal lParam As Long) As Integer
Variable hApp Description 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 0 NONE Other

Meaning Successful Error occurred 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 Signature


This function searches a specified table (wTabId) using a given search string and returns the signature of the record that matches the search string. The search string is usually the ID (short name) 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 sigKey szKey apiS The table you want to search NONE or the key of a related table. This key is required if wTabId is a closely related table. For more information, see Related Tables on page 363. The search string for the record that you want to find NULL or a pointer to an apiStruct with more information

Return Codes:
Code The signature NONE Meaning Successful 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 0 in place of the apiStruct. For more information, see Visual Basic Programming Notes on page 16. 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 the signature of the account conversion list. Set up an apiStruct with the fields shown in the following table.
Field u_ApiFind.sItemToFindOne Description Use one of the following codes:
l l

ACONV_FIND_ACONV_EXT if the search string is the external account name 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 table ID_ICSET to find the desired intercompany matching set, then call EntQueryEx( ) with query attribute INTCO_GROUPSIG (and table ID_ICSET) to get the signature of the first detail record in table ID_INTCODET. Retrieve subsequent detail records by calling EntQueryEx( ) for each detail record using query attribute INTCO_NEXTDET (and table ID_INTCODET).

EntFind( ) and the Journals Tables: ID_JOURNALS


All of the the journal tables require an apiStruct to specify the category and period. Set the fields shown in the following table in the apiStruct.
Field sigCat lStartPeriod lEndPeriod Description The category signature. The period. 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 lpString field 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 argument to 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 sigKey argument 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 of the entity conversion list. Set up an apiStruct with the fields in the following field.
Field u_ApiFind.sItemToFindCode Description Use one of the following codes:
l l

NCONV_FIND_NCONV_EXT if the search string is the external entity 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 in the following table.
NAME_IMPLICIT NAME_EXPLICIT NAME_ADMIN Get the signature of the entity or sub-entity, even if only the entity is specified in szKey. Return an error if you do not specify a sub-entity for an entity that has subentities. 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 the NAME_ADMIN code. The following table shows the different options that would be returned if EUROFF has a substructure attached with a top node of PTADJ.
Signature Returned szKey "EUROFF" "EUROFF.PTADJ" NAME_ADMIN EUROFF EUROFF.PTADJ NAME_IMPLICIT EUROFF.PTADJ EUROFF.PTADJ NAME_EXPLICIT NONE (error) EUROFF.PTADJ

184 Advanced Functions

Signature Returned szKey "USDIV" NAME_ADMIN USDIV NAME_IMPLICIT USDIV NAME_EXPLICIT 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 the signature of the group in the Security User table (ID_SECUSERTAB). The sigUser field is the user 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 is given in an apiStruct instead. Pass the category signature as sigKey. This is required if the application is set up to use dynamic organizations. Each record in the Shares table indicates how many shares of stock for one entity are owned by another entity. To find a specific record, you specify the entity signatures for both the owner and the owned entity. Other records contain the total number of shares outstanding for a particular entity and the total number of its shares that are owned by other entities. These other records specify the entity signature as the owner and NONE (HYP_NONE in Visual Basic) as the owned entity signature. To find a particular record, set up an apiStruct with the fields shown in the following table.
Field sigParent sigName Description The signature of the entity that owns the shares. The signature of the owned entity, or HYP_NONE if you want the record that has the total shares issued or the total shares owned by other entities.

If the application is set up to use dynamic organizations, also set the fields shown in the following table in the apiStruct.
Field sigCat lStartPeriod Description The category signature. The period.

Advanced Functions Alphabetical Reference 185

Field lEndPeriod

Description The period (same as lStartPeriod).

For more information, see Using an apiStruct Structure on page 110.

EntFindEntityInOrg( ) - Find Node ID


This function returns the node signature of an entity in a given organization. If the sigNode argument variable is HYP_NONE (NONE in C), the search starts from the top node of the organization. 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 Node signature NONE Meaning Successful 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 Organizations


If the application was set up to use dynamic organizations, the EntFindEntityinOrg( ) function assumes 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 value End Function 'Callback function, whatever you named it Function 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 If End Function

Advanced Functions Alphabetical Reference 187

EntFormatNumber2( ) - Format Number


This 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 hApp dVal szBuf wLen wScale Description The application handle The value to format The buffer to return the formatted number The length of szBuf 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 Frequency


This function calls the Select Frequency dialog box and retrieves the frequency you select. If you select 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 As Long, 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, this will be a string in the format freq.view where freq is the Hyperion Enterprise frequency and view is the reporting view. For more information about frequencies and views, see Frequencies and Views on page 20.

Return Codes:
188 Advanced Functions

Code 0 NONE

Meaning Successful 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 Type


This 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, ByVal sigEntity As Long, ByVal sigParentEntity As Long, ByVal sigAccount As Long, ByVal wDSMType As Integer, ByVal lStartPeriod As Long, ByVal lEndperiod As Long, lRetAcctType As Long) As Integer
Variable ENTXA_ACCT_INPUT ENTXA_ACCT_CALCULATED ENTXA_ACCT_LOGICINPUT Description An input account (and the entity is not a parent) A calculated account, either because of logic or because the entity is a parent entity 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 ENTXA_ACCTNOINPUT ENTXA_ACCTBADGROUP ENTXA_ACCT_DYNAMICVIEW ENTXA_ACCT_ERROR An entity is an active parent in the specified range of periods. An account is a major account with the currency subtable attached. 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. A dynamic view account (no other bit flags are set.) An error occured (bad hSelect, invalid sigCat, invalid sigAccount, invalid sigParentEntity, internal query failed, out of memory, invalid period range, error attaching logic, an so on.

Variable hSelect

Description The handle of the selected tables

Advanced Functions Alphabetical Reference 189

Variable sigCat sigEntity

Description The signature of the category The signature of the entity or None. If NONE, the function will use default chart logic and will assume the entity is a baselevel, not a parent entity.

sigParentEntity None if wDSMType is ID_REGULAR; otherwise, the signature of the parent entity sigAccount wDSMType The signature of the account. This is required. It cannot be NONE. The consolidation detail type. Use ID_REGULAR for regular data. Must be one of the following types:
l l l l l l

ID_REGULAR ID_PROPORTIONAL ID_ELIMINATION ID_CONTRIBUTION ID_ADJUSTMENT ID_TRANSLATION

lStartPeriod lEndPeriod

The starting period. This can be NONE to use the first period (period 0.) The starting period. For an application with a dynamic organization (org-by-period), this can be NONE to use the last period in th category. If the application is not a dynamic organization (org-by-period), IEndPeriod must be one greater than IStartPeriod (but not greater than the number of periods in the category.) Tip: For an application that does not use a dynamic organization (org-by-period), set IStartPeriod to 0 and IEndPeriod to 1. The variable in which the result is returned. This is required. On return from the function, IRetAcctType will be one or more of the following account types:
l l l l l l l l l

lRetAcctType

ENTXA_ACCT_INPUT ENTXA_ACCT_CALCULATED ENTXA_ACCT_LOGICINPUT ENTXA_ACCT_IMPLIEDSUBTOTAL ENTXA_ACCT_CONSOLIDATED ENTXA_ACCT_NOINPUT ENTXA_ACCT_BADGROUP ENTXA_ACCT_DYNAMICVIEW ENTXA_ACCT_ERROR

If there was no error (the ENTXA_ACCT_ERROR bit flag is not set) and the account is not a dynamic view account (the ENTXA_ACCT_DYNAMICVIEW bit flag is not set), then one and only one of the ENTXA_ACCT_INPUT, ENTXA_ACCT_CALCULATED, or ENTXA_ACCT_LOGICINPUT bit flags will be set. Other bit flags may also be combined with whichever one of those bit flags is set.
Tip: ENTXA_ACCT_INPUT is defined as zero. To test for it, test that neither the

ENTXA_ACCT_CALCULATED nor ENTXA_ACCT_LOGICINPUT bit flags are set. As an alternative, see EntIsAccountInput( ) - Check if an Account is an Input Account on page 205.
190 Advanced Functions

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntGetAccountsInputType(HSELECT hSelect, SIGNA sigCat, SIGNA sigEntity, SIGNA sigParentEntity, SIGNA sigAccount, WORD wDSMType, long lStartPeriod, long lEndPeriod, long* plRetAcctType);

EntGetActiveModule( ) - Get Program Name


This function returns the code for the program or module that opened the application specified by the argument variable hApp. See the section in the TOOLINC.H file that lists MF_ codes for the 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) As Integer
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, int ncbUser)

EntGetAppProfileLong( ) - Get Application Profile Long


This 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 get

values from the application .INI file (or SQL equivalent) for both SQL and file-based applications. 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 The value of the given key NONE Meaning Successful Error occurred

Example:
isServerEnabled& = EntGetAppProfileLong(szApp$, "APP_USE_SERVER, 0)

Use this format for C: long WINAPI EntGetAppProfileLong(LPSTR szAppName, LPCSTR szKeyName, long lDefault)

EntGetAppProfileString( ) - Get Application Profile String


This function reads a text string from the application .INI file.
Note: You should use the EntQueryDefault( ) function with the ID_APPDEFAULT table to get

values from the application .INI file (or SQL equivalent) for both SQL and file-based applications. 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 szResult wSize The default value to be assigned if szKeyName is not found The buffer to return the string The length of szResult (in bytes)

Return Codes:
Code The number of characters copied to szResult NONE Meaning Successful 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, LPCSTR szDefault, LPSTR szResult, short wSize)

EntGetCatPerFreq( ) - Get Period Number and Frequency in Category


This function retrieves the period number within a given category for a specific period. This function also returns the frequency used in the period string if the argument variable sigFreq is not NULL. Use this format: Declare Function EntGetCatPerFreq Lib "heaccess.dll" Alias "_EntGetCatPerFreq@16" (ByVal hSelect 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 sigFreq The category signature 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 The period number NONE Meaning Successful 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 the signature of the quarterly frequency. Note that the category does not have to be a quarterly category for this example to work. Use this format for C: SIGNA WINAPI EntGetCatPerFreq(HSELECT hSelect, LPSTR szPeriod, SIGNA sigCat, SIGNA * psigFreq)

EntGetChild( ) - Get Child Node


This function retrieves the signature of the child node of the specified node. For more information about nodes, see Organization Structures and Advanced Functions on page 120. Use this format: Declare Function EntGetChild Lib "heaccess.dll" Alias "_EntGetChild@12" (ByVal hSelect As Long, ByVal sigNode As Long, ByVal fExpandSubnames As Integer) As Long
Variable hSelect sigNode Description The handle of the selected tables The signature of the node whose child you want to retrieve

fExpandSubnames 1 (TRUE) to consider subentities, otherwise 0 (False)

Return Codes:
Code The signature of the child node NONE Meaning Successful 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 Organizations


If the application was set up to use dynamic organizations, the EntGetChild( ) function assumes that 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 the signature of the child node. Use table ID ID_NODES or HYP_ID_NODES in Visual Basic and query attribute CHILD. Here is an example of how to use EntQueryEx( ) instead of EntGetChild():
Function GetChild(hSelect&, sigNode&, fExpandSubentities%) As Long Dim 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 Signature


This function returns an entity signature based on the application handle, entity, and sub-entity criteria code you provide. The following table shows three possible sub-entity criteria codes.
Table 47

Subentity Criteria Codes for EntGetEntitySig( ) Information Returned The signature of the entity.subentity, even if the entity is specified in szKey An error message if you specify a sub-entity for an entity that does not have subentities The signature of the item you requested (as opposed to the preceding codes)

Code NAME_IMPLICIT NAME_EXPLICIT NAME_ADMIN

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 EUROFF has a substructure attached with a top node PTADJ, while USDIV does not have a substructure.
Advanced Functions Alphabetical Reference 195

Signature returned szKey "EUROFF" "EUROFF.PTADJ" "USDIV" NAME_ADMIN EUROFF EUROFF.PTADJ USDIV NAME_IMPLICIT EUROFF.PTADJ EUROFF.PTADJ USDIV NAME_EXPLICIT NONE (error) EUROFF.PTADJ USDIV

Use this format: Declare Function EntGetEntitySig Lib "heaccess.dll" Alias "_EntGetEntitySig@12" (ByVal hSelect As Long, ByVal szEntity As String, ByVal fImpliedSubEntities As Integer) As Long
Variable hSelect szEntity Description The handle of the selected tables The enitity for which you are looking

fImpliedSubEntities One of the following codes:


l l l

NAME_IMPLICIT NAME_EXPLICIT NAME_ADMIN

Return Codes:
Code Entity signature NONE Meaning Successful Error occurred

Example:
'Next line sigEntity& 'Next line sigEntity& 'Next line sigEntity& returns signature of Italy.Tran = EntGetEntitySig(hSelect&, "Italy",NAME_IMPLICIT) returns HYP_NONE = EntGetEntitySig(hSelect&, "Italy",NAME_EXPLICIT) returns signature of only Italy = EntGetEntitySig(hSelect&, "Italy",NAME_ADMIN)

Use this format for C: SIGNA WINAPI EntGetEntitySig(HSELECT hSelect, LPSTR szEntity, short fImpliedSubEntities)

EntGetHappFromSelect( ) - Get the Application Handle


This 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 The application handle NONE Meaning Successful Error occurred

Example:
hApp& = EntGetHappFromSelect(hSelect&)

Use this format for C: HAPP WINAPI EntGetHappFromSelect(HSELECT hSelect)

EntGetLastError( ) - Get Last Error


This function retrieves the last error code set by previous API calls. Whenever any other API function returns an error code (usually NONE), call this function to retrieve any additional information about the error. This function returns the last internal API error code that was set by the most recently called API function. For a complete list of error codes, see the TOOLINC.H file. For more information, see EntGetLastErrorByHApp( ) - Get Last Error on page 198. Use this format: Declare Function EntGetLastError Lib "heaccess.dll" Alias "_EntGetLastError@4" (ByVal hSelect As Long) As Integer Where hSelect is the handle of the selected tables. Return Codes:
Code Error code NONE After calling EntDataFileOpen( ): FILE_NOEXIST SECURITY_VIOLATION ERR_TABLE_NOT_SELECTED The requested datafile table does not exist, and the bCreate argument was FALSE so the table was not created. No data. The user does not have access rights to the requested datafile table and wAttr access code. Necessary tables are not selected. Tip: For applications that us dynamic organizations, verify that you specified the correct category when you selected table ID_ORGANIZATION and its associated tables (ID_ASSOC). Meaning Successful Error occurred

Advanced Functions Alphabetical Reference 197

Code

Meaning

After calling EntQueryEx( ) for table ID_DATAFILE: DFER_NOERR DFER_BADPERIOD INSUFFICIENT_SECURITY RIGHTS No error. Bad period.

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 Error


This function retrieves the last error code set by previous API calls. It is identical to EntGetLastError( ), except EntGetLastErrorByHApp( ) takes an application handle as the argument, so you can use it when no tables are selected. Whenever any other API function returns an error code (usually NONE), call this function to retrieve any additional information about the error. This function returns the last internal API error code that was set by the most recently called API function for the Hyperion Enterprise application. See the EntGetLastError section in the TOOLINC.H file for a complete list of error codes. 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 Error code NONE Meaning Successful Error occurred

Note: For a partial list of Return Codes, see EntGetLastError( ) - Get Last Error on page

197. Use this format for C:


198 Advanced Functions

short WINAPI EntGetLastErrorByHApp(HAPP hApp)

EntGetOrgLevel( ) - Get Level in Organization


This function returns the organization level for a specified node. If the application is set up to use dynamic organizations, this function uses the organization structure for the current period and 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" (ByVal hSelect As Long, ByVal sigTopNode As Long, ByVal sigTarget As Long, ByVal wLevel As Integer) As Integer
Variable hSelect Description 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 wLevel The signature of the node for which you want to know the organization level Usually 0, or one level less than the level of sigTopNode

Return Codes:
Code Organization level 0 Meaning Successful 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, short wLevel)

EntGetPerView( ) - Get Frequency and View


This function retrieves the frequency and view for a specified reporting frequency. You must select the Reporting Frequencies (ID_RPTFREQ) and Reporting Views (ID_RPTVIEW) tables before calling this function. Use this format:
Advanced Functions Alphabetical Reference 199

Declare Function EntGetPerView Lib "heaccess.dll" Alias "_EntGetPerView@16" (ByVal hSelect As Long, ByVal szFreq As String, sigFreq As Long, iView As Integer) As Integer
Variable Description hSelect The handle of the selected tables szFreq sigFreq iView 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. Place to return the frequency from the reporting frequency specified by szFreq Place to return the view from the reporting frequency specified by szFreq (either VIEW_YTD or VIEW_PERIODIC)

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntGetPerView(HSELECT hSelect, LPSTR szFreq, SIGNA * psigFreq, short * piView)

EntGetProfileLong( ) - Get Hyperion Profile Long


This 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 The value of the given key Meaning 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, ByVal szResult 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 szResult wSize The default value to be assigned if szKeyName is not found. The buffer to receive the string result The length of the szResult buffer (in bytes)

Return Codes:
Code The number of characters copied to szResult 0 Meaning Successful 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, LPCSTR szDefault, LPSTR szResult, short wSize)

EntGetRightsToTask( ) - Get Rights to Task


This 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 lTaskID The application handle 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 the TOOLINC.H file in the form SECTASK_xxxx.

Return Codes:
Code SECURITY_MODIFY SECURITY_NONE SECURITY_RESTRICTED SECURITY_VIEW Meaning Modify (write) None Restricted (partial 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 Node


This function retrieves the signature of the next sibling node in an organization. For more information about nodes, see Organization Structures and Advanced Functions on page 120. Use this format: Declare Function EntGetSibling Lib "heaccess.dll" Alias "_EntGetSibling@8" (ByVal hSelect As Long, ByVal sigNode As Long) As Long
Variable Description hSelect The handle of the selected tables sigNode The node signature

Return Codes:
Code The signature of the next sibling node NONE Meaning Successful Error occurred

Example:
202 Advanced Functions

sigSibling& = EntGetSibling(hSelect&, sigNode&)

Use this format for C: SIGNA WINAPI EntGetSibling(HSELECT hSelect, SIGNA sigNode)

EntGetSibling( ) - Dynamic Organizations


If the application was set up to use dynamic organizations, the EntGetSibling function assumes that 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 not what you want, you can use EntQueryEx( ) to get the signature of the next sibling node in the organization. Use table ID ID_NODES or HYP_ID_NODES in Visual Basic and query attribute SIBLING. Here is an example of how to use EntQueryEx() instead of EntGetSibling():
Function EntGetSibling(hSelect&, sigNode&) As Long Dim 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 Address


EntGetVarAddr( ) allows you to force Microsoft Visual Basic into assigning an address to a variable. The function returns the address of whatever you pass to it. You pass the argument by reference, so the function just returns the same address that you pass it. You can use this function to set the address fields in an apiStruct structure, which is necessary for some other 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" (pBuf As Any) As Long Where pBuf is the address you pass to the function. Return Codes:

Advanced Functions Alphabetical Reference 203

Code The address of the variable you passed to the function NONE

Meaning Successful Error occurred

Example:
apiS.lpimrData = EntGetVarAddr(dVal#)

Caution!

Microsoft Visual Basic can relocate things in memory anytime you perform a string operation. This includes string assignments, string concatenation, and string functions.

Behind-the-scenes string operations can also cause this problem. For example, if you pass a fixedlength string as a function argument, Visual Basic makes a temporary copy of the string and passes the copy instead. Redimensioning an array (ReDim) can also cause Visual Basic to relocate things in memory. Be very careful when using the EntGetVarAddr( ) function to get the address of a dynamic array, which can move around in memory. You should get the address immediately before using it and be sure you do not perform any operation that could cause Visual Basic to relocate items in memory. Otherwise, you can cause an intermittent but serious bug that is extremely difficult to find.

EntInitApiStruct( ) - Initialize API Structure


This function initializes an apiStruct structure. Use this format: Declare Sub EntInitApiStruct Lib "heaccess.dll" Alias "_EntInitApiStruct@8" (ByVal hApp As Long, apiS As APISTRUCT)
Variable Description hApp apiS The application handle The pointer to the apiStruct structure

Return Codes: None Example:


Dim apiS As APISTRUCT EntInitApiStruct hApp&, apiS

Use this format for C: void WINAPI EntInitApiStruct(HAPP hApp, LPAPISTRUCT pApiS)
204 Advanced Functions

EntIsAccountInput( ) - Check if an Account is an Input Account


This function is used to determine whether an account is an input account for the specified entity. This depends on formulas, so before you call this function, you must either select the datafile table (ID_DATAFILE) for the category and entity, or call EntLogicAttach( ) for the category 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 As Long, bIsInput As Byte) As Integer
Variable hSelect sigCat sigEntity Description The handle of the selected tables The category signature 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 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntIsAccountInput(HSELECT hSelect, SIGNA sigCat, SIGNA sigEntity, SIGNA sigAccount, HYPBOOL* pbIsInput);

EntIsEntityParent( ) - Check if an Entity is a Parent


This function checks whether an entity is a parent entity. If sigOrg is set to NONE, Hyperion Enterprise checks if the entity is a parent entity anywhere in the application. If sigOrg specifies an organization signature, Hyperion Enterprise checks if the entity is a parent entity in the organization. For more information about organizations, see Organization Structures and Advanced 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 want to 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 the node signature using EntFindEntityInOrg( ), then call EntQueryEx( ) to get its child node, just to see if there is a child. Use this format: Declare Function EntIsEntityParent Lib "heaccess.dll" Alias "_EntIsEntityParent@12" (ByVal hSelect 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 1 (TRUE) 0 (False) Meaning The entity is a parent. 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 the EntUpdate( ) or EntUpdateDefault( ) functions. Use this format: Declare Function EntIsModified Lib "heaccess.dll" Alias "_EntIsModified@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 sigKey apiS 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 listed in or ID_APPDEFAULT. NONE or the key of a related table. For more information, see Related Tables on page 363. NULL or a pointer to an apiStruct structure with more information

206 Advanced Functions

Return Codes:
Code NON-ZERO 0 (False) -1 (NONE) Meaning Table has been modified. Table has not been modified, or an error occurred. 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 be set to indicate how the modifications affect the impacted status. For more information, see NMODIFY and related constants defined in TOOLINC.H.

EntIsSelected( ) - Is Table Selected?


This function determines whether a specified table is already selected. Use arguments that are similar to those you would use to select the table. Use this format: Declare Function EntIsSelected Lib "heaccess.dll" Alias "_EntIsSelected@20" (ByVal hSelect As Long, ByVal wTabId As Integer, ByVal sigKey As Long, wLockMode As Integer, apiS As APISTRUCT) As Integer
Variable hSelect wTabId sigKey Description The handle of the selected tables The table you want to check. 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 selection mode or NONE if the table is not selected. apiS NULL, or a pointer to an apiStruct structure with more information

Return Codes:
Code 1 (TRUE) 0 (False) Meaning Table is selected. 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 Journal


This function extracts one or more journals. It uses an optional callback function that the API calls to send the current status of the journal extract. Before calling this function, you must select the following tables, in read-only format:
l

Default tables (ID_CATEGORY, ID_ORGANIZATION, ID_ACCOUNTS, and associated tables.) ID_JOURNALS - the journals tables. ID_SECURITY - security tables.
Note: If you are a Visual Basic Programmer, you must use EntJournalExtractVB( ) instead

of EntJournalExtract( ). EntJournalExtract() calls the function that Hyperion Enterprise uses to extract journals. The function supports the two methods that Hyperion Enterprise uses for extracting journals: extract journals for a single period or extract journals for all periods. To extract journals for a single period, you specify the signatures of the particular journal(s) that you wish to extract (in lpJourData.SelectedJourSigs). To extract journals for all periods, you specify the criteria and the API function will find and extract all journals that match the criteria. Specifically, the API function will internally enumerate journals, journal templates, or recurring journal templates as indicated in lpJourData.sCheckedInclude; of those, it will extract the journals that match the criteria indicated in lpJourData.lCheckedAttribTypeStatus. Use this format for C: short WINAPI EntJournalExtract(HSELECT hSelect, LPJOUREXTRSTRUCT lpJourData, CALLBACKJOURLOAD fnCallBack, LPARAM lParam, LPAPISTRUCT lpApiStruct)

Variable hSelect lpJourData lpJourData->dwSize lpJourData->hProcess lpJourData->szDelimiter lpJourData->sCheckedInclude

Description The handle of the selected tables The structure with arguments for the journal extract The size of this structure When executing on the server, the API function returns the handle of the Task Status window process here. The field delimiter, which is typically an exclamation point ( ! ) Bitmask for extracting journals (LOADEXT_JOURNALS), standard journal templates (LOADEXT_ STANDARD), or recurring journal templates (LOADEXT_RECTMP). Indicates to the API function what to search if IpJourData.wOperation is JOUROP_EXTRACTALLPER. Used internally by the API function. Set this to 0.

lpJourData->sCurrentInclude

208 Advanced Functions

Variable lpJourData>lCheckedAttribTypeStatus

Description Bitmask that holds the journal attribute, type, and status and a couple of other flags for the extract operation. 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 l l l

JOURMASK_ALL_ATTRIB (include all atrributes) JOURMASK_ATTRIB_BALANCED (include balanced journals) JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals) JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals

Journal Types to be Extracted:


l l l l

JOURMASK_ALL_TYPE (include all journal types) JOURMASK_TYPE_REGULAR (include regular journals) JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals) JOURMASK_TYPE_TOP_LEVEL (include top-level journals)

Journal Status to be Extracted:


l l l l l

JOURMASK_ALL_STATUS (include all statuses) JOURMASK_STATUS_UNPOSTED (include unposted journals) JOURMASK_STATUS_POSTED (include posted journals) JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals) JOURMASK_STATUS_REVIEWED (include reviewed journals) JOURMASK_STATUS_REVERSED (include reversed journals) JOURMASK_STATUS_LOCKED (include locked journals)

l l

Template Types to be Extracted:


l l l

JOURMASK_ALL_TEMPTYPE (include all template types) JOURMASK_TEMPTYPE_STANDARD (include all standard templates) JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)

Other Flags
l l

DBE_REMOTE (server-based extract) JOURE_APPEND (append to existing extract file)

lpJourData->lCurrentAttrib lpJourData->wOperation lpJourData->wFlags lpJourData->lSelectedJourCount lpJourData->SelectedJourSigs

0. Internal use. Indicates the operation. Must be JOUROP_EXTRACTSINGLEPER or JOUROP_EXTRACTALLPER. Used internally. Set this to 0. The number of signatures in IpJourData.SelectedJourSigs array. Use 0 if IpJourData.wOperation is JOUROP_EXTRACTSINGLEPER. The address of an array of the signatures of the selected journals. To distinguish journals from journal templates, combine signatures of journals (not templates) with the JOUR_ENTRIES constant using the "or" operator.

Advanced Functions Alphabetical Reference 209

Variable lpJourData->bExtractPasU lpJourData->wExtFlag lpJourData->lpcExtFileName fnCallBack lParam lpApiStruct lpApiStruct->sigCat lpApiStruct->lStartPeriod lpApiStruct->lEndPeriod

Description True (1) to extract posted journal(s) as unposted, otherwise False. Reserved for future use. Use 0. The path and file name of the journal extract file. The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData>lCheckedAttribTypeStatus. 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. An apiStruct with the sigCat, lStartPeriod, and lEndPeriod fields set. The signature of the category. The period number (starting with 0 for the first period.) Set this to 0 if lpJourData.wOperation is JOUROP_ EXTRACTALLPER. The same as lpApiStruct.lStartPeriod.

Return Codes:
Code EXTRACT_NOERR (0) EXTRACT_CANCELLED EXTRACT_CHECK_ERRORLOG EXTRACT_CHECKBOTH Meaning Successful Cancelled by user. Errors occurred and are listed in ERROR.LOG. Errors occurred and are listed in ERROR.LOG and the userid.ERR file.

Example: See EntJournalExtractVB( ) - Extract Journal on page 210.

EntJournalExtractVB( ) - Extract Journal


If you are a Visual Basic programmer, use this function instead of EntJournalExtract( ). This function extracts one or more journals. It uses an optional callback function that the API calls to send the current status of the journal extract. Before calling this function, you must select the following tables in read-only format:
l

Default tables (ID_CATEGORY, ID_ORGANIZATION, ID_ACCOUNTS, and associated tables.) ID_JOURNALS - the journals tables. ID_SECURITY - security tables.

EntJournalExtractVB() calls the function that Hyperion Enterprise uses to extract journals. The function 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 single period, you specify the signatures of the particular journal(s) that you wish to extract (in lpJourData.SelectedJourSigs). To extract journals for all periods, you specify the criteria and the API function will find and extract all journals that match the criteria. Specifically, the API function will internally enumerate journals, journal templates, or recurring journal templates as indicated in lpJourData.sCheckedInclude; of those, it will extract the journals that match the criteria 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, ByVal lpfnCallBack As Any, ByVal lParam As Long, lpApiStruct As apiStruct) As Integer
Variable hSelect lpJourData lpJourData.dwSize lpJourData.hProcess lpJourData.szDelimiter lpJourData.sCheckedInclude Description The handle of the selected tables The structure with arguments for the journal extract The size of this structure When executing on the server, the API function returns the handle of the Task Status window process here. The field delimiter, which is typically an apostrophe ( ). Bitmask for extracting journals (LOADEXT_JOURNALS), standard journal templates (LOADEXT_ STANDARD), or recurring journal templates (LOADEXT_RECTMP). Indicates to the API function what to search if IpJourData.wOperation is JOUROP_EXTARCTALLPER. Used internally by the API function. Set this to 0.

lpJourData.sCurrentInclude

Advanced Functions Alphabetical Reference 211

Variable lpJourData. lCheckedAttribTypeStatus

Description Bitmask that holds the journal attribute, type, and status and two flags for the extract operation. 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 l l l

JOURMASK_ALL_ATTRIB (include all atrributes) JOURMASK_ATTRIB_BALANCED (include balanced journals) JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals) JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals_

Journal Types to be Extracted:


l l l l

JOURMASK_ALL_TYPE (include all journal types) JOURMASK_TYPE_REGULAR (include regular journals) JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals) JOURMASK_TYPE_TOP_LEVEL (include parent journals)

Journal Status to be Extracted:


l l l l l

JOURMASK_ALL_STATUS (include all statuses) JOURMASK_STATUS_UNPOSTED (include unposted journals) JOURMASK_STATUS_POSTED (include posted journals) JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals) JOURMASK_STATUS_REVIEWED (include reviewed journals) JOURMASK_STATUS_REVERSED (include reversed journals) JOURMASK_STATUS_LOCKED (include locked journals)

l l

Template Types to be Extracted:


l l l

JOURMASK_ALL_TEMPTYPE (include all template types) JOURMASK_TEMPTYPE_STANDARD (include all standard templates) JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)

Other Flags
l l

DBE_REMOTE (server-based extract) JOURE_APPEND (append to existing extract file)

lpJourData.lCurrentAttrib lpJourData.wOperation lpJourData.wFlags lpJourData.lSelectedJourCount

0. Internal use. Indicates the operation. Must be JOUROP_EXTRACTSINGLEPER or JOUROP_EXTRACTALLPER. Used internally. Set this to 0. The number of signatures in lpJourData.SelectedJourSigs array. Use 0 if lpJourData.wOperation is JOUROP_EXTRACTALLPER. This must be at least one if lpJourData.wOperation is JOUROP_ EXTRACTSINGLEPER.

212 Advanced Functions

Variable lpJourData.SelectedJourSigs

Description The address of an array of the signatures of the selected journals. To distinguish journals from journal templates, signatures of journals (not templates) should be combined with the JOUR_ENTRIES constant using the "or" operator. True (1) to extract posted journal(s) as unposted, otherwise False. Reserved for future use. Use 0. The path and file name of the journal extract file. The callback function for status information or null. This is not used if the DBE_REMOTE flag is set in lpJourData.lCheckedAttribTypeStatus. 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. An apiStruct with the sigCat, lStartPeriod, and lEndPeriod fields set. The signature of the category. The period number (starting with 0 for the first period.) Set this to 0 if lpJourData.wOperation is JOUROP_ EXTRACTALLPER. The same as lpApiStruct.lStartPeriod.

lpJourData.bExtractPasU lpJourData.wExtFlag lpszExtFileName lpfnCallBack lParam lpApiStruct lpApiStruct->sigCat lpApiStruct->lStartPeriod lpApiStruct->lEndPeriod

Return Codes:
Code Extract_NOERR (0) Extract_CANCELLED Extract_CHECK_ERRORLOG Extract_CHECKBOTH Meaning Successful Cancelled by user Errors occurred and are listed in ERROR.LOG. 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 apiStruct Dim jourData As JourExtrStruct Dim hApp& Dim wRet As Integer Const MAXJOURNALS = 100 'let's size array for 100 journals Dim sigArr(MAXJOURNALS+1) As Long 'fixed, not dynamic, array so VB won't relocate it during G.C. 'setup apiStruct hApp& = EntGetHappFromSelect(hSelect&)

Advanced Functions Alphabetical Reference 213

Call EntInitApiStruct(hApp&, apiStruct) apiStruct.sigCat = sigCat& apiStruct.lStartPeriod = 0 first period apiStruct.lEndPeriod = 0 jourData.dwSize = LenB(jourData) jourData.hProcess = 0 jourData.szDelimiter = Asc("!") 'extract regular journals, standard templates, and recurring templates jourData.sCheckedInclude = 0 jourData.sCheckedInclude = jourData.sCheckedInclude Or LOADEXT_JOURNALS jourData.sCheckedInclude = jourData.sCheckedInclude Or LOADEXT_STANDTMP jourData.sCheckedInclude = jourData.sCheckedInclude Or LOADEXT_RECTMP 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_ALL_TYPE jourData.lCheckedAttribTypeStatus = jourData.lCheckedAttribTypeStatus Or JOURMASK_ALL_STATUS jourData.bExtractPasU = 0 'do not extract posted journals as unposted jourData.lCurrentAttrib = 0 jourData.wFlags = 0 jourData.wExtFlag = 0 jourData.cExtFileName = 0 'pass szFile$ as argument to function 'select the tables wRet% = 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 period lCount& = List1.SelCount If 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 array Else 'Extract all journals based on criteria jourData.sCheckedInclude and jourData.ICheckedAttribTypeStatus were set above. jourData.wOperation = JOUROP_EXTRACTALLPER jourData.iSelectedJourCount = 0 jourData.IpSelectedJourSigs = 0 End 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 Journal


This function executes a journal load. It requires a callback function that the API calls to send the current status of the journal load. In addition to the default tables, you must select the security tables, 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 of

EntJournalLoad( ). Use this format for C: short WINAPI EntJournalLoad(HSELECT hSelect, LPJOURLOADSTRUCT lpJourData, CALLBACKJOURLOAD fnCallBack, LONG lParam, LPAPISTRUCT lpApiStruct)
Variable hSelect lpJourData lpJourData->dwSize lpJourData->hProcess lpJourData->szDelimiter lpJourData->sCheckedInclude lpJourData->sCurrentInclude Description The handle of the selected tables The structure with arguments for the journal load The size of this structure The handle of the Task Status window process. This returns the process handle when executing on the server. The field delimiter, which is typically a comma ( , ) Loads journals (LOADEXT_JOURNALS) and standard or recurring journal templates (LOADEXT_ STANDTMP or LOADEXT_RECTMP) Indicates the type of journal or journal template to include in the load. Used internally.

Advanced Functions Alphabetical Reference 215

Variable lpJourData>lCheckedAttribTypeStatus

Description Bitmask that holds the journal attribute, type, and status. Can be set to any combination of the following: Attributes to be Extracted:
l l l l

JOURMASK_ALL_ATTRIB (include all atrributes) JOURMASK_ATTRIB_BALANCED (include balanced journals) JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals) JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals_

Journal Types to be Extracted:


l l l l

JOURMASK_ALL_TYPE (include all journal types) JOURMASK_TYPE_REGULAR (include regular journals) JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals) JOURMASK_TYPE_TOP_LEVEL (include top-level journals)

Journal Status to be Extracted:


l l l l l

JOURMASK_ALL_STATUS (include all statuses) JOURMASK_STATUS_UNPOSTED (include unposted journals) JOURMASK_STATUS_POSTED (include posted journals) JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals) JOURMASK_STATUS_REVIEWED (include reviewed journals) JOURMASK_STATUS_REVERSED (include reversed journals) JOURMASK_STATUS_LOCKED (include locked journals)

l l

Template Types to be Extracted:


l l l l

JOURMASK_ALL_TEMPTYPE (include all template types) JOURMASK_TEMPTYPE_STANDARD (include all standard templates) JOURMASK_TEMPTYPE_RECURRING (include all recurring templates) DBE_REMOTE (server-based extract)

lpJourData->lCurrentAttrib lpJourData->lCurrentType lpJourData->lCurrentStatus lpJourData->buse18Format lpJourData->sAutoReversing lpJourData->wExtFlag lpJourData->lpcLoadFileName fnCallBack

Holds the attribute. Used internally. Holds the type. Used internally. Holds the status. Used internally. TRUE to use Release 1.8 format, else False. Flags to check for posted and unposted autoreversing journals. Set to Null and used internally. Reserved for future use. The path\name of the journal load file. The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData->lCheckedAttribTypeStatus.

216 Advanced Functions

Variable lParam lpApiStruct

Description The argument for the callback function, or NULL is the DBE_REMOTE flag is set in lpJourData>lCheckedAttribTypeStatus. Set to Null.

Return Codes:

Code LOAD_NOERR (0) Non Zero

Meaning Successful Failure

Example: See EntJournalLoadVB( ) - Load Journal on page 217.

EntJournalLoadVB( ) - Load Journal


If you are a Visual Basic programmer, use this function instead of EntJournalLoad( ). This function executes a journal load. It requires a callback function that the API calls to send the current status of the journal load. In addition to the default tables, you must select the security tables, 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 hSelect lpJourData lpJourData.dwSize lpJourData.hProcess lpJourData.szDelimiter lpJourData.sCheckedInclude lpJourData.sCurrentInclude

Description The handle of the selected tables The structure with arguments for the journal load The size of this structure The handle of the Task Status window process. This returns the process handle when executing on the server. The field delimiter, which is typically a comma ( , ) Loads journals and standard or recurring journal templates Indicates the type of journal or journal template.

Advanced Functions Alphabetical Reference 217

Variable lpJourData. lCheckedAttribTypeStatus

Description Bitmask that holds the journal attribute, type, and status. Can be set to any combination of the following: Attributes to be Extracted
l l l l

JOURMASK_ALL_ATTRIB (include all atrributes) JOURMASK_ATTRIB_BALANCED (include balanced journals) JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals) JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals)

Journal Types to be Extracted


l l l l

JOURMASK_ALL_TYPE (include all journal types) JOURMASK_TYPE_REGULAR (include regular journals) JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals) JOURMASK_TYPE_TOP_LEVEL (include top-level journals)

Journal Status to be Extracted


l l l l l

JOURMASK_ALL_STATUS (include all statuses) JOURMASK_STATUS_UNPOSTED (include unposted journals) JOURMASK_STATUS_POSTED (include posted journals) JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals) JOURMASK_STATUS_REVIEWED (include reviewed journals) JOURMASK_STATUS_REVERSED (include reversed journals) JOURMASK_STATUS_LOCKED (include locked journals)

l l

Template Types to be Extracted


l l l l

JOURMASK_ALL_TEMPTYPE (include all template types) JOURMASK_TEMPTYPE_STANDARD (include all standard templates) JOURMASK_TEMPTYPE_RECURRING (include all recurring templates) DBE_REMOTE (server-based extract)

lpJourData.lCurrentAttrib lpJourData.lCurrentType lpJourData.lCurrentStatus lpJourData.buse18Format lpJourData.sAutoReversing lpJourData.wExtFlag


szLoadFileName fnCallBack

Holds the attribute. Holds the type. Holds the status. TRUE if load file is in Release 1.8 format, else False. Flags to check for posted and unposted autoreversing journals. Reserved for future use. The path name of the journal load file. The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData. lCheckedAttribTypeStatus.

218 Advanced Functions

Variable
lParam

Description The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData. lCheckedAttribTypeStatus. Structure containing the rest of the journal load arguments.

lpApiStruct

Return Codes:
Code LOAD_NOERR (0) Non Zero Meaning Successful Failure

Example:
Private Sub JournalLoad(hSelect As Long, sigCat As Long, szFile As String) Dim jourData As JourLoadStruct Dim wRet% jourData.dwSize = LenB(jourData) 'should be 44 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 wRet% = 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 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$

Advanced Functions Alphabetical Reference 219

' Convert the C-style strings into Basic strings wLen% = 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 = 0 End Function

Use this format for C: short WINAPI EntJournalLoadVB(HSELECT hSelect, LPJOURLOADSTRUCT lpJourLoad, LPCSTR lpszLoadFileName, CALLBACKJOURLOAD fnCallBack, LONG lParam, LPAPISTRUCT lpApiStruct)

EntLogicAttach( ) - Attach Formulas


This function builds a logic block and attaches it to the application. You need to do this before you can calculate formulas or call any function that depends on formulas, such as EntIsAccountInput( ). You must select the Logic table (ID_LOGIC) table before calling EntLogicAttach( ). You should call EntLogicDetach( ) when you are finished using the logic block.
Note: Selecting the ID_DATAFILE table automatically builds and attaches the logic block. You

do 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. It merges the pcode tables for the 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 all categories. Use this format: Declare Function EntLogicAttach Lib "heaccess.dll" Alias "_EntLogicAttach@12" (ByVal hSelect As Long, ByVal sigCat As Long, ByVal sigMethod As Long) As Integer
Variable hSelect sigCat Description The handle of the selected tables The signature of the category

sigMethod The signature of the method

Return Codes:
220 Advanced Functions

Code 0 NONE

Meaning Successful Error occurred

Use this format for C: short WINAPI EntLogicAttach(HSELECT hSelect, SIGNA sigCat, SIGNA sigMethod)

EntLogicCompile( ) - Compile Logic


EntLogicCompile( ) compiles specific selected methods or all invalid methods. Before calling this selection you must select the following tables:
l

Default Tables. ID_SECURITY with ID_ASSOC(ReadOnly) ID_LOGIC with ID_ASSOC (read-write). If executing on server the logic table is selected as read-only to avoid multiuser conflicts.

Use this format: Declare Function EntLogicCompile Lib "heaccess.dll" Alias "_EntLogicCompile@12" (ByVal hSelect As Long, lpLogicCompile As LOGICCOMPSTRUCTSTRUCT, lpApiStruct As apiStruct) As Integer
Variable hSelect lpLogicCompile lpLogicCompile.dwSize lpLogicCompile.hProcess Description The handle of the selected tables Structure with arguments for logic compile The size of this structure The handle of the Task Status window process. Returns the process handle when executing on server, NULL locally.

lpLogicCompile.bRemoteFlag Indicates whether to compile logic locally or on the server; FALSE if compiled local, TRUE if server. lpLogicCompile.fnCallBack lpLogicCompile.lParam Address of the callback function for status information can pass NULL (0) if no callback function 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 lpApiStruct

Description 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 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntLogicCompile(HSELECT hSelect, LPLOGICCOMPSTRUCT lpLogicCompile, LPAPISTRUCT lpApiStruct)

EntLogicDetach( ) - Detach Formulas


This function detaches a logic block. Call this function when you are finished using a block that was created by EntLogicAttach( ). A logic block is the merged set of formulas appropriate for a particular category and method. It merges the pcode tables for the 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 all categories. Use this format: Declare Function EntLogicDetach Lib "heaccess.dll" Alias "_EntLogicDetach@12" (ByVal hSelect As Long, ByVal sigCat As Long, ByVal sigMethod As Long) As Integer
Variable hSelect sigCat Description The handle of the selected tables The signature of the category

sigMethod The signature of the method

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntLogicDetach(HSELECT hSelect, SIGNA sigCat, SIGNA sigMethod)
222 Advanced Functions

EntLogicDiscard() Discard Logic Blocks


This function discards all logic blocks that are flagged to be discarded. A logic block is the merged set of formulas appropriate for a particular category and method. It merges the pcode tables for the 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 all categories. Use this format: Declare Function EntLogicDiscard Lib "heaccess.dll" Alias "_EntLogicDiscard@12" (ByVal hApp As Long, ByVal sigCat As Long, ByVal sigMethod As Long) As Integer
Variable hApp sigCat Description The application handle 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 Formulas


This function exports formulas from an application. Before calling this function, you must select the following tables:
l

Default tables ID_SECURITY and its associated tables (read only) ID_LOGIC - Logic table (read only)
Note: If you are a Visual Basic programmer, use EntLogicExportVB( ) instead of

EntLogicExport( ). Use this format for C: short WINAPI EntLogicExport(HSELECT hSelect, LPLOGICEXPORT lpLogicExport , LPAPISTRUCT lpApiStruct)
Variable hSelect lpLogicExport Description The handle of the selected tables Structure with arguments for logic export

Advanced Functions Alphabetical Reference 223

Variable lpLogicExport->dwsize lpLogicExport->hProcess lpLogicExport->delimiter lpLogicExport->sigEntry lpLogicExport->lFlag

Description The size of the structure The handle of the Task Status window process. Returns the process handle when executing on a server, or NULL when executing locally. The field delimiter, which is typically a comma ( , ) Used to select current export method Must be one of the following:
l l l l l l l

LOGEXP_ISMETHOD LOGEXP_ISMETHOD LOGEXP_ISFUNCTION LOGEXP_ISRULE LOGEXP_EXPALL LOGEXP_NOHEADER 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 lpLogicExport->iSelectFuncCount lpLogicExport->SelectedFuncSigs lpLogicExport->fnCallback lpLogicExport->lParam lpLogicExport->FileName An array of the signatures of the rules. The number of functions selected. An array of the signatures of the functions. The callback function for status information. The argument for the callback function. 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 0 NONE Meaning Successful Error occurred

For an example, see EntLogicExportVB( ) - Export Formulas on page 225.


224 Advanced Functions

EntLogicExportVB( ) - Export Formulas


Use this function instead of EntLogicExport( ) if you are a Visual Basic programmer. This function exports formulas from an application. Before calling this function, you must select the following tables:
l

Default tables ID_SECURITY and its associated tables (read only) 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 function argument 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 hSelect lpLogicExport lpLogicExport.dwsize lpLogicExport.hProcess lpLogicExport.delimiter lpLogicExport.sigEntry lpLogicExport.lFlag

Description The handle of the selected tables Structure with arguments for logic export The size of the structure The the handle of the Task Status window process. Returns the process handle when executing on a server. The field delimiter, which is typically a comma ( , ). Used internally to select current method being exported. Set to NONE. Must be one of the following:
l l l l l l l

LOGEXP_ISMETHOD LOGEXP_ISMETHOD LOGEXP_ISFUNCTION LOGEXP_ISRULE LOGEXP_EXPALL LOGEXP_NOHEADER 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 lpLogicExport.iSelectFuncCount lpLogicExport.SelectedFuncSigs lpLogicExport.fnCallback lpLogicExport.lParam szFileName An array of the signatures of the rules. The number of functions selected. An array of the signatures of the functions. The callback function for status information. The argument for the callback function. 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 0 NONE Meaning Successful Error occurred

Example:
Private Sub ExportLogic(hSelect As Long, szFile As String) Dim logicExport As LOGICEXPORTSTRUCT Dim apiStruct As apiStruct Dim hApp& Dim wRet% logicExport.dwSize = LenB(logicExport) logicExport.hProcess = 0 logicExport.delimiter = Asc("!") logicExport.sigEntry = 0 logicExport.lFlag = LOGEXP_EXPALL logicExport.wExtFlags = 0 logicExport.iSelectedMethCount = 0 logicExport.lpSelectedMethSigs = 0 logicExport.iSelectedRuleCount = 0 logicExport.lpSelectedRuleSigs = 0 logicExport.iSelectedFuncCount = 0 logicExport.lpSelectedFuncSigs = 0 logicExport.fileName = 0 logicExport.fnCallBack = FuncPtrToLong (AddressOf MyCallBack) logicExport.lParam = 0 hApp& = 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 Long FuncPtrToLong = fnPtr End Function Public Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfMethodCString As Long, ByVal unused1 As Long, ByVal unused2 As Long, ByVal lParam As Long) As Integer Dim wRet%, wLen% Dim szFile$, szMethod$ Dim szMsg$ 'Copy C-style strings to Basic strings wLen% = 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 0 End Function

Use this format for C: short WINAPI EntLogicExportVB(HSELECT hSelect, LPLOGICEXPORT lpLogicExport, LPAPISTRUCT lpApiStruct, LPCSTR szFileName)

EntLogicImport( ) - Import Formulas


This function imports formulas to an application. Before calling this function, you must select the following tables:
l

Default tables ID_SECURITY and its associated tables (read only) 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 of

EntLogicImport( ). Use this format for C: short WINAPI EntLogicImport(HSELECT hSelect, LPLOGICIMPORT lpLogicImport , LPAPISTRUCT lpApiStruct)

Advanced Functions Alphabetical Reference 227

Variable hSelect lpLogicImport lpLogicImport->dwsize lpLogicImport->hProcess lpLogicImport->delimiter lpLogicImport->bReplace lpLogicImport->sigMethod lpLogicImport->iLogicType lpLogicImport->uMethod lpLogicImport->uRule

Description The handle of the selected tables Structure with arguments for formulas import The size of the structure The the handle of the Task Status window process. Returns the process handle when executing on a server, or NULL when executing locally. The field delimiter, which is typically a comma ( , ) TRUE to replace formulas The signature of the current method1 One of the following types: LOGIC_CHART, LOGIC_CONSOL, or LOGIC_TRANS TRUE to import methods TRUE to import rules

lpLogicImport->uCustomFunc TRUE to import custom functions lpLogicImport->uLogicComp lpLogicImport->bNoHeader lpLogicImport->wImportFlag lpLogicImport->wExtendFlag lpLogicImport->fnCallback lpLogicImport->lParam lpLogicImport->iFileListCnt lpLogicImport->lpFileList lpApiStruct TRUE to compile formulas No header Indicates whether to import formulas locally or on a server. For server processing set to LOGIC_REMOTE. Reserved for future use. The callback function for status information The argument for the callback function The number of elements in the File List table, lpLogicImport->lpFileList An array of selected file names (maximum of 260 bytes each). 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 0 NONE LOGIC_COMPERR (1) Meaning Successful Error occurred Check methods failed during logic import

Example:
228 Advanced Functions

See EntLogicImportVB( ) - Import Formulas on page 229.

EntLogicImportVB( ) - Import Formulas


If you are a Visual Basic programmer, use this function instead of EntLogicImport( ). This function imports formulas to an application. Before calling this function, you must select the following tables:
l

Default tables ID_SECURITY and its associated tables (read only) 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 function argument instead of in lpLogicImport.lpFileList.
Note: Also, use VB's LenB function, instead of Len, to set the dwSize field in the

LOGICIMPORTSTRUCT 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 hSelect lpLogicImport lpLogicImport.dwsize lpLogicImport.hProcess lpLogicImport.delimiter lpLogicImport.bReplace lpLogicImport.sigMethod lpLogicImport.iLogicType lpLogicImport.uMethod lpLogicImport.uRule

Description The handle of the selected tables Structure with arguments for formulas import The size of the structure The the handle of the Task Status window process. Returns the process handle when executing on a server, or NULL when executing locally. The field delimiter, which is typically a comma ( , ) TRUE to replace formulas The signature of the current method One of the following types: LOGIC_CHART, LOGIC_CONSOL, or LOGIC_TRANS TRUE to import methods TRUE to import rules

lpLogicImport.uCustomFunc TRUE to impoet custom functions

Advanced Functions Alphabetical Reference 229

Variable lpLogicImport.uLogicComp lpLogicImport.bNoHeader lpLogicImport.wImportFlag lpLogicImport.wExtendFlag lpLogicImport.fnCallback lpLogicImport.lParam lpLogicImport.iFileListCnt szFileList lpApiStruct

Description TRUE to compile formulas No header Indicates whether to import formulas locally or on a server. LOGIC_REMOTE for server processing. Reserved for future use. The callback function for status information The argument for the callback function The number of elements in the File List table, lpLogicImport.lpFileList The address of an array of selected file names (260 bytes each, each null-terminated) 0. Structure for API compatibility

Return Codes:
Code 0 NONE LOGIC_COMPERR (1) Meaning Successful Error occurred Check methods failed during formulas import

Example:
Private Sub ImportLogic(hSelect As Long, szFile As String) Dim logicImport As LOGICIMPORTSTRUCT Dim apiStruct As apiStruct Dim hApp& Dim wRet% logicImport.dwSize = LenB(logicImport) logicImport.uMethod = 1 logicImport.uRule = 1 logicImport.uCustomFunc = 1 logicImport.delimiter = Asc(",") logicImport.hProcess = 0 logicImport.iFileListCnt = 1 logicImport.wImportFlag = 0 logicImport.sigMethod = 0 ' just default for now logicImport.bReplace = 0 logicImport.fnCallBack = FuncPtrToLong(AddressOf MyCallBack) logicImport.lParam = 0 hApp& = 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 Long FuncPtrToLong = fnPtr End Function Public Function MyCallBack(ByVal addressOfFileNameCString As Long, ByVal addressOfMethodCString As Long, ByVal lTotal As Long, By Val lCurrent As Long, ByVal lParam As Long) As Integer Dim wRet%, wLen% Dim szFile$, szMethod$ Dim szMsg$ 'Copy C-style strings to Basic strings wLen% = 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 0 End Function

Use this format for C: short WINAPI EntLogicImportVB(HSELECT hSelect,LPLOGICIMPORT lpLogicImport, LPAPISTRUCT lpApiStruct, LPCSTR szFileList)

EntMessage( ) - Display a Message Box and Write the Message to the Error Log
EntMessage( ) displays a message box and writes the message to the Hyperion Enterprise error log. This function reads a message from the string table, then formats the message by substituting the specified strings for the placeholders in the message. The function displays the message by calling 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. 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) or if the caller specifies that the message box should be skipped.
Note: Visual Basic programmers must use EntMessageVB(), since Visual Basic cannot pass an

array of addresses of C-style strings. Use this format: short WINAPI EntMessage(HAPP hApp, short wMsgId, HINSTANCE hModule, short wCaptionCode, short wArgCount, LPCSTR arrayOfStrings)
Advanced Functions Alphabetical Reference 231

Variable hApp wMsgId hModule wCaptionCode

Description The application handle The string ID (in hModule) of the message The handle of the module (resource .DLL) that contains the string wMsgID The code to indicate which caption to use for the message box and whether to display a message box:
l l l l

HACC_NODISPLAY (HEMSG_NODISPLAY)- Do not display a message box. HACC_WARNING (HEMSG_WARNING) - Standard Hyperion Enterprise warning HACC_ERROR (HEMSG_ERROR) - Error 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 the Message to the Error Log
EntMessageVB( ) displays a message box and writes the message to the Hyperion Enterprise error log. This function reads a message from the string table, then formats the message by substituting up to three specified strings for the first three placeholders in the message. The function displays the message by calling 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. 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) or if the caller specifies that the message box should be skipped. Use this format: Declare Function EntMessageVB Lib "heaccess.dll" Alias "_EntMessageVB@28" (ByVal hApp as 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 hApp wMsgId hModule

Description The application handle The string ID (in hModule) of the message 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 l l l

HACC_NODISPLAY - do not display a message box. HACC_WARNING - warning. HACC_ERROR - error. 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 IDOK 0 Meaning Successful 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, short wCaptionCode, LPCSTR sz1, LPCSTR sz2, LPCSTR sz3)

EntMsgLogTaskEndTime( ) - Write the End Time and Task to the Error Log
This function writes the end time and task to the log file and removes the current task information from 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, ByVal bIncludePOV As Long) As Integer
Variable hApp Description The application handle

Advanced Functions Alphabetical Reference 233

Variable szTask

Description 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 0 NONE Meaning Successful 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 Task to the Error Log
This 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 page 271. Use this format: Declare Function EntMsgLogTaskStartTime Lib "heaccess.dll" Alias "_EntMsgLogTaskStartTimeVB@12" (ByVal hApp As Long, ByVal szTask As String, ByVal bIncludePOV As Long) As Integer
Variable hApp szTask Description The application handle 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 The value from MessageBox( ), if called. NONE or 0

Meaning Successful 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 File


EntMsgLogTime( ) writes the time and event to the log file. This function reads a message from the string table, then formats the message by substituting the specified strings for the placeholders in the message. The function substitutes the current time and date for the next placeholder in the message, and writes the resulting formatted message to the Hyperion Enterprise error log.
Note: Visual Basic programmers must use EntMsgLogTimeVB() instead, since Visual Basic

cannot pass an array of addresses of C-style strings. Use this format: short WINAPI EntMsgLogTime(HAPP hApp, short wMsgId, HINSTANCE hModule, short wArgCount, LPCSTR arrayOfStrings)
Variable hApp wMsgId hModule Description The application handle The string ID (in hModule) of the message 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 Log File


EntMsgLogTimeVB( ) writes the time and event to the log file. This function reads a message from the string table, then formats the message by substituting up to three specified strings for the first three placeholders in the message. The function substitutes the current time and date for the next placeholder in the message, and writes the resulting formatted message to the Hyperion 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 hApp wMsgId hModule Description The application handle The string ID (in hModule) of the message 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 Application


This function opens an application, but it does not select any tables. You must select tables after calling this function. You must call EntCloseApplication( ) to close the application when you are 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 As Integer) As Long
236 Advanced Functions

Variable szAppId szUserId

Description The application ID 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 The application handle (hApp) NONE or 0 Meaning Successful 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 Application


This function is like EntOpenApplication( ) except it sets internal flags to suppress any error messages 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, ByVal szPassWord As String, wRet As Integer) As Long
Variable szAppId szUserId Description The application ID 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 The application handle (hApp) NONE or 0

Meaning Successful Error occurred

Example:
hApp& = EntOpenServerAppplication("TAX", "MARY", "secret", ret%)

Use this format for C: HAPP WINAPI EntOpenServerApplication(LPSTR szAppId, LPSTR szUserId, LPSTR szPassWord, short far * pwRet)

EntPgeExtract( ) - Extract Page Format and Setup Information


This function extracts page format and setup information, which can be set with Task/Extract Page Format and Setup.
Note: EntPgeExtract( ) and EntPgeLoad( ) read and write to a binary file, which the user should

not access. Use this format: Declare Function EntPgeExtract Lib "heaccess.dll" Alias "_EntPgeExtract@12" (ByVal hApp As Long, ByVal lpszFileName As String, ByVal wFlag As Integer) As Integer
Variable hApp Description The application handle

lpszFileName The page format and setup load file wFlag Flag (currently ignored)

Return Codes:
Code 0 NONE Meaning Successful 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 Information


This function loads page format and setup information, which can be set with Task/Extract Page Format 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 not reload a default format or setup over a non-default value.
Note: EntPgeExtract( ) and EntPgeLoad( ) read and write to a binary file, which the user should

not access. Use this format: Declare Function EntPgeLoad Lib "heaccess.dll" Alias "_EntPgeLoad@12" (ByVal hApp As Long, ByVal lpszFileName As String, ByVal wFlag As Integer) As Integer
Variable hApp Description The application handle

lpszFileName The page format and setup load file wFlag Flag (currently ignored)

Return Codes:
Code 0 NONE Meaning Successful 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 Period


This function calls the Hyperion Enterprise Select Period dialog box and retrieves the period you 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 hSelect

Description The handle of the selected tables

fWantDate One of the following flags to return the period:


l l

0 to return the period as a period number. 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 the

value of fWantDate to zero. For example, if you specify 1 for fWantDate and you are trying to retrieve the 13th month of a 13-month accounting year, Hyperion Enterprise changes the 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 0 NONE

Meaning Successful Error occurred

Example:
Public Function SelectPeriod(iMethod As Integer) As String Dim ret As Integer Dim PerAsk As String * 20 If hSelect& <> 0 Then If iMethod% < 0 Or iMethod% > 1 Then iMethod% = 0 ret% = EntPerAsk(hSelect&, iMethod%, PerAsk$) If ret% = 0 Then SelectPeriod = CToBStr(PerAsk$) End If End Function

Use this format for C: short WINAPI EntPerAsk( HSELECT hSelect, SBOOL FAR * pfWantDate, LPSTR szRetbuf)

EntQryRptFreq( ) - Query Reporting Frequency


This function retrieves the ID (short name) or description of the reporting frequency associated with 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" (ByVal hSelect As Long, ByVal sigFreq As Long, ByVal wView As Integer, ByVal pzbuf As String, ByVal wMax As Integer, ByVal szBuf As String ) As Integer
Variable Description hSelect The handle of the selected tables sigFreq wView pzbuf wMax szBuf The signature of the frequency (FREQ_MONTH, FREQ_QUARTER, and so on). For more information, see Frequencies and Views on page 20 The view (VIEW_YTD or VIEW_PERIODIC) The query attribute (NAME or DESC) The length of 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 least HYP_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 0 NONE Meaning Successful 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 Information


This function queries a record in a table and retrieves the requested field (attribute) from the record. For detailed information about query attributes you can use with Hyperion Enterprise tables, see Appendix B, Query Attributes. Visual Basic programmers should use the EntQueryExStr( ) function when querying a string value. EntQueryExStr( ) is a clone of the declaration for EntQueryEx( ) adjusted for use with strings 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 As Long, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal sigRecd As Long, ByVal sigKey As Long, ByVal dwLen As Long, pzBuf As Any, apiS As APISTRUCT) As Integer

Variable Description hSelect The handle of the selected tables wTabId wAttr The table containing the record you want to query The attribute for the field you are querying

sigRecd The signature of the record you want to query sigKey dwLen pzBuf apiS NONE or the key of a related table. For more information, see Related Tables on page 363. The length of pzBuf The buffer to return the requested information 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 0 NONE

Meaning Successful 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 declaration

allows passing 0 (zero) in place of the apiStruct. For more information, see Visual Basic Programming 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 Defaults


EntQueryDefault( ) queries application or user defaults. It is not necessary to select the tables before calling this function. For detailed information about query attributes you can use with Hyperion Enterprise tables, see Appendix B, Query Attributes. Visual Basic programmers should use the EntQueryDefaultStr() function when querying a string value. EntQueryDefaultStr() is a clone of the declaration of EntQueryDefault() adjusted for use with strings and declared in the ToolKit.bas file. For detailed information about query attributes you can use with Hyperion Enterprise tables, see Appendix B, Query Attributes. Use this format: Declare Function EntQueryDefault Lib "heaccess.dll" Alias "_EntQueryDefault@20" (ByVal hApp As Long, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal wLen As Integer, pzBuf As Any) As Integer

Variable Description hApp wTabId The application handle The table ID, which should be one of the following tables:
l l l

ID_HAPP ID_APPDEFAULT ID_USERDEFAULT

wAttr wLen pzBuf

The attribute for the field you are querying The length of pzBuf The buffer for the requested information

Return Codes:

Code 0 NONE

Meaning Successful Error occurred

Example:
Dim isServerAvail As Byte ret% = 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( ) Routine


This function registers a function for the Hyperion Enterprise API functions to use in place of calling the Windows MessageBox( ) function directly. Use this format: Declare Sub EntRegisterMsgBox Lib "heaccess.dll" Alias "_EntRegisterMsgBox@4" (ByVal lpfnMsgBox) where lpfnMsgBox is the address of a function or NULL. Use NULL to unregister a function that you previously registered so that the API uses MessageBox( ) again. Return Codes: None. Use this format for C: void WINAPI EntRegisterMsgBox(LPFNMSGBOX lpfnMsgBox)

EntRunRollover( ) - Run Rollover


This function executes a rollover. The callback function for EntRunRollover( ) provides status information. Use this format: Declare Function EntRunRollover Lib "heaccess.dll" Alias "_EntRunRollover@12" (ByVal hSelect As Long, ByVal sigRolloverSet As Long, ByVal lpCallback As Long) As Integer
Variable hSelect Description 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 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntRunRollover(HSELECT hSelect, SIGNA sigRolloverSet, CALLBACKAPI lpCallback)
244 Advanced Functions

EntSave( ) - Save Table


This function saves changes to one or more Hyperion Enterprise tables that were made by EntUpdate( ). You should save changes to all selected tables simultaneously. If the program aborts or fails to save the rest of the changes and you are saving changes one table at a time, the tables 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 sigKey apiS The ID of the table you want to save, or HYP_NONE (NONE in C) to save all tables selected by hSelect NONE, or the key of a related table. For more information, see Related Tables on page 363. NULL, or a pointer to an apiStruct structure with more information

Note: Because internal tables might change due to changes to another table, we recommend

setting the wTabId argument to HYP_NONE (NONE in C) to save changes to all selected tables. Return Codes:
Code 0 NONE Meaning Successful 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, LPAPISTRUCT pApiS)

EntSaveDefault( ) - Save Defaults


This 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 page 361. Use this format:
Advanced Functions Alphabetical Reference 245

Declare Function EntSaveDefault Lib "heaccess.dll" Alias "_EntSaveDefault@8" (ByVal hApp As Long, ByVal wTabId As Integer) As Integer
Variable Description hApp wTabId The application handle The table ID, which must be one of the following tables:
l l

ID_APPDEFAULT ID_USERDEFAULT

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntSaveDefault(HAPP hApp, short wTabId)

EntSecurityExtract( ) - Extract Security


This function executes a security extract. This function requires a callback function that the API will call to send current status of the extract. If extracting security on a server (the DBE_REMOTE bit flag is set in lpSecLoad->wFlags), you may want to know the process handle of the extract process so that you can track and monitor the 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 of

EntSecurityExtract( ). Use this format for C: short WINAPI EntSecurityExtract(HSELECT hSelect, LPSECLOADSTRUCT lpSecLoad, CALLBACKSECLOAD fnCallBack, LPARAM lParam)
Variable hSelect lpSecLoad Description The handle of the selected tables The structure with arguments for the security extract

246 Advanced Functions

Variable lpSecLoad->dwsize lpSecLoad->cDelimiter lpSecLoad->szFileName lpSecLoad->bSecClass lpSecLoad->bAcesRight

Description The size of this structure The field delimiter, which typically is a comma ( , ) The path to the extract file TRUE to extract security classes, else False TRUE to extract access rights, else False

lpSecLoad->bUserAndGroup TRUE to extract users and user groups, else False lpSecLoad->bTask lpSecLoad->wFlags lpSecLoad->phProcess fnCallBack lParam TRUE to extract security tasks, else False Flags DBE_APPEND and DBE_REMOTE, as desired The process handle returned when executing on a server The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpSecLoad>wFlags. The argument for the callback function

Return Codes:
Code LOAD_NOERR (0) NONE LOAD_CANCELLED LOAD_CHECK_ERRORLOG Meaning Successful Error occurred Cancelled by user Error occurred and listed in the error log

For an example, see EntSecurityExtractVB( ) - Extract Security on page 247.

EntSecurityExtractVB( ) - Extract Security


If you are a Visual Basic programmer, use this function instead of EntSecurityExtract( ). This function executes a security extract. This function requires a callback function that the API will call to send current status of the extract. If extracting security on a server (the DBE_REMOTE bit flag is set in lpSecData.wFlags), you may want to know the process handle of the extract process so that you can track and monitor the server processes that your program launches. The process handle returned at lpSecData.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, ByVal lpfnCallBack As Any, ByVal lParam As Long) As Integer
Variable hSelect lpSecData lpSecData.dwsize lpSecData.cDelimiter lpSecData.szFileName lpSecData.bSecClass lpSecData.bAcesRight Description The handle of the selected tables The structure with arguments for the security extract The size of this structure The field delimiter, which typically is a comma ( , ) The path to the extract file TRUE to extract security classes; otherwise False TRUE to extract access rights; otherwise False

lpSecData.bUserAndGroup TRUE to extract users and user groups; otherwise False lpSecData.bTask lpSecData.wFlags lpSecData.phProcess szFileName lpfnCallBack lParam TRUE to extract security tasks; otherwise False Flags DBE_APPEND and DBE_REMOTE, as desired The process handle returned when executing on a server The path/filename of the extract file The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpSecData.wFlags. The argument for the callback function

Example:
Note: EntUnSelect0( ) in this example is declared similar to EntUnSelect( ) but its declaration

allows passing 0 in place of the apiStruct. For more information, see Visual Basic Programming Notes on page 16.
Private Sub SecurityExtract(hSelect As Long, szFile As String) Dim s As SecLoadStruct Dim wRet% wRet% = EntSelectAdd(HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, hSelect&, APILOCK_READONLY, 0, 0, 0, 0) 'Select items to extract If chkClass.Value Then s.bSecClass = True If chkRights.Value Then s.bAcesRight = True If chkUsr.Value Then s.bUserAndGroup = True If chkTask.Value Then s.bTask = True s.dwSize = LenB(s) s.cDelimiter = Asc(",") s.wFlags = 0 s.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 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 Dim wRet%, wLen% Dim szFile$, szTaskName$ Dim szMsg$ 'Copy C-style strings to Basic strings wLen% = 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 0 End Function

Use this format for C: short WINAPI EntSecurityExtractVB(HSELECT hSelect, LPSECLOADSTRUCT lpSecData, LPCSTR lpszExtFileName,CALLBACKSECLOAD fnCallBack, LPARAM lParam)

EntSecurityLoad( ) - Load Security


This function executes a security load. This 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 lpSecLoad->wFlags), you may want to know the process handle of the load process so that you can track and monitor the 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 EntSecurityLoadVB( ) instead of

EntSecurityLoad( ). Use this format for C: short WINAPI EntSecurityLoad(HSELECT hSelect, LPSECLOADSTRUCT lpSecLoad, CALLBACKSECLOAD fnCallBack, LPARAM lParam)
Variable hSelect lpSecLoad Description The handle of the selected tables The structure with arguments for the security load

Advanced Functions Alphabetical Reference 249

Variable lpSecLoad->dwsize lpSecLoad->bSecClass lpSecLoad->bAcesRight

Description The size of this structure Do security classes Do access rights

lpSecLoad->bUserAndGroup Do users and groups lpSecLoad->bTask lpSecLoad->szFileName lpSecLoad->cDelimiter lpSecLoad->cPad lpSecLoad->wFlags lpSecLoad->phProcess fnCallBack lParam Do security tasks The path to the load file The field delimiter, which typically is a comma ( , ) Not used. 0 or DB_REMOTE The process handle returned when executing on a server The callback function for status information. This is not used if the DB_REMOTE flag is set in lpSecLoad->wFlags. The argument for the callback function

Return Codes:

Code LOAD_NOERR (0) NONE LOAD_CANCELLED LOAD_CHECK_ERRORLOG

Meaning Successful Error occurred Cancelled by user. Error occurred and listed in the error log.

For an example, see EntSecurityLoadVB( ) - Load Security on page 250.

EntSecurityLoadVB( ) - Load Security


If you are a Visual Basic programmer, use this function instead of EntSecurityLoad( ). This function executes a security load. This 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 may want to know the process handle of the load process so that you can track and monitor the server processes that your program launches. The process handle returned at lpSecData.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.

250 Advanced Functions

Note: If you are a Visual Basic programmer, you must use EntSecurityLoadVB( ) instead of

EntSecurityLoad( ). Use this format: Declare Function EntSecurityLoadVB Lib "heaccess.dll" Alias "_EntSecurityLoadVB@20" (ByVal hSelect As Long, lpSecData As SecLoadStruct, ByVal lpszFileName As String, ByVal lpfnCallBack As Any, ByVal lParam As Long) As Integer
Variable hSelect lpSecData lpSecData.dwsize lpSecData.cDelimiter lpSecData.szFileName lpSecData.bSecClass lpSecData.bAcesRight Description The handle of the selected tables The structure with arguments for the security load The size of this structure The field delimiter, which typically is a comma ( , ) The path to the load file TRUE to load security classes; otherwise False TRUE to load access rights; otherwise False

lpSecData.bUserAndGroup TRUE to load users and user groups; otherwise False lpSecData.bTask lpSecData.wFlags lpSecData.phProcess szFileName fnCallBack lParam TRUE to load security tasks; otherwise False. 0 or DB_REMOTE The process handle eturned when executing on a server The path/filename of the file to load The callback function for status information. This is not used if the DB_REMOTE flag is set in lpSecData.wFlags. The argument for the callback function.

Return Codes:
Code LOAD_NOERR (0) NONE LOAD_CANCELLED LOAD_CHECK_ERRORLOG Meaning Successful Error occurred Cancelled by user Error occurred and listed in the error log

Example:
Private Sub SecurityLoad(hSelect As Long, szFile As String) Dim s As SecLoadStruct Dim 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 load If chkClass.Value Then s.bSecClass = True If chkRights.Value Then s.bAcesRight = True If chkUsr.Value Then s.bUserAndGroup = True If chkTask.Value Then s.bTask = True s.dwSize = LenB(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) hSelect& = EntUnSelect0(hSelect&, HYP_ID_SECURITY Or HYP_ID_ASSOC, HYP_NONE, 0, wRet%, 0) 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 Dim wRet%, wLen% Dim szFile$, szTask$ Dim szMsg$ 'Copy C-style strings to Basic strings wLen% = 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 0 End Function

Use this format for C: short WINAPI EntSecurityLoadVB(HSELECT hSelect, LPSECLOADSTRUCT lpSecData, LPCSTR lpszFileName, CALLBACKSECLOAD fnCallBack, LPARAM lParam)

EntSelect( ) - Select a Table for Use


This function is used to select a table. Tables must be selected before they can be accessed by any other function. EntSelect( ) returns a handle of one or more selected tables. You can use the ID_ASSOC constant with the table ID and an OR operation to select all associated tables. Use EntSelectAdd( ) to select additional tables. Remember to deselect the table when you are finished using it by calling the EntUnSelect( ) function. You should use the ID_ASSOC constant rather than select associated tables individually. For more 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 because

you must first select the table that contains sigKey, then use EntSelectAdd( ) to select the desired table. For more information, see EntSelectAdd( ) - Select an Additional Table for 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 hApp wTabId sigKe wAttr Description The application handle The ID of the table that you want to select NONE 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 the table is denied. lpPtar lpPtac NULL (not implemented) 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 The handle of the selected tables NULL Meaning Successful 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, short FAR * lpwLockMode, void FAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback, LPARAM lParam)
Advanced Functions Alphabetical Reference 253

EntSelectAdd( ) - Select an Additional Table for Use


This 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 its associated tables at the same time rather than select associated tables individually. For more information, 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 want to 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, use EntSelectTableAdd( ) instead of EntSelectAdd( ) because you need to pass an apiStruct structure argument. Use this format: Declare Function EntSelectAdd Lib "heaccess.dll" Alias "_EntSelectAdd@32" (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) As Integer
Variable wTabId sigKey hSelect wAttr lpPtar lpPtac Description The ID of the table that you want to select NONE, or the key of a related table. The related table should already have been selected. The handle of the currently selected tables from EntSelect( ) The access rights desired. Use APILOCK_READONLY to open the table with read-only access. NULL (Not implemented.) 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 Access rights granted NONE Meaning Successful 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, void FAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback, LPARAM lParam)

EntSelectTable( ) - Select a Table for Use


This 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_ASSOC constant to select the table and its associated tables rather than select associated tables individually. 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 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, apiS As APISTRUCT) As Long
Variable hApp wTabId sigKey wAttr Description The application handle The ID of the table you want to select NONE 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 the table is denied. lpPtar lpPtac NULL (Not implemented.) 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 apiS The parameter to be passed back to the user-provided callback function NULL, or a pointer to an apiStruct structure with more information

Return Codes:

Advanced Functions Alphabetical Reference 255

Code The handle of the selected tables NONE

Meaning Successful 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 Use


This function selects a table and adds it to an existing table selection handle. It works the same way as the EntSelectAdd( ) function, except that you can pass an apiStruct. You should use an OR operation with the ID_ASSOC constant to select the table and its associated tables rather than select associated tables individually. For more information, see the Associated Tables on page 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( ) - Select an 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, apiS As APISTRUCT) As Integer
Variable wTabId sigKey hSelect wAttr lpPtar Description The ID of the table that you want to select NONE, or the key of a related table. The related table should already have been selected. The handle of the currently selected tables from EntSelect( ) The access rights desired. Use APILOCK_READONLY to open the table with read-only access. NULL (Not implemented.)

256 Advanced Functions

Variable lpPtac

Description 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 apiS The parameter to be passed back to the user-provided callback function NULL, or a pointer to an apiStruct structure with more information

Return Codes:
Code Access rights granted NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntSelectTableAdd(short wTabId, SIGNA sigKey, HSELECT hSelect, short wAttr, void FAR * lpPtar, void FAR * lpPtac, CALLBACKSEL SelCallback, LPARAM lParam, LPAPISTRUCT pApiS)

EntSelectTableAdd( ) - Notes for Specific Tables


For the journal detail tables (ID_JOURNAL_DETAIL, ID_JOURNAL_HISTORY_DETAIL, and ID_JOURNAL_TEMPLATES_DETAIL), you must set up an apiStruct (see Using an apiStruct Structure on page 110). Set the fields shown in the following table in the apiStruct.
Field sigCat lStartPeriod lEndPeriod Description The category signature. The period. 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 APISTRUCT Call EntInitApiStruct(hApp&, apiS) apiS.sigCat = sigCat& apiS.lStartPeriod = 0 '1st period apiS.lEndPeriod = 0 'same as start period ret% = 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 Module


This function tells Hyperion Enterprise the name of your program as it should appear in the Users in Application report in the Hyperion Enterprise Application module. For more information, see the Maintaining Applications chapter in the Hyperion Enterprise Administrators 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 0 NONE Meaning Successful Error occurred

Use this format for C: short WINAPI EntSetActiveModule(HAPP hApp, short wModule, LPSTR szText)

EntSharesExtract( ) - Shares Extract


EntSharesExtract() extracts the shares to an ASCII file. Before you call this function, select the following tables:
l

Default tables (category, organization, account tables; for more information see Select and Deselect Tables using Advanced Functions on page 111. ID_SHARES and associated tables - APILOCK_READONLY ID_SECURITY and associated tables - APILOCK_READONLY

Set the point of view to the appropriate category before calling EntSharesExtract...(). For more information, see Setting the Point of View on page 121.
Note: If you are a Visual Basic programmer, you must use EntSharesExtractVB() instead of

EntSharesExtract(). Use this format for C:


258 Advanced Functions

short WINAPI EntSharesExtract(HSELECT hSelect, LPSHRSEXTRACTSTRUCT pArgs, LPAPISTRUCT lpApiStruct)


Variable hSelect pArgs pArgs->dwsize pArgs->hProcess pArgs->cDelim pArgs->nMode Description The handle of the selected tables The structure with arguments for the shares extract The size of the shares extract structure The Task Status window process handle is returned here if executing on the server The field delimiter, which typically is a comma ( , ) The different modes used to extract all entities, selected groups or selected entities. Values to use for pArgs.nMode are:
l l l

SHR_EXT_ALLENT - Extract all entities. SHR_EXT_SELGRP - Extract all entities in the group. SHR_EXT_SELENT - Extract the selected entity only (pSigs.sigNode).

pArgs->sigNode pArgs->bRemoteFlag pArgs->fnCallBack pArgs->lParam pArgs->szExtractFile lpApiStruct

Signature of the selected entity. Remote or local extract. TRUE for remote extract, FALSE for local extract. Not used. Not used. File name for file to extract to. 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 0 NONE Meaning Successful Error occurred

Example: See EntSharesExtractVB( ) - Shares Extract on page 259 for an example.

EntSharesExtractVB( ) - Shares Extract


If you are a Visual Basic programmer, use this function instead of EntSharesExtract(). This function extracts the shares to an ASCII file. Before you call this function, select the following tables:
Advanced Functions Alphabetical Reference 259

Default tables (category, organization, account tables; for more information see Select and Deselect Tables using Advanced Functions on page 111. ID_SHARES and associated tables - APILOCK_READONLY ID_SECURITY and associated tables - APILOCK_READONLY

Set the point of view to the appropriate category before calling EntSharesExtract...(). For more information, see Setting the Point of View on page 121. This function is similar to EntSharesExtract() except that the name of the extract file is passed as a function argument instead of in pArgs.lpszExtractFile. Use this format: Declare Function Lib "heaccess.dll" Alias "_@16" (ByVal hSelect As Long, pArgs As SHRSEXTRACTSTRUCT, ByVal szExtractFile As String, apiS as ApiStruct) As Integer
Variable hSelect pArgs pArgs.dwsize pArgs.hProcess pArgs.cDelim pArgs.nMode Description The handle of the selected tables Structure with arguments for the shares extract. See ToolKit.bas. All fields are required input except the callback function (NULL) and the output fields. The size of the shares extract structure The Task Status window process handle is returned here if executing on the server. The field delimiter, which typically is a comma ( , ) The different modes used to extract all entities, selected groups or selected entities:
l l l

SHR_EXT_ALLENT - Extract all entities. SHR_EXT_SELGRP - Extract all entities in the group. 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 pArgs.lParam szExtractFile apiS apiS.lStartPeriod apiS.lEndPeriod Not used. Not used. File name for shares extract ApiStruct structure (user-defined type) First period (0 based) Last period (0 based) for which to extract shares

Return Codes:

260 Advanced Functions

Code 0 NONE

Meaning Successful Error occurred

Example:
Dim shrsExt As ShrsExtractStruct Dim apiStruct As apiStruct Dim ret% shrsExt.dwSize = LenB(shrsExt) shrsExt.cDelim = Asc(",") If optAllEnt.Value = True Then shrsExt.nMode = SHR_EXT_ALLENT 'all entities Else If optSelGrp.Value = True Then shrsLoad.nMode = SHR_EXT_SELGRP 'selected group Else shrsExt.nMode = SHR_EXT_SELENT 'selected entity End If End If shrsExt.sigNode = EntGetEntitySig(hSelect&, szEntity, HYP_NAME_IMPLICIT) shrsExt.bRemoteFlag = 0 shrsExt.fnCallBack = 0 shrsExt.lParam = 0 shrsExt.lpszFileName = 0 Call EntInitApiStruct(hApp&, apiStruct) apiStruct.lStartPeriod = 0 '1st period apiStruct.lEndperiod = 11 '12th period ret% = EntSharesExtractVB(hSelect&, shrsExt, szFileName, apiStruct)

EntSharesLoad( ) - Shares Load


EntSharesLoad() loads 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 and Deselect Tables using Advanced Functions on page 111. ID_SHARES and associated tables - APILOCK_READWRITE ID_SECURITY and associated tables - APILOCK_READONLY
Note: If you are a Visual Basic programmer, you must use EntSharesLoadVB() instead of

EntSharesLoad(). Use this format for C: short WINAPI EntSharesLoad(HSELECT hSelect, LPSHRSLOADSTRUCT lpShrsLoadSruct, LPAPISTRUCT lpApiStruct)

Advanced Functions Alphabetical Reference 261

Variable hSelect lpShrsLoadStruct lpShrsLoadStruct->dwsize lpShrsLoadStruct->hProcess lpShrsLoadStruct->cDelim lpShrsLoadStruct->nMode

Description The handle of the selected tables The structure with arguments for the shares load The size of the shares load structure The Task Status window process handle is returned here if executing on the server. The field delimiter, which typically is a comma ( , ) Merge or replace shares mode:
l l

SHR_MERGE - Merge SHR_REPLACE - Replace

lpShrsLoadStruct->bRemoteFlag TRUE for server load, FALSE for local load lpShrsLoadStruct->wExtFlag lpShrsLoadStruct->fnCallBack 0; future extensions The callback function for load. Your callback function for EntSharesLoad(), and EntSharesLoadVB() must be the type defined as CALLBACKSHARES. 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 0 NONE Meaning Successful Error occurred

Example: See EntSharesExtractVB( ) - Shares Extract on page 259 for an example.

EntSharesLoadVB( ) - Shares Load


If you are a Visual Basic programmer, use this function instead of EntSharesLoad(). This function loads 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 and Deselect Tables using Advanced Functions on page 111. ID_SHARES and associated tables - APILOCK_READWRITE 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 function argument instead of in pArgs.lpszFileName. Use this format: Declare Function EntSharesLoadVB Lib "heaccess.dll" Alias "_EntSharesLoadVB@16" (ByVal hSelect As Long, pArgs As SHRSLOADSTRUCT, ByVal szLoadFile As String, apiS as APIStruct) As Integer
Variable hSelect pArgs Description The handle of the selected tables 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, not when executing on the server. The size of the shares load structure The Task Status window process handle is returned here if executing on a server. The field delimiter, which typically is a comma ( , ) Merge or replace mode:
l l

pArgs.dwsize pArgs.hProcess pArgs.cDelim pArgs.nMode

SHR_MERGE - merge SHR_REPLACE - replace

pArgs.bRemoteFlag TRUE for server load;FALSE for local load pArgs.wExtFlag pArgs.fnCallBack pArgs.lParam sxLoadFile apiS Future extensions. 0 The callback function for load. For more information, see CALLBACKSHARES on page 319. The argument for the callback function File to load Structure for API compatibility; Nul.

Return Codes:
Code 0 NONE Meaning Successful 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 Data


This function executes a data load.
Note: This function can be used with any language except Visual Basic. Use

EntUNCDataLoadVB( ) for Visual Basic applications. If loading data on a server, the DB_REMOTE bit flag is set in pArgs->wLoadFlag. You might want to know the process handle of the load process so that you can track and monitor the server processes that your program launches. You can get the process handle by setting lParam to a HANDLE * variable before calling EntUNCDataLoad( ). The handle returned 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 for C: short WINAPI EntUNCDataLoad(HSELECT hSelect, LPCDBLOADSTRUCT_UNC pArgs, CALLBACKDBLOAD fnCallBack, LPARAM lParam)
Variable hSelect pArgs pArgs->dwSize pArgs->cDelim pArgs->cNeg Description The handle of the selected tables The structure with arguments for the data load The size of the pArg structure The field delimiter, which is typically a comma ( , ) A negative delimiter, which is typically a dash (-) or a parenthesis [ ( ) ]

264 Advanced Functions

Variable pArgs->cScale pArgs->cView pArgs->dDataBy pArgs->sOperation pArgs->iFileListCnt pArgs->lpFileList

Description The scale of the data The data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT), or NONE to use the categorys default view The data to use with sOperation The operation (divide or multiply by dDataBy) The number of elements in file list table An array of selected path\filenames. This allows the user to load data files from different locations at the same time. Note: Each file name in this array should be exactly 260 (_MAX_PATH) bytes long and should be null terminated after the last character in the file name. If any of the filename strings are not 260 (_MAX_PATH) bytes long, this function will not properly parse the list of files, which causes the function to terminate.

pArgs->szLoadErrFileName The error file name pArgs->sigAcctConv pArgs->sigCurCat pArgs->sigFrequency pArgs->sigNameConv pArgs->wLoadFlag fnCallBack lParam The account conversion table signature The currently selected category The frequency The entity conversion table signature The database load options flags The callback function for status information. (Not used if DB_REMOTE bit flag is set in pArgs->wLoadFlag). For more information, see CALLBACKDBLOAD - For EntUNCDataLoad( ) on page 314. Normally, 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, so lParam is assumed to be a HANDLE * if it is not NULL.

Return Codes:
Code 0 NONE LOAD_CANCELLED LOAD_CHECK_ERRORLOG LOAD_CHECKBOTH Meaning Successful Error occurred Canceled by user Errors listed in the applications error log Errors written to both the applications 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 Point of View on page 121. Example:
Advanced Functions Alphabetical Reference 265

For an example, see EntUNCDataLoadVB( ) - Load Data on page 266. The additional arguments for EntUNCDataLoadVB( ) are passed as the appropriate fields in pArgs.

EntUNCDataLoadVB( ) - Load Data


This 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 them during the callback function, places the addresses of the strings into a copy of the DBLOADSTRUCT_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, ByVal lParam As Long, ByVal szFileList As String, ByVal szLoadErrFileName As String) As Integer

Variable hSelect pArgs pArgs.dwSize pArgs.cDelim pArgs.cNeg pArgs.cScale pArgs.cView pArgs.dDataBy pArgs.sOperatio pArgs.sigAcctConv pArgs.sigCurCat

Description The handle of the selected tables The pointer to the structure with arguments for the data load The size of the pS structure The field delimiter, which is typicaly a comma ( , ) A negative delimiter, which is typically a dash (-) or an apostrophe (') The scale of the data The data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT), or NONE to use the categorys default view The data to use with sOperation The operation (divide or multiply by dDataBy) The account conversion table signature The currently selected category

pArgs.sigFrequency The frequency pArgs.sigNameConv The entity conversion table signature pArgs.iFileListCnt pArgs.wLoadFlag fnCallBack lParam The number of filenames in szFileList The database load options flag Callback function for status information (not used if DB_REMOTE bit flag is set in pArgs->wLoadFlag). For more information, see CALLBACKVB on page 321. 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 not NULL.

266 Advanced Functions

Variable szFileList

Description 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 after the last character in the file name. If any of the file name strings are not 260 (_MAX_PATH) bytes long, this function will 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 not overwrite the lpFileList field in the DBLOADSTRUCT structure. This allows you to experiment with 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 more information, see CALLBACKVB on page 321. Return Codes:
Code 0 NONE LOAD_CANCELLED LOAD_CHECK_ERRORLOG LOAD_CHECKBOTH Meaning Successful Error occurred Canceled by user Errors listed in the applications error log Errors written to both the applications error log and the load error file

Example:
Dim s As DBLOADSTRUCT_UNC Dim szFile260 As String * 260 Filename must be a 260 character string, NULL terminated within these 260 characters LSet szFile260$ = szFile$ Mid(szFile260$, Len(szFile$) + 1) = Chr(0) szFile$ = szFile260$ Set the load options based on various radio buttons and check boxes flag% = 0 If optAccum.Value Then flag% = flag% Or DB_ACCUM Else If optReplace.Value Then flag% = flag% Or DB_REPLACE Else If optMerge.Value Then flag% = flag% Or DB_MERGE End If If chkLogic.Value Then flag% = flag% Or DB_EXECLOG If chkCalcAcct.Value Then flag% = flag% Or DB_REPCALCACCTS If 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 default s.cView = Asc(FORMVIEW_CAT) s.dDataBy = -1 'data to use with sOperation. s.sOperation = HYP_NONE s.iFileListCnt = 1 'Number of elements in file list table s.sigAcctConv = HYP_NONE 'Account conversion table signature s.sigCurCat = sigCat& 'currently selected category s.sigFrequency = HYP_NONE 'frequency signature s.sigNameConv = HYP_NONE 'Entity conversion table signature s.wLoadFlag = flag% 'Database load options flag (DB_MERGE, etc.) This example uses Spyworks for the callback function ret% = EntUNCDataLoadVB(hSelect&, s, cbkLoad.ProcAddress, 0, szFile$, szErrFile$) . . . The SpyWorks call back function Private 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 lval1 wLen% = 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% EndSub Function 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) 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% = 0 End Function

268 Advanced Functions

Note: EntQueryExStr0( ) is declared similar to EntQueryExStr( ) but adjusted to allow passing

0 in place of the apiStruct argument. For more information, see Visual Basic Programming Notes on page 16. Use this format for C: EntUNCDataLoadVB(HSELECT hSelect, LPCDBLOADSTRUCT_UNC pS, CALLBACKVB fnCallBack, LPARAM lParam, LPCSTR szFileList, LPCSTR szLoadErrFileName)

EntUnSelect( ) - Deselecting Tables


This 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 operation with the ID_ASSOC constant to deselect all tables associated with the specified table. For more information, 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 values that 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 table selection handle internally associated with the Hyperion Enterprise Retrieve application handle. Use this format: Declare Function EntUnSelect Lib "heaccess.dll" Alias "_EntUnSelect@24" (ByVal hSelect As Long, ByVal wTabId As Integer, ByVal sigKey As Long, ByVal bDiscard As Integer, wRC As Integer, apiS As APISTRUCT) As Long
Variable Description hSelect wTabId sigKey The handle of the selected tables The ID of the table you are trying to deselect. Use one of the table IDs or NONE for all. 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 should be kept in memory wRC apiS The buffer to return the error code. On return, this is 0 (zero) if successful, non-zero or NONE if unsuccessful. 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 been deselected. 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, BOOL bDiscard, short FAR * lpwRC, LPAPISTRUCT pApiS)

EntUpdate( ) - Update Record


This function updates the value for a specified field in a record in a table. When you are finished updating data, you need to call EntSave( ) to actually save your changes. Visual Basic programmers should use the EntUpdateStr( ) function when updating a string value. EntUpdateStr( ) is a clone of the declaration for EntUpdate( ) adjusted for use with strings and declared in the ToolKit.bas file.
Caution!

Use this function only for the Datafile table (ID_DATAFILE). Before you use this function, read Updating Data on page 117 which describes how to use this function to update data.

Use this format: Declare Function EntUpdate Lib "heaccess.dll" Alias "_EntUpdate@28" (ByVal hSelect As Long, ByVal wTabId As Integer, ByVal wAttr As Integer, ByVal sigRecd As Long, ByVal sigKey As Long, pzBuf As Any, apiS As APISTRUCT) As Integer

Variable Description hSelect The handle of the selected tables wTabId wAttr The Datafile table, ID_DATAFILE 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 pzBuf apiS NONE for table ID_DATAFILE The new value for the specified field. NULL for table ID_DATAFILE when the new values are in apiS An apiStruct structure with more information. Required for most ID_DATAFILE update attributes.

Return Codes:

270 Advanced Functions

Code 0 NONE

Meaning Successful 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 Defaults


This function updates application or user defaults. After you are finished updating values, call EntSaveDefault( ) to save your changes.Visual Basic programmers should use the EntUpdateDefaultStr( ) function when querying a string value. EntUpdateDefaultStr( ) is a clone of the declaration for EntUpdateDefault( ) adjusted for use with strings and declared in the ToolKit.bas file. Use this format: Declare Function EntUpdateDefault Lib "heaccess.dll" Alias "_EntUpdateDefault@16" (ByVal hApp As Long, ByVal wTabId As Integer, ByVal wAttr As Integer, pzBuf As Any) As Integer
Variable Description hApp wTabId The application handle The table ID, which must be one of the following tables:
l l l

ID_HAPP ID_APPDEFAULT ID_USERDEFAULT

wAttr

The attribute that you are updating. Valid attributes for tables ID_APPDEFAULT and ID_USERDEFAULT are the same as the query attributes 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. The new value for the field

pzBuf

For the ID_APPDEFAULT table, the valid attributes are any of the query attributes with the following exceptions:
l

APP_NTDATADIR APP_NTINBOXDIR APP_NTOUTBOXDIR APP_NTREPORTDIR


Advanced Functions Alphabetical Reference 271

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( ) automatically substitutes the application path for @APP unless you request query attribute APP_NTINBOXDIR, and so on. For more information, see the Creating Applications chapter in the Hyperion Enterprise Administrators Guide.
Caution!

Many of the application settings in table ID_APPDEFAULT should not be changed after the application is created. Examine the Hyperion Enterprise Application module for any menu item or field that is editable. Do not change the application setting that corresponds to a field that cannot be edited as it could corrupt your application.

Return Codes:
Code 0 NONE Meaning Successful 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 Long Integer


This 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 update values 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 TRUE FALSE Meaning Successful Error occurred

Use this format for C: BOOL WINAPI EntWriteAppProfileLong(LPCSTR szAppName, LPCSTR szKeyName, long lValue)

EntWriteAppProfileString( ) - Write Application Profile String


This function writes a string to a specified application .INI file. You should use the EntUpdateDefault( ) function with the ID_APPDEFAULT table to update values 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 string in the .INI file.

Return Codes:
Code TRUE Meaning Successful

Advanced Functions Alphabetical Reference 273

Code FALSE

Meaning Error occurred

Use this format for C: BOOL WINAPI EntWriteAppProfileString(LPCSTR szAppName, LPCSTR szKeyName, LPCSTR szValue)

EntWriteProfileLong( ) - Write Hyperion Profile Long Integer


This 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 TRUE FALSE Meaning Successful Error occurred

Example:
ret& = EntWriteProfileLong(vbNullString, "Organization", 0)

Use this format for C: BOOL WINAPI EntWriteProfileLong(LPCSTR szAppName, LPCSTR szKeyName, long lValue)

EntWriteProfileString( ) - Write Hyperion Profile String


This 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 1 0 Meaning Successful Error occurred

Example:
ret& = EntWriteProfileString(vbNullString, "AppID", szApp$)

Use this format for C: BOOL WINAPI EntWriteProfileString(LPCSTR szAppName, LPCSTR szKeyName, LPCSTR szValue)

EntVBGetCStrLen( ) - Get Length of C-string


This function is for Visual Basic only. Some callback functions are passed an argument which is the address of a C-style string. In Visual Basic the callback argument function type is long. You can use EntVBGetCStrLen( ) and EntVBCopyStr( ) to convert the long argument to a Visual Basic string. You can call EntVBGetCstrLen( ) to get the length of the string, allocate a Visual Basic string equal to the same length, and call EntVBCopyStr( ) to copy the C-style string into the Visual Basic string. The function EntVBCopyStr( ) is a clone of the of EntVBCopyData. ) Use this format: Declare Function EntVBGetCStrLen Lib "heaccess.dll" Alias "EntVBGetCStrLen@4" (ByVal lAddr As Long) As Integer where lAddr is the address of the C-style string. Return Codes:
Code Length of the string Meaning Successful

Example:
wLen% = EntVBGetCStrLen(lval1&) szFile$ = Space(wLen%) ret% = EntVBCopyStr(szFile$, lval1&, wLen%)

Advanced Functions Alphabetical Reference 275

EntVBCopyData( ) - Copy Data


This function is intended for Visual Basic only. The arguments for some callback functions are actually the address of a structure (user-defined type). If your callback function declares the argument as type long, you can use EntVBCopyData( ) to copy that structure into a Visual Basic variable of the correct type so that you can use it. Use this format: Declare Function EntVBCopyData Lib "heaccess.dll" Alias "_EntVBCopyData@12" (Dest As Any, ByVal lAddr As Long, ByVal wLen As Integer) As Integer
Variable Description Dest lAddr wLen The destination buffer The address of the source to copy The length to copy

Return Codes:
Code 0 NONE Meaning Successful Error occurred

Example:
Dim args As CALLBACKSTRUCT ret% = EntVBCopyData( args, lval2&, LenB(args))

EntVBCopyStr( ) - Copy String


EntVBCopyStr( ) 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" (ByVal Dest As String, ByVal lAddr As Long, ByVal wLen As Integer) As Integer
Variable Description Dest lAddr wLen The destination buffer The address of the source to copy The length to copy

Return Codes:
276 Advanced Functions

Code 0 NONE

Meaning Successful Error occurred

HypGethApp( ) - Get Application Handle


Most of the advanced Hyperion Enterprise functions take either an application handle from EntOpenApplication( ) or a table selection handle from EntSelect( ) as an argument. In contrast, spreadsheet add-in functions take a Hyperion Enterprise Retrieve application handle from HypConstruct( ) as an argument. HypGethApp( ) returns the application handle associated with a Hyperion Enterprise Retrieve handle. Use this format: Declare Function HypGethApp Lib "heaccess.dll" Alias "_HypGethApp@4"(ByVal hRApp As Integer) As Long where hRApp is the Hyperion Enterprise Retrieve application handle from HypConstruct( ). Return Codes:
Code The application handle NULL Meaning Successful Error occurred

Example:
hApp& = HypGethApp(hRApp%)

Use this format for C: HAPP WINAPI HypGethApp(HRETRIEVEAPP hRApp)

HypGethSelect( ) - Get Table Selections Handle


Most of the advanced Hyperion Enterprise functions take a table selection handle from EntSelect( ) as an argument. In contrast, spreadsheet add-in functions take a Hyperion Enterprise Retrieve application handle from HypConstruct( ) as an argument. HypGethSelect( ) returns the table selection handle associated with a specified Hyperion Enterprise Retrieve application handle. Use this format: Declare Function HypGethSelect Lib "heaccess.dll" Alias "_HypGethSelect@4"(ByVal hRApp As Integer) As Long where hRApp is the Hyperion Enterprise Retrieve application handle from HypConstruct( ). Return Codes:
Advanced Functions Alphabetical Reference 277

Code The hselect application handle NULL

Meaning Successful Error occurred

Example:
hSelect& = HypGethSelect(hRApp%)

Use this format for C: HSELECT WINAPI HypGethSelect(HRETRIEVEAPP hRApp)

HypSethSelect( ) - Set Table Selections Handle


HypSethSelect( ) updates the table selection handle (hSelect) that is internally associated with a Hyperion Enterprise Retrieve application handle. You should call this function only if you opened the application using HypConstruct( ) or HypMultiInit( ) and subsequently called EntUnSelect( ). 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 hRApp As 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 0 NONE Meaning Successful 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

5
In This Chapter

Converting from Hyperion Enterprise SE

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 SE programs for use with Hyperion Enterprise.

Hyperion Enterprise SE Conversion Overview


At a minimum, 16-bit programs written using the Hyperion Developer's toolkit for Hyperion Enterprise SE must be converted to 32-bit programs. 32-bit programs must be adjusted and recompiled. For more information, see steps 1 and 2 in Upgrading Hyperion Enterprise SE Code on page 282. Although most older functions are still supported for backwards compatibility (see the Unsupported Functions topic for a list), you should also upgrade your code to support the new features in Hyperion Enterprise. These features include larger applications and larger IDs (formerly called short names). For more information, see step 3 in Upgrading Hyperion Enterprise SE Code on page 282. For more information on what's new in the Developer's Toolkit, see Include Files for Hyperion Enterprise on page 279.

Include Files for Hyperion Enterprise


Hyperion Enterprise provides the following include files:
l

TOOLKIT.BAS, for working with Microsoft Visual Basic 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 page 279.
Note: If you recompile your programs using the include files provided with Hyperion

Enterprise, you must redefine the application handles as Hyperion Enterprise Retrieve application handles. For more information, see Redefine Application Handles on page 283.

Function Classifications
In 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 functions are described in Chapter 2, Spreadsheet Add-in Functions Other supported functions for working with tables that are designed to work with the spreadsheet add-in functions. These functions are described in the Chapter 3, Table Functions Advanced functions that use the full power of the underlying Hyperion Enterprise API functions. 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 page 280 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 Functions


These functions are optimized for use by spreadsheet add-in products, such as Hyperion Enterprise Retrieve. They are generally the safest and easiest functions to use. These functions work only for Hyperion Enterprise applications that you open using HypConstruct( ) or HypMultiInit( ). 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 for quicker reads. They automatically buffer data writes using the HypHPLNK( ) function. The HypHPCommit2( ) function optimizes the data writes in the buffer to increase performance. HypConstruct( ) and HypMultiInit( ) initialize various internal buffers and select default tables for use by the other functions in this group. You can open a maximum of 20 Hyperion Enterprise applications at any one time for use by these functions. HypConstruct( ), HypMultiDefault( ), and HypMultiGet( ) return a handle 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 Enterprise SE except that anything that was an application handle of type HAPP in Hyperion Enterprise SE is now a Hyperion Enterprise Retrieve application handle of type HRETRIEVEAPP. For more information, see Redefine Application Handles on page 283. Some Hyperion Enterprise SE functions have been cloned to handle the larger applications and IDs of Hyperion Enterprise. The new versions of these functions take the form Hyp...Ex( ) and are described in Chapter 2, Spreadsheet Add-in Functions. To upgrade to these functions, see Replacing Obsolete Functions with New Hyp...( ) Functions on page 284. The obsolete functions are not documented. New Hyp...( ) functions have been added to support new functions in Hyperion Enterprise and Hyperion Enterprise Retrieve.

Other Supported Functions


Many Hyperion Enterprise SE functions are still supported in Hyperion Enterprise for backward compatibility. These functions are easy to use with the spreadsheet add-in functions and are described in Chapter 3, Table Functions. Some of these functions have been cloned to handle the larger applications and IDs of Hyperion Enterprise Release. The new versions of these functions generally take the form Hyp...Ex( ) and are described in Chapter 3, Table Functions To upgrade to these functions, see Replacing Obsolete Functions with New Hyp...( ) Functions on page 284. The obsolete functions are not documented. To emphasize that these functions use a Hyperion Enterprise Retrieve application handle and must 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. For information on replacing these functions with their corresponding Ent...( ) functions, see Replacing Obsolete Functions with New Ent...( ) Functions on page 286.

New Ent...( ) Functions


Many new functions have been added for Hyperion Enterprise. These functions have been designed 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 application handle, 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 new Ent...( ) 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 Functions
A 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 result using new functions. The following functions are unsupported:
l

HypAppendNode( ) HypConsolidate( ) HypCreateAcctTxt( ) HypCreateCatTxt( ) HypCreateNameTxt( ) HypDelete( ) HypDelNode( ) HypInsChildNode( ) HypInsert( ) HypInsParentNode( ) HypInsSiblingNode( ) HypJLockPeriodsSet( ) HypLockPeriodsSet( ) HypPeriodsSetEx( ) HypPsf_GetStatus( ) HypPsf_ImpactStatus( ) HypRetMultiAsk( ) HypSave( ) HypSetTopNode( ) HypUnJLockPeriodsSet( ) HypUnLinkName( ) HypUnlockPeriodsSet( ) HypUpdate( ) HypUpdNode( )

Upgrading Hyperion Enterprise SE Code


You must upgrade your Hyperion Enterprise SE code so that you can compile it. Use the new TOOLKIT.BAS include file or the TOOLKIT.H file for C in your code. You should also upgrade it 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 recommended

to support the larger applications, record signatures, and IDs in Hyperion Enterprise. The undocumented functions supported in Hyperion Enterprise emulate Hyperion Enterprise 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. For more information, see Upgrading Functions on page 289 and Changes to Hyperion Enterprise Tables on page 297.

To upgrade Hyperion Enterprise SE code:


1
Redefine all application handles to Hyperion Enterprise Retrieve application handles. You cannot recompile your code until you perform this step. For more information, see Redefine Application Handles on page 283. Convert 16-bit programs to 32-bit programs. For more information, see Converting 16-bit Programs to 32-bit Programs on page 284.
Note: If you used the 32-bit version of the Hyperion Enterprise API and your programs are

written in Microsoft Visual Basic, you must replace the function declarations in your code with the function declarations in the new TOOLKIT.BAS file.

Upgrade functions by performing the following tasks:


l

Replace each obsolete Hyperion Enterprise SE function with the corresponding new Hyp...( ) function. For a list of these functions, see Replacing Obsolete Functions with New Hyp...( ) Functions on page 284. Alternatively, you can replace many of the obsolete 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. Upgrade specific functions as required. For more information, see Upgrading Functions on page 289. Upgrade your code to adjust for changes to Hyperion Enterprise tables. For more information, see Changes to Hyperion Enterprise Tables on page 297.

Redefine Application Handles


Any variable you used for an application handle (type HAPP in C) should now be a Hyperion Enterprise Retrieve application handle (type HRETRIEVEAPP in C). This is the handle returned by HypConstruct( ), HypMultiGet( ), and HypMultiDefault( ) and is used by all other spreadsheet add-in functions and other supported functions.

Visual Basic Programming Note


If 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 them with 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 Long to Integer.

C Programming Note
Redefine these variables as type HRETRIEVEAPP before you recompile your program. If you were using the 32-bit compiler in Hyperion Enterprise SE, you must recompile because the fundamental type has changed from a long integer (DWORD) to a short integer. If you were using the 16-bit compiler, you must change the type to HRETRIEVEAPP and convert your program to a 32-bit program.

Converting 16-bit Programs to 32-bit Programs


Sixteen-bit programs are no longer supported. You must convert your existing application to a 32-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 function declarations in your code with the 32-bit function declarations in the new TOOLKIT.BAS file. The 32-bit function declarations use lib HACCESS32.DLL as the library name, not lib HACCESS.DLL. They also use aliases and some different numeric types as described later. For programs written in C or other languages (except Visual Basic) you must link the program with HACCESS32.LIB, not HACCESS.LIB. For Microsoft Visual Basic, the 32-bit function declarations handle the linking. Some of the function arguments and return codes that were short integers (16 bits) in 16bit programs are long integers (32-bit) in 32-bit programs. In C, these were defined as type int, which compiles correctly in either case. In Microsoft Visual Basic, you must change them from type integer to type long. To see which variables to change, compare your old function declarations with the new function declarations. 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-bit

version of Visual Basic uses the 32-bit declarations. The 16-bit version of Visual Basic uses the 16-bit declarations, which are no longer supported.

Replacing Obsolete Functions with New Hyp...( ) Functions


Some Hyperion Enterprise SE functions have been cloned to handle the larger applications and IDs of Hyperion Enterprise. These are the differences between the obsolete Hyperion Enterprise SE 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

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. 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 functions generally 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 should replace them.
Table 48

Obsolete Functions and New Hyp..( ) Functions New Function HypValidateLnkParams( ) - Check Link Parameters on page 72 * EntFormatNumber2( ) - Format Number on page 188 HypAcctListAskEx( ) - Select Account List on page 28 HypCatAskEx( ) - Select Category on page 28 HypCatGetNumPeriodsEx( ) - Calculate Number of Periods in a Category on page 83 HypCatGetPerShortEx( ) - Get Period ID in Category Frequency on page 84 HypCatMapPeriodEx( ) - Map Period into Frequency on page 84 HypEnumEx( ) - Enumerate Records in a Table on page 88 HypEnumAcctListEntriesEx( ) - Enumerate Accounts in Account List on page 85 HypEnumEx( ) - Enumerate Records in a Table on page 88 HypEnumNameListEntriesEx( ) - Enumerate Entities in an Entity List on page 90 HypFindEx( ) - Find Signature on page 94 HypFindNameInOrgEx( ) - Find Node ID on page 95 HypFindEx( ) - Find Signature on page 94* HypGetCatPerFreq( ) - Get Period Number and Frequency in Category on page 96 HypGetCatPerFreq( ) - Get Period Number and Frequency in Category on page 96 HypGetPerViewEx( ) - Get Frequency and View on page 100 HypQueryEx( ) - Query Hyperion Enterprise Tables on page 105* HypGetTopNodeEx( ) - Get Top Node on page 101 HypHPCommit2( ) - Write Data Buffers on page 39 HypHPCUREx( ) - Get Component Currency on page 40

Obsolete Function AreValidLnkParams( ) EntFormatNumber( ) HypAcctListAsk( ) HypCatAsk( ) HypCatGetNumPeriods( ) HypCatGetPerShort( ) HypCatMapPeriod( ) HypEnum( ) HypEnumAcctListEntries( ) HypEnumAcctSig( ) HypEnumNameListEntries( ) HypFind( ) HypFindNameInOrg( ) HypGetAcctSig( ) HypGetCatPeriod( ) HypGetCatPeriodEx( ) HypGetPerView( ) HypGetRptFreq( ) HypGetTopNode( ) HypHPCommit( ) HypHPCUR( )

Upgrading Hyperion Enterprise SE Code 285

Obsolete Function HypHPKEY( ) HypHPLogicCommit( ) HypIsNameParent( ) HypLock( ) HypNamAsk( ) HypNameListAsk( ) HypQryAcctListEntry( ) HypQryNameListEntry( ) HypQryNode( ) HypQryRptFreq( ) HypQuery( ) HypQuerySig( ) HypUnLock( ) ValidateHypParams( )

New Function HypHPKEYEx( ) - Get Default Entity, Category, Account, or Period on page 50 HypHPCommit2( ) - Write Data Buffers on page 39 HypIsNameParentEx( ) - Check If Entity Is a Parent on page 102 HypLockEx( ) - Select a Table on page 103 HypNamAskEx( ) - Select Entity on page 67 HypNameListAskEx( ) - Select Entity List on page 67 HypQueryEx( ) - Query Hyperion Enterprise Tables on page 105* HypQueryEx( ) - Query Hyperion Enterprise Tables on page 105* HypQueryEx( ) - Query Hyperion Enterprise Tables on page 105* HypQryRptFreqEx( ) - Query Reporting Frequency on page 104 HypQueryEx( ) - Query Hyperion Enterprise Tables on page 105 HypQueryEx( ) - Query Hyperion Enterprise Tables on page 105* HypUnLockEx( ) - Deselect a Table on page 106 HypValidateParams( ) - Check Parameters on page 73*

* Optional
Note: Although some changes are indicated as optional in the previous table, the obsolete

functions 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 difference in Hyperion Enterprise. For more information, see the Upgrade Specific Functions and Changes to Hyperion Enterprise Tables on page 297. Many of these obsolete functions can be replaced with new Ent...( ) functions, if you prefer. For a list, see the following topic.

Replacing Obsolete Functions with New Ent...( ) Functions


Table 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. For more 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 Ent... ( ) Functions EntDateConv( ) - Date Conversion and Calculate Period Number on page 153 EntAcctAsk( ) - Select Account on page 126 EntAcctListAsk( ) - Select Account List on page 126 EntCatAsk( ) - Change Category on page 138 EntCatGetNumPeriods( ) - Calculate Number of Periods in a Category on page 138 EntCatGetPerShort( ) - Get Period Label on page 139 EntCatMapPeriod( ) - Map Period into Frequency on page 140 EntConsolidate( ) - Consolidate on page 141 EntDataExtract( ) - Extract Data on page 146 EntUNCDataLoad( ) - Load Data on page 264 EntDataFileOpen( ) - Open Datafile on page 152 EntUnSelect( ) - Deselecting Tables on page 269 EntSave( ) - Save Table on page 245 EntUpdate( ) - Update Record on page 270 EntEnum( ) - Enumerate Records in a Table on page 167 EntEnum( ) - Enumerate Records in a Table on page 167 EntEnum( ) - Enumerate Records in a Table on page 167 EntEnumApplications( ) - Enumerate Applications on page 178 EntEnum( ) - Enumerate Records in a Table on page 167 EntEnumOrgEntities( ) - Enumerate Nodes in an Organization on page 178 EntEnumSubAcctSig( ) - Enumerate Subaccounts on page 180 EntFind( ) - Find Signature on page 182 EntFindEntityInOrg( ) - Find Node ID on page 186 EntFreqAsk( ) - Select Frequency on page 188 EntFind( ) - Find Signature on page 182 EntGetCatPerFreq( ) - Get Period Number and Frequency in Category on page 193 EntGetCatPerFreq( ) - Get Period Number and Frequency in Category on page 193 EntGetChild( ) - Get Child Node on page 194

Hyperion Enterprise SE Functions DateConv( )* HypAcctAsk( )* HypAcctListAsk( ) HypCatAsk( ) HypCatGetNumPeriods( ) HypCatGetPerShort( ) HypCatMapPeriod( ) HypConslidate( ) HypDBExtract( ) HypDBLoad( ) HypDFOpen( ) HypDFClose( ) HypDFSave( ) HypDFLogicExecute( ) HypEnum( ) HypEnumAcctListEntries( ) HypEnumAcctSig( ) HypEnumApplications( )* HypEnumNameListEntries( ) HypEnumOrgNames( )* HypEnumSubAcctSig( )* HypFind( ) HypFindNameInOrg( ) HypFreqAsk( )* HypGetAcctSig( ) HypGetCatPeriod( ) HypGetCatPeriodEx( ) HypGetChild( )*

Upgrading Hyperion Enterprise SE Code 287

Hyperion Enterprise SE Functions HypGetNameSig( )* HypGetOrgLevel( )* HypGetPerView( ) HypGetRptFreq( ) HypGetSibling( )* HypGetTopNode( ) HypIsNameParent( ) HypLock( ) HypNamAsk( ) HypNameListAsk( ) HypPerAsk( )* HypQryAcctListEntry( ) HypQryNameListEntry( ) HypQryNode( ) HypQryRptFreq( ) HypQuery( ) HypQuerySig( ) HypUnLock( )

Ent... ( ) Functions EntGetEntitySig( ) - Get Entity Signature on page 195 EntGetOrgLevel( ) - Get Level in Organization on page 199 EntGetPerView( ) - Get Frequency and View on page 199 EntQueryEx( ) - Query Information on page 241 EntGetSibling( ) - Get Sibling Node on page 202 EntQueryEx( ) - Query Information on page 241 EntIsEntityParent( ) - Check if an Entity is a Parent on page 205 EntSelect( ) - Select a Table for Use on page 252 and EntSelectAdd( ) - Select an Additional Table for Use on page 254 EntEntityAsk( ) - Select Entity on page 162 EntEntityListAsk( ) - Select Entity List on page 163 EntPerAsk( ) - Select Period on page 239 EntQueryEx( ) - Query Information on page 241 EntQueryEx( ) - Query Information on page 241 EntQueryEx( ) - Query Information on page 241 EntQryRptFreq( ) - Query Reporting Frequency on page 240 EntQueryEx( ) - Query Information on page 241 EntQueryEx( ) - Query Information on page 241 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 SE behavior 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 page 297. Alternatively, you can replace the obsolete functions in this list with new Hyp...( ) functions. For more information, see Replacing Obsolete Functions with New Hyp...( ) Functions on page 284.

288 Converting from Hyperion Enterprise SE

Note: You should allocate a larger buffer for EntFreqAsk( ) for the returned frequency name

than for HypFreqAsk( ), although it is not likely that your application actually uses larger frequency names. The buffer should be 2(SIZENAME+1) for EntFreqAsk( ) rather than 2(OLDSIZENAME+1).

Upgrading Functions
When you replace obsolete functions, you must adjust your code for differences in the Hyperion Enterprise Release API. The following functions might need to be adjusted when you replace them:
l

HypLock( ) and HypUnLock( ) For more information, see Upgrade HypLock( ) and HypUnLock( ) on page 289. HypFind( ) For more information, see Upgrade HypFind( ) on page 289. HypQuery( ) For more information, see Upgrade HypQuery( ) on page 290. HypQuerySig( ) For more information, see Upgrade HypQuerySig( ) on page 293. HypQryNode( ) For more information, see Upgrade HypQryNode( ) on page 294. 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 the new function EntAcctSplit( ). For more information, see Replacing Split 32-bit Account and Entity 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 tables individually. This locks all of the tables associated with the specified table, as in Hyperion Enterprise 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 the Books table.

Upgrade HypFind( )
When you replace calls to HypFind( ) with calls to HypFindEx( ) or EntFind( ), check whether you use HypFind( ) to find the frequency in the ID_FREQUENCY table. Hyperion Enterprise frequencies 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 that you pass it. For example, if you pass it frequency M or frequency M.PER, it returns the signature for frequency M in either case. In Hyperion Enterprise, the entire string is used. For example, if you 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 table ID_ICSET, not ID_INTCODET. For more information, see Changes to the Intercompany Detail 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 the following differences:
l

Many query attributes that are valid in Hyperion Enterprise SE do not exist in Hyperion Enterprise. For more information see Obsolete Query Attributes on page 290. Many query attributes return information of a different size (type) in Hyperion Enterprise than in Hyperion Enterprise SE. For more information see Upgrade HypQuery( ) on page 290. In Hyperion Enterprise SE, it is possible to pass a length of zero to HypQuery( ) for the size of the return buffer for many queries. This works because the Hyperion Enterprise SE API assumes that the buffer is the correct size and does not check the length argument, especially for short integers. Hyperion Enterprise returns an error message, so you must pass the length in all cases.

Obsolete Query Attributes


Table 50 lists obsolete query attributes and what you should use to replace them. The obsolete query attributes do not work with HypQueryEx( ) or EntQueryEx( ).
Table 50

Obsolete Query Attributes Obsolete Query Attribute CAT_DISPLAYPER ACCT_GROUP ACCT_LEVEL QRYFIRST All in table All in table All in table All in table New Query Attribute Query attribute was never functional. GRPACCT_CHARTORDER Not applicable because accounts do not have levels. GRPACCT_CHARTORDER For more information, see Changes to the Intercompany Detail Table on page 298. For more information, see Changes to the Rollovers Table on page 300. For more informations, see Obsolete Security Tables on page 302. For more information, see Obsolete Security Tables on page 302.

Table ID_CATEGORY ID_GROUP ID_GROUP ID_GROUP ID_INTCODET ID_ROLLOVER ID_SECCATTAB ID_SECCATDET

290 Converting from Hyperion Enterprise SE

Table ID_SECNAMETAB ID_SECNAMEDET ID_SECHYPTAB ID_SECHYPDET ID_SECGRPTAB ID_SECUSERTAB

Obsolete Query Attribute All in table All in table All in table All in table All in table USERTAB_GROUP USERTAB_PASSWORD USERTAB_USERID

New Query Attribute For more information, see Obsolete Security Tables on page 302. For more information, see Obsolete Security Tables on page 302. For more informations, see Obsolete Security Tables on page 302. For more informations, see Obsolete Security Tables on page 302. For more information, see Changes to the Security Group Table on page 306. For more information, see Changes to the Security Users Table on page 306.

ID_SUBACCT (obsolete table name - ID_ SUBACCTHDR) ID_SUBACCT (obsolete table name - ID_ SUBACCTHDR) ID_SUBACCTDETAIL (obsolete table name - ID_SUBACCTDET) ID_SUBACCTDETAIL (obsolete table name - ID_SUBACCTDET) ID_SUBNAME

SUBTABLE_LEVEL

Not applicable. Subaccounts do not have levels.

SUBTABLE_MULTILEVEL

Not applicable. All sub-tables are potentially multilevel.

SIGNATURE QRYFIRST ELIMINATIONS INTERCOMPANY SUB-NAME

Not applicable. The signature of the detail record is the subaccount signature. SUBTABLE_FIRSTDETAIL for table ID_SUBACCTHDR. Error.

Upgrade HypQuery( ) Query Sizes


HypQuery( ) compensates for query sizes that have changed. However, the new functions HypQueryEx( ) and EntQueryEx( ) do not compensate for differences in query size. You should update your code to use the new query sizes. The following query attributes are Integers (short in C) in Hyperion Enterprise SE and are all record signatures and long in Hyperion Enterprise. If you pass an Integer to query an item that is an Integer in Hyperion Enterprise SE but is long in Hyperion Enterprise, the underlying Hyperion Enterprise API generates an error message.
l

ACCT_GROUP ACCT_SUBACCT_TABLE BOTTOMLIST

Upgrading Functions 291

CAT_FREQ CAT_PRIORSIG CHARTMETHOD COUNT CURRENCY QRYFIRST QRYNEXT REPORT_ID REPSET_ID ROLLOVER_CAT1 (ROLL_SRCCAT) ROLLOVER_CAT2 (ROLL_DESTCAT) SUBACCT_TABLE TOPLIST

The following query attributes are Integers (short in C) in Hyperion Enterprise SE and are one character (Byte). The Hyperion Enterprise API does not set or clear the upper byte if passed an Integer for a Byte field, so you might get unexpected results.
l

ACCT_IS_BALANCE ACCT_IS_INTERCO ACCT_SUBACCT_TYPE AUTORECALC CAT_FLOWYTD INTERCOMPANY JOURNALS LIST_DIRECTION SCALESCHED_BOLD

Although the following query attributes also retrieve only one byte now, Hyperion Enterprise extends it to two bytes if wLen = 2.
l

ACCT_IS_CONSOLIDATE ACCT_IS_CURRENCY ACCT_IS_SCALE ALLPERIODS CAT_SCALE SCHED_ITALIC SHOW_LOGIC SUBACCT_TYPE

292 Converting from Hyperion Enterprise SE

SUBTABLE_IS_INTERCO SUPPNODATA USELABEL

You can pass a length of zero to HypQuery( ) for the size of the return buffer for many queries in Hyperion Enterprise SE. This is not applicable in Hyperion Enterprise. The system returns an error message. Query attribute CODE retrieves a string in Hyperion Enterprise SE. The functions HypQueryEx( ) and EntQueryEx( ) retrieve the signature of a code in Hyperion Enterprise. If you 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 for attributes 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 length when 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 Equivalent The NAME attribute returns the ID of the major account only. Use the ACCT_ FULLNAME attribute to get the full account ID. Accounts do not have levels. The ACCT_LEVEL query attribute for the accounts table (ID_ACCOUNTS) is not applicable and returns an error code. The following query attributes are record signatures and retrieve a Long (SIGNA in C) value:
l l l l l

Hyperion Enterprise SE Query Attribute The NAME attribute returns the full account ID. The ACCT_LEVEL query attribute is valid for the Accounts table (ID_ACCOUNTS). The following query attributes retrieve an Integer (short in C) value:
l l l l l

ACCT_GROUP ACCT_SUBACCT_TABLE CHARTMETHOD CURRENCY SUB-NAME

ACCT_GROUP ACCT_SUBACCT_TABLE CHARTMETHOD CURRENCY SUB-NAME

Upgrading Functions 293

Hyperion Enterprise SE Query Attribute The following query attributes retrieve an Integer (short in C) value:
l l l l l l l l l

Hyperion Enterprise Equivalent The following query attributes retrieve a byte.


l

ACCT_IS_BALANCE ACCT_IS_CONSOLIDATE* ACCT_IS_CURRENCY* ACCT_IS_INTERCO ACCT_IS_SCALE* ACCT_SUBACCT_TYPE INTERCOMPANY JOURNALS SCALE

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 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 NAME of the code.

The query attribute CODE retrieves a string.

Although these retrieve only one byte in Hyperion Enterprise, the system retrieves two bytes if wLen = 2.

Upgrade HypQryNode( )
Instead of calling HypQryNode( ), you can call HypQueryEx( ) or EntQueryEx( ). Table 52 lists the Hyperion Enterprise equivalents for Hyperion Enterprise SE HypQryNode( ) query attributes.
Table 52

Upgrading HypQryNode( ) Query Attributes Hyperion Enterprise Equivalent Not applicable. Use table ID_NODES, attribute NODEBYPER_CONLOGIC. Not applicable. Use table ID_NODES, attribute NODEBYPER_PCTOWNED. Use the new Nodes table, ID_NODES, when you call HypQueryEx( ) or EntQueryEx( ). These query 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 entity signature to query the Entities table (ID_NAMES) using the desired query attribute.

Hyperon Hyperion Enterprise SE Query Attribute ACQUIRED CONSMETHOD DISPOSED PCTOWNED ADDFLAG HIDEDEPS CHARTMETHOD CODE CURRENCY DESCRIPTION ELIMINATIONS INTERCOMPANY JOURNALS NAME NAMEID NAMESIG PARENT SCALE SUB-NAME

294 Converting from Hyperion Enterprise SE

Upgrade HypQryNode( ) Query Sizes


The 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 Hyperion Enterprise equivalents.
Table 53

Upgrading HypQryNode( ) Query Sizes Hyperion Enterprise Query Size The following query attributes retrieve a Long (SIGNA in C). HypQryNode( ) truncates the value to an Integer (short in C), as in Hyperion Enterprise SE. To be fully functional in Hyperion Enterprise, you must use HypQueryEx( ) or EntQueryEx( ).
l l l

Hyperion Enterprise SE Query Size The following query attributes retrieve an Integer (short in C) value:
l l l

CHARTMETHOD CURRENCY SUB-NAME

CHARTMETHOD CURRENCY SUB-NAME

The following query attributes retrieve an Integer (short in C) value:


l l l l l

The following query attributes retrieve a Byte:


l

ELIMINATIONS* HIDEDEPS* INTERCOMPANY JOURNALS SCALE

ELIMINATIONS*
l

HIDEDEPS*
l

INTERCOMPANY
l

JOURNALS
l

SCALE 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 NAME of the code.

The query attribute CODE retrieves a string.

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( ) with HypQueryEx( ) or EntQueryEx( ). Use the tables ID_ACCTLISTENTRY or ID_NAMELISTENTRY. If query attributes are a different size in Hyperion Enterprise than in Hyperion Enterprise SE, HypQryAcctListEntry( ) and HypQryNameListEntry( ) compensate for these changes. You must use an argument of the correct length when using HypQueryEx( ) or EntQueryEx( ). Table 54 lists the Hyperion Enterprise SE query attributes for HypQryAcctListEntry( ) and HypQryNameListEntry( ) and their Hyperion Enterprise equivalents.
Table 54

Upgrading HypQryAcctListEntry( ) and HypQryNameListEntry( ) Query Attributes Hyperion Enterprise Equivalent The following query attributes retrieve a Long (SIGNA in C):
l

Hyperion Enterprise SE Query Attributes The following query attributes retrieve an Integer (short in C) value:
l

NUM_CHART

NUM_CHART

Upgrading Functions 295

Hyperion Enterprise SE Query Attributes


l

Hyperion Enterprise Equivalent


l

NUM_CONSOL NUM_CURRENCY NUM_GROUPS NUM_NAME NUM_ORGS NUM_SUBNAMES NUM_SUBSTRUCTS NUM_TABLES QRYFIRST QRYNEXT

NUM_CONSOL NUM_CURRENCY NUM_GROUPS NUM_NAME NUM_ORGS NUM_SUBNAMES NUM_SUBSTRUCTS NUM_TABLES QRYFIRST QRYNEXT

l l l l

l l l l

The following query attributes retrieve an Integer (short in C) value:


l l l l l l l l l l l l l l l

The following query attributes retrieve a Byte:


l l l l l l l l l l l l l l l

ALL_DEPS BASE_NAMES CALC_ACCT* ELIM_NAMES IMMED_DEPS INPUT_ACCT* INTCO_NAMES JOURNAL_NAMES MULTI_ACCT* PARENT_NAMES SHOW_DETAIL* SINGLE_ACCT* SUBNAMES SUB_MULT* SUB_SINGLE*

_DEPS BASE_NAMES CALC_ACCT* ELIM_NAMES IMMED_DEPS INPUT_ACCT* INTCO_NAMES JOURNAL_NAMES MULTI_ACCT* PARENT_NAMES SHOW_DETAIL* SINGLE_ACCT* SUBNAMES SUB_MULT* SUB_SINGLE*

The following query attributes retrieve an array of Integers (array of shorts in C) value:
l l l l l l

The following query attributes retrieve an array of Longs (array of SIGNAs in C):
l l l l l l

CHART_DATA CONSOL_DATA ORG_DATA SUBNAME_DATA TABLE_DATA SUBSTRUCT_DATA

CHART_DATA CONSOL_DATA ORG_DATA SUBNAME_DATA TABLE_DATA SUBSTRUCT_DATA

Query attribute CODE in table ID_NAMELISTENTRY retrieves the userdefined 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 Query attribute LEVELS in table ID_ACCTLISTENTRY

Hyperion Enterprise Equivalent Not applicable. You can filter dynamic account lists by code instead.

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 the codes associated with an entity list:
l

Query the Entity List table for query attribute NUM_CODES to get the number of codes associated with the entity list. The number retrieved is a long integer. Allocate a buffer large enough to hold an array of that many signatures (Long in Visual Basic, SIGNA in C). Query the Entity List table for query attribute CODE_DATA, passing it the address of the buffer. It will fill the buffer with an array of code signatures. You can get the ID of each code by querying the new Codes table, ID_CODES, for the NAME of the code, passing it the signature of the code.

Replacing Split 32-bit Account and Entity Signatures


In Hyperion Enterprise SE, it is possible to split the 32-bit account signature to extract the signatures of the major accounts and subaccounts. Similarly, it is possible to split the 32-bit entity signature to extract the sub-entity signature. To get the major account and sub-account signatures in Hyperion Enterprise, use EntAcctSplit( ). To get the sub-entity signature in Hyperion Enterprise, call HypQueryEx( ) to query the entity table (ID_NAME) for attribute SUB-NAME.

Changes to Hyperion Enterprise Tables


When you replace obsolete functions with the new Hyp...( ) or Ent...( ) functions, you must adjust your code for changes to the Hyperion Enterprise tables. The following tables have changed from Hyperion Enterprise SE:
l

Intercompany Detail Table (ID_INTCODET) Nodes Table (ID_NODES) Rollovers Table (ID_ROLLOVER) Security Group Table (ID_SECGRPTAB) Security User Table (ID_SECUSERTAB)

Renamed Tables
The table IDs for the tables shown in Table 55 have been renamed. The values of these tables have not been changed.
Changes to Hyperion Enterprise Tables 297

Table 55

Renamed Tables Hyperion Enterprise SE ID_SUBACCT ID_SUBACCTDETAIL ID_SETS ID_REPSETS Hyperion Enterprise ID_SUBACCTHDR ID_SUBACCTDET ID_REPORT_SETS ID_REPORT_ENTRIES

Table Name Subaccount Header Subaccount Detail Report Sets Report Entries

Changes to the Intercompany Detail Table


The Intercompany Detail table, ID_INTCODET, has been split into two tables in Hyperion Enterprise: ID_ICSET and ID_INTCODET. The new table ID_ICSET contains the intercompany matching sets. Each record in this table has the set name and other information that applies to the whole set (such as the plug account). The Intercompany 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 Table


When you upgrade HypEnum( ) to HypEnumEx( ) or EntEnum(), you should continue to use table ID_INTCODET. Just as in Hyperion Enterprise SE, you can pass the signature of the group header record (now in table ID_ICSET) to enumerate the detail records in that set only, or you can pass NONE to enumerate the detail records in all sets. Additionally, you can now enumerate just the sets by calling HypEnumEx( ) or EntEnum( ) for table ID_ICSET.

Upgrade HypLock( ) and HypUnLock( ) for the Intercompany Table


When you replace HypLock( ) and HypUnLock( ) with HypLockEx( ) and HypUnLockEx( ), or EntSelect( ), EntSelectAdd( ), and EntUnSelect( ), use table ID_ICSET and an OR operation with the ID_ASSOC constant. This selects both tables.

Upgrade HypQuery( ) for the Intercompany Table


When you upgrade HypQuery( ) to HypQueryEx( ) or EntQueryEx( ), some of the information you might be trying to get is in the group header record in table ID_ICSET, and some is in the detail record in table ID_INTCODET. You can use HypFindEx( ) or EntFind( ) to get the signature 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 Hyperion Enterprise 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 Table ID ID_ICSET ID_ICSET ID_INTCODET ID_INTCODET Any table Hyperion Enterprise Query Attribute NAME INTCO_PLUGSIG INTCO_ACCTSIG1 INTCO_ACCTSIG2 QRYFIRST QRYNEXT

Hyperion Enterprise SE Query Attribute INTCO_GROUP_NAME INTCO_PLUG INTCO_ACCT1 INTCO_ACCT2 QRYFIRST, QRYNEXT

Although the obsolete functions emulate the behavior of Hyperion Enterprise SE, the emulation is not perfect. If you continue to use the obsolete HypQuery( ) function, you must use the signature returned from the obsolete HypFind( ) function to query information that is now in table 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 Table


In 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 records are in separate tables. To retrieve the first detail record in a set, call HypQueryEx( ) or EntQueryEx( ) using table ID_ICSET, the signature of the group header record for the set, and query attribute INTCO_GROUPSIG. This retrieves the signature of the first detail record for the set, in table ID_INTCODET. To retrieve the next detail record in a set, call HypQueryEx( ) or EntQueryEx( ) using table ID_INTCODET, the signature of the current detail record, and query attribute INTCO_NEXTDET. If no more detail records are in the set, the signature retrieved will be NONE. You can also use HypEnumEx( ) or EntEnum( ) to get the signatures of the detail records.

Changes to the Nodes Table


Organization structure information in Hyperion Enterprise is stored in nodes. Table 57 lists the changes in the Nodes table from Hyperion Enterprise SE to Hyperion Enterprise.
Table 57

Changes in the Nodes Table Hyperion Enterprise Node information is stored in a new table, ID_NODES.

Hyperion Enterprise SE Node information is stored in the names table, ID_NAMES.

Changes to Hyperion Enterprise Tables 299

Hyperion Enterprise SE HypFindNameInOrg( ) returns an entity signature. HypEnumOrgNames( ) passes an entity signature to your callback function.

Hyperion Enterprise HypFindNameInOrg( ) returns the node signature. HypEnumOrgNames( ) passes a node signature to your callback function. Your callback function can use the signature to call HypQryNode( ) because HypQryNode( ) expects a node signature. You cannot use the callback function signature to call HypQuerySig( ) or HypQueryEx( ) 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 Table


The Rollovers table, ID_ROLLOVER, has been split into two tables, ID_ROLLOVER and ID_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 each rollover set. Each record contains the source and destination categories.

HypLock( ) and HypUnLock( )


When you upgrade HypLock( ) and HypUnLock( ) to HypLockEx( ) and HypUnLockEx( ), or EntSelect( ), EntSelectAdd( ), and EntUnSelect( ), use table ID_ROLLSET and an OR operation with the ID_ASSOC constant. This selects both tables.

HypEnum( )
When you upgrade HypEnum( ) to HypEnumEx( ) or EntEnum( ), you should continue to use table ID_ROLLOVER. As in Hyperion Enterprise SE, you can pass the signature of the group header record (now in table ID_ROLLSET) to enumerate only the detail records in that rollover set, or you can pass NONE to enumerate the detail records in all rollover sets. Additionally, you can now enumerate just the rollover sets by calling HypEnumEx( ) or EntEnum( ) for the ID_ROLLSET table.

HypFind( )
When you replace calls to HypFind( ) with HypFindEx( ) or Entfind( ) to find the record associated with a group ID, use table ID_ROLLSET rather than ID_ROLLOVER. The rollover IDs are now in table ID_ROLLSET.

HypQuery( )
When you upgrade HypQuery( ) to HypQueryEx( ) or EntQuery(), some of the desired information is in the group header record in table ID_ROLLSET and some is in the detail record in table ID_ROLLOVER.
300 Converting from Hyperion Enterprise SE

You can use HypFindEx() or EntFind() to get the signature of the header record in table ID_ROLLSET. For information on getting the signature of a detail record, see Get the Detail Records for the Rollovers Table on page 301.
Table 58

Upgrading HypQuery( ) Rollovers Table Query Attributes Table ID ID_ROLLOVER ID_ROLLOVER ID_ROLLSET Any table Hyperion Enterprise Query Attribute ROLL_SRCCAT ROLL_DESTCAT NAME QRYFIRST QRYNEXT

Hyperion Enterprise SE Query Attribute ROLLOVER_CAT1 ROLLOVER_CAT2 ROLLOVER_NAME QRYFIRST QRYNEXT

Although the obsolete functions emulate the behavior of Hyperion Enterprise SE, the emulation is not perfect. If you continue to use the obsolete HypQuery( ) function, you have to use the signature returned from obsolete HypFind( ), which is the signature of the group header record in table ID_ROLLSET, to query information that's now in table ID_ROLLSET. You have to use a signature retrieved by the obsolete HypEnum( ) function, which is the signature of a detail record, to query information that is now in table ID_ROLLOVER.
Table 59

Upgrading HypQuery( ) Rollovers Table Query Sizes Release 4 These query attributes now retrieve a Long (SIGNA in C) value.

Release 1.8 or 4SE These query attributes retrieve an Integer (short 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) ROLLOVER_CAT2 (or ROLL_DESTCAT) QRYFIRST QRYNEXT

Get the Detail Records for the Rollovers Table


In Hyperion Enterprise SE, the rollover detail records follow the group header records (the record for the rollover set name) in the Rollovers table. In Hyperion Enterprise, the header record and 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( ) using table ID_ROLLSET, the signature of the group header record for the rollover set, and query attribute ROLL_GROUPSIG. This retrieves the signature of the first detail record for the set, in table ID_ROLLOVER. To retrieve the next detail record in a rollover set, call HypQueryEx( ) or EntQueryEx( ) using table ID_ROLLOVER, the signature of the current detail record, and query attribute ROLL_NEXTDET. If no more detail records are in the set, the signature retrieved will be NONE.

Obsolete Security Tables


Table 60 describes security tables that are obsolete in Hyperion Enterprise. The following security tables do not exist in Hyperion Enterprise.
Table 60

Obsolete Security Tables Description Category access groups Category access details Entity access groups Entity access details Hyperion Enterprise task access groups Hyperion Enterprise task access details

Table ID ID_SECCATTAB ID_SECCATDET ID_SECNAMETAB ID_SECNAMEDET ID_SECHYPTAB ID_SECHYPDET

Obsolete Security Access Group Tables


The obsolete HypEnum( ), HypFind( ), and HypQuery( ) functions treat the obsolete security access group tables (ID_SECCATTAB, ID_SECNAMETAB, and ID_SECHYPTAB) like the Hyperion Enterprise SE security group table (ID_SECGRPTAB). The signature of a group in any of these tables is now the signature of a group in the user table, ID_SECUSERTAB. For more information, 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 table ID_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 of groups in the Security Users table (ID_SECUSERTAB).

Obsolete Security Access Detail Tables


The 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, not just 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 specified category, entity, or task. In this case, the access group signature passed to HypQuery( ) was -1 or NONE. To get current user rights to a category or entity, call HypQueryEx( ) or EntQueryEx( ) to query the Categories or Entities table (ID_CATEGORY or ID_NAMES) using the query attribute USER_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 access code 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 Hyperion Enterprise application handle used for the Advanced Functions, not the Hyperion Enterprise Retrieve application handle from HypConstruct( ). You should call HypGethApp( ) to get the proper hApp& value to use. The obsolete HypLock( ) and HypUnLock( ) functions do not select or deselect the security access detail tables because the tables no longer exist. However, in case your legacy program checked error return codes, HypLock( ) still returns APILOCK_READONLY if the current user has the security rights that are needed to select the table in Hyperion Enterprise SE.

Security Task Codes


Table 61 lists the obsolete constants used for checking a user rights to particular tasks in Hyperion Enterprise SE using the obsolete table ID_SECHYPDET and the corresponding security task constant to use in Hyperion Enterprise.
Table 61

Upgrading Security Task Codes Hyperion Enterprise Security Task SECTASK_CHARTOFACCTSMODULE SECTASK_APPLICATIONMODULE SECTASK_BOOKSMODULE SECTASK_CATEGORYMODULE SECTASK_CONSOLMODULE SECTASK_DATABASEMODULE SECTASK_JOURNALSMODULE SECTASK_FORMULASMODULE Not applicable. SECTASK_ENTITIESMODULE SECTASK_REPORTSMODULE SECTASK_ROLLOVERSETADMIN

Hyperion Enterprise SE Security Task HYPACC_ACCOUNTS HYPACC_APPLICATION HYPACC_BOOKS HYPACC_CATEGORY HYPACC_CONSOLIDATION HYPACC_DATABASE HYPACC_JOURNALS HYPACC_LOGIC HYPACC_MAIL HYPACC_NAMES HYPACC_REPORTS HYPACC_ROLLOVERS

Changes to Hyperion Enterprise Tables 303

Hyperion Enterprise SE Security Task HYPACC_SCHEDULES HYPACC_SECURITY HYPACC_SYSTEMS HYPACC_COA HYPACC_SUBACCTAB HYPACC_ACCTCVTTAB HYPACC_ACCTLIST HYPACC_INTERCOMATCH HYPACC_NEWAPPS HYPACC_EDITAPPS HYPACC_BOOKEDITOR HYPACC_BOOKCOMPILE HYPACC_BOOKRUN HYPACC_RUNINTERCO HYPACC_DATAENTRY HYPACC_LOADDATA HYPACC_EXTRACTDATA HYPACC_UNLOCKDATA HYPACC_DEFINEFORMAT HYPACC_JOURCREATE HYPACC_JOURPOST HYPACC_JOUREDITPOST HYPACC_JOURREVERSE HYPACC_JOURUNPOST HYPACC_JOURPRINT HYPACC_LOGICADM HYPACC_MAILADM HYPACC_NORGS

Hyperion Enterprise Security Task SECTASK_SCHEDULESMODULE SECTASK_SECURITY Not applicable. SECTASK_CHARTOFACCTSSETUP SECTASK_SUBACCTTBLADMIN SECTASK_ACCTCNVADMIN SECTASK_ACCTLISTADMIN SECTASK_INTERCOADMIN SECTASK_NEWAPPS SECTASK_APPLICATIONADMIN SECTASK_REPORTSCRIPTEDIT SECTASK_REPORTSCRIPTEDIT SECTASK_RUNBOOKS SECTASK_RUNINTERCO SECTASK_SCHEDDATAENTRY SECTASK_LOADDATA SECTASK_EXTRACTDATA SECTASK_UNLOCKDATA SECTASK_DATABASEADMIN SECTASK_JOURADMIN SECTASK_POSTJOUR SECTASK_EDITJOUR SECTASK_REVERSEJOUR SECTASK_UNPOSTJOUR SECTASK_JOURREPORTS SECTASK_METHODADMIN Not applicable. SECTASK_ORGADMIN

304 Converting from Hyperion Enterprise SE

Hyperion Enterprise SE Security Task HYPACC_NSUBSTRUCT HYPACC_NCURRENCIES HYPACC_NCONVTAB HYPACC_NAMELIST HYPACC_RSETMANAGER HYPACC_RIMPORT HYPACC_REDITOR HYPACC_RCOMPILE HYPACC_RRUN HYPACC_ROLLRUN HYPACC_SDATAENTRY HYPACC_SDEFINESCHED HYPACC_SECURITYADM HYPACC_SYSLOAD HYPACC_SYSEXTRACT HYPACC_BOOKDEFINE HYPACC_DEFROLLOVER HYPACC_EDITDATA HYPACC_LOCKDATA HYPACC_OPEN HYPACC_DEFREPORTS HYPACC_CATADM HYPACC_CONSOL HYPACC_EXTRACTOLOCK HYPACC_JOURREVIEW HYPACC_JOURALLOWSS HYPACC_JOURALLOWUBWN HYPACC_DATAJOURLOCK

Hyperion Enterprise Security Task SECTASK_SUBSTRADMIN SECTASK_CURRENCYADMIN SECTASK_ENTITYCNVADMIN SECTASK_ENTITYLISTADMIN SECTASK_REPORTADMIN SECTASK_REPORTSCRIPTEDIT SECTASK_REPORTSCRIPTEDIT SECTASK_REPORTSCRIPTEDIT SECTASK_RUNREPORTS SECTASK_ROLLRUN SECTASK_SCHEDDATAENTRY SECTASK_SCHEDADMIN SECTASK_SECURITY SECTASK_LOADAPP SECTASK_EXTRACTAPP SECTASK_REPORTSCRIPTEDIT SECTASK_ROLLOVERSETADMIN SECTASK_SCHEDDATAENTRY SECTASK_LOCKDATA SECTASK_OPENPERIOD SECTASK_REPORTSCRIPTEDIT SECTASK_CATADMIN SECTASK_CONSOL_ALL SECTASK_EXTRACTDATA SECTASK_REVIEWJOUR SECTASK_UNBALANCEDJOUR SECTASK_BALANCEINENTITY SECTASK_DATAJOURLOCK

Changes to Hyperion Enterprise Tables 305

Hyperion Enterprise SE Security Task HYPACC_DATAJOURUNLOCK HYPACC_GRW

Hyperion Enterprise Security Task SECTASK_DATAJOURUNLOCK SECTASK_REPORTSCRIPTEDIT

Changes to the Security Group Table


Table 62 lists the changes in the Security Group table (ID_SECGRPTAB) from Hyperion Enterprise SE to Hyperion Enterprise.
Table 62

Changes in the Security Group Table Hyperion Enterprise Security groups are in the Security Users table, ID_SECUSERTAB. Note: When upgrading HypEnum( ), HypFind( ), and HypQuery( ), use ID_ SECUSERTAB instead of ID_SECGRPTAB. The access groups and the query attributes GRPTAB_CAT, GRPTAB_NAME, and GRPTAB_HYPE do not exist in Hyperion Enterprise.

Hyperion Enterprise SE Security groups are in the security group table, ID_ SECGRPTAB.

Each security group is assigned a category access, name access, and Hyperion Enterprise task access group. Query attributes GRPTAB_NAME, GRPTAB_CAT, and GRPTAB_ HYPE retrieve these groups. HypEnum( ) enumerates only groups.

You cannot use HypEnumEx( ). Instead, call EntEnum( ) with table ID_ SECUSERTAB.

Changes to the Security Users Table


Table 63 lists the changes in the Security Users table from Hyperion Enterprise SE to Hyperion Enterprise.
Table 63

Changes in the Security Users Table Hyperion Enterprise The user table contains both users and security groups. You cannot use HypEnumEx( ). Call EntEnum( ) with an apiStruct. Use SECUSER_PASSWORD to get the password and SHORTNAME to get the user ID.

Hyperion Enterprise SE The Security users table, ID_SECUSERTAB, contains only users. HypEnum( ) enumerates only users. You use HypQuery( ) with query attributes USERTAB_PASSWORD and USERTAB_USERID to get the password and the user ID. The USERTAB_GROUP query returns the user's security group. The COUNT query attribute retrieves the number of users in the table.

A user can belong to more than one group, so query attribute USERTAB_GROUP does not exist in Hyperion Enterprise. Use the Security Group table, ID_SECGRPTAB, to enumerate the groups to which a user belongs. COUNT retrieves the total number of users and security groups in the Security Users table. To get the number of users, use the new query attribute SECUSER_NUM_GROUPS to retrieve the number of groups in the table, then subtract this number from the total retrieved from COUNT.

306 Converting from Hyperion Enterprise SE

6
In This Chapter

Callback Functions

Callback Functions Overview............................................................................ 307 Callback Function Syntax................................................................................ 308

This chapter provides information about using callback functions, hich are required by enumeration functions. It includes the following topics:

Callback Functions Overview


All data enumeration functions require a user-provided callback function. The enumeration function calls the callback function for each item enumerated. You use the callback function to do whatever processing you wish to do for each item enumerated. Additionally, some advanced functions use a callback function to provide status information during 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 CALLBACKAPP (or CALLBACK6) CALLBACKSTR DWCALLBACK

Here are the callback functions you should use for the Ent...( ) data enumeration functions and any other advanced functions that use callbacks:
l

CALLBACKAPI CALLBACKAPP (or CALLBACK6) CALLBACKCREATE CALLBACKDBENUM CALLBACKDBLOAD CALLBACKJOUREXTRACT CALLBACKJOURLOAD

Callback Functions Overview 307

CALLBACKLOGIC CALLBACKSECLOAD CALLBACKSEL CALLBACKSHARES CALLBACKUSERS CALLBACKVB CALLBACKVBNET

Most callback functions should typically return 0 (zero). They can return any non-zero value to abort enumeration or other operation. A non-zero value will be passed back as the return code from the API function.

Callback Function Syntax


The following topics provide the syntax for individual callback functions.

CALLBACK12
This 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 As Long, ByVal lParam As Long) As Integer
Variable Description MyFunc The name of your callback function hRApp sigList The Retrieve application handle 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 account if 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 call HypQueryEx( ) 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 0 Non-zero

Meaning Continue the operation Cancel the operation

Use this format for C: short WINAPI MyFunc(HRETRIEVEAPP hRApp, SIGNA sigList, SIGNA sigEntry, LONG lParam)

CALLBACKAPI
This 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( ) - Run Rollover 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 lParam apiS NONE, or the key of a related table. For more information, see the Related Tables on page 363. User-defined data An apiStruct stucture

Return Codes:
Code 0 Non-zero Meaning Continue the operation 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( ) or HypEnumApplications( ). 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 lParam The address of a C-style string that is the application name User-defined data

Return Codes:
Code 0 Non-zero Meaning Continue the operation Cancel the operation

Use this format for C: short WINAPI MyFunc(LPSTR szApp, LONG lParam)

CALLBACKCREATE
This callback function is called by EntCreateApplication( ) at the appropriate time for you to set the application defaults for the new application. EntCreateApplication( ) passes this callback function the application handle (hAppl) for the new application so you can call EntUpdateDefault( ) to set the application defaults. The application is not fully created or initialized, so do not use this hApp to do much else within the callback function. Call EntUpdateDefault( ) using table ID_APPDEFAULT. For detailed information about query attributes for this table, see the ID_APPDEFAULT (Application Defaults Table) Query Attributes on page 372. To set attributes in your callback function, run the New Application wizard in Hyperion Enterprise to see what information is required. You must set all the information for which the wizard asks. Do not set any information for which the wizard does not ask, such as the compressed files option. When Hyperion Enterprise creates an application, it uses the callback function to set the following attributes, and your callback function should probably do likewise: APP_EXPECTED_ACCTS APP_EXPECTED_ENTITIES APP_EXPECTED_CATS APP_EXPECTED_REPORTS APP_DESC APP_DEVERASELOG APP_IS_ORGBYPER APP_JOUR_AUTONUMBER APP_STORECONDETAIL APP_STORETRANDETAIL APP_USETURBO APP_JOUR_TOPLEVEL APP_IMPACTFUTURECAT APP_SUBACCTSIG APP_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 following attributes: APP_PATH APP_DATADIR APP_INBOXDIR APP_OUTBOXDIR APP_REPORTDIR For SQL applications, the callback function in Hyperion Enterprise also sets the following attributes: APP_PATH APP_INBOXDIR APP_OUTBOXDIR APP_REPORTDIR APP_SQL_SERVER APP_SQL_DBNAME APP_ORA_LRG_TBLSPACE APP_ORA_IDX_TBLSPACE APP_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 lParam The application handle User-defined data

Return Codes:
Code 1 0 Meaning True. Continue the operation. 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. The account enumeration function is called multiple times by EntDataExtract( ). You supply the lKey argument. EntDataExtract( ) provides fnCallback and lParam for its own use. Use this format for C: SHORT WINAPI MyFunc (LPARAM lKey, CALLBACKAPI fnCallback, LPARAM lParam);
Variable MyFunc Description The ID of your callback function

Callback Function Syntax 311

Variable lKey

Description 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) and apiStruct (NULL) are not used by fnCallback function of EntDataExtract( ). The fnCallback function returns 0 (zero) if ok, non-zero if you should abort the enumeration. Return Codes:
Code 0 Non-zero Meaning Successful Cancel the operation. Not yet implemented.

CALLBACKDBLOAD - For EntAppExtract( )


This callback function is used for status information while extracting an application. For more information, see EntAppExtract( ) - Extract Application on page 129 and EntAppExtractVB( ) - Extract Application on page 130. Use this format: Public Function MyFunc(ByVal addressofFileNameCString As Long, ByVal addressofMessageCString As Long, ByVal szEntity As Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lTotal AsLong, ByVal lCurrent As Long, ByVal lParam As Long) As Integer
Variable MyFunc Description The ID of your callback function

addressofFileNameCString Name of extract file addressofMessageCString Status text szEntity lStart lEnd lTotal lCurrent Unused Unuse Unused Unused Unused

312 Callback Functions

Variable lParam

Description The argument that you supplied for the callback function

Return Codes:
Code 0 Non-zero Meaning Continue the operation. Cancel the operation. (Not implemented.)

Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR addressofMessageCString, LPCSTR szEntity, 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 more information, see EntAppLoad( ) - Load Application on page 132 and EntAppLoadVB( ) Load Application on page 133. Use this format: Public Function MyFunc (ByVal addressofFileNameCString As Long, ByVal addressofMessageCString As Long, ByVal szEntity As Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lTotal As Long, ByVal lCurrent As Long, ByVal lParam As Long) As Integer;
Variable MyFunc Description The ID of your callback function

addressofFileNameCString Name of load file addressofMessageCString Status text szEntity lStart lEnd lTotal lCurrent lParam Unused Unused Unused Size of load file. (in bytes) Current position in load file The argument you supplied for the callback function

Return Codes:
Callback Function Syntax 313

Code 0 Non-zero

Meaning Continue the operation. 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 more information, see EntDataExtract( ) - Extract Data on page 146. Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szCategory, LPCSTR szEntity, long lStart, long lEnd, long lTotal, long lCurrent, long lParam);
Variable MyFunc Description The ID of your callback function

szFileName Name of extract file szCategory Category being extracted szEntity lStart lEnd lTotal lCurrent lParam Entity being extracted First period (1-based) Last period (1-based) Total number of accounts selected to extract Number of accounts extracted The argument you supplied for the callback function

Return Codes:
Code 0 True Meaning Continue the operation. 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, long lStart, long lEnd, long lTotal, long lCur, long lParam);

Variable MyFunc

Description The ID of your callback function

szFileName Name of load file szCategory Category being loaded szEntity lStart lEnd lTotal lCur lParam Entity being loaded First period (1-based) Last period (1-based) Total number of lines in load file Number of lines processed so far The argument that you supplied for the callback function

CALLBACKJOUREXTRACT
This callback function is used for status information in a journal extract. For more information, see EntJournalExtract( ) - Extract Journal on page 208 and EntJournalExtractVB( ) - Extract Journal on page 210. Use the format: Public Function MyFunc(ByVal addressofFileNameCString As Long, ByVal addressofNameCString As Long, lTotal As Long, lCurrent As Long, lParam As Long) As Integer

Variable MyFunc

Description The name of your callback function

addressofFileNameCString The name of the extract file addressofNameCString lTotal lCurrent lParam The name of journal being extracted Not used. Not used. The argument you supplied for the callback function

Return Codes:

Callback Function Syntax 315

Code 0 TRUE

Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szName, long lTotal, long lCurrent, long lParam)

CALLBACKJOURLOAD
This 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, ByVal addressofNameCString As Long, lTotal As Long, lCurrent As Long, lParam As Long) As Integer
Variable MyFunc Description The name of your callback function

addressofFileNameCString The name of the load file addressofNameCString lTotal lCurrent lParam The name of journal being loaded The size of the load file. This argument is used to calculate the position for a meter bar control. The current position in the load file. This argument is used to calculate the position for a meter bar control. The argument that you supplied for the callback function

Return Codes:
Code 0 TRUE Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szName, long lTotal, long lCurrent, long lParam)

CALLBACKLOGIC
This callback function is used for status information when exporting or importing logic. For more 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, ByVal addressOfMethodCString As Long, ByVal lTotal As Long, ByVal lCurrent As Long, ByVal lParam As Long) As Integer
Variable MyFunc Description The name of your callback function

addressofFileNameCString The name of the file being imported or exported addressOfMethodCString lTotal lCurrent lParam The name of the method being imported or exported The total number of files. Not used for logic export. This argument is used to calculate the position for a meter bar control. The number of files imported so far. Not used for logic export. This argument is used to calculate the position for a meter bar control. The argument you supplied for the callback function

Return Codes:
Code 0 TRUE Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szMethod, long ITotal, long ICurrent, long lParam)

CALLBACKSECLOAD
This callback function is used for status information in a security load or extract. For more information on security extract, see EntSecurityExtract( ) - Extract Security on page 246. For more information about security load, see EntSecurityLoad( ) - Load Security on page 249. Use this format: Public Function MyFunc(ByVal addressOfFileNameCString As Long, ByVal addressOfTaskCString As Long, ByVal lCurrent As Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lParam As Long) As Integer
Variable MyFunc Description The name of your callback function

Callback Function Syntax 317

Variable

Description

addressOfFileNameCString The name of the file being loaded or extracted addressOfTaskCString lCurrent lStart lEnd lParam The task being processed The current position. For a load, this is the position in the load file. For an extract, this is the task number. The start position in the load or extract file (0) The total size of the load file, or the the total number of tasks being extracted 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 0 TRUE Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szTask, long lCurrent, long lStart, long lEnd, long lParam)

CALLBACKSEL
This callback function is called for changes to the selected tables. Related Functions: EntAppLoad( ) - Load Application on page 132 EntAppLoadVB( ) - Load Application on page 133 EntAppendToCBChain( ) - Append to Callback Chain on page 128 EntDeleteFromCBChain( ) - Delete from Callback Chain on page 154 EntSelect( ) - Select a Table for Use on page 252 EntSelectAdd( ) - Select an Additional Table for Use on page 254 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 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 wTabId The table ID of the table that changed

318 Callback Functions

Variable Description sigKey lParam apiS NONE, or the key of a related table. For more information, see the Related Tables on page 363. User-defined data NULL pointer unless wTabId = ID_DATAFILE. In this case, it will be an apiStruct structure with the sigParent, wType, sigName, and sigCat 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 more of the callback functions associated with the hSelect for this change. Return Codes:
Code 0 Non-zero Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc (HSELECT hSelect, short wTabld, SIGNA sigKey, LONG IParam, LPAPISTRUCT pApiS)

CALLBACKSHARES
This callback function is used for status information when loading shares. For more information about 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, ByVal addressofEntityCString As Long, ByVal lSize As Long, ByVal lPos As Long, ByVal lParam As Long) As Integer

Variable MyFunc

Description The ID of your callback function

addressofFileNameCString Name of load or extract file addressofEntityCString lSize lPos lParam Number of records processed in the load file; empty string ("") on completion Size of the load file (bytes) Current position in load file (number of bytes) 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, addressofFileNameCString and addressofEntityCString, to Visual Basic strings, see EntVBGetCStrLen( ) - Get Length of Cstring on page 275. Use this format for C: short WINAPI MyFunc(LPCSTR szFileName, LPCSTR szEntity, long lSize, long lPos, long lParam);

CALLBACKSTR
This 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 lAddr The Hyperion Enterprise Retrieve application handle 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 0 Non-zero

Meaning Continue the operation. Cancel the operation.

Use this format for C: Callback Function Syntax on page 308int WINAPI MyFunc(HRETRIEVEAPP hRApp, LPSTR szApp)

CALLBACKUSERS
This callback function is used to enumerate users who are using a particular application. For more information, see EntEnumUsersOnSystem( ) - Enumerate Users on System on page 181. Use this format: Public Function MyFunc(ByVal hApp As Long, UserInfo As Active_User_Info, ByVal lParam As 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 0 Non-zero

Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc (HAPP hApp, LPACTIVE_USER_INFO pUserInfo, LONG lParam)

CALLBACKVB
This callback function is used by both EntDataExtractVB2( ) and EntUNCDataLoadVB( ) to provide status information while the task is executing.
Note: The functions EntVBCopyData ( ) and EntVBGetCStrLen( ) can be used to convert long

callback 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 MyFunc

Description 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 lParam A structure (user-defined record type) containing the rest of the status information. For a description of the fields, see CALLBACKSTRUCT in the TOOLKIT.BAS file. The argument that you supplied

Return Codes:
Callback Function Syntax 321

Code 0 Non-zero

Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc(LPCSTR szFileName, CALLBACKSTRUCT * pArgStruct, LPARAM lParam)

DWCALLBACK
This 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( ) - Enumerate Subaccount Signatures on page 92 Use this format: Public Function MyFunc(ByVal hRApp As Integer, ByVal sigRecd As Long, ByVal lParam As Long) 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 0 Non-zero Meaning Continue the operation. Cancel the operation.

Use this format for C: short WINAPI MyFunc(HRETRIEVEAPP hRApp, SIGNA sigRecd, LONG lParam)

CALLBACKVBNET
This callback function is used for Visual Basic .NET platform to provide status information while the task is executing.
322 Callback Functions

EnumAppsCB
This 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 0 Non-zero Meaning Continue the operation. Cancel the operation.

DataExtractCallback
This 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, addressOfStruct As CALLBACKSTRUCT, ByVal lParam As Long) As Integer
Variable MyFunc Description 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 lParam The address of a CALLBACKSTRUCT type. For a description of the fields, see CALLBACKSTRUCT in the TOOLKIT.VB file. The argument that you supplied

Return Codes:
Code 0 Meaning Continue the operation.

Callback Function Syntax 323

Code Non-zero

Meaning Cancel the operation.

DataLoadCallback
This callback function is used for status information in loading data. Public Delegate Function MyFunc(ByVal szFileName As String, argStruct As CALLBACKSTRUCT, ByVal lParam As Long) As Integer
Variable MyFunc Description 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 lParam The address of a CALLBACKSTRUCT type. For a description of the fields, see CALLBACKSTRUCT in the TOOLKIT.VB file. The argument that you supplied

Return Codes:
Code 0 Non-zero Meaning Continue the operation. Cancel the operation.

EnumSubAcctCB
This callback function is used for enumeration of sub accounts. Public Delegate Function MyFunc(ByVal hSelect As Integer, ByVal sigAcct As Integer, ByVal sigNone 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 0 Non-zero

Meaning Continue the operation. Cancel the operation.

EnumJournalLoadCB
This callback function is used for enumeration of loaded journals Use the format: Public Delegate Function MyFunc(ByVal addressofFileNameCString As String, ByVal addressOfJourNameCString As String, fSize As Long, fPos As Long, lParam As Long) As Integer

Variable MyFunc

Description The name of your callback function

addressofFileNameCString The name of the load file addressOfJourNameCString The name of journal being loaded fSize fPos lParam The size of the load file. The current position in the load file. The argument that you supplied for the callback function

Return Codes:

Code 0 TRUE

Meaning Continue the operation. Cancel the operation.

SecLoadCallBack
This 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, ByVal addressOfTaskCString As String, ByVal lPosAs Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lParam As Long) As Integer

Callback Function Syntax 325

Variable MyFunc

Description The name of your callback function

addressOfFileNameCString The name of the file being loaded. addressOfTaskCString lPos lStart lEnd lParam The task being processed Current position in load file (number of bytes) The start position in the load file. The total size of the load file. The argument that you supplied for the callback function

Return Codes:
Code 0 TRUE Meaning Continue the operation. Cancel the operation.

SecExtrCallBack
This 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, ByVal lPosAs Long, ByVal lStart As Long, ByVal lEnd As Long, ByVal lParam As Long) As Integer
Variable MyFunc Description The name of your callback function

szFileName Name of extract file szTask lPos lStart lEnd lParam A short description of the task. Current position in load file (number of bytes) The start position in the load file. The total size of the load file. The argument that you supplied for the callback function

Return Codes:
326 Callback Functions

Code 0 TRUE

Meaning Continue the operation. Cancel the operation.

JournalEntriesCallBack
This 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, sigKey As Integer, lParam As IntPtr, lpApiStruct As apiStruct) As Integer
Variable MyFunc hSelect sigJour sigKey lParam Description The name of your callback function The handle of the selected tables The signature of the journal The optional key (usually NONE). This is a required key if wTabId is one of the tables listed in Related Tables on page 363. Parameter to be passed back to the user-provided callback function

lpApiStruct NULL. This argument is not used.

Return Codes:
Code 0 TRUE Meaning Continue the operation. Cancel the operation.

Callback Function Syntax 327

328 Callback Functions

7
In This Chapter

Specific Functions for Microsoft Visual Basic.NET

Hyperion Enterprise API's for Microsoft Visual Basic.NET ............................................ 329

This chapter provides general information about the Hyperion Enterprise Application Programing Interface (API) and its use. If you migrate your custom-built code to Visual Basic.Net can use ToolKit.VB to communicate with Hyperion Enterprise API. This chapter describes software prerequisites required to convert Visual Basic to Visual Basic.Net. Each of these Hyperion Enterprise Application Programing Interface (API) is described in detail. Please read through this chapter carefully before converting to Visual Basic.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 Visual

Basic .NET, see the following link: http://msdn.microsoft.com/en-us/vbasic/ ms788236.aspx

Hyperion Enterprise API's for Microsoft Visual Basic.NET


These 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 calling EntDataExtractVB2( ). 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 hSelect pS pS.dwSize pS.cDelim pS.cNeg pS.cScale pS.cView pS.wDecimals pS.wDSMType pS.wExtractFlags pS.wOperation pS.dDataBy pS.bDataFileOpened pS.hProcess pS.lStartPeriod pS.lEndPeriod pS.sigAcctConv pS.sigCat pS.sigName pS.sigNameConv pS.sigParent pS.sigNameList pS.pApiDFA

Description The handle of the selected tables Structure with arguments for the data extract. All fields are required except hProcess. The size of this structure The field delimiter, which typically is a comma( , ) The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ] Scale of the data Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the categorys default view. Number of decimal places to extract Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if not ID_REGULAR Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h) Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE Data to use with wOperation Data file is currently opened (TRUE or FALSE); input and output Process handle returned when executing on server (DBE_REMOTE) The first period to extract (0-based) The last period to extract (0-based) The account conversion table signature The category signature The entity signature. Entity conversion table signature Parent if wDSMType is not ID_REGULAR Entity list The address of an apiStruct set up for enum of entity list (if pS.sigNameList != NONE) and for querying data from datafile (data & status buffers allocated). For more information, see EntEnum( ) and ID_NAMELISTENTRY (Entity List Entries Table) on page 173 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 sigList lpfnCallback lParam The path\name of extract file Signature of an account list; NONE for all accounts Your callback function for status information. For more information, see CALLBACKVBNET on page 322. Argument for your callback function

Internally, EntDataExtractVB2( ) makes a local copy of the filename string, so it does not matter if Visual Basic.Net relocates the original during the callback function. Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred 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 fields 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 s.wExtractFlags = flag% s.wOperation = HYP_NONE s.dDataBy = -1 'data to use with wOperation. s.bDataFileOpened = 0 'DataFile is currently opened (TRUE or FALSE); input and output s.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 signature s.sigCat = sigCat& 'category signature s.sigName = sigEntity& 'entity signature s.sigNameConv = HYP_NONE 'Entity conversion table signature s.sigParent = HYP_NONE 'parent (if wDSMType is not ID_REGULAR) s.sigNameList = HYP_NONE 'Entity list s.fnEnumAcct = 0 'address of function to enumerate accounts (not used, just set to 0) s.lParamEnumAcct = 0 'your argument for fnEnumAcct function s.fnStatusCB = 0 'address of callback function for status information (not used, use lpfnCallback argument instead.) s.lParamStatus = 0 'your argument for fnStatusCB function s.pApiDFA = EntGetVarAddr(apiS) 'address of APISTRUCT; set signame field in apiStruct; EntDataExtract() may modify apiStruct s.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 Data


This function extracts consolidation detail from VB.NET Platform. The tables selected are ID_NAMELIST ENTRY and ID_PSFDATA. Use this format: Declare Function EntDSMDataExtractVB Lib "HEAccess.dll" Alias "_EntDSMDataExtractVB@28" (ByVal hSelect As Integer, ByRef pS As DBEXTRACTSTRUCT, ByVal szExtractFile As String, ByVal sigList As Integer, ByVal lpfnCallBack As DataExtractCallback, ByVal lParam As Integer, ByRef pDSM As DSMDBEXTRACTSTRUCT) As Short
Variable hSelect pArgs pArgs.dwSize pArgs.cDelim pArgs.cNeg pArgs.cScale pArgs.cView pArgs.wDecimals pArgs.wDSMType pArgs.wExtractFlags pArgs.wOperation pArgs.dDataBy pArgs.bDataFileOpened pArgs.hProcess pArgs.lStartPeriod pArgs.lEndPeriod Description The handle of the selected tables Structure with arguments for the data extract. All fields are required except hProcess. The size of this structure The field delimiter, which typically is a comma( , ) The negative delimiter, which typically is a dash (-) or parenthesis [ ( ) ] Scale of the data. Data view (FORMVIEW_YTD, FORMVIEW_PER, FORMVIEW_CAT). Use NONE to use the categorys default view. Number of decimal places to extract Detailed storage model type (ID_REGULAR, ID_PROPORTIONAL, and so on); requires sigParent if not ID_REGULAR Data extract options (see DBE_APPEND, DBE_REMOTE, and so on in ToolInc.h) Operation: FRMT_OP_MUL (multiply), FRMT_OP_DIV (divide), or NONE Data to use with wOperation Data file is currently opened (TRUE or FALSE); input and output Process handle returned when executing on server (DBE_REMOTE) The first period to extract (0-based) The last period to extract (0-based)

Hyperion Enterprise API's for Microsoft Visual Basic.NET 333

Variable pArgs.sigAcctConv pArgs.sigCat pArgs.sigName pArgs.sigNameConv pArgs.sigParent pArgs.sigNameList pArgs.pApiDFA pArgs.pApiDFA.sigName

Description The account conversion table signature The category signature The entity signature Entity conversion table signature Parent if wDSMType is not ID_REGULAR Entity list The address of an apiStruct set up for enum of entity list (if pArgs.sigNameList != NONE) and for querying data from datafile (data & status buffers allocated) Entity signature

pArgs.pApiDFA.u_Dfa.bAutoRecalc See Working with Data on page 114. szExtractFile sigList lpfnCallback lParam dsm dsm.dwSize dsm.wExtractFlags The path name of extract file Signature of an account list; NONE for all accounts Your callback function for status information. For more information, see CALLBACKVBNET on page 322. Argument for your callback function Structure with arguments for dsm extract Size of this structure Data extract options flag. Use any or all of these values: DBE_DSM_TRANS DBE_DSM_PROP DBE_DSM_CONTRIB DBE_DSM_ELIM DBE_DSM_TOPADJ dsm.cSeperator dsm.bXAFormat dsm.bAllDeps dsm.bAllImmedDeps dsm.iSelectedDependents dsm.lpSelectedDepSigs Extract translation data Extract proportion data Extract contribution data Extract elimination data Extract parent adjustment data Field delimiter (Default '|') used when extracting consolidation detail. Extract using format (one field concatenated) or External format (3 fields). The extract consolidation detail for all dependents. If not use list of immediate dependents. The extract consolidation detail for all immediate dependents. If not use list of immediate dependents. Number of dependents selected. Use if both dsm.bAllDeps and dsm.bAllImmedDeps are false. List of selected dependents.

334 Specific Functions for Microsoft Visual Basic.NET

Return Codes:
Code 0 NONE LOAD_CHECK_ERRORLOG (2) Meaning Successful Error occurred 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% flag% flag% flag% flag% flag% = = = = = = 0 flag% flag% flag% flag% flag%

Or Or Or Or Or

DBE_CALC_ACCTS DBE_GLOBAL_ACCTS DBE_SUPPRESS_ND DBE_SUPPRESS_ZERO 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 apiStruct dsm.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 Address


EntGetVarAddr( ) allows you to force Microsoft Visual Basic into assigning an address to a variable. The function returns the address of variable you pass to the function. You pass the argument 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 some other 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" (ByRefpBuf As 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 The address of the variable you passed to the function NONE Meaning Successful Error occurred

Example:
apiS.lpimrData = EntGetVarAddr(dValue#)

Caution!

Microsoft Visual Basic can relocate things in memory anytime you perform a string operation. This includes string assignments, string concatenation, and string functions.

Behind-the-scenes string operations can also cause this problem. For example, if you pass a fixedlength string as a function argument, Visual Basic makes a temporary copy of the string and passes the copy instead. Redimensioning an array (ReDim) can also cause Visual Basic to relocate things in memory. Be very careful when using the EntGetVarAddr( ) function to get the address of 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 to relocate items in memory. Otherwise, you can cause an intermittent but serious bug that is extremely difficult to find.

EntJournalExtractVB( ) - Extract Journal


This function extracts one or more journals. It uses an optional callback function that the API calls to send the current status of the journal extract. Before calling this function, you must select the following tables in read-only format:
l

Default tables (ID_CATEGORY, ID_ORGANIZATION, ID_ACCOUNTS, and associated tables.) ID_JOURNALS - the journals tables. ID_SECURITY - security tables.

EntJournalExtractVB() calls the function that Hyperion Enterprise uses to extract journals. The function supports the two methods that Hyperion Enterprise uses for extracting journals: extract journals for a single period or extract journals for all periods. To extract journals for a single period, you specify the signatures of the particular journal(s) that you wish to extract (in lpJourData.SelectedJourSigs). To extract journals for all periods, you specify the criteria and the API function will find and extract all journals that match the criteria. Specifically, the API function will internally enumerate journals, journal templates, or recurring journal templates as indicated in lpJourData.sCheckedInclude; of those, it will extract the journals that match the criteria 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 As String, ByVal lpfnCallBack As Integer, ByVal lParam As Integer, ByRef lpApiStruct As apiStruct) As Short

Variable hSelect lpJourData lpJourData.dwSize lpJourData.hProcess lpJourData.szDelimiter lpJourData.sCheckedInclude

Description The handle of the selected tables The structure with arguments for the journal extract The size of this structure When executing on the server, the API function returns the handle of the Task Status window process here. The field delimiter, which is typically an apostrophe ( ). Bitmask for extracting journals (LOADEXT_JOURNALS), standard journal templates (LOADEXT_ STANDARD), or recurring journal templates (LOADEXT_RECTMP). Indicates to the API function what to search if IpJourData.wOperation is JOUROP_EXTARCTALLPER. Used internally by the API function. Set this to 0.

lpJourData.sCurrentInclude

338 Specific Functions for Microsoft Visual Basic.NET

Variable lpJourData. lCheckedAttribTypeStatus

Description Bitmask that holds the journal attribute, type, and status and two flags for the extract operation. 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 l l l

JOURMASK_ALL_ATTRIB (include all atrributes) JOURMASK_ATTRIB_BALANCED (include balanced journals) JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals) JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals_

Journal Types to be Extracted:


l l l l

JOURMASK_ALL_TYPE (include all journal types) JOURMASK_TYPE_REGULAR (include regular journals) JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals) JOURMASK_TYPE_TOP_LEVEL (include parent journals)

Journal Status to be Extracted:


l l l l l

JOURMASK_ALL_STATUS (include all statuses) JOURMASK_STATUS_UNPOSTED (include unposted journals) JOURMASK_STATUS_POSTED (include posted journals) JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals) JOURMASK_STATUS_REVIEWED (include reviewed journals) JOURMASK_STATUS_REVERSED (include reversed journals) JOURMASK_STATUS_LOCKED (include locked journals)

l l

Template Types to be Extracted:


l l l

JOURMASK_ALL_TEMPTYPE (include all template types) JOURMASK_TEMPTYPE_STANDARD (include all standard templates) JOURMASK_TEMPTYPE_RECURRING (include all recurring templates)

Other Flags
l l

DBE_REMOTE (server-based extract) JOURE_APPEND (append to existing extract file)

lpJourData.lCurrentAttrib lpJourData.wOperation lpJourData.wFlags lpJourData.lSelectedJourCount

0. Internal use. Indicates the operation. Must be JOUROP_EXTRACTSINGLEPER or JOUROP_EXTRACTALLPER. Used internally. Set this to 0. The number of signatures in lpJourData.SelectedJourSigs array. Use 0 if lpJourData.wOperation is JOUROP_EXTRACTALLPER. This must be at least one if lpJourData.wOperation is JOUROP_ EXTRACTSINGLEPER.

Hyperion Enterprise API's for Microsoft Visual Basic.NET 339

Variable lpJourData.SelectedJourSigs

Description The address of an array of the signatures of the selected journals. To distinguish journals from journal templates, signatures of journals (not templates) should be combined with the JOUR_ENTRIES constant using the "or" operator. True (1) to extract posted journal(s) as unposted, otherwise False. Reserved for future use. Use 0. The path and file name of the journal extract file. The callback function for status information or null. This is not used if the DBE_REMOTE flag is set in lpJourData.lCheckedAttribTypeStatus. 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. An apiStruct with the sigCat, lStartPeriod, and lEndPeriod fields set. The signature of the category. The period number (starting with 0 for the first period.) Set this to 0 if lpJourData.wOperation is JOUROP_ EXTRACTALLPER. The same as lpApiStruct.lStartPeriod.

lpJourData.bExtractPasU lpJourData.wExtFlag lpszExtFileName lpfnCallBack lParam lpApiStruct lpApiStruct->sigCat lpApiStruct->lStartPeriod lpApiStruct->lEndPeriod

Return Codes:
Code Extract_NOERR (0) Extract_CANCELLED Extract_CHECK_ERRORLOG Extract_CHECKBOTH Meaning Successful Cancelled by user Errors occurred and are listed in ERROR.LOG. 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 Journal


This function executes a journal load. It requires a callback function that the API calls to send the current status of the journal load. In addition to the default tables, you must select the security tables, 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 As String, ByVal lpfnCallBack As EnumJournalLoadCB, ByVal lParam As Integer, ByRef lpApiStruct As apiStruct) As Short
Variable hSelect lpJourData lpJourData.dwSize lpJourData.hProcess lpJourData.szDelimiter lpJourData.sCheckedInclude lpJourData.sCurrentInclude lpJourData. lCheckedAttribTypeStatus Description The handle of the selected tables The structure with arguments for the journal load The size of this structure The handle of the Task Status window process. This returns the process handle when executing on the server. The field delimiter, which is typically a comma ( , ) Loads journals and standard or recurring journal templates Indicates the type of journal or journal template. Bitmask that holds the journal attribute, type, and status. Can be set to any combination of the following: Attributes to be Extracted
l l l l

JOURMASK_ALL_ATTRIB (include all atrributes) JOURMASK_ATTRIB_BALANCED (include balanced journals) JOURMASK_ATTRIB_UNBALANCED (include unbalanced journals) JOURMASK_ATTRIB_BAL_BY_ENTITY (include balanced by entity journals)

Journal Types to be Extracted


l l l l

JOURMASK_ALL_TYPE (include all journal types) JOURMASK_TYPE_REGULAR (include regular journals) JOURMASK_TYPE_AUTOREVERSING (include auto-reversing journals) JOURMASK_TYPE_TOP_LEVEL (include top-level journals)

Journal Status to be Extracted


l l l l l

JOURMASK_ALL_STATUS (include all statuses) JOURMASK_STATUS_UNPOSTED (include unposted journals) JOURMASK_STATUS_POSTED (include posted journals) JOURMASK_STATUS_AUTOREVERSED (include auto-reversed journals) JOURMASK_STATUS_REVIEWED (include reviewed journals)

342 Specific Functions for Microsoft Visual Basic.NET

Variable

Description
l l

JOURMASK_STATUS_REVERSED (include reversed journals) JOURMASK_STATUS_LOCKED (include locked journals)

Template Types to be Extracted


l l l l

JOURMASK_ALL_TEMPTYPE (include all template types) JOURMASK_TEMPTYPE_STANDARD (include all standard templates) JOURMASK_TEMPTYPE_RECURRING (include all recurring templates) DBE_REMOTE (server-based extract)

lpJourData.lCurrentAttrib lpJourData.lCurrentType lpJourData.lCurrentStatus lpJourData.buse18Format lpJourData.sAutoReversing lpJourData.wExtFlag


szLoadFileName fnCallBack

Holds the attribute. Holds the type. Holds the status. TRUE if load file is in Release 1.8 format, else False. Flags to check for posted and unposted autoreversing journals. Reserved for future use. The path name of the journal load file. The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpJourData. lCheckedAttribTypeStatus. The argument for the callback function, or NULL if the DBE_REMOTE flag is set in lpJourData. lCheckedAttribTypeStatus. Structure containing the rest of the journal load arguments.

lParam

lpApiStruct

Return Codes:
Code LOAD_NOERR (0) Non Zero Meaning Successful 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 Defaults


EntQueryDefault( ) queries application or user defaults. It is not necessary to select the tables before calling this function. For detailed information about query attributes you can use with Hyperion Enterprise tables, see Appendix B, Query Attributes. Use this format: Declare Function EntQueryDefault Lib "HEAccess.dll" Alias "_EntQueryDefault@20" (ByVal hApp As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal wLen As Short, ByRef pzBuf 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 As Short, 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 As Integer, ByRef pzBuf As Long) As Short
Variable Description hApp wTabId The application handle The table ID, which should be one of the following tables:
l l l

ID_HAPP ID_APPDEFAULT ID_USERDEFAULT

wAttr wLen pzBuf

The attribute for the field you are querying The length of pzBuf The buffer for the requested information

Return Codes:
Code 0 NONE Meaning Successful 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 Information


This function queries a record in a table and retrieves the requested field (attribute) from the record. For detailed information about query attributes you can use with Hyperion Enterprise tables, see Appendix B, Query Attributes. Use this format: Declare Function EntQueryEx Lib "HEAccess.dll" Alias "_EntQueryEx@32" (ByVal hSelect As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer, ByVal sigKey As Integer, ByVal wLen As Integer, ByRef pzBuf As Object, ByRef lpApiStruct As apiStruct) As Short Use this format for querying a string value: Declare Function EntQueryExStr Lib "HEAccess.dll" Alias "_EntQueryEx@32" (ByVal hSelect 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 As apiStruct) As Short Use this format for querying a integer value: Declare Function EntQueryExInt Lib "HEAccess.dll" Alias "_EntQueryEx@32" (ByVal hSelect 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 As Integer) As Short

Variable Description hSelect The handle of the selected tables

346 Specific Functions for Microsoft Visual Basic.NET

Variable Description wTabId wAttr The table containing the record you want to query The attribute for the field you are querying

sigRecd The signature of the record you want to query sigKey dwLen pzBuf apiS NONE or the key of a related table. For more information, see Related Tables on page 363. The length of pzBuf The buffer to return the requested information NULL or the address of an apiStruct structure with mor3 information

Return Codes:
Code 0 NONE Meaning Successful 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 Security


This function executes a security extract. This function requires a callback function that the API will call to send current status of the extract. If extracting security on a server (the DBE_REMOTE bit flag is set in lpSecData.wFlags), you may want to know the process handle of the extract process so that you can track and monitor the server processes that your program launches. The process handle returned at lpSecData.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 As Integer) As Short
Variable hSelect Description The handle of the selected tables

Hyperion Enterprise API's for Microsoft Visual Basic.NET 347

Variable lpSecData lpSecData.dwsize lpSecData.cDelimiter lpSecData.szFileName lpSecData.bSecClass lpSecData.bAcesRight

Description The structure with arguments for the security extract The size of this structure The field delimiter, which typically is a comma ( , ) The path to the extract file TRUE to extract security classes; otherwise False TRUE to extract access rights; otherwise False

lpSecData.bUserAndGroup TRUE to extract users and user groups; otherwise False lpSecData.bTask lpSecData.wFlags lpSecData.phProcess szFileName lpfnCallBack lParam TRUE to extract security tasks; otherwise False Flags DBE_APPEND and DBE_REMOTE, as desired The process handle returned when executing on a server The path/filename of the extract file The callback function for status information. This is not used if the DBE_REMOTE flag is set in lpSecData.wFlags. 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 Security


This 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 may want to know the process handle of the load process so that you can track and monitor the server processes that your program launches. The process handle returned at lpSecData 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 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 hSelect lpSecData lpSecData.dwsize lpSecData.cDelimiter lpSecData.szFileName lpSecData.bSecClass lpSecData.bAcesRight Description The handle of the selected tables The structure with arguments for the security load The size of this structure The field delimiter, which typically is a comma ( , ) The path to the load file TRUE to load security classes; otherwise False 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 lpSecData.wFlags lpSecData.phProcess szFileName fnCallBack lParam TRUE to load security tasks; otherwise False. 0 or DB_REMOTE The process handle eturned when executing on a server The path/filename of the file to load The callback function for status information. This is not used if the DB_REMOTE flag is set in lpSecData.wFlags. The argument for the callback function.

Return Codes:
Code LOAD_NOERR (0) NONE LOAD_CANCELLED LOAD_CHECK_ERRORLOG Meaning Successful Error occurred Cancelled by user 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 Record


This function updates the value for a specified field in a record in a table. When you are finished updating data, you need to call EntSave( ) to actually save your changes. You must use the EntUpdateStr( ) function when updating a string value. EntUpdateStr( ) is a clone of the declaration 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 this function, read Updating Data on page 117 which describes how to use this function to update data.

Use this format: Declare Function EntUpdate Lib "HEAccess.dll" Alias "_EntUpdate@28" (ByVal hSelect As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer, ByVal sigKey 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 As Integer, ByVal wTabId As Short, ByVal wAttr As Short, ByVal sigRecd As Integer, ByVal sigKey As Integer, ByVal pzBuf As String, ByRef lpApiStruct As apiStruct) As Short
Variable Description hSelect The handle of the selected tables wTabId wAttr The Datafile table, ID_DATAFILE 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 pzBuf apiS NONE for table ID_DATAFILE The new value for the specified field. NULL for table ID_DATAFILE when the new values are in apiS An apiStruct structure with more information. Required for most ID_DATAFILE update attributes.

Return Codes:
Code 0 NONE Meaning Successful 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 Defaults


This function updates application or user defaults. After you are finished updating values, call EntSaveDefault( ) to save your changes. You must use the EntUpdateDefaultStr( ) function when querying a string value. EntUpdateDefaultStr( ) is a clone of the declaration for EntUpdateDefault( ) 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 wTabId The application handle The table ID, which must be one of the following tables:
l l l

ID_HAPP ID_APPDEFAULT ID_USERDEFAULT

wAttr

The attribute that you are updating. Valid attributes for tables ID_APPDEFAULT and ID_USERDEFAULT are the same as the query attributes 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. The new value for the field

pzBuf

For the ID_APPDEFAULT table, the valid attributes are any of the query attributes with the following exceptions:
352 Specific Functions for Microsoft Visual Basic.NET

APP_NTDATADIR APP_NTINBOXDIR APP_NTOUTBOXDIR APP_NTREPORTDIR 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( ) automatically substitutes the application path for @APP unless you request query attribute APP_NTINBOXDIR, and so on. For more information, see the Creating Applications chapter in the Hyperion Enterprise Administrators Guide.
Caution!

Many of the application settings in table ID_APPDEFAULT should not be changed after the application is created. Examine the Hyperion Enterprise Application module for any menu item or any edited fields. Do not change the application setting that corresponds to a field that cannot be edited as it could corrupt your application.

Return Codes:
Code 0 NONE Meaning Successful 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 Data


This function is intended to copy data to Visual Basic.Net Platform. The arguments for some callback functions are actually the address of a structure (user-defined type). If your callback function declares the argument as type short, you can use EntVBCopyData( ) to copy that structure 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 wLen As 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) As Short
Variable Description Dest lAddr wLen The destination buffer The address of the source to copy The length to copy

Return Codes:
Code 0 NONE Meaning Successful 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 Information


This function retrieves information about a journal detail record. Use this format: Declare Function HypHPJOUR Lib "HEAccess.dll" Alias "_HypHPJOUR@36" (ByVal hRApp As Short, ByVal wAttr As Short, ByVal szJourName As String, ByVal sigJourDet As Integer, ByVal sTableID As Short, ByVal szCat As String, ByVal szPerName As String, ByVal wLen 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" (ByVal hRApp As Short, ByVal wAttr As Short, ByVal szJourName As String, ByVal sigJourDet As Integer, ByVal sTableID As Short, ByVal szCat As String, ByVal szPerName As String, ByVal wLen As Short, ByRef pzBuf As Double) As Short
354 Specific Functions for Microsoft Visual Basic.NET

Variable hRApp wAttr

Description A non-zero retrieve Hyperion Enterprise Retrieve application handle A short integer specifying which journal attribute you want returned

szJourName The journal ID sigJourDet sTableID szCat The signature of the journal detail row from HypJourDetAsk( ) The ID of the table data is retrieved from, either ID_JOURNAL_ENTRIES or ID_JOURNAL_TEMPLATES 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 pzBuf The length of the pzBuf buffer 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 Description Journal number, or NONE (-1) as the journal number if there is no journal number. Journal status Journal description Journal detail entity Journal detail account Journal detail debit Journal detail credit Type/String Size Long Integer (short in C) String SIZEJOURDESC+1 String SIZEFULLNAME+1 String SIZEFULLACT+1 Double Double

Attribute JOUR_NO JOUR_ST JOUR_DS JOUR_EN JOUR_AC JOUR_DB JOUR_CR

Return Codes:
Code 0 NONE HACC_BAD_CATEGORY HACC_BAD_CODE HACC_BAD_JOURNAL HACC_BAD_PERIOD Meaning Successful Error occurred Error occurred, invalid szCat Error occurred, invalid wAttr Error occurred, invalid szJourName Error occurred, invalid szPerName

Hyperion Enterprise API's for Microsoft Visual Basic.NET 355

Code HACC_BAD_SELECT HACC_BAD_TABLE

Meaning Error occurred Error occurred, invalid sTableID

356 Specific Functions for Microsoft Visual Basic.NET

A
In This Appendix

Table IDs

Table Descriptions ....................................................................................... 357 Tables of Default Settings ............................................................................... 361 Associated Tables........................................................................................ 362 Related Tables ........................................................................................... 363

This appendix provides information about the tables into which Hyperion Enterprise applications are organized.

Table Descriptions
Table 65 lists all of the Hyperion Enterprise table IDs, descriptions, and associated tables. All table IDs appear in the C language form ID_TABLENAME, as they appear in the TOOLKIT.H file. If you are using Microsoft Visual Basic, insert HYP_ at the beginning of all table IDs. The correct Microsoft Visual Basic form for a table ID, as shown in the TOOLKIT.BAS file, is HYP_ID_TABLENAME. If there is no corresponding table ID in the TOOLKIT.BAS file for one of 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 functions

that take the form Ent...( ).


Table 65

Hyperion Enterprise Table IDs Name Accounts Account conversion Account conversion list Account list Account list entry Pass the signature of an account list as the key. Special Considerations Not applicable. Pass the signature of an account conversion list in ID_ACCTCVTLIST as the key.

Table ID ID_ACCOUNTS ID_ACCTCONVERT ID_ACCTCVTLIST ID_ACCTLIST ID_ACCTLISTENTRY

Table Descriptions 357

Table ID ID_BOOK_ENTRIES ID_BOOK_SETS ID_BOOKS ID_CATEGORY ID_CATEGORY_LINKS ID_CODES ID_CURRENCY ID_DATAFILE ID_FORMATS ID_FORMULAS ID_FREQUENCY ID_GROUP ID_ICSET ID_INTCODET ID_JOURNAL_DETAIL ID_JOURNAL_HISTORY ID_JOURNAL_HISTORY_ DETAIL ID_JOURNAL_PERIOD_ INFO ID_JOURNAL_TEMPLATES ID_JOURNAL_TEMPLATES_ DETAIL ID_JOURNALS ID_LOGIC ID_LOGIC_CAT_ATTRIB ID_NAMECONVERT ID_NAMECVTLIST

Name Book entries Book sets Books Categories Category linkages Codes Currencies Data file Formats for data load and data extract files Formulas Frequencies Account groups Intercompany matching sets Intercompany detail Journals detail Journals history Journals history details Journal period information Journal templates Journal templates detail Journals Methods Logic category attributes Entity conversion Entity conversion list

Special Considerations Pass the signature of the book set as the key.

Pass the signature of the method as the key.

For more information, see Working with Data on page 114.

Pass the signature of the method as the key. This table uses the constants FREQ_MONTH, FREQ_QUARTER, and so on as the frequency signatures. These constants are defined in the TOOLINC.H file.

Pass the signature of the intercompany set in ID_ICSET as the key. Pass the signature of the journal in ID_JOURNALS as the key.* Pass the category signature as the key.* Pass the signature of the history journal in ID_JOURNAL_HISTORY as the key.* Pass the category signature as the key.* Pass the category signature as the key.* Pass the signature of the journal template in ID_JOURNAL_TEMPLATES as the key.* Pass the category signature as the key.* The DEFCHARTLOGICSIG constant is the signature for the default chart logic. See the record signatures for various default logic methods in the TOOLINC.H file. Pass the signature of the method as the key. Pass the signature of an entity conversion list in ID_NAMECVTLIST as the key.

358 Table IDs

Table ID ID_NAMELIST ID_NAMELISTENTRY ID_NAMES ID_NODES

Name Entity list Entity list entry Entities Nodes

Special Considerations

Pass the signature of an entity list in ID_NAMELIST as the key. To use this table, select all of its associated tables by selecting either ID_ ORGANIZATION OR ID_ASSOC or ID_NAMES OR ID_ASSOC. If the application is set to use dynamic organizations, you must pass a category as the key. You also must pass an apiStruct argument for some queries. To use this table, select ID_ORGANIZATION OR ID_ASSOC.

ID_ORGANIZATION ID_PERIOD ID_PRINT ID_PSFDATA ID_REPORT_ENTRIES ID_REPORT_SETS ID_REPORTS ID_ROLLOVER ID_ROLLSET ID_RPTFREQ

Organizations Periods Printing PSF Data Report entries in report sets Report sets Reports Rollovers Rollover sets Reporting frequencies

If the application is set up to use dynamic organizations, you have to pass a category as the key when selecting this table.

Pass a category as the key when selecting this table. Pass an apiStruct argument for other API functions. Pass the signature of a report set as the key.

Pass the signature of a rollover set as the key.

This table ID is valid only for the following functions:


l l l l l l l l l l

EntSelect( ) EntUnSelect( ) EntEnum( ) EntQueryEx( ) EntFind( ) HypLockEx( ) HypUnLockEx( ) HypEnumEx( ) HypQueryEx( ) HypFindEx( )

Table Descriptions 359

Table ID ID_RPTVIEW

Name Reporting views

Special Considerations This table ID is valid only for the following functions:
l l l l l l l l l l

EntSelect( ) EntUnSelect( ) EntEnum( ) EntQueryEx( ) EntFind( ) HypLockEx( ) HypUnLockEx( ) HypEnumEx( ) HypQueryEx( ) HypFindEx( )

ID_RULES ID_RULESEXP ID_RULESVAR ID_SCHEDULES ID_SECCLASS ID_SECGRPTAB

Rules Rule expressions Rule variables Schedules Security class Security group This table is a matrix of security groups by users. Each cell in the matrix is a record 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, not a string (usually the ID). Pass the rule signature as the key. Pass the rule signature as the key.

ID_SECRIGHTS

Security rights

This table is a matrix of users by security classes. Each cell in the matrix is a record in the table. The table contains the users' explicit rights to each security class. 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 have explicit rights to that class. However, the user might have implicit rights from membership in a group. The key field in this table is a structure defined as type SECURRIGHTSKEY, not a string (usually the ID).

ID_SECTASK ID_SECTASKFILTER ID_SECURITY

Security task Security task filter Security This table ID is valid only for the following functions:
l l l l

EntSelect( ) EntUnSelect( ) HypLockEx( ) HypUnLockEx( )

This table ID is used only with ID_ASSOC to select or deselect all the security tables together. If you forget to use an OR operation with ID_ASSOC, only ID_ SECUSERTAB is selected or deselected.

360 Table IDs

Table ID ID_SECUSERTAB ID_SERVER ID_SHARES

Name Security Users Server Shares

Special Considerations

Each record in this table indicates how many shares of one entity's stock are owned by another entity. Special records contain the total number of shares outstanding 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 as the key when selecting this table.The key field for this table, normally the ID, is not a string. For more information, see the EntFind( ) function.

ID_SUBACCTDET ID_SUBACCTHDR ID_SUBNAME ID_SUBSTRUCTURE ID_SUGGEST_OWN

Subaccount detail Subaccount header Subentities Substructures Table that suggests the consolidation method and consolidation percentage Used methods Custom functions

Pass the signature of a sub-account header as the key.

ID_USE_METHODS ID_USERDEFFUNC

Pass the signature of the method as the key.

* All of the journals tables require an apiStruct for most functions. Also, you have to use an apiStruct to select the following journals tables: ID_JOURNAL_DETAIL ID_JOURNAL_HISTORY_DETAIL ID_JOURNAL_PERIOD_INFO ID_JOURNAL_TEMPLATES_DETAIL This means that you can use only the EntSelectTableAdd( ) function to select these tables. The apiStruct for the journals tables should include 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 the ID_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 the required information.

Tables of Default Settings


The tables listed in Table 66 contain default settings and are used with several functions, including EntQueryDefault( ), EntUpdateDefault( ), and EntSaveDefault( ). You can also use these tables with HypQueryEx( ), EntQueryEx( ), EntUpdate( ), and EntSave( ). You do not need 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 Name Application Information Application Defaults User Defaults

Table ID ID_HAPP ID_APPDEFAULT ID_USERDEFAULT

Note: These tables IDs are defined in the toolinc.H file.

Associated Tables
When you select or deselect a table, you can use the table ID combined with the ID_ASSOC constant using an OR operation to simultaneously select the table and its associated tables. Here is 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 select or 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 Associated Tables ID_GROUP ID_SUBACCTDET ID_SUBACCTHDR ID_BOOK_ENTRIES ID_BOOK_SETS ID_FREQUENCY ID_PERIOD ID_CATEGORY_LINKS ID_LOGIC_CAT_ATTRIB ID_USE_METHODS ID_PERIOD ID_INTCODET ID_JOURNAL_ENTRIES ID_JOURNAL_TEMPLATES ID_JOURNAL_PERIOD_INFO ID_JOURNAL_ENTERIES ID_JOURNALS selects and deselects the associated tables even if you do not specify ID_ASSOC. ID_CODES ID_CODES ID_CURRENCY ID_LOGIC ID_SUBNAME ID_SUBSTRUCTURE

Table ID ID_ACCOUNTS ID_BOOKS ID_CATEGORY ID_FORMULAS ID_FREQUENCY ID_ICSET ID_JOURNAL_TEMPLATES ID_JOURNALS ID_LOGIC ID_NAMES

362 Table IDs

Table ID ID_NODES ID_ORGANIZATION ID_REPORTS ID_ROLLSET ID_RULES ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECTASKFILTER ID_SECURITY ID_SECUSERTAB

Associated Tables ID_SHARES, ID_CODES ID_CURRENCY ID_LOGIC ID_NAMES ID_NODES ID_SHARES ID_SUBNAME ID_SUBSTRUCTURE ID_REPORT_ENTRIES ID_REPORT_SETS ID_ROLLOVER ID_RULESEXP, ID_RULESVAR ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK, ID_SECTASKFILTER ID_SECUSERTAB ID_SECCLASS ID_SECTASK ID_SECTASKFILTER ID_SECUSERTAB ID_SECCLASS ID_SECGRPTAB ID_SECTASK ID_SECTASKFILTER ID_SECUSERTAB ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASKFILTER ID_SECUSERTAB ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECUSERTAB ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECTASKFILTER ID_SECCLASS ID_SECGRPTAB ID_SECRIGHTS ID_SECTASK ID_SECTASKFILTER

Related Tables
Table 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, as shown in the TOOLKIT.BAS file, is HYP_ID_TABLENAME.
Table 68

Related Hyperion Enterprise Tables Key Requirement ID_ACCTCVTLIST ID_ACCTLIST ID_BOOK_SETS ID_LOGIC ID_LOGIC ID_ICSET ID_JOURNALS ID_CATEGORY ID_JOURNAL_HISTORY ID_CATEGORY

Table ID_ACCTCONVERT ID_ACCTLISTENTRY ID_BOOK_ENTRIES ID_CATEGORY_LINKS ID_FORMULAS ID_INTCODET ID_JOURNAL_DETAIL ID_JOURNAL_HISTORY ID_JOURNAL_HISTORY _DETAIL ID_JOURNAL_PERIOD_INFO

Related Tables 363

Table ID_JOURNAL_TEMPLATES ID_JOURNAL_TEMPLATES _DETAIL ID_JOURNALS ID_LOGIC_CAT_ATTRIB ID_NAMECONVERT ID_NAMELISTENTRY ID_PSFDATA ID_REPORT_ENTRIES ID_ROLLOVER ID_RULESEXP ID_RULESVAR ID_SHARES ID_SUBACCTDET ID_USE_METHODS

Key Requirement ID_CATEGORY ID_JOURNAL_TEMPLATES ID_CATEGORY ID_LOGIC ID_NAMECVTLIST ID_NAMELIST ID_CATEGORY ID_REPORT_SETS ID_ROLLSET ID_RULES ID_RULES ID_CATEGORY ID_SUBACCTHDR ID_LOGIC

364 Table IDs

B
In This Appendix

Query Attributes

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 query Hyperion Enterprise Version tables using EntQueryEx( ) or HypQueryEx( ) and their related functions.

Query Attributes Overview


HypQueryEx( ) does not handle an apiStruct, so if you need to use an apiStruct for a particular query, you must use EntQueryEx( ). Most queries do not require an apiStruct but instead pass NULL in EntQueryEx( ). The query attributes described in this chapter include those that require an 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 correct Visual Basic form for a table ID as shown in the TOOLKIT.BAS file is HYP_ID_TABLENAME. If there is no corresponding table ID in the TOOLKIT.BAS file

for 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 the type that you should use for the pzbuf argument in query functions. For example, if a query returns type LONG, then pzbuf should also be type LONG. If you are programming in C, you need to use a pointer to the stated type unless the type is inherently a pointer type. Table 69 lists the different types in both Visual Basic and C.
Table 69

Visual Basic and C Types C Type char, UCHAR, or HYPBOOL. HYPBOOL is used for Boolean values that are either True (1) or False (0).

Visual Basic Type Byte or one-character string

Query Attributes Overview 365

Visual Basic Type Double Long Integer Long String

C Type double long or LONG short SIGNA, which is used for values that are record signatures LPSTR

For query attributes that retrieve strings, allocate your buffer to the following sizes:
l

Use HYP_SIZELABEL+1 for IDs. Use HYP_SIZEDESC+1 for descriptions. Use HYP_SIZEFULLNAME+1 for entity IDs. 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 Attributes


Table 70 lists all of the default query attributes that are applicable to most but not all Hyperion Enterprise tables. Tables to which these query attributes do not apply are identified as such in this chapter.
Table 70

Default Query Attributes Description Count of records in a table. The time_t type is defined as the number of seconds since midnight January 1, 1970. In Microsoft'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 date and time (day, month, year, hour, minute, and more). For more information, see Microsoft's documentation (MSDN - Microsoft Developers' Network). Description of records in a table. Description of records in a table. Lock mode for the table. For more information, EntIsSelected( ) - Is Table Selected? on page 207. Indicates whether the table has been updated. For more information, EntIsModified( ) - Is Table Modified? on page 206. Type VB: long C: long VB: Long C: time_t

Query COUNT DATETIME

DESC DESCRIPTION LOCK_MODE MODIFIED

VB: String C: LPSTR VB: String C: LPSTR VB: Integer C: short VB: Integer C: short

366 Query Attributes

Query NAME NUM_ELEMENTS NUM_COLUMNS QRYFIRST QRYNEXT SECURITYCLASS SHORTNAME TIME_STAMP TIMESTAMP_CHK USECOUNT USER_RIGHTS VERIFYSIG

Description ID. Number of elements. Number of columns. First record. Next record. Security class signature for the item. ID. Table timestamp. TRUE (1) if timestamp is different (table changed by another user, need to refresh), FALSE (0) otherwise. Number of locks on table. Current user rights to access one of the following items: SECURITY_MODIFY, SECURITY_VIEW, SECURITY_NONE, or SECURITY_RESTRICTED. Used to verify a signature. Returns NONE if the signature is invalid. See Note.

Type VB: String C: LPSTR VB: Long C: long VB: Long C: long VB: Long C: SIGNA VB: Long C: SIGNA VB: Long C: SIGNA VB: String C: LPSTR VB: Long C: Long VB: Byte C: HYPBOOL Integer short

VB: 0 C: NULL

Note: The VERIFYSIG query attribute returns zero if the signature is valid, or NONE if the

signature is invalid. The return code is the value returned from the query function HypQueryEx( ) or EntQueryEx( ), not the value in the pzBuf argument. You can pass NULL. This query attribute verifies only the user's access rights and checks if the record is deleted. It does not verify that the signature is in a valid range.

Nondefault Query Attributes


The following topics describe the query attributes for tables that do not use the default query attributes.

ID_ACCOUNTS (Accounts Table) Query Attributes


The default query NAME returns the account ID for only the major account. Use query attribute ACCT_FULLNAME to retrieve the full account ID. Table 71 lists the query attributes for the Accounts table.
Table 71

ID_ACCOUNTS Table Query Attributes Description Chart of accounts sequence number. VB Type C Type

Query ACCT_COA_SEQ_NUM

Nondefault Query Attributes 367

Query ACCT_COMBINE_VSIGS ACCT_DECIMALS ACCT_FIRST_SUB_SIG ACCT_FULLNAME ACCT_GROUP ACCT_IS_BALANCE ACCT_IS_CONSOLIDATE ACCT_IS_CURRENCY ACCT_IS_DYNAMIC ACCT_IS_INTERCO ACCT_IS_MAJOR ACCT_IS_SCALE ACCT_IS_SINGLELEVEL ACCT_IS_SUB ACCT_IS_SUBSUB ACCT_IS_VALIDATED ACCT_NEXTCHARTORDER ACCT_SPLIT_VSIGS ACCT_SUBACCT_TABLE ACCT_SUBACCT_TYPE ACCT_SUBACCTDESC ACCT_SUBACCTNAME ACCT_TYPE CODE INTERCO_NAMESIG

Description Get an account signature, given the signatures of the major account and subaccounts. See Note 1. Number of decimals to display.

VB Type Long Integer Long

C Type SIGNA short SIGNA LPSTR SIGNA HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL SIGNA SIGNA SIGNA char LPSTR LPSTR short SIGNA SIGNA

Get full account ID major.sub.subsub. Signature of the account group. TRUE (1) if the specified account is a balance account, otherwise FALSE (0). Indicates whether the specified account is a consolidated account. Indicates whether to apply currency translation. Indicates whether the account is a dynamic account. Indicates whether the account is an intercompany account. Indicates whether the account is a major account. Indicates whether the account is a scaled account. Limits subaccounts to one level (TRUE (1)/FALSE (0)). TRUE (1) if account is first-level sub-account with no second-level sub-account (major.sub). TRUE (1) if account has second-level sub-account (major.sub.subsub) or else FALSE (0). TRUE (1) if sub-account type is validated, as opposed to fixed or none, or else FALSE (0). Next account in the chart-of-account order. Get major, sub-account, and subsubaccount signatures from an account signature. See Note 2. Signature of the sub-account table Fixed, validated, or none. See SUBACTYPE_* in TOOLINC.H file. Influenced by type of attached sub-account table Description of lowest level sub-account (if one exists). ID of lowest-level sub-account (if one exists). Account type such as asset, liability, and so on. See ACTTYPE_* defines in TOOLINC. H file. Signature of user-defined code. Get entity signature if bottom-level detail is intercompany sub-account.

String Long Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Long Long Long Byte String String Integer Long Long

368 Query Attributes

Query LAST_ATTACHED_SUBTABLE

Description Get lowest-level detail sub-account table for the account.

VB Type Long

C Type 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 Description The signature of the first-level sub-account, or HYP_NONE (NONE in C). The signature of the second-level sub-account, or HYP_NONE (NONE in C).

Field u_ApiQry.sigSub u_ApiQry.sigSubSub

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 which you want to concatenate a second-level sub-account. EntQueryEx( ) returns the signature of the resulting account in the pzBuf argument. EntQueryEx( ) returns one of the following codes: Return Codes:
Code ACCT_NOERR (0) ACCT_FULL_0SUBSUSED (1) ACCT_FULL_1SUBUSED (2) ACCT_SUBSNOTVALID (3) NONE Meaning Successful. No signature returned because the input account already contains first- and second-level subaccounts. The input account already had a first-level sub-account, but the first-level sub-account was concatenated from the apiStruct. No signature returned because the input account contained an invalid combination. 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 u_ApiQry.sigSub u_ApiQry.sigSubSub

Description Set to HYP_NONE (NONE in C). Set to HYP_NONE (NONE in C).

Call EntQueryEx( ) and pass it the account signature. The query returns the signature of the major account in pzBuf argument. EntQueryEx( ) also returns the first- and second-level subaccount signatures that are part of table ID_SUBACCTDET in the apiStruct's u_ApiQry.sigSub and u_ApiQry.sigSubSub fields.
Nondefault Query Attributes 369

Note: You can use the EntAcctSplit( ) function, as an alternative.

ID_ACCTCONVERT (Account Conversion Table) Query Attributes


Table 73 contains individual entries for each account conversion list in table ID_ACCTCVTLIST. Each entry includes the Hyperion Enterprise account and the corresponding external account name to convert. The default query attributes NAME and SHORTNAME return the external account name.
Table 73

ID_ACCTCONVERT Table Query Attributes Description Hyperion Enterprise account ID. Account signature. Add or subtract. VB Type String Long Integer C Type LPSTR SIGNA short

Query ACONV_ACCTNAME ACONV_ACCTSIG ACONV_ADD_SUB

ID_ACCTCVTLIST (Account Conversion List Table) Query Attributes


Table 74 contains information about account conversion lists. The actual entries in each account conversion list are stored in table ID_ACCTCONVERT.
Table 74

ID_ACCTCVTLIST Table Query Attributes Description First entry in the account conversion table. Direction: E to extract from Hyperion Enterprise, L to load into Hyperion Enterprise, or B if valid in both directions. VB Type Long Byte C Type SIGNA char

Query FIRST_ENTRY LIST_DIRECTION

ID_ACCTLIST (Account List Table) Query Attributes


Table 75 contains information about the account lists in the application. The accounts in each account list are stored in table ID_ACCTLISTENTRY.
Table 75

ID_ACCTLIST Table Query Attributes Description Signature of the first detail record. List type: Fixed (F) or Dynamic (D). VB Type Long Integer C Type SIGNA short

Query FIRST_ENTRY LIST_TYPE

370 Query Attributes

ID_ACCTLISTENTRY (Account List Entry Table) Query Attributes


This table contains the entries in the specified account list. If the record signature (sigRecd) is HYP_NONE (NONE in C) and the account list is a fixed account list, then the query functions query the first entry in the account list. If the record signature is HYP_NONE and the account list is dynamic, then the query functions query the criteria record for the account list. Use record signature for the criteria record. The Account List Entry table contains a record for each entry in the each fixed account list and a criteria record for each dynamic or fixed list. The criteria record contains the criteria used to create the account list. Some query attributes apply only to fixed lists. Most query attributes apply only to criteria records. For more information, see ID_NAMELISTENTRY (Entity List Entry 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 Description Entity signature of list entry. Get signature of first entry. VB Type Long Long C Type SIGNA SIGNA

Query ENTRY_SIG FIRST_ENTRY

Table 77 lists all the query attributes that apply to criteria records.
Table 77

ID_ACCTLISTENTRY Table Query Attributes Description Indicates whether accounts are calculated accounts. Selected codes. Note: Use NUM_CODES to get size to allocate array. VB Type Byte Array of Longs C Type char, HYPBOOL, or short Array of SIGNA

Query CALC_ACCT CODE_DATA

CRITERIA_TYPES DYNVIEW_ACCOUNT ENTRY_SIG FIRST_ENTRY GROUP_DATA The signature of the account. Gets the first record (same as QRYFIRST). Selected account groups. Note: Use NUM_GROUPS to get the size to allocate the array. INPUT_ACCT MULTI_ACCOUNT NUM_CODES Indicates whether accounts are input accounts. Indicates whether accounts are multilevel accounts. Number of codes selected as criteria.

String Byte Long Long Array of Longs

LPSTR HYPBOOL SIGNA SIGNA Array of SIGNA

Byte Byte Long

HYPBOOL HYPBOOL long

Nondefault Query Attributes 371

Query NUM_GROUPS NUM_SUBACCTS NUM_TABLES SHOW_DETAIL SINGLE_ACCT SUB_MULT SUB_SINGLE SUBACCT_DATA

Description Number of defined groups selected as criteria. Number of subaccounts selected as criteria. Number of sub-account tables selected as criteria. Indicates whether subaccounts should be shown for this account, TRUE (1) or FALSE (0). Indicates whether the accounts are single-level accounts. Indicates whether the subaccounts are multilevel subaccounts. Indicates whether the subaccounts are single-level subaccounts. Selected subaccounts. Note: Use NUM_SUBACCTS to get size to allocate array.

VB Type Long Long Long Byte Byte Byte Byte Array of Longs

C Type long long long HYPBOOL HYPBOOL HYPBOOL HYPBOOL 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) Query Attributes


The query attributes in Table 78 are used with EntQueryDefault( ), though you can use them with HypQueryEx() or EntQueryEx( ). Default queries do not apply to this table.
Table 78

ID_APPDEFAULT Table Query Attributes Description Locking account. Always execute translation methods. Balance rate account. Billions separator. Application calendar file name. Consolidation is periodic. Application currency. Data directory with macro substitution. Decimal delimiter. Application description. Device driver DLL name such as HEFILE.DLL or SQL equivalent. VB Type Long Byte Long String String Byte Long String String String String C Type SIGNA HYPBOOL SIGNA LPSTR LPSTR HYPBOOL SIGNA LPSTR LPSTR LPSTR LPSTR

Query APP_ACCTFORLOCK APP_ALWAYS_EXEC_TRANS APP_BALACCT APP_BILLIONS APP_CALENDAR APP_CONSOL_IS_PER APP_CURRENCY APP_DATADIR APP_DECIMAL APP_DESC APP_DRV_DLL

372 Query Attributes

Query APP_EXPECTED_ENTITIES APP_EXPECTED_REPORTS APP_EXPECTED_ACCTS APP_EXPECTED_CATS APP_FLOACCT APP_HOLDING_LOGIC APP_ID APP_IMPACTFUTURECAT APP_INBOXDIR APP_INPUT_PCT APP_IS_ORGBYPER APP_ISBALACCTPVA APP_ISFLOACCTPVA APP_JOUR_AUTONUMBER APP_JOUR_REVIEW APP_JOUR_RUN_LOGIC APP_JOUR_TOPLEVEL APP_MILLIONS APP_NODVIMPLIED APP_NTDATADIR APP_NTINBOXDIR APP_NTOUTBOXDIR APP_NTREPORTDIR APP_NUM_DECIMALS APP_OUTBOXDIR APP_PATH APP_REPORTDIR APP_SERVER

Description Number of expected entities. Number of expected reports. Number of expected accounts. Number of expected categories. Flow rate account. Method for holding company. Application ID. Impacts future categories. Inbox directory (with macro substitution). Input ownership as percent, not as number of shares. Indicates whether application is set up to use dynamic organizations. Indicates whether the balance account is PVA. Indicates whether the flow account is PVA. Automatically numbers journal on save. Journals that must be reviewed. Calculate formulas when a journal is posted. Allow top-level journal adjustments. Millions separator. No dynamic view account implied calculations. Data directory with no macro substitution. Inbox directory with no macro substitution. Outbox directory with no macro substitution. Report directory with no macro substitution. Number of decimals to display. Outbox directory with macro substitution. Application path. Report directory with macro substitution. Server name for client-server options.

VB Type Long Long Long Long Long Long String Byte String Byte Byte Byte Byte Byte Byte Byte Byte String Byte String String String String Integer String String String String

C Type long long long long SIGNA SIGNA LPSTR HYPBOOL LPSTR HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL LPSTR HYPBOOL LPSTR LPSTR LPSTR LPSTR short LPSTR LPSTR LPSTR LPSTR

Nondefault Query Attributes 373

Query APP_SITE APP_SITE_SHIFTED APP_STORECONDETAIL APP_STORETRANDETAIL APP_SUBACCTSIG APP_THOUSANDS APP_USE_CHILD_RATES APP_USE_MULTI_THREAD APP_USE_SERVER APP_USES_SYSTEM_NUM APP_USETURBO

Description Site number (0 - 14). Site number bit-shifted to the high-order 4 bits. Store contribution detail. Store translation detail. Unique sub-account signatures, that is, not shared. Thousands separator. Indicates whether non-global rates come from child. Indicates wether to use multithread support (TRUE (1) or FALSE (0)). Indicates whether to use client-server options. Use the default system setting for number format. Indicates whether the system should use the ACE (Statutory Consolidation Engine).

VB Type Long Long Byte Byte Byte String Byte Byte Byte Byte Byte

C Type SIGNA SIGNA HYPBOOL HYPBOOL HYPBOOL LPSTR HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL

Table 79 lists the query attributes for file-based applications. You can read, update, and save these query attributes although they are currently not in use.
Table 79

Query Attributes for File-Based Applications Description Swap drive. Indicates whether user specified a swap drive. Compress file options. VB Type String Long (32-bit) Integer (16-bit) Long (32-bit) Integer (16-bit) C Type LPSTR HYPBOOL HYPBOOL

Query APP_SWAPDRIVE APP_ISSWAPDRIVE APP_ISCOMPRESS

Table 80 lists the query attributes for SQL applications.


Table 80

Query Attributes for SQL Applications Description SQL server name. SQL database name. Maximum negotiated packet size for the SQL driver. VB Type String String Long C Type LPSTR LPSTR long

Query APP_SQL_SERVER APP_SQL_DBNAME APP_NTWRK_PCKT_SIZE

ID_BOOK_ENTRIES (Book Entries Table) Query Attributes


Table 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 Description Book signature within a book set. Signature of the book set. Next book signature within a book set. VB Type Long Long Long C Type SIGNA SIGNA SIGNA

Query BOOK_ID BOOKSET_ID NEXT_BOOK_SIG

ID_BOOK_SETS (Book Sets Table) Query Attributes


Table 82 contains information about book sets. The actual books in each book set are stored in table ID_BOOK_ENTRIES.
Table 82

ID_BOOK_SETS Table Query Attributes Description ID of a report set ID in a book set. VB Type Long C Type SIGNA

Query BOOKSET_ID

ID_BOOKS (Books Table) Query Attributes


Table 83 lists query attributes for the Books table.
Table 83

ID_BOOKS Table Query Attributes Description Help instructions length. Help instructions. Document filter. Document filter code. VB Type String String Long Byte C Type LPSTR LPSTR long char

Query BOOK_COMPILED_BOOK BOOK_SCRIPT DOC_FILTER DOC_TYPE_CD

ID_CATEGORY (Categories Table) Query Attribute


Table 84 lists query attributes for the Category table.
Table 84

ID_CATEGORY Table Query Attributes Description Convert literal frequency "Q1 03" to a period number in the category. See Note 1. VB Type Long C Type long

Query CAT_CVTLITFREQTOPER

Nondefault Query Attributes 375

Query CAT_DATEFROMPER

Description Convert category period to calendar date.

VB Type Array of three Integers

C Type Array of three shorts. On return, the first element with be the month, the second will be the day, and the third will be the year. long HYPBOOL SIGNA LPCATMAP STRUCT long See Note 2. HYPBOOL HYPBOOL HYPBOOL long long short LPSTR LPSTR LPSTR LPSTR SIGNA char or short double short short HYPBOOL short SIGNA

CAT_FISCALYEARSTART CAT_FLOWYTD CAT_FREQ CAT_GETPERANDYEAR CAT_GETPERIOD CAT_HASDATA CAT_HASORG CAT_JOUR_RESTARTNUMON CAT_JOUR_STARTNUMBER CAT_MAPPERIOD CAT_NUMPERIODS CAT_PATH CAT_PATH_NOT CAT_PER_LONG CAT_PER_SHORT CAT_PRIORSIG CAT_SCALE CAT_SCALE_FACTOR CAT_STARTPER CAT_STARTYEAR CAT_STOREDET CAT_VIEW CODE

Fiscal year start of the category based on period number. Periodic or category-to-date flow. Frequency index. Map lStartPeriod to period and year. Gets period based on frequency, period, and year.

Long Byte Long CATMAP STRUCT Long Byte

Indicates whether an organization exists in this category. Restarts journal autonumber each period flag. Starting auto number for journals. Map period from FreqA to FreqB. See Note 3. Number of periods. Data path for this category with @APP translated. Data path for this category without @APP translated. Gets date in the form "January 2003." Gets period label ("Jan 03"). See Note 4. Signature of the prior category. Scale. Scale factor such as 1, 2, 3, and so on. Period in which the category starts. Year in which the category starts. Stores consolidation detail. View of data (VIEW_YTD or VIEW _PERIODIC.) User-defined code.

Byte Byte Long Long Integer String String String String Long Byte Double Integer Integer Byte Integer Long

The functions HypCatGetNumPeriodsEx( ) and EntCatGetNumPeriods( ) use a combination of the CAT_NUMPERIODS and CAT_MAPPERIOD query attributes.

376 Query Attributes

Note: The CAT_CVTLITFREQTOPER query attribute requires an apiStruct with the fields in

Table 85.
Table 85

Fields for apiStruct Description The address of the literal frequency string. An example is "Q1 03. TRUE (1) to allow frequencies other than the category's frequency, otherwise FALSE (0).

Field lpString u_ApiQry.bFreq_Not_CatFreq

Note: The CAT_GETPERIOD query attribute requires an apiStruct with the fields shown in

Table 86.
Table 86

Fields for apiStruct Description The month. The frequency signature such as FREQ_MONTH. The year. For example, 2003.

Field lStartPeriod u_ApiQry.sigFreq u_ApiQry.sYear

Note: The CAT_MAPPERIOD query attribute requires an apiStruct with the fields in

Table 87.
Table 87

Fields for apiStruct Description The period number in Freq A. The frequency for lStartPeriod FREQ_MONTH, and so on. For example, Freq A. Use NONE for the default frequency of the category. The desired frequency, for example, Freq B.

Field lStartPeriod u_ApiQry.sigFreq u_ApiQry.sigAltFreq

On return, pzBuf will be the period number in Freq B that is equivalent to the specified period in 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 in

Table 88.

Nondefault Query Attributes 377

Table 88

Fields for apiStruct Description The period number. The frequency. Set to NONE to use the frequency of the category.

Field lStartPeriod u_ApiQry.sPeriod_View

ID_CATEGORY_LINKS (Category Links Table) Query Attributes


Table 89 lists the query attributes for the Category Links table.
Table 89

ID_CATEGORY_LINKS Query Attributes Description Category linkage Category signature VB Type Long Long C Type SIGNA SIGNA

Query CATLINK_LINKCAT CATLINK_MAINCAT

ID_CODES (Codes Table) Query Attributes


Table 90 lists query attributes for the Codes table.
Table 90

ID_CODES Query Attributes Description See the CODE_TYPE_... definitions in the toolinc.h. file. VB Type Integer C Type short

Query CODES_TYPE

ID_CURRENCY (Currencies Table) Query Attributes


Table 91 lists the query attributes for the Currencies table.
Table 91

ID_CURRENCY Table Query Attributes Description The symbol for this currency, such as $, , and so on. The multiply/divide flag state. TRUE (1) if this currency is multiply. VB Type String Integer C Type LPSTR short

Query CURR_SYMBOL MULFLAG

ID_DATAFILE (Datafile Table) Query Attributes


Most query attributes for the Datafile table require an apiStruct. For instructions on setting up an apiStruct, Using an apiStruct Structure on page 110. For more information about which fields to set in the apiStruct, Retrieving Data on page 115. You might also need to set the u_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 status values 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 Description Indicates whether the account is a calculated (LOGIC_CALC) or input account (LOGIC_INPUT or LOGIC_LINPUT). Get formula for account. Get the number of periods out of the requested periods that contain data. Get the account signature. Get data values. Get list of accounts from within datafile. Get base value for a balance account. Get base value for a flow account. Get cumulative value. Get opening balance. Get previous value. Get status of each period. Indicates whether the period can be journal locked. Indicates whether the period can be journal unlocked. Indicates whether the period can be locked. Indicates whether the period can be unlocked. Get parent/child status for each requested period. 0 0 0 0 Byte Byte Byte Byte Array of Integers NULL NULL NULL NULL HYPBOOL HYPBOOL HYPBOOL HYPBOOL Array of shorts VB Type Integer String Integer Long 0 Array of Long. 0 C Type short LPSTR short SIGNA NULL Array of SIGNA. NULL

Query ACCT_TYPE DATAFILE_GETLOGICSTMT DATAFILE_ACCTHASDATA DATAFILE_ACCTSIG DATAFILE_GET DATAFILE_GETACCTLIST DATAFILE_GET_BAS DATAFILE_GET_BASFLO DATAFILE_GET_CUM DATAFILE_GET_OPE DATAFILE_GET_PRE DATAFILE_GETSTATUS DATAFILE_ISPER_EJLCKABLE DATAFILE_ISPER_EJUNLCKABLE DATAFILE_ISPER_LCKABLE DATAFILE_ISPER_UNLCKABLE PARENT

Note: Results for the following query attributes are returned in both the data buffer and the

status buffer, the lpimrData and lpseStatus addresses in the apiStruct: DATAFILE_GET DATAFILE_GET_BAS DATAFILE_GET_BASFLO DATAFILE_GET_CUM DATAFILE_GET_OPE DATAFILE_GET_OPEMUST DATAFILE_GET_PRE DATAFILE_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 in

Table 93.

Nondefault Query Attributes 379

Table 93

Fields for apiStruct Description The category signature. The entity signature. The account signature.

Field sigCat sigName u_Dfa.sigAcct

The value returned in pzBuf is LOGIC_CALC, LOGIC_INPUT, or LOGIC_LINPUT.


Note: The DATAFILE_GETACCTLIST query attribute requires an apiStruct with the fields

shown in Table 94.


Table 94

Fields for apiStruct Description Datafile enumeration filters. See 0, DF_FILTOUT_CALC, and DF_FILTOUT_NODATA, and the toolkit.bas file. Number of entries that the buffer can hold.

Field u_ApiQry.pad u_ApiQry.pad2

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 was written exclusively to improve performance of data extract in Hyperion Enterprise. It does not use the sigRecd, SigKey, or dwLen arguments to EntQueryEx(). It assumes that the buffer is large enough and does not check the size. You must allocate the buffer large enough for one more than the number of records, otherwise you will overwrite memory.

ID_FORMATS (Formats Table) Query Attributes


Table 95 lists the query attributes for the Formats table.
Table 95

ID_FORMATS Table Query Attributes Description Account conversion table signature. Number of decimals. String delimiter. Suppress ZEROS NODATA. File spec (*.DAT). Name conversion table signature. Negative delimiter. VB Type Long Integer Byte Byte String Long Byte C Type SIGNA short UCHAR char LPSTR SIGNA UCHAR

Query FORMAT_ACONVSIG FORMAT_DECIMALS FORMAT_DELIMITER FORMAT_EXTRACT_DERIVED FORMAT_FILESPEC FORMAT_NCONVSIG FORMAT_NEG

380 Query Attributes

Query FORMAT_OPCODE FORMAT_OPERAND FORMAT_SCALE FORMAT_SUPRESS FORMAT_USE FORMAT_VIEW

Description Opcode (multiply, divide, or none). Operand (number used with opcode). Scale of the data. Suppress ZEROS NODATA. Format use LOAD / EXTRACT. Data view, such as YTD, PER, CATEGORY.

VB Type Byte Double Integer Byte Byte Byte

C Type char double short UCHAR char char

ID_FORMULAS (Formulas Table) Query Attributes


This table contains the individual logic statements for each logic method stored in the Logic table (ID_LOGIC). Table 96 lists the query attributes for the Formulas table.
Table 96

ID_FORMULAS Table Query Attributes Description Account signature for formula. Checks if a category has logic. Category for this formula. Comment for this statement. Size this comment. Error code (string resource). Formula signature that had error. The actual statement. Size of this statement. Long String Long Long Long String Long SIGNA LPSTR LONG LONG SIGNA LPSTR LONG VB Type Long C Type SIGNA

Query FORMULA_ACCOUNT FORMULA_CAT_HAS_LOGIC FORMULA_CATEGORY FORMULA_COMMENT FORMULA_COMMENT_SZ FORMULA_ERROR_CODE FORMULA_ERROR_SIG FORMULA_STATEMENT FORMULA_STATEMENT_SZ

ID_FREQUENCY (Frequencies Table) Query Attributes


Table 97 lists the query attributes for the Frequencies table.
Table 97

ID_FREQUENCY Table Query Attributes Description VB Type Long Integer C Type SIGNA short

Query FREQ_BASEPERIOD FREQ_FISCALSAME

Nondefault Query Attributes 381

Query FREQ_FISCALSTART FREQ_LITTOSIG FREQ_MAP_PERIODS FREQ_NUMPERYEAR FREQ_PERLONG FREQ_PERSHORT FREQ_RPTFREQ

Description

VB Type Integer

C Type short SIGNA short short LPSTR LPSTR SIGNA

Get frequency signature from period ID. See Note 1. See Note 3. Number of frequency units in a year. Description of the period in the frequency. See Note 4. ID of the period in the frequency. See Note 4. Get associated reporting frequency. See Note 2.

Long Integer Integer String String Long

Note: The FREQ_LITTOSIG query attribute requires an apiStruct with the lpString field set to

the address of the literal period string, such as "Q1."


Note: The FREQ_RPTFREQ query attribute converts a Hyperion Enterprise frequency and view

to the corresponding reporting frequency. Pass the signature of the Hyperion Enterprise frequency as the record signature (sigRecd argument). Pass the Hyperion Enterprise view as the sigKey argument.
Note: The FREQ_MAP_PERIODS query attribute converts a period in one frequency to the

equivalent period in another frequency. This query attribute requires an apiStruct with its u_ApiQry.sPeriod_Base field set to the signature of the base frequency, and its lStartPeriod field set to the period number (in the base frequency). The sigRecd argument in EntQueryEx() or HypQueryEx() is the signature of the frequency to which you want to map the period. On return, pzBuf will be the period number or the constant BAD_PERIOD. The return code is always 0. Also, see the CAT_MAPPERIOD query attribute in the ID_CATEGORY Query Attributes table.
Note: For the FREQ_PERLONG and FREQ_PERSHORT query attributes, pass the period

number as the sigKey argument.

ID_GROUP (Account Groups Table) Query Attributes


Most of the query attributes for this table are default values used when a new account is added to the group. Table 98 lists the query attributes for the Account Groups table.
Table 98

ID_GROUPS Table Query Attributes Description Number of decimals to display. VB Type Integer C Type short

Query ACCT_DECIMALS

382 Query Attributes

Query ACCT_IS_BALANCE ACCT_IS_CONSOLIDATE ACCT_IS_CURRENCY ACCT_IS_DYNAMIC ACCT_IS_SCALE ACCT_IS_SINGLELEVEL ACCT_SUBACCT_TABLE ACCT_SUBACCT_TYPE ACCT_TYPE CODE GRPACCT_CHARTORDER

Description Indicates whether the account is a balance account, TRUE (1) or FALSE (0). Indicates whether the account is a consolidation account, TRUE (1) or FALSE (0). Indicates whether Currency translation should be applied, TRUE (1) or FALSE (0). Indicates whether the account is a dynamic account, TRUE (1) or FALSE (0). Indicates whether the account is a scaled account, TRUE (1) or FALSE (0). Limit accounts to one level, TRUE (1) or FALSE (0). Get sub-account signature. Get sub-account type: Fixed, Validated, or None. Type of account. Signature of user-defined code. Signature of first account in the group.

VB Type Byte Byte Byte Byte Byte Byte Long Byte Integer Long Long

C Type HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL SIGNA char short SIGNA SIGNA

ID_HAPP (Application Information Table) Query Attributes


The query attributes in Table 99 are used with EntQueryDefault( ). You can also use them with HypQueryEx( ) or EntQueryEx( ). Default queries do not apply to this table.
Table 99

ID_HAPP Table Query Attributes Description Do not display error messages on screen. Intended for use by server applications where it is not practical to display an error message. Password of the current user. Indicates whether an application uses client-server options and the client-server DLL is available. TRUE (1) or FALSE (0). User ID for the current user. VB Type Byte String Byte String C Type HYPBOOL LPSTR HYPBOOL LPSTR

Query HYP_HAPP_IS_SILENT HYP_PASSWORD HYP_SERVER_AVAIL HYP_USERID

ID_ICSET (Intercompany Matching Sets Table) Query Attributes


The 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 Description Signature of first detail record in table ID_INTCODET. Signature of plug account. VB Type Long Long C Type SIGNA SIGNA

Query INTCO_GROUPSIG INTCO_PLUGSIG

ID_INTCODET (Intercompany Detail Table) Query Attributes


This table contains the pairs of intercompany accounts for each intercompany matching set in the Intercompany Matching Sets table (ID_ICSET). Table 101 lists the query attributes for the Intercompany Detail table.
Table 101

ID_INTCODET Table Query Attributes Description Signature of one intercompany account. Signature of the matching account. Signature of the next detail record in the set, or NONE if no more details. VB Type Long Long Long C Type SIGNA SIGNA SIGNA

Query INTCO_ACCTSIG1 INTCO_ACCTSIG2 INTCO_NEXTDET

ID_JOURNAL_DETAIL (Journals Detail Table) Query Attributes


This 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 Journals Detail table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOURERR_INVATTR is not defined in the TOOLINC.H file. You must define it yourself. The value is 13.
Table 102

ID_JOURNAL_DETAIL Table Query Attributes Description Affected account. Value entered in the credit column. Value entered in the debit column. VB Type Long Double Double Byte TRUE (1) if the record is deleted. Affected entity for this detail. Byte Long C Type SIGNA double double HYPBOOL HYPBOOL SIGNA

Query JOUR_ACCT_SIG JOUR_CREDIT_AMOUNT JOUR_DEBIT_AMOUNT JOUR_DETAIL_IS_COMPLETE JOUR_DETAIL_IS_DELETED JOUR_ENTITY_SIG

384 Query Attributes

Query JOUR_JOURNAL_SIG JOUR_NEXT_DET_SIG JOUR_NEXT_JRNL_DET_SIG JOUR_OWNER_TABID JOUR_PERIOD_NUM

Description Journal to which this detail applies. Next detail in the table. Next detail for this journal. Table ID of the detail's owner. Period number to which the journal applies.

VB Type Long Long Long Integer Long

C Type SIGNA SIGNA SIGNA short long

The JOUR_JOURNAL_SIG, JOUR_NEXT_DET_SIG, JOUR_NEXT_JRNL_DET_SIG, and JOUR_OWNER_TABID query attributes require an apiStruct with the fields shown in Table 103. For the JOUR_PERIOD_NUM query attribute, you do not need to specify the 1StartPeriod and 1EndPeriod fields in the apiStruct, however you do need to specify the sigCat field in the apiStruct.
Table 103

Fields for apiStruct Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_JOURNAL_HISTORY (Journals History Table) Query Attributes


The 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 lists the query attributes for the Journals History table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOURERR_INVATTR is not defined in the TOOLINC.H file. You must define it yourself. The value is 13.
Table 104

ID_JOURNAL_HISTORY Table Query Attributes Description Parent of entity to which the journal applies. Specifies the journal as balanced or unbalanced. VB Type Long Byte C Type SIGNA UCHAR See Note 2 below.

Query JOUR_AFFECTED_PARENT JOUR_ATTRIB

Nondefault Query Attributes 385

Query JOUR_AUTONUMBER JOUR_CODE_SIG JOUR_CREATE_DATETIME JOUR_CREATED_BY_USER_ID JOUR_DETAIL_SIG JOUR_DETAIL_TABID JOUR_ISBALANCED JOUR_ISCOMPLETE JOUR_DIFFERENCE JOUR_JOURNAL_NAME JOUR_JOURNAL_STATUS JOUR_PERIOD_NUM JOUR_PERIODIC_FLAG JOUR_POST_DATETIME JOUR_POSTED_BY_USER_ID JOUR_REVIEWED_BY_USER_ID JOUR_REVIEWED_DATETIME JOUR_TOTAL_CREDITS JOUR_TOTAL_DEBITS JOUR_TYPE JOURHIST_NEXT_HIST_SIG

Description The automatically generated journal number. The code signature. local date and time of entry of user. ID of the user who entered this journal. The signature of the first detail for the journal. ID of the applicable detail table. TRUE (1) if journal is balanced.

VB Type Long Long Long String Long Integer Byte Byte

C Type long SIGNA time_t See Note 1 below. LPSTR SIGNA short HYPBOOL HYPBOOL double LPSTR short long HYPBOOL time_t See Note 1 below. LPSTR LPSTR time_t See Note 1 below. double double UCHAR SIGNA

The difference between total debits and credits in the journal. Name of journal (unique within category and period). Specifies the journal status as Posted, Unposted, Reviewed, Edited, or Deleted. Period number to which the journal applies. TRUE (1) if post-periodic, or FALSE (0) if period-to-date. Local date and time of post. ID of the user who posted this journal. ID of the user who reviewed this journal. Local date and time of review. Total of all journal detail credits. Total of all journal detail debits. Specifies the journal type as Auto-Reversing, Top-level or Regular. First entry for this journal in the History Detail table.

Double String Integer Long Byte Long String String Long Double Double Byte Long

Note: The time_t type is defined as the number of seconds since midnight January 1, 1970. In

Microsoft'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 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

JOUR_ATTRIB_BALANCED JOUR_ATTRIB_UNBALANCED 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 Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_JOURNAL_HISTORY_DETAIL (Journals History Detail Table) Query Attributes


This 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 query attributes for the Journals History Detail table.
Note: Calls to HypQuery...() or EntQuery...() for the various Journals tables may return the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOUERR_INVATTR is not defined in the TOOLINC.H file. You must define it yourself. The value is 13.
Table 106

ID_JOURNAL_HISTORY_DETAIL Table Query Attributes Description Affected account. Value entered in the credit column. Value entered in the debit column. TRUE (1) if detail is complete. TRUE (1) if record is deleted. Affected entity for this detail. Journal to which this detail applies. Next detail in the table. Next detail for this journal. VB Type Long Double Double Byte Byte Long Long Long Long C Type SIGNA double double HYPBOOL HYPBOOL SIGNA SIGNA SIGNA SIGNA

Query JOUR_ACCT_SIG JOUR_CREDIT_AMOUNT JOUR_DEBIT_AMOUNT JOUR_DETAIL_IS_COMPLETE JOUR_DETAIL_IS_DELETED JOUR_ENTITY_SIG JOUR_JOURNAL_SIG JOUR_NEXT_DET_SIG JOUR_NEXT_JRNL_DET_SIG

Nondefault Query Attributes 387

Query JOUR_OWNER_TABID JOUR_PERIOD_NUM

Description Table ID of the detail's owner. Period number to which the journal applies.

VB Type Integer Long

C Type short long

All query attributes for this table require an apiStruct with the fields shown in Table 107.
Table 107

Fields for apiStruct Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_JOURNAL_PERIOD_INFO (Journal Period Information Table) Query Attributes


Default queries do not apply to this table. You can pass HYP_NONE (NONE in C) as the record signature. 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 the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOURERR_INVATTR is not defined in the TOOLINC.H file. You must define it yourself. The value is 13.
Table 108

ID_JOURNAL_PERIOD_INFO Table Query Attributes Description TRUE (1) if the period is open Number of the next unopened period. Period number to which the journal applies. VB Type Byte Long Long C Type HYPBOOL long long

Query JOURPER_IS_PERIOD_OPENED JOURPER_NEXT_PERIOD_TO_OPEN JOURPER_PERIOD_NUMBER

All query attributes for this table require an apiStruct with the fields shown in Table 109.
Table 109

Fields for apiStruct Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

388 Query Attributes

ID_JOURNAL_TEMPLATES (Journal Templates Table) Query Attributes


This table stores journal templates. The detail records for each journal template are stored in the Journal Templates Detail table, ID_JOURNAL_TEMPLATES_DETAIL. Default queries do not 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 the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOURERR_INVATTR is not defined in the toolinc.h file. You must define it yourself. The value is 13.
Table 110

ID_JOURNAL_TEMPLATES Table Query Attributes Description Parent of entity to which journal applies. Specifies the journal as Balanced or Unbalanced. See Note 2 below. The code signature. User's local date and time of entry. ID of the user who entered this journal. The signature of the first detail for the journal template. ID of the applicable detail table. The difference between total debits and credits in the journal. TRUE (1) if journal is balanced. VB Type Long Byte Long Long String Long Integer Double Byte Byte Name of journal (unique within category and period). TRUE (1) if post periodic, or FALSE (0) if period-to-date. Type of journal template (standard or recurring). See Note 3 below. Total of all journal detail credits. Total of all journal detail debits. Specifies the journal type as auto-reversing, top-level or regular. String Byte Byte Double Double Byte C Type SIGNA UCHAR SIGNA time_t See Note 1 below. LPSTR SIGNA short double HYPBOOL HYPBOOL LPSTR HYPBOOL UCHAR double double UCHAR

Query JOUR_AFFECTED_PARENT JOUR_ATTRIB JOUR_CODE_SIG JOUR_CREATE_DATETIME JOUR_CREATED_BY_USER_ID JOUR_DETAIL_SIG JOUR_DETAIL_TABID JOUR_DIFFERENCE JOUR_ISBALANCED JOUR_ISCOMPLETE JOUR_JOURNAL_NAME JOUR_PERIODIC_FLAG JOUR_TEMPLATE_TYPE JOUR_TOTAL_CREDITS JOUR_TOTAL_DEBITS JOUR_TYPE

Nondefault Query Attributes 389

Note: The time_t type is defined as the number of seconds since midnight January 1, 1970. In

Microsoft'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 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:

JOUR_ATTRIB_BALANCED JOUR_ATTRIB_UNBALANCED JOUR_ATTRIB_BAL_BY_ENTITY

For more information on these constants, see the ID_JOURNALS (Journals Table) Query Attributes on page 391.
Note: The JOUR_TEMPLATE_TYPE query attribute returns the following constants:

JOUR_TEMPLATE_STANDARD (1) JOUR_TEMPTYPE_RECURRING (2)

The constants for the JOUR_TEMPLATE_TYPE query attribute are not defined in the TOOLINC.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 Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_JOURNAL_TEMPLATES_DETAIL (Journal Templates Detail Table) Query Attributes


This 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 112 lists 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 the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOURERR_INVATTR is not defined in the toolinc.h file. You must define it yourself. The value is 13.
Table 112

ID_JOURNAL_TEMPLATES_DETAIL Table Query Attributes Description Affected account. Value entered in the credit column. Value entered in the debit column. TRUE (1) if detail is complete. TRUE (1) if record is deleted. Affected entity for detail. Journal to which this detail applies. Next detail in the table. Next detail for this journal. Table ID of the detail's owner. Period number to which this journal applies. VB Type Long Double Double Byte Byte Long Long Long Long Integer Long C Type SIGNA double double HYPBOOL HYPBOOL SIGNA SIGNA SIGNA SIGNA short long

Query JOUR_ACCT_SIG JOUR_CREDIT_AMOUNT JOUR_DEBIT_AMOUNT JOUR_DETAIL_IS_COMPLETE JOUR_DETAIL_IS_DELETED JOUR_ENTITY_SIG JOUR_JOURNAL_SIG JOUR_NEXT_DET_SIG JOUR_NEXT_JRNL_DET_SIG JOUR_OWNER_TABID JOUR_PERIOD_NUM

All query attributes for this table require an apiStruct with the fields shown in Table 113.
Table 113

Fields for apiStruct Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_JOURNALS (Journals Table) Query Attributes


The 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 the

error code JOUERR_INVATTR if you use a query attribute that is not valid for that particular table. JOURERR_INVATTR is not defined in the toolinc.h file. You must define it yourself. The value is 13.
Nondefault Query Attributes 391

Table 114

ID_JOURNALS Table Query Attributes Description Used for parentadjustment only. Specifies the journal as Balanced or Unbalanced. The automatically generated journal number. The code signature. Local date and time of entry of user. ID of the user who entered this journal. The signature of the first detail for the journal. ID of the applicable detail table. The difference between total debits and credits in the journal. The first entry for this journal in the Journal History table, ID_ JOURNAL_HISTORY. TRUE (1) if this journal is balanced. TRUE (1) if this journal is balanced. TRUE (1) if this journal is complete. TRUE (1) if this journal is editable. TRUE (1) if this journal is postable. TRUE (1) if this journal is reversible. TRUE (1) if this journal is reviewable. TRUE (1) if this journal is unpostable. Name of journal, which is unique within category and period. Specifies the journal status as Posted, Unposted, Reviewed, Edited, or Deleted. Period number to which the journal applies. TRUE (1) if post periodic, or FALSE (0) if period-to-date. Local date and time of post. ID of the user who posted this journal. ID of the user who reviewed this journal. Long Long Long String Long Integer Double Long Byte Byte Byte Byte Byte Byte Byte Byte String Integer Long Byte Long String String VB Type Long C Type SIGNA UCHAR long SIGNA time_t See Note below. LPSTR SIGNA short double SIGNA HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL LPSTR short long HYPBOOL time_t See Note below. LPSTR LPSTR

Query JOUR_AFFECTED_PARENT JOUR_ATTRIB JOUR_AUTONUMBER JOUR_CODE_SIG JOUR_CREATE_DATETIME JOUR_CREATED_BY_USER_ID JOUR_DETAIL_SIG JOUR_DETAIL_TABID JOUR_DIFFERENCE JOUR_HIST_SIG JOUR_ISBALANCED JOUR_ISBALANCEDBYNAME JOUR_ISCOMPLETE JOUR_ISEDITABLE JOUR_ISPOSTABLE JOUR_ISREVERSABLE JOUR_ISREVIEWABLE JOUR_ISUNPOSTABLE JOUR_JOURNAL_NAME JOUR_JOURNAL_STATUS JOUR_PERIOD_NUM JOUR_PERIODIC_FLAG JOUR_POST_DATETIME JOUR_POSTED_BY_USER_ID JOUR_REVIEWED_BY_USER_ID

392 Query Attributes

Query JOUR_REVIEWED_DATETIME JOUR_TOTAL_CREDITS JOUR_TOTAL_DEBITS JOUR_TYPE

Description Local date and time of review. Total of all journal detail credits. Total of all journal detail's debits. Specifies the journal type as Auto-reversing, Parent or Regular.

VB Type Long Double Double Byte

C Type time_t See Note below. double double UCHAR

Note: The time_t type is defined as the number of seconds since midnight January 1, 1970. In

Microsoft'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 date and time (day, month, year, hour, minute, and more). For more information, see Microsoft's documentation (MSDN - Microsoft Developers' Network). All of the constants 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 Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_LOGIC (Methods Table) Query Attributes


This table contains the available methods in the system. See the record signatures for various default methods in the toolinc.h file. Table 116 lists the query attributes for the Methods table.
Table 116

ID_LOGIC Table Query Attributes Description User-defined code. Validate flag for methods. Logic type: Chart or Consolidation. Number of entities to view. VB Type Long Byte Integer Integer C Type SIGNA char short short

Query CODE INVALID LOGIC_TYPE NUM_NAMES

Nondefault Query Attributes 393

ID_LOGIC_CAT_ATTRIB (Logic Category Attributes Table) Query Attributes


Table 117 lists the query attributes for the Logic Category Attribute table.
Table 117

ID_LOGIC_CAT_ATTRIB Table Query Attributes Description Category attributes Consol option Elim option Signature of category these attributes apply to NoConsol option NoElim option No rounding option Notrans option Rounding option TRANS option VB Type Integer Byte Byte Long Byte Byte Byte Byte Byte Byte C Type Word Uchar Uchar SIGNA Uchar Uchar Uchar Uchar Uchar Uchar

Query CATATTR_ATTRIBUTE CATATTR_CONSOL CATATTR_ELIM CATATTR_MAINCAT CATATTR_NOCONSOL CATATTR_NOELIM CATATTR_NOROUND CATATTR_NOTRANS CATATTR_ROUND CATATTR_TRANS

ID_NAMECONVERT (Entity Conversion Table) Query Attributes


This 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 external name used for conversion. The default query attributes NAME and SHORTNAME return the external name. Table 118 the query attributes for the Entity Conversion table.
Table 118

ID_NAMECONVERT Table Query Attributes Description Add or subtract. Hyperion Enterprise entity. Entity signature. VB Type Integer String Long C Type short LPSTR SIGNA

Query NCONV_ADD_SUB NCONV_HYPNAME NCONV_SIG

ID_NAMECVTLIST (Entity Conversion Table) Query Attributes


This table contains information about the entity conversion lists in the application. The entries for 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 Description First entry in the Entity Conversion table. Direction: E to extract from Hyperion Enterprise, L to load into Hyperion Enterprise, or B for both directions. VB Type Long Byte C Type SIGNA char

Query FIRST_ENTRY LIST_DIRECTION

ID_NAMELIST (Entity Table) Query Attributes


This table contains information about the entity lists in the application. The entities in each entity list are stored in the Entity List Entry table (ID_NAMELISTENTRY). Table 120 lists the query attributes for the Entity table.
Table 120

ID_NAMELIST Table Query Attributes Description First entry in the Entity List Entry table, ID_NAMELISTENTRY. List type: F for fixed or D for dynamic. VB Type Long Integer C Type SIGNA short

Query FIRST_ENTRY LIST_TYPE

ID_NAMELISTENTRY (Entity List Entry Table) Query Attributes


This 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) and the entity list is a fixed list (as opposed to dynamic), then the query attributes will query the first entry for the list. The Entity List Entry table contains a record for each entry in a fixed list, and a criteria record for each entity list (fixed or dynamic). A dynamic entity list contains only a criteria record in this 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 Description Entity signature of list entry. Get signature of first entry. VB Type Long Long C Type SIGNA SIGNA

Query ENTRY_SIG FIRST_ENTRY

Table 122 lists all the query attributes that apply to criteria records.
Table 122

ID_NAMELISTENTRY Query Attributes for Criteria Records Description Include all dependents. VB Type Byte C Type HYPBOOL

Query ALL_DEPS

Nondefault Query Attributes 395

Query BASE_NAMES CHART_DATA CODE_DATA CONSOL_DATA CURRENCY_DATA DUP_NAMES ELIM_NAMES IMMED_DEPS INTCO_NAMES JOURNAL_NAMES NAME_DATA NUM_CHART NUM_CODES NUM_CONSOL NUM_CURRENCY NUM_NAMES NUM_ORGS NUM_SUBNAMES NUM_SUBSTRUCTS NUM_TRANS ORG_DATA PARENT_NAMES SUBNAMES SUBNAME_DATA SUBSTRUCT_DATA TRANS_DATA

Description Include base entities. Selected chart methods. Selected codes. Consolidation methods. Selected currencies. Allow duplicate entities. Include only elimination names. Include immediate dependents. Include only intercompany entities. Include only journal entities. Selected entities. Number of chart methods. Number of codes. Number of consolidation methods. Number of currencies. Number of entities specified. Number of organizations to view. Number of subentities. Number of substructures. Number of translation methods. Organization data. Include parent entities. Show subentities. Selected subentities. Selected substructures. Translation methods.

VB Type Byte Array of Longs Array of Longs Array of Longs Array of Longs Byte Byte Byte Byte Byte Array of Longs Long Long Long Long Long Long Long Long Long Array of Longs Byte Byte Array of Longs Array of Longs Array of Longs

C Type HYPBOOL Array of SIGNA Array of SIGNA Array of SIGNA Array of SIGNA HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL Array of SIGNA long long long long long long long long long Array of SIGNA HYPBOOL HYPBOOL Array of SIGNA Array of SIGNA Array of SIGNA

396 Query Attributes

ID_NAMES (Entities Table) Query Attributes


For all query attributes other than the default query attributes, you can suppress the sub-entity to get information about only the specified major entity component of the specified entity. This option 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 Description Indicates whether parent adjustments are allowed for this entity. TRUE (1) or FALSE (0). Signature of chart method for the parent adjustment. Chart method signature. User-defined code. Currency. Get combination of entity and sub-entity descriptions. Indicates whether the entity is an elimination entity. TRUE (1) or FALSE (0). Signature of holding company. Indicates whether the entity is an intercompany entity. TRUE (1) or FALSE (0). Indicates whether the entity allows journals. TRUE (1) or FALSE (0). Get the concatenated entity.subentity ID. Get the signature of a given entity and sub-entity combination. See Note Returns the entity code by period from shares if there is one for the entity. See Note 2. Indicates whether the specified entity exists in the specified organization. TRUE (1) or FALSE (0). See Note 3. Indicates whether the entity is a holding company for an entity. TRUE (1) or FALSE (0). Indicates whether the specified entity has a journal posted to it. TRUE (1) or FALSE (0). Indicates whether the specified entity has a parent journal posted. TRUE (1) or FALSE (0). Indicates whether you can enter data for the entity. TRUE (1) or FALSE (0). See Note 4. Returns just the major entity signature for this entity. VB Type Byte Long Long Long Long String Byte Long Byte Byte String Long Long or Array of Longs Byte Byte Byte Byte Byte Long C Type HYPBOOL SIGNA SIGNA SIGNA SIGNA LPSTR HYPBOOL SIGNA HYPBOOL HYPBOOL LPSTR SIGNA SIGNA or Array of SIGNA HYPBOOL HYPBOOL HYPBOOL HYPBOOL HYPBOOL SIGNA

Query ALLOW_TOPADJ CHART_TOPADJ CHARTMETHOD CODE CURRENCY DESC ELIMINATIONS HOLDING_COMPANY INTERCOMPANY JOURNALS NAME NAME_COMBINE_VSIGS NAME_ENT_CODES NAME_IN_ORG NAME_IS_HOLDING_ COMPANY NAME_IS_JOURPOSTED NAME_IS_JOURPARPOSTED NAME_IS_VALID_FOR_DATA NAME_MAJOR

Nondefault Query Attributes 397

Query NAME_PARENT_NODE NAME_SPLIT_VSIGS NAMEWITHSUB PAR_CHILD_STAT PARENT PARENT_IN_ANY_CAT SCALE SCALE_FACTOR STOREAUDITDET SUB-NAME SUBSTRUCT

Description Returns the node for this entity and parent combination. Returns the major entity and sub-entity signatures for the entity. See Note 5. Query for entities. If you send EUROFF and it has a substructure, returns EUROFF.PTADJ. Get status: Parent, Child, or Inactive. See Note 6. Get status: Parent, Child, or Inactive. See Note 6. Returns PARENT_ACTIVE if the entity is a parent in any category. Scaling. Scale factor, such as 1000. Indicates whether audit detail information is saved during consolidation. TRUE (1) or FALSE (0). Subentity signature. Associated substructure signature. NONE if no substructure.

VB Type Long Long Long Integer Integer Integer Byte Double Byte Long Long

C Type SIGNA SIGNA SIGNA short short short char double HYPBOOL SIGNA SIGNA

Note: The NAME_COMBINE_VSIGS query attribute requires an apiStruct with the

u_ApiQry.sigSub field set to the signature of the sub-entity. On return, pzBuf contains the resultant signature or NONE. The query function returns one of the following codes: Return Codes:
Code 0 NAME_FULL_0SUBSUSED NAME_SUBSNOTVALID NONE Meaning Successful. The entity signature already had a sub-entity. No sub-entity, or an invalid sub-entity was specified. No apiStruct, or any other error.

Note: Use the NAME_ENT_CODES query attribute to get the signature of the code associated

with the entity regardless of whether it comes from the Entities table (ID_NAMES) or from the Shares table (ID_SHARES). This query attribute only requires an apiStruct if you 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 Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

If a range of periods is specified (lStartPeriod to lEndPeriod), then pzBuf must be large enough for 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 apiStruct specifying the period.
Note: The NAME_IN_ORG query attribute requires an apiStruct with the sigName field set to

the signature of the organization.


Note: When using the NAME_IS_VALID_FOR_DATA query attribute, if the entity has an

attached substructure, you can enter data only to an entity.subentity combination. For example, 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 a combination or if no substructure is attached.
Note: The NAME_SPLIT_VSIGS query attribute requires an apiStruct with the signature of the

major entity returned in pzBuf, and the signature of the sub-entity returned in u_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 returns CHILD_ACTIVE. If the entity is not active in all specified periods, pzBuf returns NAME_INACTIVE. This query attribute requires an apiStruct if the application is set up to use dynamic organizations. Set the fields shown in Table 125 in the apiStruct.
Table 125

Fields for apiStruct Description The category signature. The starting period. The ending period. 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 specified range. If this field is not NULL, the values will be returned in the status buffer by period, instead of in pzBuf.

Field sigCat lStartPeriod lEndPeriod lpseStatus

Nondefault Query Attributes 399

ID_NODES (Nodes Table) Query Attributes


Default query attributes do not apply to this table. If you specify a range of periods, the buffer must be large enough to hold the return values for all periods in the range. Table 126 lists the query attributes for the Nodes table.
Table 126

ID_NODES Table Query Attributes Description Zero value indicates that data should be added to the parent, nonzero value indicates that data should be subtracted from the parent. Signature of child node. See Note. Count of items in the table. Hide dependents. Returns just the major entity signature for this entity. Entity signature with implied sub-entity if one exists. Entity signature without implied sub-entity if one exists. Next parent. VB Type Integer Long Long Byte Long Long Long Long Byte Zero value indicates that the node is inactive in the specified period or periods, otherwise the node is active. Byte Byte Parent consolidation method to use when performing a consolidation of the child. Long Byte Byte Parent percentage to consolidate of the child. Parent percentage control of the child. Parents percentage ownership of the child. Parent node. Signature of sibling node. Parent translation method to use when performing a consolidation of the child. Double Double Double Long Long Long C Type short SIGNA long HYPBOOL SIGNA SIGNA SIGNA SIGNA HYPBOOL HYPBOOL HYPBOOL SIGNA HYPBOOL HYPBOOL double double double SIGNA SIGNA SIGNA

Query ADDFLAG CHILD COUNT HIDEDEPS NAME_MAJOR NAMEID NAMESIG NEXTPARENT NODE_CONSOLIDATABLE NODEBYPER_ACTIVE NODEBYPER_ACTIVE_OR NODEBYPER_CONLOGIC NODEBYPER_ISACTIVE NODEBYPER_ISACTIVE_OR NODEBYPER_PCTCONSOL NODEBYPER_PCTCONTROL NODEBYPER_PCTOWNED PARENT SIBLING TRANSMETHOD

Note: If you want to suppress subentities with the CHILD query attribute, set the

u_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 table require an apiStruct with the fields shown in Table 127.
Table 127

Fields for apiStruct Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

ID_ORGANIZATION (Organizations Table) Query Attributes


Table 128 lists the query attributes for the Organizations table.
Table 128

ID_ORGANIZATION Table Query Attributes Description Substructure signature. Signature of top node in organization. VB Type Long Long C Type SIGNA SIGNA

Query SUBSTRUCT TOPNODE

For more information on the TOPNODE query attribute, see HypGetTopNodeEx( ) - Get Top Node on page 101.

ID_PERIOD (Periods Table) Query Attributes


Table 129 lists the query attributes for the Periods table.
Table 129

ID_PERIOD Table Query Attributes Description Number of the day in the year. Number of the half-year in the year. Number of the month in the year. Number of the quarter in the year. Number of the trimester in the year. Number of the week in the year. Year. VB Type Integer Integer Integer Integer Integer Integer Integer C Type short short short short short short short

Query PER_DAYS PER_HALFYEARS PER_MONTHS PER_QUARTERS PER_TRIMESTERS PER_WEEKS PER_YEARS

Nondefault Query Attributes 401

ID_PRINT (Printing Table) Query Attributes


ID_PRINT contains a record for each sample report provided in Hyperion Enterprise. Each record contains page setup and page format information for that report. The page setup and page format information is intended for use by Print Engine functions. The record for a particular report may not necessarily exist, if the report has not been run by someone with write access to the table. Table 130 lists the query attributes for the Printing table.
Table 130

ID_PRINT Table Query Attributes Description Page format. Page setup structure. VB Type Byte Byte C Type char char

Query PRINT_PAGEFORMAT PRINT_PAGESETUP

ID_PSFDATA (PSF Data Table) Query Attributes


For 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, and type (e.g., ID_REGULAR,) in the apiStruct (sigName, sigParent, and wType fields.) The API function will use this information to find the appropriate record in the PSF table. Pass the signature of the record in the PSF table (as the sigRecd argument.) If you know the record signature from a previous call to EntFind() or EntEnum(), this is the more efficient method.

Table 131 lists the query attributes for the PSF Data table.
Table 131

ID_PSFDATA Table Query Attributes Description Get PSF status information. Get PSF status and text for one period. Entity signature. Parent entity signature. Put PSF status information PSF type. See Note. Long Long SIGNA SIGNA VB Type C Type

Query PSF_GETSTATUS PSF_GETSTATUSTEXT PSF_NAME PSF_PARENT PSF_PUTSTATUS PSF_TYPE

Note: The wType and PSF_TYPE query attributes return the following constants:

ID_REGULAR ID_ELIMINATION

402 Query Attributes

ID_TRANSLATION ID_PROPORTIONAL ID_CONTRIBUTION ID_ADJUSTMENT

All query attributes for this table require an apiStruct with the fields in Table 132.
Table 132

Fields for apiStruct Description The starting period. The ending period. The entity signature. The parent entity signature if sigType is not ID_REGULAR. The type. Use the same constants as in the note above. The category signature.

Field lStartPeriod lEndPeriod sigName sigParent wType sigCat

ID_REPORT_ENTRIES (Report Entries Table) Query Attributes


This 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 Description Next report signature within a report set. Report ID within a report set. VB Type Long Long C Type SIGNA SIGNA

Query NEXT_REPORT_SIG REPORT_ID

ID_REPORT_SETS (Report Sets Table) Query Attributes


The 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 Description Signature of the first report in the set. VB Type Long C Type SIGNA

Query REPSET_ID

ID_REPORTS (Reports Table) Query Attributes


Table 135 lists the query attributes for the Reports table.
Nondefault Query Attributes 403

Table 135

ID_REPORTS Table Query Attributes Description VB Type Byte Byte C Type char char

Query REPORT_COMPILED_RPT REPORT_SCRIPT

ID_ROLLOVER (Rollovers Table) Query Attributes


This 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 Description Destination category. Next detail record. Source category. VB Type Long Long Long C Type SIGNA SIGNA SIGNA

Query ROLL_DESTCAT ROLL_NEXTDET ROLL_SRCCAT

ID_ROLLSET (Rollover Sets Table) Query Attributes


This table contains information about each rollover set. The entries for each rollover set are stored 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 Description Get destination data options. Get destination options - Same as Source or Yearly. Retrieve the group signature for the rollover set. Get the number of source periods to copy. Get the number of periods to increment. Get source data options. Rollover type: Year End or Periodic. VB Type Integer Integer Long Integer Integer Integer Integer C Type Short Short SIGNA Short Short Short Short

Query ROLL_DESTDATAOPT ROLL_DESTOPT ROLL_GROUPSIG ROLL_NUMPERCOPY ROLL_NUMPERINCR ROLL_SRCDATAOPT ROLL_TYPE

ID_RPTFREQ (Reporting Frequencies Table) Query Attributes


Default 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 Reporting Frequencies table.
404 Query Attributes

Table 138

ID_RPTFREQ Table Query Attributes Description Description. Label. The string must be large enough for at least SIZERPTFREQ + 1 characters. Get the Hyperion Enterprise frequency. Get the Hyperion Enterprise view. ID. VB Type String String Integer or Long Integer or Long String C Type LPSTR LPSTR short or SIGNA short or SIGNA LPSTR

Query DESC NAME RFQ_FREQ RFQ_VIEW SHORTNAME

ID_RPTVIEW (Reporting Views Table) Query Attributes


Default queries do not apply to this table. Table 139 lists the query attributes for the Reporting Views table.
Table 139

ID_RPTVIEW Table Query Attributes Description Description. Label. Get the Hyperion Enterprise frequency associated with the reporting view Get the Hyperion Enterprise view type associated with the reporting view. ID. VB Type String String Integer or Long Integer or Long String C Type LPSTR LPSTR short or SIGNA short or SIGNA LPSTR

Query DESC NAME RFQ_FREQ RFQ_VIEW SHORTNAME

ID_RULES (Update Rules Table) Query Attributes


Table 140 lists the query attributes for the Update Rules table.
Table 140

ID_RULES Table Query Attributes Description Check the account sign during the update rule. Execute update rule always. Signature of first expression for this rule. Help instruction length. Help instructions. See Note. Signature of first variable for this rule. String Long LPSTR SIGNA Long SIGNA VB Type C Type

Query RULES_CHKACCOUNTSIGN RULES_EXECUTEALWAYS RULES_EXPRESSION RULES_INST_LENGTH RULES_INSTRUCTIONS RULES_VARIABLES

Nondefault Query Attributes 405

Note: When using the RULES_INSTRUCTIONS query attribute, first query the length of the

item, allocate a buffer large enough for the size of the query + 1, then query the item.

ID_RULESEXP (Update Rules Expressions Table) Query Attributes


This table contains records for the expressions associated with a specific update rule in the Update Rules table, ID_RULES. Table 141 lists the query attributes for the Update Rules Expressions table.
Table 141

ID_RULESEXP Table Query Attributes Description Destination account for this update rule. See Note. The length of a destination account expression. Elimination expression for this update rule. See Note. The length of an elimination expression. Deleted flag. Signature of the next expression. Partner elimination expression for this update rule. See Note. The length of a partner elimination expression. Proportion expression for this update rule. See Note. The length of a proportional expression. Update rule signature. Long SIGNA String LPSTR Byte Long String HYPBOOL SIGNA LPSTR String LPSTR VB Type C Type

Query RULESEXP_DESTACCT RULESEXP_DESTACCT_LENGTH RULESEXP_ELIMEXP RULESEXP_ELIMEXP_LENGTH RULESEXP_IS_DELETED RULESEXP_NEXT_EXP RULESEXP_PELIMEXP RULESEXP_PELIMEXP_LENGTH RULESEXP_PROPEXP RULESEXP_PROPEXP_LENGTH RULESEXP_RULEID

Note: When using RULESEXP_ELIMEXP and RULESEXP_PROPEXP, query the length of the

item, allocate a buffer large enough for the size of the query + 1, then query the item.

ID_RULESVAR (Rules Variables Table) Query Attributes


This table contains records for the variables associated with a specific update rule in the Update Rules table, ID_RULES. Table 142 lists the query attributes for the Rules Variables table.
Table 142

ID_RULESVAR Table Query Attributes Description Deleted flag. Signature of next variable. VB Type Byte Long C Type HYPBOOL SIGNA

Query RULESVAR_IS_DELETED RULESVAR_NEXT_VAR

406 Query Attributes

Query RULESVAR_RULEID RULESVAR_VAR_LENGTH RULESVAR_VARIABLE

Description Signature of rule using this variable. Length of this variable. Text for this variable. See Note.

VB Type Long

C Type SIGNA

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 Attributes


Table 143 lists the query attributes for the Schedules table.
Table 143

ID_SCHEDULES Table Query Attributes Description Account cell width. Display all/current period. Non-zero value to display all periods or zero to display only the current period. Calculate formulas automatically. Bottom account list. Data cell width. Use bold font. Name of the font to use. Size of the font to use. Use italic font. Display Logic window. Indicates whether accounts with no data should be suppressed. TRUE (1) or FALSE (0). Top account list. Display account IDs (1), or description (0). VB Type Integer Byte Byte Long Integer Byte String Integer Byte Byte Byte Long Byte C Type short HYPBOOL HYPBOOL SIGNA short HYPBOOL LPSTR short HYPBOOL HYPBOOL HYPBOOL SIGNA HYPBOOL

Query ACCTWIDTH ALLPERIODS AUTORECALC BOTTOMLIST PERIODWIDTH SCHED_BOLD SCHED_FONTNAME SCHED_FONTSIZE SCHED_ITALIC SHOWLOGIC SUPPNODATA TOPLIST USELABEL

ID_SECCLASS (Security Class Table) Query Attributes


Every entity, category, account, task, and so on is assigned to a security class. Query the appropriate table, such as ID_NAMES for entities, or ID_CATEGORY for categories, using the SECURITYCLASS query attribute. This query attribute returns the signature of the security class for 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. Possible rights, returned in the pzBuf argument, are SECRIGHT_VIEW, SECRIGHT_RESTRICTED, or SECRIGHT_NONE. Table 144 lists the query attributes for the Security Class table.
Table 144

ID_SECCLASS Table Query Attributes Description Current user rights for this class. VB Type Integer C Type short

Query SECCLASS_CURRENTRIGHTS

ID_SECGRPTAB (Security Group Table) Query Attributes


This 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 could be an individual or another group. You can find the first record a security group in the Security Group table by querying the Security Users table (ID_SECUSERTAB) with query attribute SECUSER_FIRSTMEMBER. The query functions return SECURERR_NOERR (0) for unsupported queries. Table 145 lists the query attributes for the Security Group table.
Table 145

ID_SECGRPTAB Table Query Attributes Description Security group. Signature of the next group member in the group table. Member ID or signature of the group member in the Security Users table, ID_SECUSERTAB. VB Type Long Long Long C Type SIGNA SIGNA SIGNA

Query SECGRP_GROUPSIG SECGRP_NEXTSIG SECGRP_USERSIG

ID_SECRIGHTS (Security Rights Table) Query Attributes


This 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 Description Next class signature. Rights assigned. Security class. Rights user signature. VB Type Long Integer Long Long C Type SIGNA short SIGNA SIGNA

Query SECRIGHTS_NEXTCLASS SECRIGHTS_RIGHTS SECRIGHTS_SECCLASS SECRIGHTS_USERSIG

408 Query Attributes

ID_SECTASK (Security Task Table) Query Attributes


Table 147 lists the query attributes for the Security Task table.
Table 147

ID_SECTASK Table Query Attributes Description Task security class. Task filter. VB Type Long String C Type SIGNA LPSTR

Query SECTASK_SECCLASS SECTASK_TASKFILTER

ID_SECTASKFILTER (Security Task Filter Table) Query Attributes


Table 148 lists the query attributes for the Security Task Filter table.
Table 148

ID_SECTASKFILTER Table Query Attributes Description Task signature VB Type Long C Type SIGNA

Query SECFILTER_TASKFILTER

ID_SECUSERTAB (Security Users Table) Query Attributes


This 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 the Security Group table. The query functions return SECURERR_NOERR (0) for unsupported queries. Table 149 lists the query attributes for the Security Users table.
Table 149

ID_SECUSERTAB Table Query Attributes Description Rights to this class of the current user. Returns the first member of a group, which is the signature in the ID_SECGRPTAB table. Retrieves the count of security groups. User password. User state. Users/Groups flag; SECURITY_GROUP if it is a group. Byte char Long Long String SIGNA long LPSTR VB Type C Type

Query SECUSER_CLASSRIGHTS SECUSER_FIRSTMEMBER SECUSER_NUM_GROUPS SECUSER_PASSWORD SECUSER_STATE SECUSER_TYPECODE

ID_SERVER (Server Table) Query Attributes


Queries to this table are available only if the Hyperion Enterprise Server is installed on your system. The default query attributes do not apply to this table. Table 150 lists the query attributes for the Server table.
Nondefault Query Attributes 409

Table 150

ID_SERVER Table Query Attributes Description Server name. Server name. Machine name of server. Port number of Hyperion Enterprise service on the server. String Integer LPSTR short VB Type String C Type LPSTR

Query NAME SHORTNAME SVR_MACHINE SVR_PORT

ID_SHARES (Shares Table) Query Attributes


Each record in this table specifies how many shares of one entity's stock are owned by another entity. Special record indicates the total number of shares issued by an entity and the total number of its shares owned by other entities. Table 151 lists the query attributes for the Shares table.
Table 151

ID_SHARES Table Query Attributes Description Get the user-defined entity code. Number of shares. Number of shares or total number of shares outstanding. Number of voting shares or total number of voting shares outstanding. Entity signature of the owned entity of the shares. Entity signature of the owner entity of the shares. Total number of outstanding shares for the entity. See Note. Total number of outstanding voting shares for the entity. See Note. Total number of shares that all other entities own for the entity. See Note. Total number of voting shares that all other entities own for the entity. See Note. Consolidation method. Ultimate percent consolidated. Ultimate percent control. VB Type Long or Array of Longs Double or array of Doubles Double or Array of Doubles Double or Array of Doubles Long Long Double or Array of Doubles Double or Array of Doubles Double or Array of Doubles Double or Array of Doubles Long or Array or Longs Double or Array of Doubles Double or Array of Doubles C Type SIGNA or array of SIGNA double or array of doubles double or array of doubles double or array of doubles SIGNA SIGNA double or array of doubles double or array of doubles double or array of doubles double or array of doubles SIGNA or array of SIGNA double or array of doubles double or array of doubles

Query SHARES_ENT_CODES SHARES_NONVOTING SHARES_PERCENT_ NONVOT SHARES_PERCENT_VOT SHARES_SIGOWNED SHARES_SIGOWNER SHARES_TOT_ISSUED_ NONVOT SHARES_TOT_ISSUED_ VOT SHARES_TOT_OWNED_ NONVOT SHARES_TOT_OWNED_ VOT SHARES_ULTMETHOD SHARES_ULTPCTCONSOL SHARES_ULTPCTCTL

410 Query Attributes

Query SHARES_ULTPCTOWNED SHARES_VOTING

Description Ultimate percent ownership of this owner and owned entity pair. Number of voting shares.

VB Type Double or Array of Doubles Double or Array of Doubles

C Type 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 use dynamic organizations. Set the sigName field in the apiStruct to the signature of the entity.
l

SHARES_TOT_ISSUED_NONVOT SHARES_TOT_ISSUED_VOT SHARES_TOT_OWNED_NONVOT SHARES_TOT_OWNED_VOT

If the application is set up to use dynamic organizations, pass the category signature as the sigKey argument and set up an apiStruct for all queries with the fields shown in Table 152.
Table 152

Fields for apiStruct Description The category signature. The starting period. The ending period.

Field sigCat lStartPeriod lEndPeriod

If you specify a range of periods, the buffer must be large enough to hold the return values for all periods in the range.

ID_SUBACCTDET (Subaccount Detail Table) Query Attributes


This 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 Description Signature of currency or entity if alternate type is not SUB_ALT_TYPE_NORMAL. Alternate type. See Note. Signature of next detail sub-account record for the sub-account table. Reverse the sign for this entry. Signature of the next level sub-account table, if any. Subaccount type: Fixed, Validated, or None. VB Type Long Byte Long Byte Long Byte C Type SIGNA char SIGNA HYPBOOL SIGNA char

Query SUBACCT_ALT_SIG SUBACCT_ALT_SIG_TYPE SUBACCT_NEXTDETAIL SUBACCT_REVSIGN SUBACCT_TABLE SUBACCT_TYPE

Nondefault Query Attributes 411

Query SUBACCT_VIA_ALTSIG

Description The input signature is a currency or entity signature. Outputs the signature of the detail record.

VB Type Long

C Type SIGNA

Note: The SUBACCT_ALT_SIG_TYPE query attribute returns the following constants:

SUB_ALT_TYPE_NORMAL SUB_ALT_TYPE_CURRENCY SUB_ALT_TYPE_INTCO

ID_SUBACCTHDR (Subaccount Header Table) Query Attributes


This table contains information about sub-account tables. The entries in each sub-account table are stored in the Subaccount Detail table (ID_SUBACCTDET). Table 154 lists the query attributes for the Subaccount Header table.
Table 154

ID_SUBACCTHDR Table Query Attributes Description Subaccount table first detail record. Indicates whether the sub-account table is intercompany. TRUE (1) or FALSE (0). Subaccount table type. For more information, see the TOOLINC.H file. VB Type Long Byte Integer C Type SIGNA HYPBOOL short

Query SUBTABLE_FIRSTDETAIL SUBTABLE_IS_INTERCO SUBTABLE_TYPE

Note: The record with signature 0 (SIG_SUBHDRCURRENCY constant in Toolnc.h) is the

currency sub-account table. The record with signature 1 (SIG_SUBHDRINTERCOMPANY constant) is the intercompany sub-account table.

ID_SUBNAME (Subentities Table) Query Attributes


This table contains information about subentities tables. The entries in each subentities table are stored in the Subentities table (ID_SUBNAME). Table 155 lists the query attributes for the Subentities table.
Table 155

ID_SUBNAME Table Query Attributes Description Chart method signature. User-defined code. Currency. VB Type Long Long Long C Type SIGNA SIGNA SIGNA

Query CHARTMETHOD CODE CURRENCY

412 Query Attributes

Query JOURNALS PAR_CHILD_STAT PARENT SCALE SUBSTRUCT

Description Indicates whether the sub-entity allows journals. TRUE (1) or FALSE (0). Query for entities to get status if entity is a parent, child, or inactive. See Note. Parent entity. Scaling. Signature of attached substructure, or NONE if no substructure is attached.

VB Type Byte Integer Integer Byte Long

C Type HYPBOOL short short char SIGNA

When using the PAR_CHILD_STAT query attribute, if the entity is a parent entity, pzBuf returns PARENT_ACTIVE. If the entity is a child entity, pzBuf returns CHILD_ACTIVE. If the entity is 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 dynamic organizations. Set the fields shown in Table 156 in the apiStruct:
Table 156

Fields for apiStruct Description The category signature The starting period The ending period 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 values will be returned in the status buffer by period, instead of in pzBuf.

Field sigCat lStartPeriod lEndPeriod lpseStatus

ID_SUBSTRUCTURE (Substructures Table) Query Attributes


Table 157 lists the query attributes for the Substructures table.
Table 157

ID_SUBSTRUCTURE Table Query Attributes Description Substructure signature TopNode field VB Type Long Long C Type SIGNA SIGNA

Query SUBSTRUCT TOPNODE

ID_SUGGEST_OWN (Suggest Consolidation Method and Percentage Table) Query Attributes


Table 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 Description TRUE (1) if the lower limit is to be included in the range. Get the lower limit of the percentage control range. Use this consolidation method if the percentage control is within the range. Use this percentage consolidation if the consolidation method matches. Type of percentage consolidation to use. See Note. TRUE (1) if the upper limit is to be included in the range. Get the upper limit of the percentage control range. Byte Double HYPBOOL double VB Type Byte Double Long Double C Type HYPBOOL double SIGNA double

Query SUGGEST_OWN_BOT_INCLUSIVE SUGGEST_OWN_BOT_RANGE SUGGEST_OWN_CONS_METHOD SUGGEST_OWN_PCT_CONSOL SUGGEST_OWN_PCT_TYPE SUGGEST_OWN_TOP_INCLUSIVE SUGGEST_OWN_TOP_RANGE

Note: The SUGGEST_OWN_PCT_TYPE query attribute returns the following constants:

SUGGEST_OWN_USE_NUMBER SUGGEST_OWN_USE_PCONTROL SUGGEST_OWN_USE_POWN SUGGEST_OWN_USE_POWNMIN

ID_USE_METHODS (Used Methods Table) Query Attributes


Table 159 lists the query attributes for the Used Methods table.
Table 159

ID_USE_METHODS Table Query Attributes Description Signature of category use statement applies to Signature of method being used VB Type Long Long C Type SIGNA SIGNA

Query USEMETHOD_CATSIG USEMETHOD_METHODSIG

ID_USERDEFAULT (User Defaults Table) Query Attributes


You use the query attributes for this table with the EntQueryDefault( ) function although you can also use them with HypQueryEx( ) or EntQueryEx( ). Default queries do not apply to this table. Table 160 lists the query attributes for the User Defaults table.
Table 160

ID_USERDEFAULT Table Query Attributes Description Current account. VB Type String C Type LPSTR

Query CURACCOUNT

414 Query Attributes

Query CURACCOUNTSIG CURCATEGORY CURCATEGORYSIG CURFREQ CURFREQSIG CURNAME CURNAMESIG CURORG CURORGSIG CURPERIOD CURPERIODSIG CURSCALESIG CURSCHEDULE CURSCHEDULESIG CURVIEWSIG DELETEERRLOG ENTERKEY ERROR_MODE SAVECHANGES SECURITYCLASS SHOWFOLDERS SHOWPALETTE SHOWSTATBAR SHOWTOOLBAR TRACE_FILE TRACE_LEVEL USER_DEFAULTSECURITY USER_ERRORASZERO

Description Current account signature. Current category. Current category signature. Current frequency. Current frequency signature. Current entity. Current entity signature. Current organization. Current organization signature. Current period. Current period signature. Current scale signature. Current schedule for data entry. Current schedule signature. Current view. Indicates whether previous error log file should be deleted. Enter key behavior. Display error mode: Verbose, Terse, or All. See the ERR_NO_... definitions in the toolinc.h file. Indicates whether changes to selection boxes should be saved on exit. Security class of current user.

VB Type Long String Long String Long String Long String Long String Long Long String Long Long Integer Integer Integer Integer Long Integer

C Type SIGNA LPSTR SIGNA LPSTR SIGNA LPSTR SIGNA LPSTR SIGNA LPSTR SIGNA SIGNA LPSTR SIGNA SIGNA short short short short SIGNA short short short short LPSTR short SIGNA HYPBOOL

Indicates whether the palette should be displayed. Indicates whether the status bar should be displayed. Indicates whether the toolbar should be displayed. Output file for trace data. Level of trace enabled. Default security class for new elements. Indicates whether an error should be displayed as zero in Hyperion Enterprise Retrieve.

Integer Integer Integer String Integer Long Byte

Nondefault Query Attributes 415

Query USER_EXECUTEEXCEL USER_NODATAASZERO USER_SCALEHPVAL USERPATH

Description Indicates whether Microsoft Excel should be executed after worksheet option. Indicates whether no data should be displayed as zero in Hyperion Enterprise Retrieve. Indicates whether HPVAL values should be scaled in Oracle's Hyperion Enterprise Retrieve. User path for error log file.

VB Type Byte Byte Byte String

C Type HYPBOOL HYPBOOL HYPBOOL 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 Description Desktop border color. Modeless dialog box background color. Popup dialog background color. Dialog text (static) color. Dialog caption background color. Dialog caption text color. Table column caption background color. Table column caption text color. Selected text color. Selected background color. Input data text color. Input data background color. Calculated data text color. Calculated data background color. Parent data text color. Parent data background color. Derived data text color. Derived data background color. System modify text color. System modify background color. System view text color. VB Type Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long C Type long long long long long long long long long long long long long long long long long long long long long

Query DESKTOPBORDER BACKGROUNDCOLOR DIALOGBACKCOLOR DIALOGTEXTCOLOR DIALOGCAPTIONTEXTCOLOR DIALOGCAPTIONBACKCOLOR TABLECAPTIONTEXTCOLOR TABLECAPTIONBACKCOLOR SELECTTEXTCOLOR SELECTBACKCOLOR INPUTTEXTCOLOR INPUTBACKCOLOR CALCTEXTCOLOR CALCBACKCOLOR PARENTTEXTCOLOR PARENTBACKCOLOR DERIVEDTEXTCOLOR DERIVEDBACKCOLOR ADMINMODIFYTEXTCOLOR ADMINMODIFYBACKCOLOR ADMINVIEWTEXTCOLOR

416 Query Attributes

Query ADMINVIEWBACKCOLOR NAMESMODIFYTEXTCOLOR NAMESMODIFYBACKCOLOR NAMESVIEWTEXTCOLOR NAMESVIEWBACKCOLOR NAMESSELECTTEXTCOLOR NAMESSELECTBACKCOLOR NAMEISCONSOLTEXTCOLOR NAMENOTCONSOLTEXTCOLOR NAMECONSOLBACKCOLOR CONSOLOKCOLOR CONSOLNOTOKCOLOR NODATATEXTCOLOR OTHERDATATEXTCOLOR STATUSBACKCOLOR ADMINRESTRICTTEXTCOLOR ADMINRESTRICTBACKCOLOR DYNVIEWTEXTCOLOR DYNVIEWBACKCOLOR

Description System view background color. Entity modify text color. Entity modify background color. Entity view text color. Entity view background color. Selected entity text color. Selected entity background color. Valid consolidation range text color. Invalid consolidation range text color. Consolidation range background color. OK status text color. Impacted status text color. NO DATA status text color. DATA status text color. Status background color. System restricted text color. System restricted background color. Dynamic view text color. Dynamic view background color.

VB Type Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long

C Type long long long long long long long long long long long long long long long long long long long

ID_USERDEFFUNC (Custom Functions Table) Query Attributes


Table 162 lists the query attributes for the Custom Functions table.
Table 162

ID_USERDEFFUNC Table Query Attributes Description Indicates whether function is set up as a chart method function. Indicates whether function is set up as a consolidation method function. Indicates whether function is set up as a translation function. VB Type Byte Byte Byte C Type HYPBOOL HYPBOOL HYPBOOL

Query UDF_CHART UDF_CONSOL UDF_NOTRANS

Nondefault Query Attributes 417

Query UDF_INSTRUCTION_LENGTH UDF_EXPRESSION_LENGTH UDF_INSTRUCTIONS UDF_EXPRESSION

Description Retrieve the length of instructions. Retrieve the length of expression. Retrieve instructions. See Note. Retrieve expression. See Note.

VB Type Integer Integer String String

C Type short short LPSTR LPSTR

Note: For query attributes UDF_INSTRUCTIONS and UDF_EXPRESSION, you should query

the length of the item, allocate a string buffer large enough (queried size +1), then query the item.

418 Query Attributes

Index

Numbers
16-bit function declarations function declarations, 17 16-bit programs converting to 32-bit, 284

A
account checking if input account, 205 retrieving default name of, 50 selecting with ENTACCTASK( ), 126 selecting with HYPACCTASK( ), 27 Account Conversion List table, 370 Account Conversion table, 370 account heading retrieving, 45 account labels, 34 account list enumerating accounts in, 85 selecting with ENTACCTLISTASK( ), 126 selecting with HYPACCTLISTASKEX( ), 28 Account List Entry table, 371 Account List table, 370 account signature splitting into parts, 127 account types getting with EntGetAccountsInputType( ), 189 account value retrieving normal, 57 retrieving special, 60 retrieving using HypHPVAL2( ), 59 accounts enumerating in account lists, 85 Accounts Group table, 382 Accounts table, 367 advanced functions alphabetical reference, 125

combining with spreadsheet add-in functions, 113 consolidation detail values and, 25, 119 deselecting tables with, 111 for selection dialog boxes, 114 opening an application with, 110 organization structures and, 120 related functions, 113 retrieving data using, 115 selecting tables with, 111 tables and, 110 updating data using, 117 using tables with, 112 using to work with data, 114 using with Hyperion Enterprise INI file, 123 alphabetical reference table functions, 82 apiStruct, 110 in Visual Basic, 18 initializing, 204 use in selecting additional tables, 256 use in selecting tables, 255 application closing with ENTCLOSEAPPLICATION( ), 141 closing with HYPDESTRUCT( ), 31 creating with ENTCREATEAPPLICATION( ), 143 opening, 110 opening with ENTOPENAPPLICATION( ), 236 opening with ENTSERVEROPENAPPLICATION( ), 237 opening with HYPCONSTRUCT( ), 29 selecting default, 63 application .INI file getting number in, 191 reading text string in, 192 application defaults querying, 243 saving, 245 Application Defaults table, 372

Index 419

application handle, 196 retrieving, 277 application handles redefining, 283 retrieving multiple, 65 Application Information table, 383 applications closing multiple, 64 enumerating with ENTENUMAPPLICATIONS( ), 178 enumerating with HYPENUMAPPLICATIONS( ), 87 logging onto, 66 retrieving default handle, 63 Associated tables, 362

B
Basic, 16 better or worse percent, 55 value, 35 Book Entries table, 374 Book Sets table, 375 Books table, 375 buffers data, 39

C
C, 16 C++, 16 C-string retrieving length of, 275 calculate number of periods in a category, 138 calculated account determination, 37 calculating percent change, 56 the number of periods in a category, 83 callback chain appending to, 128 deleting from, 154 Callback functions, 18 in Visual Basic, 18 callback functions CALLBACK12, 308 CALLBACK6, 310 CALLBACKAPI, 309

CALLBACKAPP, 310 CALLBACKCREATE, 310 CALLBACKDBENUM, 311 CALLBACKDBLOAD, 312, 313, 314 CALLBACKJOUREXTRACT, 315 CALLBACKJOURLOAD, 316 CALLBACKLOGIC, 316 CALLBACKSECLOAD, 317 CALLBACKSEL, 318 CALLBACKSTR, 320 CALLBACKUSERS, 320 CALLBACKVB, 321 CALLBACKVBNET, 322 CALLBACK12, 308 CALLBACK6, 310 CALLBACKAPI, 309 CALLBACKAPP, 310 CALLBACKCREATE, 310 CALLBACKDBENUM, 311 CALLBACKDBLOAD, 312, 313, 314 CALLBACKJOUREXTRACT, 315 CALLBACKJOURLOAD, 316 CALLBACKLOGIC, 316 CALLBACKSECLOAD, 317 CALLBACKSEL, 318 CALLBACKSTR, 320 CALLBACKUSERS, 320 CALLBACKVB, 321 Categories table, 375 category calculating the number of periods in, 83 description, 38 frequency, 43 getting period and frequency in, 193 retrieving default name of, 50 retrieving period number and frequency in, 96 selecting with ENTCATASK( ), 138 selecting with HYPCATASKEX( ), 28 changes to Hyperion Enterprise tables, 297 obsolete security tables, 302 checking link parameters, 72 parameters, 73 child node, 194 getting with HYPGETCHILD( ), 97 classifications of functions, 280

420 Index

closing applications, 31 Codes table, 378 combining spreadsheet add-in functions with advanced functions, 113 component currency, 40 component full entity description, 44 consolidating with ENTCONSOLIDATE( ), 141 consolidation detail values, 25, 119 constants in visual basic, 17 conversion 16-bit programs to 32-bit, 284 converting a string to double, 137 converting from Hyperion Enterprise SE to Hyperion Enterprise, 297 copying data, 276, 353 strings, 276 Currencies table, 378 currency description, 36 currency label, 40 Custom Functions table, 417

default journal category, 33 default journal period, 34 default query attributes, 366 default settings discarding changes, 156 tables of, 361 derived value, 40 deselecting tables, 269 detaching logic, 222 detailed storage model defined, 25, 119 discard logic, 223 discarding changes in default settings, 156 in tables, 155 DWCALLBACK, 322

E
Ent...( ), 281 Entacctask( ), 126 Entacctlistask( ), 126 Entacctsplit( ), 127 Entappendtocbchain( ), 128 Entappextract( ), 129 Entappextractvb( ), 130 Entappload( ), 132 Entapploadvb( ), 133 Entasciitodouble( ), 137 Entcatask( ), 138 Entcatgetnumperiods( ), 138 Entcatgetpershort( ), 139 Entcatmapperiod( ), 140 Entcloseapplication( ), 141 Entconsolidate( ), 141 Entcreateapplication( ), 143 Entdataextract( ), 146 Entdataextractvb( ), 148 Entdatafileopen( ), 152 Entdateconv( ), 153 Entdeletefromcbchain( ), 154 Entdiscardchanges( ), 155 Entdiscarddefault( ), 156 EntDSMDataExtractVB(), 158 Ententityask( ), 162 Ententitylistask( ), 163 EntEnum( )
Index 421

D
data loading, 264, 266 retrieving with advanced functions, 115 storing, 51 updating with advanced functions, 117 data buffers, 39 flushing, 42 data buffers, writing with HYPHPCOMMIT2( ), 39 data retrieval functions, 25 data update functions, 26 datafile opening with ENTDATAFILEOPEN( ), 152 Datafile table, 378 date conversion, 82 ENTDATECONV( ), 153 DATECONV( ), 82 default application selecting, 63 default application handle, 63 default journal, 32

using with ID_SECGRPTAB, 175 using with ID_SECRIGHTS, 176 using with ID_SECTASK, 176 with ID_SECUSERTAB, 176 with ID_SHARES, 176 with ID_SUBACCTDET, 177 Entenum( ), 167 using with ID_ACCTLISTENTRY, 168 using with ID_INTCODET, 170 using with ID_JOURNAL_DETAIL, 171 using with ID_JOURNAL_HISTORY, 172 using with ID_JOURNAL_TEMPLATES, 172 using with ID_JOURNALS, 170 using with ID_NAMELISTENTRY, 173 using with ID_NAMES, 174 using with ID_NODES, 174 using with ID_ROLLOVER, 175 using with ID_RPTVIEW, 175 EntEnumApplications( ), 178 EntEnumOrgEntities( ), 178 EntEnumSubAcctSig( ), 180 EntEnumUsersOnSystem( ), 181 EntFind( ), 182 using with ID_ACCTCONVERT, 183 using with ID_INTCODET, 183 using with ID_NAMECONVERT, 184 using with ID_NAMES, 184 using with ID_SECGRPTAB, 185 using with ID_SECRIGHTS, 185 using with ID_SHARES, 185 using with the Journals Tables, 183 EntFindEntityInOrg( ), 186 additional example, 186 EntFormatNumber( ), 188 EntFreqAsk( ), 188 EntGetAccountsInputType( ), 189 EntGetActiveModule( ), 191 EntGetAppProfileLong( ), 191 EntGetAppProfileString( ), 192 EntGetCatPerFreq( ), 193 EntGetChild( ), 194, 195 EntGetEntitySig( ), 195 EntGetHappFromSelect( ), 196 EntGetLastError( ), 197 EntGetLastErrorByHApp( ), 198 EntGetOrgLevel( ), 199 EntGetPerView( ), 199

EntGetProfileLong( ), 200 EntGetProfileString( ), 201 EntGetRightsToTask( ), 201 ENTGETSIBLING( ) additional example, 203 EntGetSibling( ), 202, 203 EntGetVarAddr( ), 203 EntInitApiStruct( ), 204 EntIsAccountInput( ), 205 EntIsEntityParent( ), 205 EntIsModified( ), 206 EntIsSelected( ), 207 Entities checking if a parent, 205 getting signature of, 195 retrieving default, 50 selecting, 67, 162 entities checking if parent, 102 enumerating in an entity list, 90 enumerating in an organization, 91 getting signatures for, 98 Entities table, 397 Entity code, 41 Entity Conversion List table, 394 Entity Conversion table, 394 entity label, 52 entity list enumerating entities in, 90 selecting, 67, 163 Entity List Entry table, 395 Entity List table, 395 entity signature, 195 EntJournalExtract( ), 208 EntJournalExtractVB( ), 210 EntJournalLoad( ), 215 EntJournalLoadVB( ), 217 EntLogicAttach( ), 220 EntLogicDetach( ), 222 EntLogicDiscard( ), 223 EntLogicExport( ), 223 EntLogicExportVB( ), 225 EntLogicImport( ), 227 EntLogicImportVB( ), 229 EntMessageVB( ), 232 EntMsgLogTaskEndTime( ), 233 EntMsgLogTaskStartTime( ), 234

422 Index

EntMsgLogTime( ), 236 EntOpenApplication( ), 236 EntOpenServerApplication( ), 237 EntPageExtract( ), 238 EntPageLoad( ), 239 EntPerAsk( ), 239 EntQryRptFreq( ), 240 EntQuery( ), 241 EntQueryDefault( ), 243 EntQueryEx( ), 241, 243 EntQueryExStr( ), 243 EntRegisterMsgBox( ), 244 EntRunRollover( ), 244 EntSave( ), 245 EntSaveDefault( ), 245 EntSecurityExtract( ), 246 EntSecurityExtractVB( ), 247 EntSecurityLoad( ), 249 EntSecurityLoadVB( ), 250 EntSelect( ), 252 EntSelectAdd( ), 254 EntSelectTable( ), 255 EntSelectTableAdd( ), 256, 257 EntSetActiveModule( ), 258 EntUNCDataLoad( ), 264 EntUNCDataLoad( ) - Load Data, 264 EntUNCDataLoadVB( ), 266 EntUnSelect( ), 269 EntUpdate( ), 270 EntUpdateDefault( ), 271 EntVBCopyData( ), 276 EntVBCopyStr( ), 276 EntVBGetCStrLen( ), 275 EntWriteAppProfileLong( ), 272 EntWriteAppProfileString( ), 273 EntWriteProfileLong( ), 274 EntWriteProfileString( ), 274 enumerating accounts with HypEnumAcctListEntriesEx( ), 85 applications, 87 applications with EntEnumApplications( ), 178 entities with HypEnumNameListEntriesEx( ), 90 nodes in an organization, 178 open applications, 65 records in a table, 88, 167 sub-account signatures, 92 subaccounts, 180

users on system, 181

F
FALSE defined, 17 flow account determination, 43 flow accounts, 43 flushing data buffers, 42 Formats table, 380 fortran, 16 frequencies and views, 20 Frequencies table, 381 frequency getting with EntGetPerView( ), 199 selecting with EntFreqAsk( ), 188 selecting with HypFreqAsk( ), 32 frequency and view getting with HypGetPerViewEx( ), 100 function classifications of, 280 functions Ent...(), 281 EntAcctAsk( ), 126 EntAcctListAsk( ), 126 EntAcctSplit( ), 127 EntAppendToCBChain( ), 128 EntAsciiToDouble( ), 137 EntCatAsk( ), 138 EntCatGetNumPeriods( ), 138 EntCatGetPerShort( ), 139 EntCatMapPeriod( ), 140 EntCloseApplication( ), 141 EntConsolidate( ), 141 EntCreateApplication( ), 143 EntDataExtract( ), 146 EntDataFileOpen( ), 152 EntDataLoad( ), 264 EntDataLoadVB( ), 266 EntDateConv( ), 153 EntDeleteFromCBChain( ), 154 EntDiscardChanges( ), 155 EntDiscardDefault( ), 156 EntEntityAsk( ), 162 EntEntityListAsk( ), 163 EntEnum( ) in, 167 EntEnumApplications( ), 178 EntEnumOrgEntities( ), 178
Index 423

EntEnumSubAcctSig( ), 180 EntEnumUsersOnSystem( ), 181 EntFind( ), 182 EntFindEntityInOrg( ), 186 EntFormatNumber( ), 188 EntFreqAsk( ), 188 EntGetActiveModule( ), 191 EntGetAppProfileLong( ), 191 EntGetAppProfileString( ), 192 EntGetCatPerFreq( ), 193 EntGetChild( ), 194, 195 EntGetEntitySig( ), 195 EntGetHappFromSelect( ), 196 EntGetLastError( ), 197 EntGetOrgLevel( ), 199 EntGetPerView( ), 199 EntGetProfileLong( ), 200 EntGetProfileString( ), 201 EntGetRightsToTask( ), 201 EntGetSibling( ), 202, 203 EntGetVarAddr( ), 203 EntInitApiStruct( ), 204 EntIsAccountInput( ), 205 EntIsEntityParent( ), 205 EntIsModified( ), 206 EntIsSelected( ), 207 EntLogicAttach( ), 220 EntLogicDetach( ), 222 EntLogicDiscard( ), 223 EntOpenApplication( ), 236 EntOpenServerApplication( ), 237 EntPerAsk( ), 239 EntQryRptFreq( ), 240 EntQuery( ), 241 EntQueryDefault( ), 243 EntRegisterMsgBox( ), 244 EntRunRollover( ), 244 EntSave( ), 245 EntSaveDefault( ), 245 EntSelect( ), 252 EntSelectAdd( ), 254 EntSelectTable( ), 255 EntSelectTableAdd( ), 256, 257 EntSetActiveModule( ), 258 EntUnSelect( ), 269 EntUpdate ( ), 270 EntUpdateDefault( ), 271

EntVBCopyData( ), 276 EntVBCopyStr( ), 276 EntVBGetCStrLen( ), 275 EntWriteAppProfileLong( ), 272 EntWriteAppProfileString( ), 273 EntWriteProfileLong( ), 274 EntWriteProfileString( ), 274 for spreadsheet, 280 from previous versions, 281 HypEnum( ), 298 HypFind( ), 289 HypGethApp( ), 277 HypGethSelect( ), 277 HypQryAcctListEntry(), 295 HypQryNameListEntry(), 295 HypQryNode( ), 294 HypQuery( ), 290 HypQuerySig( ), 293 HypSethSelect( ), 278 HypUnlock( ), 298 HypUnlock(), 298 registering, 244 replacing obsolete, 286 unsupported in Release 4, 282 upgrading, 289 Functions for Microsoft Visual Basic.NET Platform :EntQueryEx( ), 346 Entdataextractvb( ), 329 EntDSMDataExtractVB(), 333 EntGetVarAddr( ), 336 EntJournalExtractVB( ), 338 EntJournalLoadVB( ), 341 EntQueryEx( ), 345 EntSecurityExtractVB( ), 347 EntSecurityLoadVB( ), 349 EntUpdate( ), 351 EntUpdateDefault( ), 352 EntVBCopyData( ), 353 HypHPJOUR( ), 354

G
getting the detail records for the Intercompany Table, 299 getting the detail records for the Rollovers table, 301

424 Index

H
HACCESS32.LIB import library file, 20 handles redefining, 283 header files, 279 Hyp...( ) functions for selecting tables, 79 Hyp...( ) functions supported in Hyperion Enterprise, 280, 281 HypAcctAsk( ), 27 HypAcctListAskEx( ), 28 HypCatAskEx( ), 28 HypCatGetNumPeriodsEx( ), 83 HypCatGetPerShortEx( ), 84 HypCatMapPeriodEx( ), 84 HypConstruct( ), 23, 29 HypConstructEx( ), 30 HypDestruct( ), 23, 31 HYPENT.INI file getting number in, 200 getting string in, 201 writing number to, 274 writing string to, 274 HypEnum( ) upgrading for the intercompany table, 298 HypEnumAcctListEntriesEx( ), 85 HypEnumApplications( ), 87 HypEnumEx( ), 88 HypEnumNameListEntriesEx( ), 90 HypEnumOrgNames( ), 91 HypEnumSubAcctSig( ), 92 Hyperion Enterprise frequencies, 20 Hyperion Enterprise SE upgrading code to Hyperion Enterprise, 282 Hyperion Retrieve functions for, 280 HypFind( ) function upgrading, 289 HypFindEx( ), 94 HypFindNameInOrgEx( ), 95 HypFreqAsk( ), 32 HypGetCatPerFreq( ), 96 HypGetChild( ), 97 HypGetDefJour( ), 32 HypGetDefJourCat( ), 33 HypGetDefJourPer( ), 34

HypGethApp( ) function, 277 HypGethSelect( ) function, 277 HypGetNameSig( ), 98 HypGetOrgLevel( ), 99 HypGetPerViewEx( ), 100 HypGetSibling( ), 101 HypGetTopNodeEx( ), 101 HypHPACC( ), 34 HypHPBET( ), 35 HypHPCAD( ), 36 HypHPCAL( ), 37 HypHPCDE( ), 38 HypHPCommit2( ), 39 HypHPCUREx( ), 40 HypHPDRV( ), 40 HypHPECO( ), 41 HypHPFlush( ), 42 HypHPFLW( ), 43 HypHPFRE( ), 43 HypHPFUL( ), 44 HypHPHEA( ), 45 HypHPINC( ), 46 HypHPINP( ), 47 HypHPJOUR( ), 48 HypHPKEYEx( ), 50 HypHPLNK( ), 51 HypHPNAM( ), 52 HypHPOWN( ), 53 HypHPPBE( ), 55 HypHPPCH( ), 56 HypHPSCA( ), 56 HypHPVAL( ), 57 HypHPVal( ) setting return behavior of, 71 HypHPVAL2( ), 59 HypHPVALEx( ), 60 HypIsNameParentEx( ), 102 HypJourAsk( ), 62 HypJourDetAsk( ), 62 HypLock() upgrading, 289, 298 HypLockEx( ), 103 HypMultiAsk( ), 63 HypMultiDefault( ), 63 HypMultiDeinit( ), 64

Index 425

HypMultiEnum( ), 65 HypMultiGet( ), 65 HypMultiInit( ), 66 HypNamAskEx( ), 67 HypNameListAskEx( ), 67 HypPerAsk( ), 68 HypQryNode( ) upgrading query sizes, 295 HypQryNode() upgrading, 294 HypQryRptFreqEx( ), 104 HypQuery( ) upgrading, 290 upgrading to HypQuery() for Intercompany Table, 298 HypQueryEx( ), 105 HypQuerySig() upgrading, 293 HypSetDefJour( ), 69 HypSetDefJourCat( ), 69 HypSetDefJourPer( ), 70 HypSethSelect( ), 278 HypSetMVMode( ), 71 HypSetProgramName( ), 71 HypUnLock() upgrading, 289, 298 HypUnLockEx( ), 106 HypValidateLnkParams( ), 72 HypValidateParams( ), 73 HypValidateParamsEx( ), 74 HypValReturn( ), 75

I
ID_ACCOUNTS, 367 ID_ACCTCONVERT, 370 ID_ACCTCVTLIST, 370 ID_ACCTLIST, 370 ID_ACCTLISTENTRY, 371 ID_APPDEFAULT, 372 ID_BOOK_ENTRIES, 374 ID_BOOK_SETS, 375 ID_BOOKS, 375 ID_CATEGORY, 375 ID_CODES, 378 ID_CURRENCY, 378 ID_DATAFILE, 378 ID_FORMATS, 380
426 Index

ID_FREQUENCY, 381 ID_GROUP, 382 ID_HAPP, 383 ID_ICSET, 383 ID_INTCODET, 384 ID_JOURNAL_DETAIL, 384 ID_JOURNAL_HISTORY, 385 ID_JOURNAL_HISTORY_DETAIL, 387 ID_JOURNAL_PERIOD_INFO, 388 ID_JOURNAL_TEMPLATES, 389 ID_JOURNAL_TEMPLATES_DETAIL, 390 ID_JOURNALS, 391 ID_LOGIC, 393 ID_NAMECONVERT, 394 ID_NAMECVTLIST, 394 ID_NAMELIST, 395 ID_NAMELISTENTRY, 395 ID_NAMES, 397 ID_NODES, 400 ID_ORGANIZATION, 401 ID_PERIOD, 401 ID_PRINT, 402 ID_PSFDATA, 402 ID_REPORT_ENTRIES, 403 ID_REPORT_SETS, 403 ID_REPORTS, 403 ID_ROLLOVER, 404 ID_ROLLSET, 404 ID_RPTFREQ, 404 ID_RPTVIEW, 405 ID_RULES, 405 ID_RULESEXP, 406 ID_RULESVAR, 406 ID_SCHEDULES, 407 ID_SECCLASS, 407 ID_SECGRPTAB, 408 ID_SECRIGHTS, 408 ID_SECTASK, 409 ID_SECTASKFILTER, 409 ID_SECUSERTAB, 409 ID_SERVER, 409 ID_SHARES, 410 ID_SUBACCTDET, 411 ID_SUBACCTHDR, 412 ID_SUBNAME, 412 ID_SUBSTRUCTURE, 413 ID_SUGGEST_OWN, 413

ID_USERDEFAULT, 414 ID_USERDEFFUNC, 417 import library linking programs to, 20 include files, 19, 279 TOOLKIT.BAS, 19 TOOLKIT.H, 19 income account determination, 46 INI file using advanced functions with, 123 writing number to, 272 writing string to, 273 initializing apiStruct, 204 input account determination, 47 Intercompany Detail table, 384 changes to, 298 getting detail records for, 299 Intercompany Matching Sets table, 383

locking tables, 103 logging off multiple applications, 64 logging onto multiple applications, 66 logic attaching, 220 detaching, 222 discard, 223 Logic table, 393

M
mapping a period into a frequency, 84 message boxes registering, 244 multiple applications closing, 64 logging onto, 66 managing, 24 managing with spreadsheet add-in functions, 24 opening with spreadsheet add-in functions, 24

J
journal detail information, 48 Journal Period Information table, 388 Journal Templates Detail table, 390 Journal Templates table, 389 journals retrieving detail information for, 48 selecting, 62 selecting detail, 62 setting default, 69 Journals Detail table, 384 Journals History Detail table, 387 Journals History table, 385 Journals table, 391

N
node ID finding with EntFindEntityInOrg( ), 186 node signatures getting with HypFindNameInOrgEx( ), 95 nodes enumerating with EntEnumOrgEntities( ), 178 enumerating with HypEnumOrgNames( ), 91 Nodes table, 400 changes to, 299 non-zero defined, 20 NONE defined for return codes, 20 number formatting with EntFormatNumber( ), 188 getting in HYPENT.INI file, 200 writing to application .INI file, 272 writing to HYPENT.INI file, 274

L
languages supported, 16 last error retrieving, 197 last value retrieval return status of, 75 level getting in organization, 199 link parameters checking, 72 list functions, 24, 25, 26

O
obsolete Ent...( ) functions replacing with new Ent...( ) functions, 125 obsolete query attributes, 290 obsolete security access detail tables, 302 obsolete security access group tables, 302
Index 427

obsolete security tables, 302 security access details, 302 security access groups, 302 opening application, 29 Org-by-period, 120 organization child node in, 194 enumerating nodes in, 91 sibling node in, 202 organization structures and advanced functions, 120 and Hyp...( ) functions, 81 organizations getting levels in, 99 getting the top node ID in, 101 Organizations table, 401 ownership retrieving information on, 53

PSF Data table, 402

Q
query Hyperion Enterprise tables, 105 reporting frequency, 104 query attributes Category Links Table, 378 default, 366 Formulas Table, 381 ID_ACCOUNTS, 367 ID_ACCTCONVERT, 370 ID_ACCTCVTLIST, 370 ID_ACCTLIST, 370 ID_ACCTLISTENTRY, 371 ID_APPDEFAULT, 372 ID_BOOK_ENTRIES, 374 ID_BOOK_SETS, 375 ID_BOOKS, 375 ID_CATEGORY, 375 ID_CODES, 378 ID_CURRENCY, 378 ID_DATAFILE, 378 ID_FORMATS, 380 ID_FREQUENCY, 381 ID_GROUP, 382 ID_HAPP, 383 ID_ICSET, 383 ID_INTCODET, 384 ID_JOURNAL_DETAIL, 384 ID_JOURNAL_HISTORY, 385 ID_JOURNAL_HISTORY_DETAIL, 387 ID_JOURNAL_PERIOD_INFO, 388 ID_JOURNAL_TEMPLATES, 389 ID_JOURNAL_TEMPLATES_DETAIL, 390 ID_JOURNALS, 391 ID_LOGIC, 393 ID_NAMECONVERT, 394 ID_NAMECVTLIST, 394 ID_NAMELIST, 395 ID_NAMELISTENTRY, 395 ID_NAMES, 397 ID_NODES, 400 ID_ORGANIZATION, 401 ID_PERIOD, 401 ID_PRINT, 402 ID_PSFDATA, 402

P
parameters checking, 73 parent entity checking if entity is, 102 Pascal, 16 passing addresses, 18 percent better or worse, 55 percent change calculating, 56 period mapping into frequency, 140 mapping into frequency with HypCatMapPeriodEx( ), 84 retrieving default name of, 50 selecting with EntPerAsk( ), 239 period label getting in category frequency, 84 retrieving, 139 periods selecting with HypPerAsk( ), 68 Periods table, 401 Printing table, 402 program name retrieving with EntGetActiveModule( ), 191 programs linking to import libraries, 20
428 Index

ID_REPORT_ENTRIES, 403 ID_REPORT_SETS, 403 ID_REPORTS, 403 ID_ROLLOVER, 404 ID_ROLLSET, 404 ID_RPTFREQ, 404 ID_RPTVIEW, 405 ID_RULES, 405 ID_RULESEXP, 406 ID_SCHEDULES, 407 ID_SECCLASS, 407 ID_SECGRPTAB, 408 ID_SECRIGHTS, 408 ID_SECTASK, 409 ID_SECTASKFILTER, 409 ID_SECUSERTAB, 409 ID_SERVER, 409 ID_SHARES, 410 ID_SUBACCTDET, 411 ID_SUBACCTHDR, 412 ID_SUBNAME, 412 ID_SUBSTRUCTURE, 413 ID_SUGGEST_OWN, 413 ID_USERDEFAULT, 414 ID_USERDEFFUNC, 417 Logic Category Attributes Table, 394 obsolete, 290 Rules Variables table, 406 Used Methods Table, 414 querying application defaults, 243 records in table, 241 user defaults, 243

R
records enumerating, 167 related tables advanced and Hyp... ( ) functions, 363 advanced functions, 113 renamed tables, 297 replacing split 32-bit account signatures, 297 replacing obsolete, 284 Report Entries table, 403 Report Sets table, 403 Reporting Frequencies table, 404

reporting frequency, 20 frequency and view for, 199 querying, 240 reporting views, 20 Reporting Views table, 405 Reports table, 403 retrieving account heading, 45 account or sub-account labels, 34 application handle, 196, 277 category description, 38 category frequency, 43 child node, 97 component currency, 40 component full entity description, 44 currency description, 36 data, 115 default labels, 50 entity code, 41 entity signatures, 98 frequency in category, 96 number in application .INI file, 191 period number and frequency, 193 period number in category, 96 scale, 56 sibling node, 101 special account value, 60 table selection handle, 277 the default journal, 32 the default journal category, 33 the default journal period, 34 retrieving data with spreadsheet add-in functions, 25 return status of HypHPVal, 75 Rollover Sets table, 404 rollovers executing, 244 Rollovers table, 404 changes to, 300 getting detail records for, 301 Rules Expressions table, 406 Rules table, 405

S
saving defaults, 245 tables, 245
Index 429

scale retrieving, 56 Schedules table, 407 Security Class table, 407 Security Group table, 408 changes to, 306 security rights getting current user's, 201 Security Rights table, 408 Security task codes, 303 Security Task Filter table, 409 Security Task table, 409 Security User table changes to, 306 Security Users table, 409 Select Account dialog box, 27 selecting account, 27 account list, 28 additional tables, 254, 256 category, 28 entities, 67 entity list, 67 frequency, 32 journal detail, 62 journals, 62 periods, 68 tables, 103, 252, 255 selecting tables using advanced functions, 111 using Hyp...( ) functions, 79 selection callbacks, 112 selection dialog boxes advanced functions for, 114 with spreadsheet add-in functions, 24 server application opening, 237 Server table, 409 set active module, 258 setting default journal, 69 default journal category, 69 default journal period, 70 return behavior of HypHPVal( ), 71 table selection handle, 278 shares owned retrieving information on, 53

Shares table, 410 sibling node, 101, 202 signatures enumerating sub-account, 92 finding, 94, 182 finding node, 95 single application management, 23 single applications managing with spreadsheet add-in functions, 23 opening with spreadsheet add-in functions, 23 spreadsheet add-in functions combining with advanced functions, 113 for multiple application management, 24 for retrieving data, 25 for single application management, 23 for updating data, 26 for using selection dialog boxes, 24 spreadsheets functions for, 280 SpyWorks, 18 storing data values, 51 string converting to a double, 137 getting in HYPENT.INI file, 201 writing to application .INI file, 273 writing to HYPENT.INI file, 274 strings, 17 in return codes, 20 in Visual Basic, 17 sub-account labels, 34 Subaccount Detail table, 411 Subaccount Header table, 412 subaccounts enumerating signatures with HypEnumSubAcctSig( ), 92 enumerating with EntEnumSubAcctSig( ), 180 Subentities table, 412 Substructures table, 413 suggest consolidation method and percentage table, 413 supported languages, 16

T
table functions alphabetical reference, 82 combining spreadsheet add-in functions with, 113 for deselecting, 79

430 Index

for selecting, 79 table selection handle retrieving, 277 setting, 278 tables and advanced functions, 110 associated, 362 changes to conversion from Hyperion Enterprise SE to Hyperion Enterprise, 297 checking if modified, 206 checking if selected, 207 deselecting, 106, 111 deselecting using Hyp...( ) functions, 79 deselecting with EntUnselect( ), 269 discarding changes, 155 enumerating records, 167 enumerating records in, 88 of default settings, 361 querying records in, 241 renamed in Release 4, 297 saving with EntSave( ), 245 selecting, 103, 111 selecting additional, 254, 256 selecting using Hyp...( ) functions, 79 selecting with EntSelect( ), 252 selecting with EntSelectTable( ), 255 selection callbacks and, 112 using an apiStruct with, 110 using Hyp...( ) functions with, 80 TOOLINC.H include file, 19 TOOLKIT.BAS include file, 19 TOOLKIT.H include file, 19 top node ID, 101 TRUE defined, 17

with spreadsheet add-in functions, 26 upgrade HypQuery( ) obsolete query attributes, 290 upgrading for the intercompany table, 298 functions, 289 Hyperion Enterprise SE to Hyperion Enterprise, 282 HypFind( ), 289 HypLock(), 289 HypQryAcctListEntry() function, 295 HypQryNameListEntry() function, 295 HypQryNode() function, 294 HypQryNode() query sizes, 295 HypQuery( ) functions, 290 HypQuery() for Intercompany Table, 298 HypQuery() query sizes, 291 HypQuerySig() function, 293 HypUnlock(), 289 user defaults querying, 243 saving, 245 User Defaults table, 414 users enumerating with EntEnumUsersOnSystem( ), 181 users in Application report setting program name in, 71 using an apiStruct structure, 18, 110 using tables with advanced functions, 112 with Hyp...( ) functions, 80

V
value calculating derived, 40 values calculating percent better or worse, 55 calculating the better or worse, 35 storing, 51 variable getting address of, 203 vbNULLString, 17 view getting with EntGetPerView( ), 199 Visual Basic, 16 32-bit function declarations, 17
Index 431

U
unlocking tables, 106 unsupported functions, 282 updating data, 117 defaults, 271 records, 270 updating data

programming notes, 16

W
working with data using advanced functions, 114 writing data buffers, 39 number to application .INI file, 272 number to application HYPENT.INI file, 274 string to application .INI file, 273 string to application HYPENT.INI file, 274

432 Index

Das könnte Ihnen auch gefallen