Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
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.
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
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
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.
Function Declarations Constants Strings Passing Addresses Callback Functions in Visual Basic
16
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
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
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.
18
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.
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
19
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.
Hyperion Enterprise Frequencies Description Daily Weekly Monthly Quarterly Trimester Half-yearly Yearly
Frequency D W M Q T H Y
20
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
21
View YTD
22
2
In This Chapter
Overview of Spreadsheet Add-in Functions..............................................................23 Single Application Management Functions..............................................................23 Multiple Application Management Functions............................................................24 Selection Dialog Box Functions...........................................................................24 Data Retrieval Functions ..................................................................................25 Data Update Functions ....................................................................................26 Alphabetical Function Reference .........................................................................27
This chapter provides information that you need to use spreadsheet add-in functions, including syntax and examples.
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.
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 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.
Selection Dialog Box Functions Description Used to select an account. Used to select an account list. Used to select a category.
24
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.
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.
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
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 Description Writes data buffers (save to disk) without calculating formulas. Clears data buffers. Stores data values into buffers (in memory). Checks HypHPLNK( ) parameters.
26
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( ).
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
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)
28
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)
Return Codes:
Code 0 NONE Meaning Successful Error occurred
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 )
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
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)
Example:
Public Sub DestructApp( ) Dim rc& If hRApp% <> 0 Then rc& = HypDestruct(hRApp%) If rc& <> 0 Then ret% = MsgBox("Logoff failed", vbOKonly, "Error")
31
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)
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
33
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.
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:
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)
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)
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
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)
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
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.
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)
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$)
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
Use this format for C: int WINAPI HypHPCommit2(HRETRIEVEAPP hRApp, BOOL fDoLogic, BOOL fCheckSecurity)
Alphabetical Function Reference
39
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)
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)
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
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)
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
Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct Error occurred
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)
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)
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( )
44
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( ) 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.
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)
46
Return Codes:
Code 0 HACC_BAD_ACCOUNT HACC_BAD_SELECT Meaning Successful Error occurred, invalid szAcct Error occurred
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)
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
Meaning Successful Error occurred Error occurred, invalid szAcc Error occurred, invalid szCat Error occurred, invalid szEntity Error occurred
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.
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)
48
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
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
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)
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
Return Codes:
50
Spreadsheet Add-in Functions
Code 0 NONE
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)
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
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( ) Entity Retrieval Codes Entities Retrieved The major entity and sub-entity (Entity.Subentity) Only the major entity Only the sub-entity
52
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)
53
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
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)
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
Return Codes:
54
Spreadsheet Add-in Functions
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)
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#)
55
Use this format for C: int WINAPI HypHPPBE( HRETRIEVEAPP hRApp, LPCSTR szAcct, const double FAR * pdValue2, const double FAR * pdValue1, double FAR * pdRetval)
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)
56
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)
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( )
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
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
fScale
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
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)
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
Variable Description hRApp The Hyperion Enterprise Retrieve application handle from HypConstruct( )
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#)
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)
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Use this format for C: short WINAPI HypJourAsk( HRETRIEVEAPP hRApp, LPSTR szRetbuf)
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)
Example:
ret& = HypMultiAsk()hRApp% = HypMultiDefault() 'hRApp% is the selected app
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")
Example:
hRApp% = HypMultiDeinit()If hRApp% <> 0 Then retz% = MsgBox("Log off failed", vbOKOnly, "Error")
Return Codes: There are no return codes for this function. Use this format for C: void WINAPI HypMultiEnum( CALLBACKSTR lpCallback)
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
Example:
hRApp% = HypMultiGet("TAX") If hRApp% = 0 Then ret% = MsgBox("TAX application is not active", vbOKOnly, "Error")
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
Use this format for C: int WINAPI HypMultiInit(LPCSTR szFName, int iShowErr)
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)
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 )
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
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 )
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Use this format for C: SBOOL WINAPI HypSetDefJour(HRETRIEVEAPP hRApp, SIGNA sigDefJour)
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( )
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Use this format for C: SBOOL WINAPI HypSetDefJourCat(HRETRIEVEAPP hRApp, SIGNA sigDefJourCat)
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Example:
HypSetMVMode(1) ret& = HypHPVAL(...) If ret& <> 0 Then ret& = HypValReturn( )
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$)
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
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)
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.
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)
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
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
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)
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
77
78
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.
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.
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.
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
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.
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.
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.
DCONV_CMO, which resets the calculated period each year DCONV_CUR, which does not reset the calculated period each year
szRefCat
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
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);
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&)
83
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);
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);
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);
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&) . .
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);
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
(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);
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
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.
91
Variable wMask
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);
(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
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);
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);
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);
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
1 = True. Retrieve the attached substructure. 0 = False. Do not retrieve the attached substructure.
Return Codes:
Table Functions Alphabetical Reference
97
Example:
sigChild& = HypGetChild(hRApp%, sigNode&, 1)
Use this format for C: SIGNA WINAPI HypGetChild(HRETRIEVEAPP hRApp, SIGNA sigNode, BOOL fExpandSubentities);
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
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
98
Table Functions
Return Codes:
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);
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
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
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);
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Example:
ret% = HypGetPerViewEx(hRApp%,QTD,SigFreq&,iview%)
Use this format for C: short WINAPI HypGetPerViewEx(HRETRIEVEAPP hRApp, LPSTR szFreq, SIGNA * psigFreq, short * piView);
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);
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);
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( )
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);
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( )
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);
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);
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
Use this format for C: short WINAPI HypQueryEx(HRETRIEVEAPP hRApp, short wTabId, short wAttr, SIGNA sigRecd, SIGNA sigKey, short wLen, void FAR * pzBuf);
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( )
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
Use this format for C: short WINAPI HypUnLockEx(HRETRIEVEAPP hRApp, short wTabId, SIGNA sigKey, SBOOL bDiscard);
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.
used by the spreadsheet add-in functions that take the form Hyp...( ).
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.
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$)
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.
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.
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.
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.
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.
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.
You must call HypSethSelect( ) whenever you perform any action that could potentially change the hSelect handle, such as EntUnSelect( ).
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.
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.
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
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
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
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
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")
'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
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
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.
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.
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.
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
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
l l l l
Load Formulas
EntLogicImport( ) EntLogicImportVB( )
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
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.
Advanced Functions to Use with the Hypent.ini File Description Reads an integer. Reads a text value. Writes an integer. Writes a text value.
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.
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
ID_SECTASKFILTER (Security Task Filter Table) Query Attributes on page 409 ID_SECUSERTAB (Security Users Table) Query Attributes on page 409
Obsolete Hyperion Enterprise Ent...( ) Functions and Corresponding New Ent...( ) Functions New Function EntDataExtractVB2( ) EntUNCDataLoad( ) EntUNCDataLoadVB( ) EntFormatNumber2( ) EntQueryEx( ) EntQueryExStr( )
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.
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 )
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)
Return Codes:
Code 0 Meaning Successful
Code NONE
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);
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( ). 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.
Code NONE
Meaning Error occurred. Call the EntGetLastErrorByHApp( ) function for a more specific error code.
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:
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;
'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);
Use this format for C: short WINAPI EntAppLoad(HAPP hApp, LPAPPLOADSTRUCT pArgs)
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.
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
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)
& 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
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
Return Codes:
Code Numeric value 0 Meaning Successful Error occurred
Example:
szVal$ = "100.35" dVal# = EntAsciiToDouble(hApp&, szVal$, dummyVar&)
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);
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);
Return Codes
Advanced Functions Alphabetical Reference 139
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);
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)
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);
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
Variable hSelect
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&)
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);
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)
Variable szCal
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
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"
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
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.
Variable pS->pApiDFA->sigName
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.
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
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.
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)
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
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);
sigEntity The entity signature sigParent NONE if wType = ID_REGULAR, otherwise the parent signature.
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);
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);
Variable hSelect
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);
Return Codes:
Code 0 NONE Meaning Successful Error occurred
short WINAPI EntDiscardChanges(HSELECT hSelect, short wTabID, SIGNA sigKey, LPAPISTRUCT pApiS);
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Use this format for C: short WINAPI EntDiscardDefault(HAPP hApp, short wTabId);
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.
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
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.
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
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
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
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);
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);
Return Codes:
Code 0 Meaning Successful
Code NONE
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);
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.
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%)
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
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.
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
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.
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
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.
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).
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.
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.
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() apiStruct Fields - Jourals Table Description The category signature. The period number. The period number (same as lStartPeriod). 0 to enumerate all.
To enumerate all journals for the specified category and period, set the mask field in the apiStruct (u_ApiEnum.dwMask) to 0, which is the default value. You can also enumerate only the 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
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() 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).
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).
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() apiStruct Fields - Journals Template Table Description The category signature. 0 to enumerate all.
For more information, see Using an apiStruct Structure on page 110. To enumerate all journal templates for the specified category, set the u_ApiEnum.dwMask 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
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.
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.
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
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.
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.
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.
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)
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);
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.
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);
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
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);
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
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);
Return Codes:
Code The signature NONE Meaning Successful Error occurred
Example:
sigCat& = EntFind0(hSelect&, HYP_ID_CATEGORY, HYP_NONE, "ACTUAL", 0)
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.
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
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.
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
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
Signature Returned szKey "USDIV" NAME_ADMIN USDIV NAME_IMPLICIT USDIV NAME_EXPLICIT USDIV
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.
Field lEndPeriod
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);
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
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);
Return Codes:
188 Advanced Functions
Code 0 NONE
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 );
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 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
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
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);
wModule The buffer to return the code identifying the program or module szUser Not used.
Use this format for C: short WINAPI EntGetActiveModule(HAPP hApp, short * pwModule, LPSTR pszUser, int ncbUser)
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)
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)
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)
Return Codes:
Code The signature of the child node NONE Meaning Successful Error occurred
Example:
sigChild& = EntGetChild(hSelect&, sigNode&, 1)
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)
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
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)
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&)
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")
Note: For a partial list of Return Codes, see EntGetLastError( ) - Get Last Error on page
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)
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)
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)
Use this format for C: long WINAPI EntGetProfileLong(LPCSTR szAppName, LPCSTR szKeyName, long lDefault)
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)
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)
Return Codes:
Code The signature of the next sibling node NONE Meaning Successful Error occurred
Example:
202 Advanced Functions
Use this format for C: SIGNA WINAPI EntGetSibling(HSELECT hSelect, SIGNA sigNode)
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:
Code The address of the variable you passed to the function NONE
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.
Use this format for C: void WINAPI EntInitApiStruct(HAPP hApp, LPAPISTRUCT pApiS)
204 Advanced Functions
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);
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)
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.
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.
SIGNA WINAPI EntIsSelected(HSELECT hSelect, short wTabId, SIGNA sigKey, short FAR * pwLockMode, LPAPISTRUCT pApiS)
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)
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
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
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)
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
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
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.
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.
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
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_
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)
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
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
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.
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.
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&)
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
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( ). 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.
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_
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)
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
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)
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.
Description The argument for the callback function, or NULL is the DBE_REMOTE flag is set in lpJourData>lCheckedAttribTypeStatus. Set to Null.
Return Codes:
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.
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)
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)
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
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)
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.
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$
' 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)
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
Return Codes:
220 Advanced Functions
Code 0 NONE
Use this format for C: short WINAPI EntLogicAttach(HSELECT hSelect, SIGNA sigCat, SIGNA sigMethod)
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).
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)
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
Return Codes: This function always returns a zero. Use this format for C: short WINAPI EntLogicDiscard(HAPP hApp, SIGNA sigCat, SIGNA sigMethod)
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
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
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
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
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
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.
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)
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)
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)
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
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
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)
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
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)
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
Description The application handle The string ID (in hModule) of the message The handle of the module (resource DLL) that contains the string wMsgID
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
Variable szTask
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
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)
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[ ]
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
Use this format for C: short WINAPI EntMsgLogTimeVB(HAPP hApp, short wMsgId, HINSTANCE hModule, LPCSTR sz1, LPCSTR sz2, LPCSTR sz3)
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)
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
Example:
hApp& = EntOpenServerAppplication("TAX", "MARY", "secret", ret%)
Use this format for C: HAPP WINAPI EntOpenServerApplication(LPSTR szAppId, LPSTR szUserId, LPSTR szPassWord, short far * pwRet)
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
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)
Variable hSelect
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
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)
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 )
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
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)
Variable Description hApp wTabId The application handle The table ID, which should be one of the following tables:
l l l
The attribute for the field you are querying The length of pzBuf The buffer for the requested information
Return Codes:
Code 0 NONE
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)
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
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)
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( ). 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
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
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
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( ). 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
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:
Meaning Successful Error occurred Cancelled by user. Error occurred and listed in the error log.
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%
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)
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
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)
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:
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)
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.)
Variable lpPtac
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)
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")
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)
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
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).
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
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
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:
Code 0 NONE
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)
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)
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
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
Return Codes:
Code 0 NONE Meaning Successful Error occurred
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
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.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)
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 [ ( ) ]
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.
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.
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.
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)
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
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)
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
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)
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:
Code 0 NONE
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)
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_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)
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)
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
Code FALSE
Use this format for C: BOOL WINAPI EntWriteAppProfileString(LPCSTR szAppName, LPCSTR szKeyName, LPCSTR szValue)
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)
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)
Example:
wLen% = EntVBGetCStrLen(lval1&) szFile$ = Space(wLen%) ret% = EntVBCopyStr(szFile$, lval1&, wLen%)
Return Codes:
Code 0 NONE Meaning Successful Error occurred
Example:
Dim args As CALLBACKSTRUCT ret% = EntVBCopyData( args, lval2&, LenB(args))
Return Codes:
276 Advanced Functions
Code 0 NONE
Example:
hApp& = HypGethApp(hRApp%)
Example:
hSelect& = HypGethSelect(hRApp%)
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
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.
TOOLKIT.BAS, for working with Microsoft Visual Basic TOOLKIT.H, for working with C and C++
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.
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.
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.
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( )
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.
written in Microsoft Visual Basic, you must replace the function declarations in your code with the function declarations in the new TOOLKIT.BAS file.
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.
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.
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.
All record signatures are 32-bit (long) in Hyperion Enterprise. In Hyperion Enterprise SE, most record signatures are 16-bit (short integer).
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( )
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.
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( )*
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.
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 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 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.
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
SUBTABLE_MULTILEVEL
Not applicable. The signature of the detail record is the subaccount signature. SUBTABLE_FIRSTDETAIL for table ID_SUBACCTHDR. Error.
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
Although the following query attributes also retrieve only one byte now, Hyperion Enterprise extends it to two bytes if wLen = 2.
l
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
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
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.
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
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
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.
Although these retrieve only one byte, the system retrieves two bytes if wLen = 2.
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
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
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
Query attribute CODE in table ID_NAMELISTENTRY retrieves the userdefined code specified as criteria for a dynamic entity list.
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.
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
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.
Changes in the Nodes Table Hyperion Enterprise Node information is stored in a new table, ID_NODES.
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.
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
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
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 Description Category access groups Category access details Entity access groups Entity access details Hyperion Enterprise task access groups Hyperion Enterprise task access details
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.
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
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
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 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 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.
6
In This Chapter
Callback Functions
This chapter provides information about using callback functions, hich are required by enumeration functions. It includes the following topics:
Here are the callback functions you should use for the Ent...( ) data enumeration functions and any other advanced functions that use callbacks:
l
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.
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
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
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
Variable lKey
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.
addressofFileNameCString Name of extract file addressofMessageCString Status text szEntity lStart lEnd lTotal lCurrent Unused Unuse Unused Unused Unused
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);
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
Use this format for C: short WINAPI MyFunc (LPCSTR szFileName, LPCSTR szMsg, LPCSTR szEntity, long lStart, long lEnd, long lTotal, long lCurrent, long lParam)
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.
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
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
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:
Code 0 TRUE
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
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
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
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
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
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
Return Codes:
Code 0 Non-zero
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
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
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
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.
Code Non-zero
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
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
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
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
Variable MyFunc
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
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
Return Codes:
Code 0 TRUE Meaning Continue the operation. Cancel the operation.
7
In This Chapter
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
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
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)
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
Dim szCaption$ 'On Error Resume Next szCaption$ = "Now Extracting..." ' Call ProcessCallback(addressOfFileNameCString, addressOfStruct, szCaption$) MyCallBack = 0 End Function
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.
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
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
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
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.
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
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
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_
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)
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
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
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.
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.
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
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
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)
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)
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)
Variable
Description
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)
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
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
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
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
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)
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%
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
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
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)
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
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
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
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
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
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
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_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. 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.
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.
EntSelect( ) EntUnSelect( ) EntEnum( ) EntQueryEx( ) EntFind( ) HypLockEx( ) HypUnLockEx( ) HypEnumEx( ) HypQueryEx( ) HypFindEx( )
Table ID ID_RPTVIEW
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( )
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).
Security task Security task filter Security This table ID is valid only for the following functions:
l l l l
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.
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.
Subaccount detail Subaccount header Subentities Substructures Table that suggests the consolidation method and consolidation percentage Used methods Custom functions
ID_USE_METHODS ID_USERDEFFUNC
* 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.
Table 66
Table IDs for Tables of Default Settings Table Name Application Information Application Defaults User Defaults
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
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
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
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
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.
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).
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 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
VB: String C: LPSTR VB: String C: LPSTR VB: Integer C: short VB: Integer C: short
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.
ID_ACCOUNTS Table Query Attributes Description Chart of accounts sequence number. VB Type C Type
Query ACCT_COA_SEQ_NUM
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.
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
Query LAST_ATTACHED_SUBTABLE
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).
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:
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
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
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
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
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
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
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.
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 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
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
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 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
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
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 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
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
Query CAT_DATEFROMPER
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.
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.
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).
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.
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.
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.
Table 88
Fields for apiStruct Description The period number. The frequency. Set to NONE to use the frequency of the category.
ID_CATEGORY_LINKS Query Attributes Description Category linkage Category signature VB Type Long Long C Type SIGNA SIGNA
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 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
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.
Table 93
Fields for apiStruct Description The category signature. The entity signature. The account signature.
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.
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 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
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.
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 Table Query Attributes Description VB Type Long Integer C Type SIGNA short
Description
VB Type Integer
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.
Note: The FREQ_LITTOSIG query attribute requires an apiStruct with the lpString field set to
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
ID_GROUPS Table Query Attributes Description Number of decimals to display. VB Type Integer C Type short
Query ACCT_DECIMALS
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 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
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
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
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
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.
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.
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_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.
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:
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.
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
Description Table ID of the detail's owner. Period number to which the journal applies.
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.
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
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.
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
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:
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:
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.
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.
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
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.
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.
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
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 Table Query Attributes Description Add or subtract. Hyperion Enterprise entity. Entity signature. VB Type Integer String Long C Type short LPSTR SIGNA
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
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
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
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
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
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
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
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:
Table 124
Fields for apiStruct Description The category signature. The starting period. The ending period.
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
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.
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
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.
ID_ORGANIZATION Table Query Attributes Description Substructure signature. Signature of top node in organization. VB Type Long Long C Type SIGNA SIGNA
For more information on the TOPNODE query attribute, see HypGetTopNodeEx( ) - Get Top Node on page 101.
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
ID_PRINT Table Query Attributes Description Page format. Page setup structure. VB Type Byte Byte C Type char char
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
Note: The wType and PSF_TYPE query attributes return the following constants:
ID_REGULAR ID_ELIMINATION
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.
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
ID_REPORT_ENTRIES Table Query Attributes Description Signature of the first report in the set. VB Type Long C Type SIGNA
Query REPSET_ID
Table 135
ID_REPORTS Table Query Attributes Description VB Type Byte Byte C Type char char
ID_ROLLOVER Table Query Attributes Description Destination category. Next detail record. Source category. VB Type Long Long Long C Type SIGNA SIGNA SIGNA
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
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
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
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
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 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 Table Query Attributes Description Deleted flag. Signature of next variable. VB Type Byte Long C Type HYPBOOL SIGNA
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 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
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 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
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
ID_SECTASK Table Query Attributes Description Task security class. Task filter. VB Type Long String C Type SIGNA LPSTR
ID_SECTASKFILTER Table Query Attributes Description Task signature VB Type Long C Type SIGNA
Query SECFILTER_TASKFILTER
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
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
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
Description Ultimate percent ownership of this owner and owned entity pair. Number of voting shares.
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
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.
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 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_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
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
currency sub-account table. The record with signature 1 (SIG_SUBHDRINTERCOMPANY constant) is the intercompany sub-account table.
ID_SUBNAME Table Query Attributes Description Chart method signature. User-defined code. Currency. VB Type Long Long Long C Type SIGNA SIGNA SIGNA
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.
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.
ID_SUBSTRUCTURE Table Query Attributes Description Substructure signature TopNode field VB Type Long Long C Type SIGNA SIGNA
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
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
ID_USERDEFAULT Table Query Attributes Description Current account. VB Type String C Type LPSTR
Query CURACCOUNT
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.
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.
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
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 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
Description Retrieve the length of instructions. Retrieve the length of expression. Retrieve instructions. See Note. Retrieve expression. See Note.
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.
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
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
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