ListJournals

Describes the Oracle Smart View for Office VBA function, ListJournals.

Description

ListJournals() lists all the available Oracle Hyperion Financial Management journals.

Syntax

Function ListJournals(

dims() As String,

dimVals() As String,

jrnlIDs() As String,

jrnlLabels() As String

) As Long

Parameters

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.

jrnlIDs: An output argument. Returns the Journal IDs as an array of strings.

jrnlLabels: An output argument. Returns the Journal Labels as an array of strings.

Return Value

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

Example

The following example sets the option to display no messages.

Public Declare Function HypConnect Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtFriendlyName As Variant) As Long

Sub TestListJournals
‘Connect to an HFM data source
HypConnect "Sheet1", "admin", "password", "connName"

Set jObj = New JournalVBA
     	jObj.UseActiveConnectionContext
    
    	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) = "2022"
    	dimVals(2) = "January"
    	dimVals(3) = "<Entity Curr Adjs>"
    
    	Dim jrnlIds() As String
    	Dim jrnlLabels() As String
    
	Dim retVal as Long
    	retVal = jObj.ListJournals(dims, dimVals, jrnlIds, jrnlLabels)
    
    	If retVal = 0 Then
        Debug.Print "Following are the Journal IDs and their Labels..."
        Debug.Print "Journal Id        Name"
        Dim i As Integer
        For i = 0 To UBound(jrnlIds)
            Debug.Print Spc(5); jrnlIds(i); Spc(10); jrnlLabels(i)
        Next
    	Else
        Debug.Print "ListJournals Failed!!!"
    	End If

End Sub