1 Reply Latest reply on Apr 16, 2013 9:43 AM by SH_INT

    1014 - Expected 'End' Error in FDM Import Script

    1003133
      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
        • 1. Re: 1014 - Expected 'End' Error in FDM Import Script
          SH_INT
          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.