SaveJournal

Description

SaveJournal() saves a journal on the Oracle Hyperion Financial Management server.

Syntax

Function SaveJournal(

props() As String,

propVals() As String,

dims() As String,

dimVals () As String

) As Long

Parameters

props: An input argument. Provide the list of properties as an array of strings.

propVals: An input argument. Provide the list of property values as an array of strings.

dims: An input argument. Provide the list of dimensions as an array of strings.

dimVals: An input argument. Provide the list of dimension values as an array of strings.

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Sub SaveJournal()
        
Connect to an HFM data source
HypConnect “Sheet1”, “admin”, “password”, “connName”

Set jObj = New JournalVBA
jObj.UseActiveConnectionContext
    
        Dim props(6) As String
        props(0) = HFM_JOURNALPROP_LABEL
        props(1) = HFM_JOURNALPROP_DESCRIPTION
        props(2) = HFM_JOURNALPROP_TYPE
        props(3) = HFM_JOURNALPROP_BALANCE_TYPE
        props(4) = HFM_JOURNALPROP_GROUP
        props(5) = HFM_JOURNALPROP_SECURITY
        props(6) = HFM_JOURNALPROP_READONLY
    
        Dim propVals(6) As String
        propVals(0) = "J001"
        propVals(1) = "Test1"
        propVals(2) = HFM_JOURNALPROP_TYPE_REGULAR
        propVals(3) = HFM_JOURNALPROP_BALANCETYPE_BALANCED
        propVals(4) = HFM_JOURNALPROP_GROUP_ALLOCATION
        propVals(5) = HFM_JOURNALPROP_SECURITY_ACCOUNTS
        propVals(6) = "0"

        dims(0) = HFM_JOURNAL_DIM_SCENARIO
        dims(1) = HFM_JOURNAL_DIM_YEAR
        dims(2) = HFM_JOURNAL_DIM_PERIOD
        dims(3) = HFM_JOURNAL_DIM_VALUE
    
        dimVals(0) = "Actual"
        dimVals(1) = "2007"
        dimVals(2) = "March"
        dimVals(3) = "<Entity Curr Adjs>"
    
        retVal = jObj.SaveJournal(props, propVals, dims, dimVals)
        If retVal = 0 Then
        Debug.Print "SaveJournal Succeeded"
        Else
        Debug.Print "SaveJournal Failed!!!"
        End If    
End Sub