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.

Similar Messages

  • FDM import script with selectable source file

    Hi All,
    I would like to build an import script attached to an import format that imports a text file with multiple value columns.
    Source file:
    Entity, Detail, Account 1, Account 2
    E_abc, D_abc, 100, 200
    In FDM this needs to be:
    Entity, Detail, Account, Amount
    E_abc, D_abc, Account 1, 100
    E_abc, D_abc, Account 2, 200
    So i need to loop through the file.
    My biggest challenge is that when i attach a script to an import format in the import process i cannot select a file from inbox anymore, it has to be a pre-defined file.
    Has someone an example or solution how to make a script-import format and enable the select file from inbox?
    And if possible has someone an example script of the issue stated above?
    Thanks in advance,
    Marc

    Hi Wayne..
    Thanks for your reply (and sorry for the delay in mine).
    Could you tell me what script to use to open the file in the befImport script, or how to rename the file in memory to a new one?
    So i write a script that rewrites the file to a new file in the inbox but i need to tell FDM that it needs to process this new file.
    Thanks,
    Marc

  • 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.

  • Issue in FDM Import script for ading multiple amount columns.

    Hi,
    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 I am gettig an error as below.
    ERROR
    Code............................................. 9
    Description...................................... Subscript out of range
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 8380
    Scirpt
    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

    Hi,
    how many columns has your file?
    that error means you are trying to access an invalid position.
    Regards

  • FDM import script need to reformat in fdmee

    Hi Guru's
    i am in the process of migrating from fdm classic to fdmee and require your help to come up on this as i am new to Python scripting.
    I am pulling the data from Oracle database through a view and want to change the below script in Jython FDMEE format to pull the data.
    Can someone help or guide me on how to proceed.
    Dim objSS
    'ADODB.Connection
    Dim strSQL
    'SQL string
    Dim rs   
    'Recordset
    Dim rsAppend
    'tTB table append rs object
    Dim Prd
    Dim Yr
    Dim Sp
    Dim Ct
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    Prd = FormatDateTime(CDate(dblPerKey),1)
    Yr = Right(Prd, 4)
    Prd = UCase(CStr(Mid(Prd, InStr(Prd, ",")+2, 3)))
    'Connect to Oracle database
    cnss.open "Provider=OraOLEDB.Oracle.1;Password=" &  DecryptPassword(3, "ojwo`f") & ";Persist Security Info=True;User ID=test;Data Source=test"
    'Create query string
    strSQL = "Select * FROM "
    Select Case lngCatKey
    Case 13: strSql = strSql & "KDDBI_BUDG_STATIC_VW"
    End Select
    strSQL = strSQL & " where PERIOD_YEAR = '" & YR & "' and PERIOD ='" & Prd & "' And CURRENCY_CODE <> 'STAT'"
    'Get data
    CnSS.commandTimeout = 240
    rs.Open strSQL, cnSS
        'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
            RES.PstrActionValue = "No Records to load!" & "SQL:" & StrSQL
    Exit Function
    End If
    'Loop through records and append to FDM Worktable table in location's DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    For Ct = 1 To 2
    If Ct = 1 Then
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = lngCatKey
    rsAppend.Fields("PeriodKey") = dblPerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("Account") =UCase (rs.fields("ACCT_CODE").Value)
    rsAppend.Fields("Entity") = UCase (rs.fields("CO").Value)
    rsAppend.Fields("UD1") = UCase("APPROVED")
    rsAppend.Fields("UD4") = UCase("CLBALANCE")
    rsAppend.Fields("UD3") = UCase (rs.fields("DEPT").Value)
    rsAppend.Fields("UD6") = UCase("LOCAL")
    rsAppend.Fields("UD7") =UCase (rs.fields("LOC").Value)
    rsAppend.Fields("UD9") = UCase (rs.fields("PRODUCT").Value)
    rsAppend.Fields("UD5") = UCase("HSP_INPUTVALUE")
    If Left(rs.fields("ACCT_CODE").Value, 1) = "3" Or Left(rs.fields("ACCT_CODE").Value, 1) = "2" Then
    rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_LC").Value)) * -1
    Else
        rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_LC").Value))
    End If
    rsAppend.Update
    Else
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = lngCatKey
    rsAppend.Fields("PeriodKey") = dblPerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("Account") =UCase (rs.fields("ACCT_CODE").Value)
    rsAppend.Fields("Entity") = UCase (rs.fields("CO").Value)
    rsAppend.Fields("UD1") = UCase("APPROVED")
    rsAppend.Fields("UD4") = UCase("CLBALANCE")
    rsAppend.Fields("UD3") = UCase (rs.fields("DEPT").Value)
    rsAppend.Fields("UD6") = UCase("KWD")
    rsAppend.Fields("UD7") =UCase (rs.fields("LOC").Value)
    rsAppend.Fields("UD9") = UCase (rs.fields("PRODUCT").Value)
    rsAppend.Fields("UD5") = UCase("HSP_INPUTVALUE")
    If Left(rs.fields("ACCT_CODE").Value, 1) = "3" Or Left(rs.fields("ACCT_CODE").Value, 1) = "2" Then
    rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_KD").Value)) * -1
    Else
        rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_KD").Value))
    End If
    rsAppend.Update
    End If
    Next
    rs.movenext
    Loop
    End If
    'Close Record Sets
    rs.close
    rsAppend.close
    'Assign Return value
    Budget_Approved = True

    How is one supposed to modify VB functions in FDM such as farsTableAppend so that it is supported in FDMEE scripts?
    I generated an API documentation from FDMEE AIF-APIs.jar (which is supposed to have all the FDMEE APIs in it I guess) but I dont see replacement for VB functions such as farsTableAppend, fExpTRx, PstrClientType, though I can see other methods in the documentation for eg. getEPMOracleHome() etc.. (All these functions that we can view using eclipse as an editor for FDMEE Dev).
    Is there any other method in the FDMEE API that I should be using to replace these functions for FDMEE Support?
    I have one more question regarding AIF-CUSTOM.jar file, what is the purpose of this jar, do we get any  additional methods in this file
    Please advise..
    Thanks in Advance

  • Newbie demystifying Import script

    I am new to FDM (and VBscript) and need some clarification on an previously written script in order to fully comprehend what happens when it is executed. Could somebody explain what this part of the FDM Import script does.
    strSQL = "Select * FROM tmAccount where tmAccount.Account=" & "'"& AccountSp & "'"
    Set rsAllocate = DW.DataAccess.farssnap(CStr(strSQL))
    Set RES.PcolRecs = DW.DBTools.fCreateRecCol
    RES.PcolRecs.PblnAdd = True
    RES.PcolRecs.PblnUpdate = False
    I think it is some kind of API statement but have not been able to pinpoint its objective.The info in the Admin and API guides are quite limited.
    I appreciate any info you guys have on this matter.
    Stefan

    As the previous poster stated, its hard to tell exactly what is happening since we only have a portion of the script; however, I will decrypt the commands a bit more for you :
    DW.DataAccess.farssnap --> Opens an ADO static type readonly recordset
    ** In your code the recordset would be assigned to rsAllocate which is going to have results from the SQL Query Select * from tmAccount where tmAccount.Account = <AccountSp> **
    As we have no idea what is in <AccountSp>, I can't say what its grabbing for sure. Also, tmAccount is not a standard FDM account as far as I can tell. I would have to guess its part of a custom solution?
    DW.DBTools.fCreateRecCol --> Return a reference to a FDM custom record collection used for complex import formats. This reference is an object of records.
    PcolRecs.PblnAdd = True --> This is a property of the fCreateRecCol object (see above). Having this set to true indicates that you will be creating a new record.
    PcolRecs.PBlnUpdate = False --> This is a property of the fCreateRecCol object. Having this set to false indicates that you are not updating a record.
    My guess/hunch is that somewhere farther down in your script you are taking whatever you read from the select statement and inserting it into the custom record collection since its been configured to add a new record.
    Hope that helps

  • 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

  • How to use import script with FDM using adapter ERPI?

    Hi,
    I use FDM and ERPI 11.1.2 to load data from EBS R12 to Planning 11.1.2
    Data loaded from eBS are YTD data.
    I have seen that I could use an import script to calculate manually the amount with the periodic_net_cr and periodic_net_dr fields.
    But how to use this import script? Because in my import format in FDM, I don't use a file but directly the adapter, so no "Expression" field.
    Thanks in advance for your help
    Fanny

    Hello Fanny,
    No you will not need to put anything in the BatchAction. If you review the FDM API Documentation posted it will outline all the scripts that will execute for a particular event ... and the order in which they execute. The BatchAciton only affects the execution of the batch ... it does not control processing of data. Processing of data is controlled by many others.
    There is a script that can be written and placed (as Tony mentioned) in the ImportAction that will be able to recaculate the values from ERPi to be YTD values. You can possibly open an SR and a support Engineer can help you .... or you can search the current KM base and use that information there from the v11.1.1.3.00 version to build your own for v11.1.2.x
    Thank you,

  • 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

  • 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

  • Using  FDM Import Action script to import data from ERPI table "tdataseg_t"

    Hi Experts
    I have extracted data from EBS using ERPI and loaded into the intermediate table "tdataseg_t"
    I am trying to use Import Action script within FDM to extract data from "tdataseg_t" table (where ERPI extract data is stored) as i could not use the normal import script.
    Requirement : I have to restrict the custom 2 dimension based on Account dimension.
    Dim Account
    Account = ???? ( i am struck here)
    If Account = 1000 to 5000 Then
    Custom2 = Right( product , 5)
    End If
    but , I could not find the exact syntax to call the Account dimension from the "tdataseg_t" table.
    Please Advise
    Thanks
    Sak
    Edited by: user12292415 on Feb 26, 2012 1:19 AM

    Hello,
    Importing data via a manual script defeats the purpose of ERPi. As it will not provide you an audit trail, drill-through/drill-back, etc.
    Your best bet is to use the default settings by the software. Just because it returns more records than you want is not a bad thing. You can conditionally change/alter the information either in an EventScript inside of FDM or by mapping the un-needed information to IGNORE.
    Thank you,

  • 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.

  • 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

  • Automate FDM Import Integration Scripts

    I have several FDM location with an associated unique integration import script that pulls data from a SQL Server. Is there a way to automate the execution of the scripts? Much like batch processing so I can control when they load at certain points? Is this possible and if so how? I would hate to create extract files and then use the batch loader as the integration script is so much cleaner and it makes it easier for the end users to manually load outside of the forced loads I would like to do. Is this possible? Thanks in advance for any help.

    Yes, you can do this. you need to create empty batch files with the name in the correct format (as with the normal flat file batch process). Generally i expect you would know the location and Category to be used in creating the empty file name so these could be hard-coded. the issue is the Period to be used, and there are various options. If you are using the 'Global' POV setting then you could use the global period setting, which would have to updated each period by the administrator. Another option might be to maintain a seperate file with the current period held in it. Another option might be to utilise a filed on the locaiton which again would need maintaining. Another option might be that the period is held in the SQL table holding the data you are importing so you could do a read of the table first to get the period

  • 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

