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.

Similar Messages

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

  • 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

  • Velocity demo: error running the import scripts

    I tried to install velocity demo,
    when I run import scripts (mydemo_schema.dmp) I get the
    following error:
    IMP-00010: not a valid export file, header failed verification
    IMP-00000: Import terminated unsuccessfully
    Did someone test it successfully ? Or is file corrupted ?
    Mario

    You need to use import from a 902 database install.
    Mike
    ----

  • 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

  • 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

  • How to fix Syntax Error: Expected end of line, etc. but found end of script. in applescript?

    I am making an applescript for my modding tool for Minecraft. It used to use multiple apps and I am now trying to make one app for all the tasks.
    Here is the code:
    say "You are running iCraft version one point one for minecraft version 1.2.5"
    display dialog "Which tool do you want to use?" buttons {"Mod Installer", "Backup", "Restore"} default button 3
    set the button_pressed to the button returned of the result
    if the button_pressed is "Mod Installer" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Insert all mod files into the Mods folder."
    display dialog "Have you inserted all Mod files into the Mods folder?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished"
    else
    display dialog "Insert mod files into the Mods folder and restart iCraft.app."
    end if
    if the button_pressed is "Backup" then
    display dialog "Are you sure you want to backup your Minecraft.jar in it's current state?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished, find it in your Backups directory in the iCraft folder"
    else
    display dialog "Backup aborted"
    end if
    if the button_pressed is "Restore" then
    display dialog "Are you sure you want to restore your Minecraft.jar with your backup?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/resources/s…
    else
    display dialog "Restore aborted"
    end if
    end
    When I try to compile/run it gives me Syntax Error: Expected end of line, etc. but found end of script.

    Your script got mangled when pasting it into your message, but the main problem looks like you are missing a bunch of end if statements.  Unless your if statements are contained on one line, you need to terminate them with a matching end if statement - for example, the following are equivalent:
    if someString is "whatever" then display dialog "foo"
    if someString is "whatever" then
      display dialog "foo"
    end if

  • Apple Script Editor, "Expected end of line but found identifier" Error

    Hello, I'm trying to automate an Application I have, called Self Control, since I have ADD and easily get distracted, and what I want to do is for my computer to automatically set the application up, but to do this, I need a script, which I have already done, but get this error, can someone help me fix this script?
    (the error happens once I click on "run", it tells me as follows: "Syntax Error", followed by, "Expected end of line but found identifier".
    on run argv
    set defaultTime to 1440
    try
      set myTime to item 1 of argv as number
    on error
      set myTime to defaultTime
    end try
    tell application "Usable Keychain Scripting"
      tell current keychain
       set myPass to (password of first generic item ¬
        whose name contains "SelfControl")
       -- eliminate invisible characters, or "gremlins," from password
       set x to quoted form of myPass
       set myPass to do shell script "echo " & x & " | perl -pe 's/[^[:print:]]//g'"
      end tell
    end tell
    tell application "SelfControl" to activate
    tell application "System Events"
      tell process "SelfControl"
       tell slider of window "SelfControl" to set value to myTime
       click button "Start" of window "SelfControl"
      end tell
      tell window 1 of process "SecurityAgent"
       with timeout of 15 seconds
        repeat
         set tryAgain to false
         try
          set value of text field 2 of scroll area 1 of group 1 to myPass
         on error
          delay 1
          set tryAgain to true
         end try
         if not tryAgain then exit repeat
        end repeat
        click button 2 of group 2
       end timeout
      end tell
    end tell
    end run
    I'm no coding expert, but your help would be greatly appreciated. I know that once the script is done I can automate it with Calendar, or even Quicksilver, I just need help with the script.
    Thanks in advance!

    This is a pain with Applescript.
    Could  be a missing " or ' .  I didn't notice this problem.
    Use (* and *) to comment out lines to find where the problem lays. Start big then go smaller and smaller until you find the problem line.  Search internet for examples of the line in question.

  • Syntax Error: Expected end of line but found end of script.

    display dialog "Are you awesome" buttons {"Yes", "No"} default button 1
    if the button returned of the result is "Yes" then
    tell application "Finder"
    display dialog "You Passed the Test" buttons {"YAY", "Poop nugets"} default button 1
    end tell
    display dialog "Cool" buttons {"Ok", "More Info"} default button 1
    if the button returned of the result is "More Info" then
    tell application "Finder"
    display dialog "You are obviously are awesome,
    100% Cool" buttons {"Ok"} default button 1
    end tell
    Then it says:
    Syntax error: Expected end of line but found end of script.

    can somebody fix this scrip becasue i am having the exact same problems
    tell application "SpeechRecognitionServer"
              set theResponse to listen for {"yes", "no"} with prompt "Hello Michael, Would you like the internet?"
              if theResponse is "yes" then
                        launch application "Google Chrome"
                        tell application "SpeechRecognitionServer"
                                  set theResponse to listen for {"yes", "no"} with prompt "What about a Calander?"
              if theResponse is "yes" then
                        launch application "ical"
                        tell application "SpeechRecognitionServer"
                                  set theResponse to listen for {"yes", "no"} with prompt "How about some iTunes Music?"
              if theResponse is "yes" then
                        launch application "itunes"
                        tell application "SpeechRecognitionServer"
                                  set theResponse to listen for {"yes","no"} with prompt "Would you like me to stop?"
              if theResponse is "no" then
                                  say "ok"
    else
              if theResponse is "no" then
                        exit repeat
    else
                                  exit repeat
    end
    end if
    end
    end if
    end
    end if
    end tell 

  • Front end application error after import script run successfully in R12

    Hi ,
    i got an exception in R12 environment.
    i developed one simple OAF page and deployed in apps import script run successfully.
    but when i am opening that page in Front end it will give an exception.
    That is
    Exception Details.
    oracle.apps.fnd.framework.OAException: Could not load application module 'tflsm.oracle.apps.po.per.server.TflsmAM'.
    ## Detail 0 ##
    JBO-30003: The application pool (cph-oadb-tst22.dk.flsmidth.netTST221543tflsm.oracle.apps.po.per.server.TflsmAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25002: Definition tflsm.oracle.apps.po.per.server.TflsmAM of type ApplicationModule not found
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25002: Definition tflsm.oracle.apps.po.per.server.TflsmAM of type ApplicationModule not found
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:545)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2094)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961)
    ## Detail 0 ##
    oracle.jbo.NoDefException: JBO-25002: Definition tflsm.oracle.apps.po.per.server.TflsmAM of type ApplicationModule not found
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:441)
    JBO-30003: The application pool (cph-oadb-tst22.dk.flsmidth.netTST221543tflsm.oracle.apps.po.per.server.TflsmAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25002: Definition tflsm.oracle.apps.po.per.server.TflsmAM of type ApplicationModule not found
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25002: Definition tflsm.oracle.apps.po.per.server.TflsmAM of type ApplicationModule not found
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:545)
    ## Detail 0 ##
    oracle.jbo.NoDefException: JBO-25002: Definition tflsm.oracle.apps.po.per.server.TflsmAM of type ApplicationModule not found
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:441)
    i will check all the class files and xml files of Application Module below top, all are there in the server top(below top)
    /u02/TST22/apps/apps_st/comn/java/classes/xxfls
    but i got the exception.
    is there any different structure in R12.
    i.ein the server top /u02/TST22/apps/apps_st/comn/java/classes/xxfls (Here my all class files in Binary mode and xml files in ASCII mode)
    only CLASS files are needed or XML files are also need.(i am moving all CLASS and XML files)
    could you please help me on this.
    Thanks with Regards,
    Muthu

    Muthu,
    This issue usually occurs when the AM.class file is not available at the given location. Try to find out on the server whether this
    tflsm.oracle.apps.po.per.server.TflsmAM exists.
    If still the problem persists then go for redeployement by deleting the existing one.
    Regards,
    Gyan

  • 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

  • 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

  • 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

