GetICTransactionData

Returns an intercompany transaction’s details, including the transaction’s amounts, currency, dimension members, and so on.

Syntax

<HsvICTransactionsData>.GetICTransactionData lItem, plSequenceId, plEntity, plICP, plAccount, plCustom1, plCustom2, plCustom3, plCustom4, plTransactionCurrency, plPostStatus, plMatchStatus, plReasonCode, plType, pdModifiedDate, pdTransactionDate, pdAmount, pdLocalAmount, pdRate, pbstrUser, pbstrId, pbstrSubId, pbstrReferenceId, pbstrMatchCode, pbstrComment1, pbstrComment2

Argument

Description

lItem

Long (ByVal). The index of the transaction in the HsvICTransactionsData instance’s array of intercompany transactions.

Tip:

You can get the upper bounds of the index by subtracting one from the count of transactions returned by BeginDataEnum.

plSequenceId

Long. Returns the transaction’s sequence ID.

Note:

Sequence IDs are internal unique identifiers of transactions.

plEntity

Long. Returns the member ID of the transaction’s Entity dimension member.

plICP

Long. Returns the member ID of the transaction’s Intercompany Partner dimension member.

plAccount

Long. Returns the member ID of the transaction’s Account dimension member.

plCustom1

Long. Returns the member ID of the transaction’s Custom 1 dimension member.

plCustom2

Long. Returns the member ID of the transaction’s Custom 2 dimension member.

plCustom3

Long. Returns the member ID of the transaction’s Custom 3 dimension member.

plCustom4

Long. Returns the member ID of the transaction’s Custom 4 dimension member.

plTransactionCurrency

Long. Returns the currency ID of the transaction’s currency.

Tip:

You can get the currency’s label by passing this ID to the HsvCurrencies method GetCurrencyLabel.

plPostStatus

Long. Returns the transaction’s posting status. Valid values are represented by the HFMConstants type library constants listed in Posting Status Constants.

plMatchStatus

Long. Returns the transaction’s matching status. Valid values are represented by the HFMConstants type library constants listed in Matching Status Constants.

plReasonCode

Long. Returns the ID of the transaction’s reason code.

Tip:

To get the reason code, pass this ID to the HsvICM method GetICReasonCodeLabel.

plType

Long. For internal use.

pdModifiedDate

Double. Returns a timestamp that identifies when the transaction was last modified. The timestamp is formatted as a Double.

pdTransactionDate

Double. Returns the transaction date formatted as a Double.

pdAmount

Double. Returns the transaction amount.

pdLocalAmount

Double. Returns the entity currency amount.

pdRate

Double. Returns the conversion rate, which represents the transaction amount divided by the entity currency amount.

pbstrUser

String. Returns the username of the user who last updated the transaction.

pbstrId

String. Returns the Transaction ID.

pbstrSubId

String. Returns the transaction’s Sub ID.

pbstrReferenceId

String. Returns the transaction’s Reference ID.

pbstrMatchCode

String. Returns the transaction’s match code.

pbstrComment1

String. Returns the transaction’s first comment.

pbstrComment2

String. Returns the transaction’s second comment.

Example

The following subroutine prints to Visual Basic’s Immediate window the Transaction ID, Sub ID, and hexadecimal HRESULT of the transactions contained by an HsvICTransactionsData instance. The subroutine’s arguments specify the transactions’ scenario, year, and period. GetErrorStatus obtains each transaction’s HRESULT.

Sub printTransErrs(lScen As Long, lYear As Long, lPer As Long)
Dim cIcTransData As HsvICTransactionsData, cIcm As HsvICM, lItems As Long
Dim lSeqId As Long, lEnt As Long, lIcp As Long, lAcct As Long
Dim lCust1 As Long, lCust2 As Long, lCust3 As Long, lCust4 As Long
Dim lCurr As Long, lPostStat As Long, lMatchStat As Long, lRCode As Long
Dim lType As Long, dModDate As Double, dTrDate As Double, dAmt As Double
Dim dLocAmt As Double, dRate As Double, sUser As String, lErr As Long
Dim sTranId As String, sSubId As String, sRefId As String
Dim sMatchCode As String, sComm1 As String, sComm2 As String
Set cIcTransData = New HsvICTransactionsData
'g_cSession is an HsvSession object reference
Set cIcm = g_cSession.ICM
cIcTransData.Initialize lScen, lYear, lPer
cIcm.GetICTransactions cIcTransData, True
cIcTransData.BeginDataEnum lItems
For i = 0 To lItems - 1
  cIcTransData.GetErrorStatus i, lErr
  cIcTransData.GetICTransactionData i, lSeqId, lEnt, lIcp, lAcct, _
    lCust1, lCust2, lCust3, lCust4, lCurr, lPostStat, lMatchStat, _
    lRCode, lType, dModDate, dTrDate, dAmt, dLocAmt, dRate, sUser, _
    sTranId, sSubId, sRefId, sMatchCode, sComm1, sComm2
    Debug.Print sTranId & " - " & sSubId & ": " & Hex(lErr)
Next i
cIcTransData.EndDataEnum
End Sub