Approve

Approves a process unit.

To attach documents when approving, use Approve2. To approve multiple process units, use ApproveEx or Approve2.

Syntax

<HsvProcessFlow>.Approve lScenario, lYear, lPeriod, lEntity, lParent, lValue, vbUseAllValueMembers, bstrAnnotation, psNewProcessState

Argument

Description

lScenario

Long (ByVal). The member ID of the process unit's Scenario dimension member.

lYear

Long (ByVal). The member ID of the process unit's Year dimension member.

lPeriod

Long (ByVal). The member ID of the process unit's Period dimension member.

lEntity

Long (ByVal). The member ID of the process unit's child Entity dimension member.

lParent

Long (ByVal). The member ID of the process unit's parent Entity dimension member.

lValue

Long (ByVal). The member ID of the process unit's Value dimension member.

vbUseAllValueMembers

Boolean (ByVal). Determines whether process units for Value dimension members related to the lValue member are approved. Pass TRUE to approve related process units, FALSE to approve only the process unit for the lValue member.

bstrAnnotation

String (ByVal). The comment for the approval.

psNewProcessState

Integer. Returns PROCESS_FLOW_STATE_APPROVED, which is the level constant for the Approved level.

Example

This example approves a process unit. The calls to the user-defined GetMemberID function get the process unit’s member IDs; for information on GetMemberID, see the Examples for GetItemID. These member IDs are then passed to Approve.

Dim lScen As Long, lYear As Long, lPer As Long
Dim lEnt As Long, lPar As Long, lVal As Long, iState As Integer
Dim cHsvProcessFlow As HsvProcessFlow, lRights As Long
lScen = GetMemberID(DIMENSIONSCENARIO, "Budget")
lYear = GetMemberID(DIMENSIONYEAR, "2001")
lPer = GetMemberID(DIMENSIONPERIOD, "September")
lEnt = GetMemberID(DIMENSIONENTITY, "Connecticut")
lPar = GetMemberID(DIMENSIONENTITY, "UnitedStates")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cHsvProcessFlow = m_cHsvSession.ProcessFlow
cHsvProcessFlow.Approve lScen, lYear, lPer, lEnt, lPar, lVal, _ 
  False, "Good numbers", iState