Closes a period, meaning that journals can no longer be posted for the period. Since periods in Financial Management apply to years and scenarios, you must pass the member IDs of the applicable scenario and year in addition to the member ID of the period.
For information on getting member IDs, see About Member IDs. |
<HsvJournals>.ClosePeriod lCategory, lYear, lPeriod
Long (ByVal). The member ID of the Scenario dimension member. | |
Long (ByVal). The member ID of the Period dimension member to be closed. |
This example closes the August period for the Actual scenario in the year 2000. The member IDs of the Scenario, Year, and Period dimension members are obtained with calls to the user-defined GetMemberID function; for details on GetMemberID, see the example for GetItemID.
Dim lScen As Long, lYear As Long, lPer As Long
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
lPer = GetMemberID(DIMENSIONPERIOD, "August")
Dim cHsvJournals As HsvJournals
Set cHsvJournals = m_cHsvSession.Journals
cHsvJournals.ClosePeriod lScen, lYear, lPer