FDM - Integration IMPORT script failed

Hi,
We are on 11.1.2.1.
I am trying to create a import integration script which i took from the FDM admin guide...and i am trying to pull data from Oracle table...
But i am getting error as "Data access error" and its in the below line when i try to execute the code form the workbench...but when i use the import button in the web its importing....*i beleive its somethign related to the STRWORKTABLENAME and somewhere i read that i need to declare the function FARSTABLE*...but i dont know how as i am pretty novice to that....can you please help me....
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
also when i checked the error log i saw
*** Begin FDM Runtime Error Log Entry [2012-07-03 07:06:27] ***
ERROR:
Code............................................. -2147467259
Description...................................... ORA-00903: invalid table name
Procedure........................................ clsDataAccess.farsTableAppend
Component........................................ upsWDataWindowDM
Version.......................................... 1112
Thread........................................... 20228
Below is the complete code i am using
Function SI_ActualLoad(strLoc, lngCatKey, dblPerKey, strWorkTableNam)*
*+'------------------------------------------------------------------+*
+'Oracle Hyperion FDM IMPORT Integration Script:+
+'+
+'Created By: admin+
+'Date Created: 2012-06-01 01:19:02+
+'strWorkTableName+
+'Purpose:+
+'strWorkTableName+
*+'------------------------------------------------------------------+*
Dim cnSS 'ADO connection Object*
Dim strSQL 'SQL String*
Dim rs 'Source system recordset*
Dim rsAppend 'Hyperion FDM recordset*
Dim monthvar*
+'Initialize ADO objects+
Set cnSS = CreateObject("ADODB.Connection")*
Set rs = CreateObject("ADODB.Recordset")*
monthvar=Month(Date)*
+'Open Hyperion FDM work table recordset For appending+
+'Set rsappend = DW.DataAccess.farsTableAppend(strWorkTableName)+
+'Connect To Oracle database (our data source)+
Dim strConn*
strConn="Provider=ORAOLEDB.ORACLE.1;Data Source=EMDDS392:1521/DEVDBEMD;Database=DEVDBEMD;User id=xxxxxxx;Password=xxxxx"*
cnss.open strConn*
+'Create source query String+
strSQL = "Select * "*
+'strSQL = strSQL & "FROM STG_SAP_ACTUALS WHERE ACCOUNT NOT LIKE 'NA'"+
strSQL = strSQL & "from EGETLDB.STG_SAP_ACTUALS where period =SUBSTR(TO_CHAR(SYSDATE-90,'MONTH'),1,5)"*
+'Open source recordset+
rs.Open strSQL, cnSS*
+'Check For data In source system+
If rs.bof And rs.eof Then*
+'Give Error message+
RES.PlngActionType = 2*
RES.PstrActionValue = "No records To load!"*
+'Assign Return value of Function+
SI_ActualLoad = False ' Assign return value of function*
Exit Function*
End If*
+'Loop through source records In database And append To+
+'Hyperion FDM work table+
If Not rs.bof And Not rs.eof Then*
Do While Not rs.eof*
rsAppend.AddNew*
rsAppend.Fields("PartitionKey") = RES.PlngLocKey*
rsAppend.Fields("CatKey") = RES.lngCatKey*
rsAppend.Fields("PeriodKey") = RES.dblPerKey*
rsAppend.Fields("DataView") = "YTD"*
rsAppend.Fields("CalcAcctType") = 9*
rsAppend.Fields("Amount") = rs.fields("GROUPCURRENCY").Value*
rsAppend.Fields("Account") =UCase(rs.fields("ACCOUNT").Value)*
rsAppend.Fields("Entity") = UCase(rs.fields("ENTITY").Value)*
rsAppend.Fields("UD1") = UCase(rs.fields("SCENARIO").Value)*
rsAppend.Fields("UD2") = rs.fields("VERSION").Value*
rsAppend.Fields("UD3") = rs.fields("CURRENCY").Value*
rsAppend.Fields("UD4") = rs.fields("TRANS_CURRENCY").Value*
rsAppend.Fields("UD5") = rs.fields("ZONE").Value*
rsAppend.Fields("UD6") = rs.fields("CATEGORY").Value*
rsAppend.Fields("UD7") = rs.fields("SCHEDULE").Value*
rsAppend.Fields("UD8") =UCase(rs.fields("DEPT_PRJCTS").Value)*
rsAppend.Fields("UD9") =rs.fields("WBSELEMENT").Value*
rsAppend.Fields("UD10") = rs.fields("DOC_DETAIL").Value*
rsAppend.Fields("UD11") = rs.fields("BUSINESS_TRANSACTION").Value*
rsAppend.Fields("UD12") = rs.fields("VENDOR_NAME").Value*
rsAppend.Fields("UD13") =rs.fields("RECOVERYINDICATOR").Value*
rsAppend.Fields("UD14") = rs.fields("TRANSAMOUNT").Value*
rsAppend.Fields("UD15") = rs.fields("GROUPCURRENCY").Value*
rsAppend.Fields("UD16") = rs.fields("SEGMENTNO").Value*
rsAppend.Fields("UD17") = rs.fields("PARTNEROBJECT").Value*
rsAppend.Fields("UD18") =rs.fields("PO").Value*
rsAppend.Fields("UD19") = rs.fields("QUANTITY_UOM").Value*
rsAppend.Fields("UD20") = rs.fields("DESCRIPTION").Value*
rsAppend.Fields("DESC1") = rs.fields("ACCOUNT_DESCRIPTION").Value*
rsAppend.Update*
rs.movenext*
Loop*
End If*
+'Give success message+
RES.PlngActionType = 6*
RES.PstrActionValue = "SQL Import successful!"*
+'Assign Return value+
SI_ActualLoad = True*
End Function*