Maybe you are looking for

  • V.26 Report is not working in Spanish

    Hi Guys, When I logged into Spanish and I tried to Run report V.26 I am not getting any value but when I ran the V.26 report in English I get the many values. In Same client I tried. Can anybody tells the reson behind the issue?

  • Basic excise duty calculated in duty free deemed export

    Hi Experts, We are facing an issue where system calculates basic excise duty in case of deemed export(duty free) . In some invoices it calculates basic excise duty though it should not calculate as it is duty free. Our scenario is like this:- At sale

  • Missing/wrong data in XI from RFC in ECC 6

    I'm having the following issue where I send data from an RFC in ECC6 to an imported RFC in XI.  Below is my structure in SAP ECC 6 and I see this in my testing of the RFC in SE37: ORG_ID       US12345 LOG_ID       OR123 PASS_WD   ABC123 TAXONOMY  ELE

  • Why does my macbook shock me occasionally even if my hands aren't wet?

    why does my macbook shock me occasionally even if my hands aren't wet?

  • Pls help me with the running of javac!!!

    Thanks for taking a look. I am a student just finished install the JDK1.2.1 version. The steps i have done below to get the error. -At the c: prompt, set path=c:\jdk1.2.1\bin -cd temp (access my working folder) -At c: prompt, i type javac Hello_Java.