Maybe you are looking for

  • How do I convert a £ sign iN SQL..?

    hello. I know ORACLE SQL doesn't mind a £ sign (converts it to a hash in TOAD) but as I'm using a SELECT statement in a BI Publisher Data Template that is used to generate an XML file - the XML generator doesn't like it.. So. Could somebody please te

  • Message Mapping Error in Text File to XML file Scenario

    Hi Gurus, This is Sudheer...I am New to SAP-PI...... Below link is File to File Scenario(Text File to XML File)... https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/basicFileAdapterContentConversion I am facing Message Mapping Error....I am not a

  • Multiple entry in J1IH

    Dear Experts, We are working on Supplementary invoice process, where in we are using Tcode J1IH - Other adjustment for excise duty posting. I would like to know whether we can enter multiple excise invoice in this transaction. I tried from my end and

  • How to confirm the var/mobile/...../Document folder is in the archive package

    I'm a newbie, so I'm not sure I am saying this correctly, so bear with me.  I recently uploaded my app to itunes Connect and was "Ready for sale" a few days ago.  When it appeared in the App Store I purchased it to see how it looks.  I noticed that t

  • Heterogeneous Services with password problem

    i need to connect to a password protected access database via oracle 9i. http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206#18830681837358 following the steps described at ASKTOM (link above) i was able to connect to ac