Submits one or more journals. The vararlJournalIDs argument takes the IDs of the journals that are being rejected.
The user must be assigned to the Journals Administrator or Create Journals role, otherwise error number 40D (hexadecimal) will occur. |
<IHsvJournalsEx>.SubmitJournals lScenario, lYear, vararlJournalIDs, pvararnRc
Long (ByVal). The member ID of the Scenario dimension member. | |
Long array (ByVal). The IDs of the journals to be submitted. Get these IDs with the HsvJournals object’s GetItemID method; for more information, see GetItemID. | |
Variant array. Returns codes that identify the success or failure of the journal submissions. The elements in this array have a one-to-one correspondence with the journal IDs passed in the vararlJournalIDs argument. Successfully submitted journals return 0. |
This example submits two journals. The calls to the user-defined GetMemberID function get the example’s dimension member IDs; for details on GetMemberID, see the Examples for IHsvTreeInfo.GetItemID. The laJnlIDs array variable is then populated with the journal IDs by HsvJournals.GetItemID. The member IDs for the Scenario and Year dimension are passed along with this array to SubmitJournals.
Dim lScen As Long, lYear As Long, lPer As Long Dim laJnlIDs(1) As Long, vaRetVal lScen = GetMemberID(DIMENSIONSCENARIO, "Actual") lYear = GetMemberID(DIMENSIONYEAR, "2000") lPer = GetMemberID(DIMENSIONPERIOD, "July") laJnlIDs(0) = m_cHsvJournals.GetItemID(lScen, lYear, lPer, _ "Jnl810") laJnlIDs(1) = m_cHsvJournals.GetItemID(lScen, lYear, lPer, _ "Jnl811") m_cIHsvJournalEx.SubmitJournals lScen, lYear, laJnlIDs, vaRetVal