Returns a variety of information for a journal.
To successfully call GetJournal, the user must be assigned to the Journals Administrator or Read Journals role, and must have Read or All access to the journal’s security class. For posted journals, the user must also have Read or All access for the entities in the journal’s line items. |
The amounts for the journal’s line items are returned in an array with a Double subtype. To return line item amounts in an array with a String subtype, use GetTextJournal. GetTextJournal is almost identical to GetJournal; the only difference is the subtype of the line item amount array. For more information, see GetTextJournal.
The first three arguments specify the scenario, year, and journal IDs. The next several arguments return journal header information, and the remaining arguments return line item data in arrays. The arrays have a one-to-one correspondence; for example, the second elements in the pvaradAmount and pvararlAccount arguments’ arrays return the amount and account for the journal’s second line item.
<IHsvJournalsEx>.GetJournal lScenario, lYear, lJournalID, plPeriod, plValue, pnType, pnStatus, pnAttribute, pbstrLabel, pbstrDescription, pbstrGroup, plSingleEntity, plSingleParent, plSecurityClass, pvararlEntryID, pvararnDebitCreditUnit, pvaradAmount, pvararbstrDescription, pvararlEntity, pvararlParent, pvararlAccount, pvararlICP, pvararlCustom1, pvararlCustom2, pvararlCustom3, pvararlCustom4
Long (ByVal). The member ID of the Scenario dimension member. | |
Long (ByVal). The ID of the journal. Get this ID with HsvJournals.GetItemID; for details, see GetItemID. | |
Long. Returns the member ID of the Value dimension member for the journal’s currency. | |
Integer. Returns the journal’s type. The valid return values are represented by the HFMConstants type library constants listed in Journal Type Constants. | |
Integer. Returns the journal’s status. The valid return values are represented by the HFMConstants type library constants listed in Journal Status Constants. | |
Integer. Returns a value that indicates whether the journal must be balanced. The valid return values are represented by the HFMConstants type library constants listed in Balance Type Constants. | |
String. Returns the description of the journal group to which the journal has been assigned. | |
Long. For single entity journals, this argument returns the ID of the journal’s base entity. If the journal is a multi-entity journal, this argument returns -1. | |
Long. For single entity journals, this argument returns the ID of the journal’s parent entity. If the journal is a multi-entity journal, this argument returns -1. | |
Long. Returns the ID of the journal’s security class. To get the label of the security class, pass this ID to HsvSecurityAccess.GetSecurityClassLabel. For more information, see GetSecurityClassLabel. | |
Variant array. Indicates whether the line items are debits or credits. Valid return values are represented by the HFMConstants type library constants listed in Debit/Credit Constants. | |
Variant array. Returns the amounts for the journal’s line items. The array is returned as a Double subtype. Use GetVariance to return the total debit and credit amounts and the difference between these amounts. For details, see GetVariance. | |
Variant array. Returns the descriptions for the journal’s line items. | |
Variant array. Returns the member IDs for the base entities of the line items. For single-entity items, these IDs will be the same as the member ID returned in the plSingleEntity argument. | |
Variant array. Returns the member IDs for the parent entities of the line items. For single-entity items, these IDs will be the same as the member ID returned in the plSingleParent argument. | |
Variant array. Returns the member IDs of the line items’ accounts. | |
Variant array. Returns the member IDs of the line items’ Intercompany Partner dimension members. | |
Variant array. Returns the member IDs of the line items’ Custom 1 dimension members. | |
Variant array. Returns the member IDs of the line items’ Custom 2 dimension members. | |
Variant array. Returns the member IDs of the line items’ Custom 3 dimension members. | |
Variant array. Returns the member IDs of the line items’ Custom 4 dimension members. |
The following example shows how to call GetJournal; after calling GetJournal, you can get information about the journal from any of the non-ByVal arguments. The example declares several variables, most of which are used as GetJournal’s arguments. The user-defined GetMemberID function gets the member IDs for the dimension members passed to GetJournal; for details on GetMemberID, see the Examples for IHsvTreeInfo.GetItemID. HsvJournals.GetItemID gets the ID of the journal passed to GetJournal.
Dim lScen As Long, lYear As Long, lPer As Long Dim lJnlPer As Long, lVal As Long, iType As Integer Dim iStatus As Integer, iAttr As Integer, sLabel As String Dim sDescHead As String, sGroup As String, lSingleEnt As Long Dim lSinglePar As Long, lSecClass As Long, vaEntryIDs Dim vaDebCredUnit, vaAmt, vaItemDesc, vaEnt, vaPar, vaAcct Dim vaICP, vaCust1, vaCust2, vaCust3, vaCust4 'Get IDs for the ByVal arguments lScen = GetMemberID(DIMENSIONSCENARIO, "Actual") lYear = GetMemberID(DIMENSIONYEAR, "2000") lPer = GetMemberID(DIMENSIONPERIOD, "July") lJnlID = m_cHsvJournals.GetItemID(lScen, lYear, lPer, "Jnl993") m_cIHsvJournalEx.GetJournal lScen, lYear, lJnlID, lJnlPer, _ lVal, iType, iStatus, iAttr, sLabel, sDescHead, sGroup, _ lSingleEnt, lSinglePar, lSecClass, vaEntryIDs, _ vaDebCredUnit, vaAmt, vaItemDesc, vaEnt, vaPar, vaAcct, _ vaICP, vaCust1, vaCust2, vaCust3, vaCust4