0 Replies Latest reply: Nov 19, 2012 2:02 PM by HFM_Dev RSS

    Import Target HFM dimensions into mapping template with FDM Script

    HFM_Dev
      Hi All

      I would like to import the Target HFM application dimensions into mapping template.
      Below is the FDM import script to import the target system dimensions.
      I have created the script under General(custom)
      when i click on run script it is showing below error and in outbox( C:\Hyperion\products\FinancialDataQuality\FDM Applications\DevFDM\Outbox\Templates) its created a file name DimAccount.csv with zero KB, where my MapLoader_With_UpCheck.xls template is available.
      <font color="Red">
      438-Object doesn't support this property or method: 'DataAccess'
      At Line: 44</font>

      Line 44 is: varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListAccounts(False)


      1     Sub ExportFMDimensions()
      2     '------------------------------------------------------------------
      3     'UpStream WebLink Custom Script:
      4     '
      5     'Created By: WLAdmin
      6     'Date Created: 10/22/2002 7:54:03 PM
      7     '
      8     'Purpose: Export Hyperion Financial Management Dimensions
      9     ' to CSV File Format. These files will then be
      10     ' used to feed the standard Excel mapping template.
      11     '
      12     '------------------------------------------------------------------
      13     'Declare local variables
      14     Dim objFileSys
      15     Dim objFile
      16     Dim objBP
      17     Dim strFile
      18     Dim lngCount
      19     Dim varList
      20     'Open the file system object
      21     Set objFileSys = CreateObject("Scripting.FileSystemObject")
      22     'Intiialize the block processor (Pass Active API & Script object References)
      23     Set objBP = CreateObject("upsWBlockProcessorDM.clsBlockProcessor")
      24     objBP.Initialize API, SCRIPTENG
      25     'Call the Connect Action for the active integration block
      26     Set API.IntBlockMgr.IntegrationMgr.PobjIntegrate = objBP.ActConnect("ExportDims")
      27     'Check for runtime errors
      28     If Err.Number <> 0 Then
      29     objR.intResult = False
      30     objR.strErrDesc = Err.Description
      31     objR.lngErrCode = Err.Number
      32     objR.blnIsErr = True
      33     'Destroy the object
      34     Set API.HyperionMgr.HPIntegrationMgr.PobjIntegrate = Nothing
      35     Set objBP = Nothing
      36     Exit Sub
      37     End If
      38     'Check the connection and start checking intersections
      39     If API.IntBlockMgr.IntegrationMgr.PobjIntegrate.intResult Then
      40     'Set the output file
      41     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimAccount.csv"
      42     Set objFile = objFileSys.CreateTextFile(strFile, True)
      43     'Execute method and assign Return value
      44     <font color="Red">varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListAccounts(False)</font>
      45     For lngCount = LBound(varList,2) To UBound(varList,2)
      46     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      47     Next
      48     objFile.Close
      49     'Set the output file
      50     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimEntity.csv"
      51     Set objFile = objFileSys.CreateTextFile(strFile, True)
      52     'Execute method and assign Return value
      53     varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListEntities(False)
      54     For lngCount = LBound(varList,2) To UBound(varList,2)
      55     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      56     Next
      57     objFile.Close
      58     'Set the output file
      59     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimIcp.csv"
      60     Set objFile = objFileSys.CreateTextFile(strFile, True)
      61     'Execute method and assign Return value
      62     varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListICPs()
      63     For lngCount = LBound(varList,2) To UBound(varList,2)
      64     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      65     Next
      66     objFile.Close
      67     'Set the output file
      68     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimC1.csv"
      69     Set objFile = objFileSys.CreateTextFile(strFile, True)
      70     'Execute method and assign Return value
      71     varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListCustom1()
      72     For lngCount = LBound(varList,2) To UBound(varList,2)
      73     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      74     Next
      75     objFile.Close
      76     'Set the output file
      77     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimC2.csv"
      78     Set objFile = objFileSys.CreateTextFile(strFile, True)
      79     'Execute method and assign Return value
      80     varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListCustom2()
      81     For lngCount = LBound(varList,2) To UBound(varList,2)
      82     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      83     Next
      84     objFile.Close
      85     'Set the output file
      86     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimC3.csv"
      87     Set objFile = objFileSys.CreateTextFile(strFile, True)
      88     'Execute method and assign Return value
      89     varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListCustom3()
      90     For lngCount = LBound(varList,2) To UBound(varList,2)
      91     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      92     Next
      93     objFile.Close
      94     'Set the output file
      95     strFile = API.DataWindow.Connection.PstrDirOutbox & "\Templates\DimC4.csv"
      96     Set objFile = objFileSys.CreateTextFile(strFile, True)
      97     'Execute method and assign Return value
      98     varList =API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataAccess.fListCustom4()
      99     For lngCount = LBound(varList,2) To UBound(varList,2)
      100     objFile.WriteLine("""" & varList(0,lngCount) & """,""" & varList(1,lngCount) &"""")
      101     Next
      102     objFile.Close
      103     'Destroy Objects
      104     API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.Connection.fDisconnect
      105     Set API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon = Nothing
      106     'Tell user we are done
      107     If LCase(API.Datawindow.Connection.PstrClientType) = "WB.exe" Then
      108     MsgBox "Dimension Extract Complete!",vbexclamation,"WebLink"
      109     Else
      110     RES.PlngActionType = 2
      111     RES.PstrActionValue = "Dimension Extract Complete!"
      112     End If
      113     Else
      114     If LCase(API.Datawindow.Connection.PstrClientType) = "WB.exe" Then
      115     MsgBox "Connection Error",vbexclamation,"WebLink"
      116     Else
      117     RES.PlngActionType = 2
      118     RES.PstrActionValue = "Connection Error"
      119     End If
      120     End If
      121     'Destroy objects
      122     Set API.IntBlockMgr.IntegrationMgr.PobjIntegrate = Nothing
      123     Set objBP = Nothing
      124     Set objFile = Nothing
      125     Set objFileSys = Nothing
      126     End Sub

      Regards
      Dev