Per my answer on Network 54 you cannot test the script interactively in FDQM workbench. You must execute the integration script as part of the normal data load process.
Per the FDM Admin guide: "Integration scripts can be run only by selecting Script from the File Type column of the Import Group grid (top grid) of the Import Formats screen".
As I mentioned in my Network 54 post you can test the pure vbscript portions (without the FDQM specifics) to confirm that is working properly then add it to the integration script which will only run as part of a normal file import process.
Regards,
John A. Booth
http://www.metavero.com

Similar Messages

  • FDM - Building Integration Import Scripts

    Hi All,
    I am trying to write an Integration Script to load SQL Server data into FDM 9.3.1. The script initialises a recordset object for the worktable that the source SQL Server data is loaded into.
    The statement at which my script fails is:
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)*
    I have followed the sample script documented in the FDM Admin Guide.
    Does anyone have ideas as to why the script fails at this statement?
    Thanks,

    Hi everyone,
    I was wondering if sending the sample code would help get a clearer picture....
    Function CTIDB2Test(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Hyperion FDM Integration Import Script:
    'Created By:     admin
    'Date Created:     2/19/2009 1:16:59 PM
    'Purpose: This import integration script connects to the CentroODS database
    ' and imports Actuals data from the generalLedgerMasterFile and glMasterAccount table into FDM
    Dim cnSS 'ADO Connection object
    Dim strSQL ' SQL String
    Dim rs ' Source System recordset
    Dim rsAppend ' FDM recordset
    Dim sPOVString
    Dim sPOVPeriod
    Dim sDataCol
    ' Initialise the ADO objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.RecordSet")
    Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
    The script fails at the statement:
    Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
    Thanks

  • Using FDM to load data from oracle table (Integration Import Script)

    Hi,
    I am using Integration Import Script to load data from oracle table to worktables in FDM.
    i am getting following error while running the script.
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
    Attaching the full error report
    ERROR:
    Code............................................. -2147217887
    Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    At line: 22
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 6260
    IDENTIFICATION:
    User............................................. ******
    Computer Name.................................... *******
    App Name......................................... FDMAPP
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... DBNAME
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... SCRTEST
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... FDM ACTUAL
    Category ID...................................... 13
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ True
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I am using the following script
    Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     Dhananjay
    'Date Created:     1/17/2012 10:29:53 AM
    'Purpose:A test script to import data from Oracle EBS tables
    Dim cnSS 'ADODB.Connection
    Dim strSQL 'SQL string
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect to SQL Server database
    cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
    'Create query string
    strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
    'Get data
    rs.Open strSQL, cnSS
    'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records to load!"
    Exit Function
    End If
    'Loop through records and append to tTB table in location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("Amount").Value
    rsAppend.Fields("Desc1") = rs.fields("Description").Value
    rsAppend.Fields("Account") = rs.fields("Account").Value
    rsAppend.Fields("Entity") = rs.fields("Entity").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    Please help me on this
    Thanks,
    Dhananjay
    Edited by: DBS on Feb 9, 2012 10:21 PM

    Hi,
    I found the problem.It was because of the connection string.The format was different for oracle tables.
    PFB the format
    *cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
    And thanks *SH* for quick response.
    So closing the thread......
    Thanks,
    Dhananjay

  • Schedule a SQL Integration Import Script

    Hey Everyone! I need some help from the FDM community.
    I am currently using FDM 11.1.2.1 and using the Hyperion Essbase adapter to load data to a Planning/Essbase application. I have successfully created a SQL integration import script that connects directly to Oracle EBS, and have manually tested the process up-to-check of the workflow. However, I would like to schedule this process on a nightly basis. I am aware of the batch processing task scheduler and have used it previously, but I am obviously not dumping flat files into the OpenBatch directory nor am I using the Custom General script usually associated with Batch Processing. So, is there a Custom General script that I can use to call on the import integration script so I can schedule such a process?
    Please let me know, and thank you for your time!
    Sincerely,
    Craig

    You can do this with the batch. You just create a blank text file with the proper naming convention for the POV you are going to kick off the integration script for and place it in Open batch. The batch will then execute the integration script for the POV when executed.

  • FDM Account Import Script

    Dear All,
    I am trying to write a script in account expression. This exp would pick account code which starts with digit "4", if yes then custom 1 dimension is [None].
    Function AccImport(strField, strRecord)
    if left(varvalue(13),1) ="4" Then
    varvalue(20)=[None]
    End If
    End Function
    This is the sample script i have written within data pump function
    Can any body please help me in writting what should be the right script to this working.
    Prince

    In your import format on the Custom1 dimension add an import script to the Expression column.
    Your source record strRecord has the Account value in it you just need to parse it out using DW.Utilities.fParseString. Then check if it starts with a "4" and if so have the script return "None" or else return the value in strField i.e. your original Custom1 source value.
    There are plenty of examples of these techniques in the FDM Admin guide in the scripting section. Have a go at writing it yourself it will be much more useful in the long run than me writing the script here.

  • Import Script Failing Sporadically

    The script ran fine for a year, then it began failing sporadically.  I suspect it's related to a DB timeout or network issue, but I can't pinpoint the issue.  I added some basic logging and error trapping, but it isn't enough to go on.  Any ideas on how to continue troubleshooting?
    Function FDM_JDE_Connect(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    ' Date         Person         Modification
    ' 20131024     Jeff McAhren   Cleaned up code, added logging
      Dim cnSS      ' Integration Connection
      Dim strSQL ' SQL statement for V_HFM_LOAD
      Dim rs     ' v_HFM_LOAD Recordset
      Dim rsAppend ' tTB table append rs object
      Dim strMonth
      Dim strYear
      Dim strJDEMonthCol
      Dim r
      WriteLog "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
      WriteLog "FDM_JDE_Connect Starting"
      WriteLog "strLoc = " & strLoc
      WriteLog "lngCatKey = " & lngCatKey
      WriteLog "dblPerKey = " & dblPerKey
      WriteLog "strWorkTableName = " & strWorkTableName
      Set cnSS = CreateObject("ADODB.Connection")
      Set rs = CreateObject("ADODB.Recordset")
      Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
      'Connect to the Integration database
      cnSS.open "Provider=SQLOLEDB.1;Password=mypassword;Persist Security Info=True;User ID=myuser;Initial Catalog=mydatabase;Data Source=mydb;"
      WriteLog "Connected to Integration Database; Err = " & Err & " - " & Err.Description
      strMonth = RIGHT("0" & Month(RES.PstrPer),2)
      strJDEMonthCol="GBAN" & strMonth
      strYear = Year(RES.PstrPer)
      strSQL = "SELECT DATAVIEW, YEAR, PERIOD, ENTITY, ACCOUNT, CUSTOM1, CUSTOM2, CUSTOM3, CUSTOM4, AMOUNT " &_
      "FROM V_HFM_LOAD WHERE PERIOD = " & strMonth & " and (YEAR = " & strYear & " or YEAR = '')"
      rs.Open strSQL, cnSS
      WriteLog "rs recordset opened; Err = " & Err & " - " & Err.Description
      'Check for data
      If rs.bof And rs.eof Then
      RES.PlngActionType = 2
      RES.PstrActionValue = "No Records to load!"
      WriteLog "No records to load, exiting function; Err = " & Err & " - " & Err.Description
      Exit Function
      End If
      'Loop through records and append to tTB table in location's DB, use records returned from the strSQL query
      If Not rs.bof And Not rs.eof Then
      WriteLog "Entering do/while loop; Err = " & Err & " - " & Err.Description
      Do While Not rs.eof
      r = r + 1
      rsAppend.AddNew
      If err <> 0 Then WriteLog "*** ERROR EXECUTING ADDNEW - RECORD: " & r & " - Error: " & err  & " - " & Err.Description
      rsAppend.Fields("PartitionKey") = RES.PlngLocKey
      rsAppend.Fields("CatKey") = RES.PlngCatKey
      rsAppend.Fields("PeriodKey") = RES.PdtePerKey
      rsAppend.Fields("DataView") = rs.fields("DATAVIEW").Value
      rsAppend.Fields("CalcAcctType") = 9
      rsAppend.Fields("Amount") = rs.fields("AMOUNT").Value
      rsAppend.Fields("Desc1") = rs.fields("ACCOUNT").Value
      rsAppend.Fields("Account") = rs.fields("ACCOUNT").Value
      rsAppend.Fields("Entity") = rs.fields("ENTITY").Value
      rsAppend.Fields("ICP") = "[ICP None]"
      rsAppend.Fields("UD1") = rs.fields("CUSTOM1").Value
      rsAppend.Fields("UD2") = rs.fields("CUSTOM2").Value
      rsAppend.Fields("UD3") = rs.fields("CUSTOM3").Value
      rsAppend.Fields("UD4") = rs.fields("CUSTOM4").Value
      rsAppend.Update
      If err <> 0 Then WriteLog "*** ERROR EXECUTING UPDATE - RECORD: " & r & " - Error: " & err  & " - " & Err.Description
      If r / 10000 = Int(r / 10000) Then WriteLog "Status Update Record: " & r
      rs.movenext
      If err <> 0 Then WriteLog "*** ERROR EXECUTING MOVENEXT - RECORD: " & r & " - Error: " & err  & " - " & Err.Description
      Loop
      WriteLog "Exiting do/while loop; recordcount = " & r & "; Err = " & Err & Err.Description
      End If
      rs.close
      rsAppend.close
      WriteLog "Recordsets closed, exiting function; Err = " & Err & Err.Description
      'Assign Return value
      FDM_JDE_Connect = True
    End Function
    Sub WriteLog(LogMessage)
        Dim objLogFile
        Dim FSO
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set objLogFile = fso.OpenTextFile("d:\scripts\HFM\FDM_JDE_Connect.log", 8, True) '8=ForAppending
        objLogFile.Writeline (Now() & ": " & LogMessage)
        objLogFile.Close
        Set objLogFile = Nothing
    End Sub

    Oh, and there is this:
    ** Begin FDM Runtime Error Log Entry [2013-10-28 16:07:18] **
    ERROR:
    Code............................................. -2147467259
    Description...................................... File [07^JDE^Actual^Jul - 2013^RR.txt] Caused Error: (Query timeout expired At line: 99) <=== LINE 99 is the "LOOP" Statement
    Procedure........................................ clsBatchLoader.mFileCollectionProcess
    Component........................................ upsWBatchLoaderDM
    Version.......................................... 1112
    Thread........................................... 5844
    IDENTIFICATION:
    User............................................. sys_jde_load
    Computer Name.................................... MyServer
    App Name......................................... BBCFDM
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... SQLOLEDB
    Data Server...................................... MyDBServer
    Database Name.................................... BBCFDM
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... JDE
    Location ID...................................... 749
    Location Seg..................................... 3
    Category......................................... ACTUAL
    Category ID...................................... 13
    Period........................................... Jul - 2013
    Period ID........................................ 7/31/2013
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False

  • FDM Integration Script Error

    Hi Guru's
    When i want to pull the data from SQL table using below integration Script from admin guide, its showing <font color="red">-2147217865 Data access Error at line15 (Line 15:Set rsAppend = DW.DataAccess.farsTable(strWorkTableName) </font>
    I tried with both web client and workbench. i got same error message.
    (FYI: UDL test connection is succeeded)
    Please help me.
    SQL server name: DEV
    Database name: FDM
    Sql Table name: SDR
    SDR Table contains Below Data Example:
    Entity Account ICP Custom1 Custom2 Custom3 Custom4 Amount
    India,      Extsales,      [Icp None],      Nocc,      No Cust,      None,      None,      50000
    India,      rent,      [Icp None],     Nocc,      No Cust,      None,      None,      20000
    Intigration Script:
    Function SQLIntegration(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Hyperion FDM Integration Import Script:
    'Created By: admin
    'Date Created: 04/19/2012 2:18:39 PM
    'Purpose: Pull data directly from SQL DB
    Dim objSS 'ADODB.Connection
    Dim strSQL 'SQL String
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs Object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect To SQL Server database
    cnss.open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=FDM;Data Source=DEV;"
    'Create query String
    strSQL = "Select * "
    strSQL = strSQL & "FROM SDR "
    'Get data
    rs.Open strSQL, cnSS
    'Check For data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records To load!"
    Exit Function
    End If
    'Loop through records And append To tTB table In location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("dblAmt").Value
    rsAppend.Fields("Desc1") = rs.fields("txtAcctDes").Value
    rsAppend.Fields("Account") = rs.fields("txtAcct").Value
    rsAppend.Fields("Entity") = rs.fields("txtCenter").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "SQL Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    <font color="red"> BELOW IS THE ERROR LOG </font>
    Error Log:
    ** Begin FDM Runtime Error Log Entry [2012-07-16-01:57:58] **
    ERROR:
    Code............................................. -2147217865
    Description...................................... Table does not exist.
    Procedure........................................ clsDataAccess.farsTable
    Component........................................ upsWDataWindowDM
    Version.......................................... 1111
    Thread........................................... 8252
    IDENTIFICATION:
    User............................................. admin
    Computer Name....................................xxxx
    App Name......................................... xxxxx
    Client App....................................... WorkBench
    CONNECTION:
    Provider......................................... SQLOLEDB
    Data Server...................................... xxxxx
    Database Name.................................... xxxxx
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... India
    Location ID...................................... 751
    Location Seg..................................... 4
    Category......................................... actual
    Category ID...................................... 13
    Period........................................... Jan - 2012
    Period ID........................................ 1/31/2012
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    regards
    Sarilla

    Hi Sarilla
    I assume you ran the script from the editor.
    You HAVE TO run it from the normal FDM workflow "Import".
    Otherwise "Data access error"
    Hope this helps
    BR

  • Subtracting Columns from Import File Using Import Script

    The file I am importing to FDM contains two amount columns, 1 Debit, 1 Credit. I want to have the Amount field populate as the Debit minus Credits. I have attempted an import script that is giving me an error in the bolded line:
    Function GBS_Amount(strField, strRecord)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     
    'Date Created:     
    'Purpose:
    'Set variables
    dim strNatural
    dim strCurmnthDR
    dim strCurmnthCR
    dim strCurAmount
    'Store the Natural Account as Column 1 of 11 of a comma delimited file
    strNatural = Trim(DW.Utilities.fParseString(strRecord, 11, 1, ","))
    'Store the Current Month Debit Amount as Column 7 of 11 of a comma delimited file
    strCurmnthDR = Trim(DW.Utilities.fParseString(strRecord, 11, 7, ","))
    'Store the Current Month Credit Amount as Column 8 of 11 of a comma delimited file
    strCurmnthCR = Trim(DW.Utilities.fParseString(strRecord, 11, 8, ","))
    'Calculate the YTD Amount
    strCurAmount = strCurmnthDR - strCurmnthCR
    GBS_Amount = strCurAmount
    End If
    End Function
    What syntax do I need to use to subtract two defined variables?

    Hi Experts,
    I have a similar situation,I am trying to import the Multiple amount columns to be addedd and imported as one amount column.Below is the script I am using for the same,script is getting verified in Script editor but When I am trying to Load the File in import, I am gettig an error as below.but if I try to import without using the script for the amount, inport is getting done.I have attached script to amount column only.
    ERROR
    Code............................................. 9
    Description...................................... Subscript out of range
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 8380
    Scirpt being used
    Function Import_YTD(strField, strRecord)
    'Set variables
    dim strCurmnth1
    dim strCurmnth2
    dim strCurmnth3
    dim strCurmnth4
    dim strCurmnth5
    dim strCurmnth6
    dim strCurmnth7
    dim strCurmnth8
    dim strCurmnth9
    dim strCurmnth10
    dim strCurmnth11
    dim strCurmnth12
    dim strCurAmount
    strCurmnth1 = Trim(DW.Utilities.fParseString(strRecord, 20, 9, ","))
    strCurmnth2 = Trim(DW.Utilities.fParseString(strRecord, 20, 10, ","))
    strCurmnth3 = Trim(DW.Utilities.fParseString(strRecord, 20, 11, ","))
    strCurmnth4 = Trim(DW.Utilities.fParseString(strRecord, 20, 12, ","))
    strCurmnth5 = Trim(DW.Utilities.fParseString(strRecord, 20, 13, ","))
    strCurmnth6 = Trim(DW.Utilities.fParseString(strRecord, 20, 14, ","))
    strCurmnth7 = Trim(DW.Utilities.fParseString(strRecord, 20, 15, ","))
    strCurmnth8 = Trim(DW.Utilities.fParseString(strRecord, 20, 16, ","))
    strCurmnth9 = Trim(DW.Utilities.fParseString(strRecord, 20, 17, ","))
    strCurmnth10 = Trim(DW.Utilities.fParseString(strRecord, 20, 18, ","))
    strCurmnth11 = Trim(DW.Utilities.fParseString(strRecord, 20, 19, ","))
    strCurmnth12 = Trim(DW.Utilities.fParseString(strRecord, 20, 20, ","))
    If strCurmnth1="" Then strCurmnth1="0" End If
    If strCurmnth2="" Then strCurmnth2="0" End If
    If strCurmnth3="" Then strCurmnth3="0" End If
    If strCurmnth4="" Then strCurmnth4="0" End If
    If strCurmnth5="" Then strCurmnth5="0" End If
    If strCurmnth6="" Then strCurmnth6="0" End If
    If strCurmnth7="" Then strCurmnth7="0" End If
    If strCurmnth8="" Then strCurmnth8="0" End If
    If strCurmnth9="" Then strCurmnth9="0" End If
    If strCurmnth10="" Then strCurmnth10="0" End If
    If strCurmnth11="" Then strCurmnth11="0" End If
    If strCurmnth12="" Then strCurmnth12="0" End If
    'Calculate the YTD Amount
    strCurAmount = CDbl(strCurmnth1) + CDbl(strCurmnth2) + CDbl(strCurmnth3) + CDbl(strCurmnth4) + CDbl(strCurmnth5) + CDbl(strCurmnth6) + CDbl(strCurmnth7) + CDbl(strCurmnth8) + CDbl(strCurmnth9) + CDbl(strCurmnth10) + CDbl(strCurmnth11) + CDbl(strCurmnth12)
    Import_YTD =strCurAmount
    End Function

  • 1014 - Expected 'End' Error in FDM Import Script

    I've been successful in creating a script. I get the following error :
    1014 - Expected 'End'
    At Line: 43 *(bolded)*
    Can someone please point me in the right direction.
    Thanks
    Function JDE_Entity(strField, strRecord)
    'Oracle Hyperion FDM DataPump Import Script:
    'Created By:     jzm6518
    'Date Created:     10/29/2012 11:42:36 AM
    'Purpose: Concatenate Entity 00089 with Sub_Account for mapping purposes
    'This is the section where variables are assigned
    'strField represents the Original Entity
    'strSubAcct represents the SubAccount field
    'strSubAcct=DW.Utilities.fParseString(strRecord,6,5,vbTab)
    strSubAcct=DW.Utilities.fParseString(strRecord,6,5,",")
    'strLedger represents the Ledger Field
    'strLedger=DW.Utilities.fParseString(strRecord,6,1,vbTab)
    strLedger=DW.Utilities.fParseString(strRecord,6,1,",")
    'strDept represents the dept Field
    'strDept=DW.Utilities.fParseString(strRecord,6,3,vbTab)
    strDept=DW.Utilities.fParseString(strRecord,6,3,",")
    If strField = "00001" or StrField = "1" then
    If strDept = "2" or strDept = "3" or strDept = "4" or strDept = "6" or strDept = "7" or strDept = "8" or strDept = "8" or strDept = "35" then
    JDE_Entity = strField & "." & strDept
    Else
    End If
    Else
    If strField = "00050" or strField = "00055" or strField = "00070" or strField = "00075" then
    If strLedger = "AA" or strLedger = "BA" then
    JDE_Entity = strLedger & "." & strField
    Else
    End If
    End If
    Else
    If strField = "00089" then
    JDE_Entity = strField & "." & strSubAcct
    Else
    End If
    **Else** JDE_Entity = strField
    End IF
    End Function

    This code is really messy and not well structured, so it's no surprise you have an issue. Try the following:
    1) Never have an Else clause in your If statements where you don't actually have an Else condition i.e. line 33, 40 etc
    2) Use a Case statement to replace your outermost If. It will make your code easier to read and probably get rid of your error which will be caused by poorly sequenced/structured If statements.

  • FDMEE import script not working

    Hi,
    I had a simple import script in FDM Classic that was removing every lines of data from a source file for every amount lower than 0.50 and higher than-0.50.  The FDM Classic import script was:
    Function Remove_50(strField, strRecord)
    'Purpose: To skip lines of data  Between -0.50 AND
    0.50                
    If IsNumeric(strField) Then
       If Abs(strField) <= 0.50  Then
         RES.PblnSkip = True
       Else
         'Keep line:
         Remove_50 = strField
       End If
    End If
    End Function
    Now, I have to convert it to FDMEE Jython.  Here is my first try:
    def  PSA_Remove_50 ( strField, strRecord ):
    if abs(strField) <= 0.50:
    return 0
    else:
    return strField    
    Very simple import script but it is giving me a headache :Oo
    Thanks for your help!
    Dan

    I'd also say to stick with the BigDecimal data type unless you have a really good reason for using the float data type. If you start to multiply floats then you can end up with horrors like this if you're not careful where inaccuracies can start to creep in:
    >>> f = float(1.1)
    >>> f*1
    1.1
    >>> f*2
    2.2
    >>> f*3
    3.3000000000000003
    That's just something to be aware of if you decide to take the float route

  • FDM Import Script

    Hi,
    i'm new making import scripts to FDM. I m making an integration script between SAP and FDM. I m getting information from via web FDM, the problem is when i a m trying to add this information to the workTable. The code is as follows:
    for i = 0 to tData.Rowcount
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName1)
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("Entity") = arrayResult(19)
    rsAppend.Fields("Account") = arrayResult(0)
    rsAppend.Fields("Desc1") = arrayResult(0)
    rsAppend.Fields("ICP") = "[None]"
    rsAppend.Fields("Amount") = saldoTotal
    rsAppend.Update
    next
    Whe i execute this script i just receive an error message saying: "Error: Import Failed", nothing appears in the Error log, neither in the work table.
    Can anyone help me? Does anybody know what can i do to add these records in the work table?
    Thanks in advance.
    Regards.

    How are you getting the table name for variable strWorkTableName1?
    I'd suggest taking another look at the admin guide. There is an example import integration script in that document.

  • Import script (SQL to FDM) - ConnectionRead error

    Hi,
    I have written an import script in FDM to load data from a SQL view. This script works fine when loading approx 5,000 rows, however, fails when trying to load 20k+ rows
    The error message I am receiving is:
    Detail: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
    At line: 72
    Line 72 = rs.movenext 'moves to the next record in the SQL view.
    I have tried ignoring a few columns in the import script (to reduce the data volume) - this works, however I need all columns.
    Below is a copy of the script:
    Function COG1_BrandPL(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    Dim cnSS 'ADO connection object
    Dim strSQL 'SQL string
    Dim rs 'Source (Cognos) recordset
    Dim rsAppend 'FDM recordset
    'Initialize ADO objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    'Open FDM table recordset for appending
    Set rsAppend = DW.DataAccess.farsTableAppend(strWorkTableName)
    'Connect to SQL Server database
    cnSS.open "Driver={SQL Server};Server=XXXXXXXXX;OLE DB Services =-2;Database=XXXXXX;Uid=USER;Pwd=PASSWORD;"
    'Create SQL query string
    strSQL = "Select * FROM Corporate_PLUOP_view"
    'Open source recordset
    rs.Open strSQL, cnSS
    'Check for data in source system
    If rs.bof AND rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No records to load!"
    COG1_BrandPL = False
    Exit Function
    End If
    'Loop through source records and append to FDM table
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = lngCatKey
    rsAppend.Fields("PeriodKey") = dblPerKey
    rsAppend.Fields("DataView") = "YTD"
    'From Cognos
    rsAppend.Fields("UD3") = rs.fields("Cube").value
    rsAppend.Fields("Entity") = rs.fields("Entity").value
    rsAppend.Fields("UD1") = rs.fields("Custom1").value
    rsAppend.Fields("Account") = rs.fields("Account").value
    rsAppend.Fields("ICP") = rs.fields("ICP").value
    rsAppend.Fields("UD2") = rs.fields("Custom2").value
    rsAppend.Fields("Amount") = rs.fields("QPR_Value").value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    rs.close
    cnSS.close
    'Assign Return value
    COG1_BrandPL = True
    End Function
    The only other thing I have tried is copying and pasting the script to Excel.... This works for ALL rows... so seems to be a communication issue between FDM and SQL?
    Any ideas?

    Bit more info:
    I am using FDM 9.3.1
    SQL Server 2005 on Windows 2003 Enterprise x64
    Here's a copy of the FDM error log:
    ** Begin FDM Runtime Error Log Entry [2010-01-13-12:14:55] **
    ERROR:
    Code......................................... -2147467259
    Description.................................. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
    At line: 75
    Procedure.................................... clsImpProcessMgr.fLoadAndProcessFile
    Component.................................... upsWObjectsDM
    Version...................................... 931
    Thread....................................... 12432
    IDENTIFICATION:
    User......................................... HFM-Cognos1
    Computer Name................................ DEFMDHY9A01
    App Name..................................... CognosTest
    Client App................................... WebClient
    CONNECTION:
    Provider..................................... ORAOLEDB.ORACLE
    Data Server..................................
    Database Name................................ HFM9UAT
    Trusted Connect.............................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location..................................... COGNOS1
    Location ID.................................. 750
    Location Seg................................. 3
    Category..................................... ACTUAL
    Category ID.................................. 13
    Period....................................... Jun - 2009
    Period ID.................................... 30/06/2009
    POV Local.................................... False
    Language..................................... 1033
    User Level................................... 1
    All Partitions............................... False
    Is Auditor................................... False
    Edited by: PaulScrivens on 13-Jan-2010 03:26

  • FDM integration script for multiple locations

    Hi,
    I have a slight problem with FDM integration script (SQL integration).
    From what I've understood and tested within one FDM-application (tablespace) I'm not able to have multiple integration scripts. This because the integration script needs to be named SQLIntegration.uss, otherwise there will be an error.
    I have multiple locations within one FDM-application where I would like to use an integration script. Due to the above mentioned naming "bug", I need to include all my locations' integration information in one script. As imagined this is not a solution that easy to maintain or easy to read.
    - Is there a workaround for the name-bug?
    - Can I call a function within the main function? I tried without any success, but maybe you would have a solution.
    Any input would be beneficial

    user10757003 wrote:
    Not sure what you mean when you say you rename the file and you get the error.
    Is this a new integration script you have created and cut / pasted the existing integration script contents? If so, did you remember to change the SQLINTEGRATION = TRUE statement at the end of the script to the new integration script name? this might be the reason why you get the 'Import Successful' popup and the Import error dropdown.What I mean is that scripts are name xxx.uss abc.uss. This should be fairly clear.
    Now I have the SQLIntegration.uss, if I change the name of the script to SQLIntegration1.uss or any name. The script will not work. And I receive one error and one success message as stated above.
    Note: I'm not changing the content or anything else inside the script.

  • Need limit data selection to GL_Period in FDM integration script

    Greetings!
    I am trying to modify an FDM Integration script to limit the data selection to a specific GL period name. The FDM function passes 4 parameters of which one is dblPerKey. My understanding is that this parameter contains the end-date of the requested GL Period and thatthe element is a datetime data type. I have tried several incantations of VB Script to create a period name in MON-YY format and all seem to fail with no data returned. What I am not understanding is what is the content of dblPerKey and can I use it to derive a GL period name? If not, I am open to any and all suggestions.
    My deepest appreciation and thanks for any and all suggestions you may send my way.
    Tom

    Hi Tom
    If you haven't already I'd try posting this in the FDM forum as I think you are more likely to get an answer there.
    Performance Management Applications > Financial Data Management
    Regards
    Stuart

  • Automating FDM Integration Script in Task Manager

    Hi everyone
    I have created an Integration Script that copies data from a SQL table to FDM, and is now attempting to automate a daily run in Task Manager.
    To do this it seems I need to create a Custom Script to run the following Integration Script:
    Function LedgerTrans(strLoc, lngCatKey, dblPerKey, strWorkTableName) I am unable to figure out what to write in the Custom Script to trigger the Integration Script. Can anyone explain or give a sample?
    Best regards
    Frederik

    You don't need a custom script, you can just use the batch process to trigger the import for the POV. You would create a standard batch script using the Batch GUI in the workbench (Tools > Batch processing) and then put empty source files in the OpenBatch folder with the POV for the file name to trigger the import script for the POV.

Maybe you are looking for

  • Text in my headers is now in Fractions

    A few days ago parts of my email headers and certain email blasts have text replaced with what looks like fractions. You can view an example from this screenshot link: http://www.bigthinkingbythehour.com/FractionType.jpg Any thoughts? I'm running Pan

  • What is "an unknown error occurred (4002)" received from iTunes store?

    When I turn on iTunes, I get the following message, "We could not complete your iTunes Store request. An unknown error occurred (4002)." I have no downloads pending or anything else that I know of. Can't figure this out.

  • Backup error with networker

    we have an error as below. does anyone know any clue for this? 18594:nsrsapsv:/usr/sap/RMA/SYS/exe/run/brbackup is not a SAP Brtools command. 18573:nsrsapsv:Running backup process as user rmaadm 18560:nsrsapsv:spawning /usr/sap/RMA/SYS/exe/run/brback

  • Cannot change password

    Since Apple changed @me.com accounts, it's a mess. My iTunes account password is not recognized anymore. So I ask iTunes to reset password, but when I do so, the security question is not recognized anymore (my day and month of birth). So I ask iTunes

  • Material master changes - approval

    Hi , Is there any way that material master changes can will go to approving manager as we have MI20 used to approve stock take changes. Please suggest. thanks