GetJournal2

Returns a variety of information for a journal. This is the same as GetJournal except with the addition of the VARIANT_BOOL vbScaleAmounts flag which is used to determine whether the textual representation of the amounts are scaled or not.

Caution!

To successfully call GetJournal2, 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 GetJournal2; 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 fourth argument is the vbScaleAmounts flag. The call to GetJournal calls GetJournal2 with a vbScaleAmounts = VARIANT_TRUE. This scales the amounts based on the cell's scale factor. Setting the flag to FALSE means that no scaling will occur.

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.

Syntax

<HsvJournalsEx>.GetJournal2 lScenario, lYear, lJournalID, vbScaleDataValues, plPeriod, plValue, pnType, pnStatus, pnAttribute, pbstrLabel, pbstrDescription, pbstrGroup, plSingleEntity, plSingleParent, plSecurityClass, pvararlEntryID, pvararnDebitCreditUnit, pvaradAmount, pvararbstrDescription, pvararlEntity, pvararlParent, pvararlAccount, pvararlICP, pvararlCustom1, pvararlCustom2, pvararlCustom3, pvararlCustom4
ArgumentDescription
lScenario

Long (ByVal). The member ID of the Scenario dimension member.

lYear

Long (ByVal). The member ID of the Year dimension member.

lJournalID

Long (ByVal). The ID of the journal. Get this ID with HsvJournals.GetItemID; for details, see GetItemID.

vbScaleDataValues

Boolean (ByVal). Determines whether the textual representation of the amounts are scaled or not. Setting to TRUE will scale the amounts based on the cell's scale factor. Setting the flag to FALSE results in no scaling.

plPeriod

Long. Returns the ID of the journal’s period.

plValue

Returns the member ID of the Value dimension member for the journal’s currency.

pnType

Integer. Returns the journal’s type. The valid return values are represented by the HFMConstants type library constants listed in Journal Type Constants.

pnStatus

Integer. Returns the journal’s status. The valid return values are represented by the HFMConstants type library constants listed in Journal Status Constants.

pnAttribute

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.

pbstrLabel

String. Returns the label of the journal.

pbstrDescription

String. Returns the description of the journal.

pbstrGroup

String. Returns the description of the journal group to which the journal has been assigned.

plSingleEntity

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.

plSingleParent

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.

plSecurityClass

Long. Returns the ID of the journal’s security class.

Tip:

To get the label of the security class, pass this ID to HsvSecurityAccess.GetSecurityClassLabel. For more information, see GetSecurityClassLabel.

pvararlEntryID

Variant array. For internal use.

pvararnDebitCreditUnit

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.

The array is returned as an Integer subtype.

pvaradAmount

Variant array. Returns the amounts for the journal’s line items.

The array is returned as a Double subtype.

Tip:

Use GetVariance to return the total debit and credit amounts and the difference between these amounts. For details, see GetVariance.

pvararbstrDescription

Variant array. Returns the descriptions for the journal’s line items.

The array is returned as a String subtype.

pvararlEntity

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.

The array is returned as a Long subtype.

pvararlParent

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.

The array is returned as a Long subtype.

pvararlAccount

Variant array. Returns the member IDs of the line items’ accounts.

The array is returned as a Long subtype.

pvararlICP

Variant array. Returns the member IDs of the line items’ Intercompany Partner dimension members.

The array is returned as a Long subtype.

pvararlCustom1

Variant array. Returns the member IDs of the line items’ Custom 1 dimension members.

The array is returned as a Long subtype.

pvararlCustom2

Variant array. Returns the member IDs of the line items’ Custom 2 dimension members.

The array is returned as a Long subtype.

pvararlCustom3

Variant array. Returns the member IDs of the line items’ Custom 3 dimension members.

The array is returned as a Long subtype.

pvararlCustom4

Variant array. Returns the member IDs of the line items’ Custom 4 dimension members.

The array is returned as a Long subtype.