GetTextJournal

Returns a variety of information for a journal.

Caution!

To successfully call GetTextJournal, 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 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 pvarabstrAmount and pvararlAccount arguments’ arrays return the amount and account for the journal’s second line item.

The amounts for the journal’s line items are returned in an array with a String subtype. To return line item amounts in an array with a Double subtype, use GetJournal. GetJournal is almost identical to GetTextJournal; the only difference is the subtype of the line item amount array. For more information, see GetJournal.

Syntax

<IHsvJournalsEx>.GetTextJournal lScenario, lYear, lJournalID, plPeriod, plValue, pnType, pnStatus, pnAttribute, pbstrLabel, pbstrDescription, pbstrGroup, plSingleEntity, plSingleParent, plSecurityClass, pvararlEntryID, pvararnDebitCreditUnit, pvarabstrAmount, pvararbstrDescription, pvararlEntity, pvararlParent, pvararlAccount, pvararlICP, pvararlCustom1, pvararlCustom2, pvararlCustom3, pvararlCustom4

Argument

Description

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 number of the journal. Get this ID with HsvJournals.GetItemID; for details, see GetItemID.

plPeriod

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

plValue

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

pnType

Integer. Returns a numeric constant that identifies 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 member 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 member 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.

pvarabstrAmount

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

The array is returned as a String 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.

Example

See the Example for GetJournal. The only difference between the two methods is the data subtype of the array that returns the line item amounts. All other arguments are identical.