LoadICTransactions

Loads or scans intercompany transactions from arrays that specify the transactions’ dimension members and data.

Syntax

<IHsvAdminICM>.LoadICTransactions var2dlsaTranDim, var2dbstrsaTranDetails, bstrDelimiter, lNumTrans, lLoadOptions, dStartLoadTime, pvaralResults

Argument

Description

var2dlsaTranDim

Long array (ByVal). A two-dimensional array that specifies the dimension members for which to load transactions. The first dimension contains one item per transaction, and has a one-to-one correspondence with the first dimension of the var2dbstrsaTranDetails argument’s array.

The second dimension specifies the member IDs of the transactions’ dimension members, contains 10 items, and is indexed as follows:

  • 0 = Scenario

  • 1 = Year

  • 2 = Period

  • 3 = Entity

  • 4 = Intercompany Partner

  • 5 = Account

  • 6 = Custom 1

  • 7 = Custom 2

  • 8 = Custom 3

  • 9 = Custom 4

var2dbstrsaTranDetails

String array (ByVal). A two-dimensional array that specifies the transaction data. The first dimension contains one item per transactions, and has a one-to-one correspondence with the first dimension of the var2dlsaTranDim argument’s array.

The second dimension specifies the transactions’ data, contains 10 items, and is indexed as follows. All items are strings except when otherwise noted:

  • 0 = Transaction ID.

  • 1 = Sub ID.

  • 2 = Transaction Date. This must be a date cast to a Double, as in the following example:

    CDbl(CDate("11/13/2004"))

  • 3 = Transaction currency label.

  • 4 = Transaction amount.

  • 5 = Entity currency amount.

  • 6 = Conversion rate.

  • 7= Reference ID.

  • 8 = Comment 1.

  • 9 = Comment 2.

bstrDelimiter

String (ByVal). A delimiter character that the system can use to process the transactions. This character cannot be contained in any of the strings in the var2dbstrsaTranDetails argument’s array.

lNumTrans

Long (ByVal). The number of transactions to load. If this number is less than the indexes of the first dimensions of the var2dlsaTranDim and var2dbstrsaTranDetails arguments’ arrays, then only the number of transactions specified here are loaded.

lLoadOptions

Long (ByVal). The load option, which specifies whether to load or scan the data and whether to merge or replace existing transactions. Valid values are represented by the HFMConstants type library constants listed in Transaction Load Mode Constants.

dStartLoadTime

Double (ByVal). The timestamp indicating when to start the loading task. The timestamp must be a Date cast to a Double.

pvaralResults

Variant. Returns an array of HRESULTS indicating the success or failure of the loading. Each item corresponds to the first dimension in the var2dbstrsaTranDetails argument’s array of transactions.

Example

The following example loads an intercompany transaction.

Dim cAdminICM As IHsvAdminICM, laDims(0, 9) As Long
Dim saData(0, 9) As String, vaRet
Set cAdminICM = g_cSession.ICM
' GetMemberID is a user-defined function that returns a member ID from
' a member label
laDims(0, 0) = GetMemberID(DIMENSIONSCENARIO, "ActMon")
laDims(0, 1) = GetMemberID(DIMENSIONYEAR, "2004")
laDims(0, 2) = GetMemberID(DIMENSIONPERIOD, "February")
laDims(0, 3) = GetMemberID(DIMENSIONENTITY, "C")
laDims(0, 4) = GetMemberID(DIMENSIONICP, "A")
laDims(0, 5) = GetMemberID(DIMENSIONACCOUNT, "PayltIC")
laDims(0, 6) = GetMemberID(DIMENSIONCUSTOM1, "Increases")
laDims(0, 7) = GetMemberID(DIMENSIONCUSTOM2, "[None]")
laDims(0, 8) = GetMemberID(DIMENSIONCUSTOM3, "[None]")
laDims(0, 9) = GetMemberID(DIMENSIONCUSTOM4, "[None]")
saData(0, 0) = "Tran001"
saData(0, 1) = "Sub001"
saData(0, 2) = CDbl(CDate("2/13/2004"))
saData(0, 3) = "EUR"
saData(0, 4) = "100"
saData(0, 5) = "100"
saData(0, 6) = "1.0"
saData(0, 7) = "Ref001"
saData(0, 8) = "comment 1"
saData(0, 9) = "comment 2"
cAdminICM.LoadICTransactions laDims, saData, ";", 1, ICT_LOAD_REPLACE, _
  Now, vaRet