ProcessAllICTrans

Deletes, posts, unposts, or unmatches all transactions for a given scenario, year, and period.

Tip:

To process only specified transactions for a given scenario, year, and period, use ProcessICTransactions.

Syntax

<HsvICM>.ProcessAllICTrans(lICAction, pIUnkICTransactionsData)

Argument

Description

lICAction

Long (ByVal). A flag that specifies the processing to perform. Pass one of the following constants, which are members of the HFMConstants type library enumeration tagICMTRANSPROCESSACTION:

  • ICM_DELETETRANS_ALL

  • ICM_POSTTRANS_ALL

  • ICM_UNMATCHTRANS_ALL

  • ICM_UNPOSTTRANS_ALL

For descriptions of these constants, see Processing Action Constants.

pIUnkICTransactionsData

HsvICTransactionsData object (ByVal). An initialized HsvICTransactionsData object reference.

Note:

The HsvICTransactionsData method Initialize specifies the scenario, year, and period of the transactions to process.

Return Value

String. Returns an XML string that indicates whether an error occurred. The string is of the following format, with the status attribute containing zero if no error occurred, or an non-zero error number otherwise:

<processtransactionsresponse status="HRESULT">
</processtransactionsresponse>

Example

The following function deletes all transactions for the specified scenario, year, and period.

Function deleteTrans(lScen As Long, lYear As Long, lPer As Long) _
  As String
Dim cIcTransData As HsvICTransactionsData, cICM As HsvICM, sRet As String
Set cIcTransData = New HsvICTransactionsData
'g_cSession is an HsvSession object reference
Set cICM = g_cSession.ICM
cIcTransData.Initialize lScen, lYear, lPer
sRet = cICM.ProcessAllICTrans(ICM_DELETETRANS_ALL, cIcTransData)
deleteTrans = sRet
End Function