5 Replies Latest reply on Jun 5, 2017 9:31 PM by 991158

    FDMEE 'ICP' Mapping (LIKE) - Help!!!

    991158

      Hello FDMEE Group -

       

      Need some assistance. I'm almost there....The below ICP 'like' mapping works fine.  **However - I just need to tweak it slightly.....What I want to insert here is and additional piece to say basically, RUN this if ACCOUNT = 270000, if not then ICP_NONE.   How would I modify below to make this happen

       

       

       

      ICP = fdmRow.getString("ICP")                          

      Entity = fdmRow.getString("Entity")                    

                                                             

      #Append currency code                                  

                                                             

      if (Entity[9:11] == "US"):                             

           fdmResult = "LE_" + ICP + "_USD"                       

      elif (Entity[9:11] == "BR"):                           

           fdmResult = "LE_" + ICP + "_BRL"                  

      elif (Entity[9:11] == "CA"):                           

           fdmResult = "LE_" + ICP + "_CAD"                  

      elif (Entity[9:11] == "CH"):                           

           fdmResult = "LE_" + ICP + "_CHF"                  

                       

      else:                                                  

           fdmResult = ICP                                  

        • 1. Re: FDMEE 'ICP' Mapping (LIKE) - Help!!!
          SH_INT

          ICP = fdmRow.getString("ICP")                          

          Entity = fdmRow.getString("Entity")          

          Account = fdmRow.getSting("Account")         

                                                                 

          #Append currency code                                  

          if Account=="270000":                                                       

              if (Entity[9:11] == "US"):                             

                  fdmResult = "LE_" + ICP + "_USD"                       

              elif (Entity[9:11] == "BR"):                           

                  fdmResult = "LE_" + ICP + "_BRL"                  

              elif (Entity[9:11] == "CA"):                           

                  fdmResult = "LE_" + ICP + "_CAD"                  

              elif (Entity[9:11] == "CH"):                           

                  fdmResult = "LE_" + ICP + "_CHF"                            

              else:                                                  

                  fdmResult = ICP          

          else:

              fdmResult="ICP_None"

          • 2. Re: FDMEE 'ICP' Mapping (LIKE) - Help!!!
            991158

            Error when running it....

             

            The script based mapping 'z_INTERCO' (LIKE) has failed to compile:

            mismatched input 'elif' expecting DEDENT (<string>, line 10)

            • 3. Re: FDMEE 'ICP' Mapping (LIKE) - Help!!!
              Robert Gideon

              The code looks good. Make sure that you are indenting a specific number of spaces.  The Dedent message is telling you that perhaps the last "else" isn't lined up correctly with its corresponding if statement.

              • 4. Re: FDMEE 'ICP' Mapping (LIKE) - Help!!!
                SH_INT

                As mentioned it will be the indentation that is causing the issue as Jython is extremely sensitive to this bieing correct and consistent. OTN and the FDMEE code editors are not particularly helpful in this regard! I usually paste the code into something like Notepadd++ which will quickly identify if any indentation is out of sync. Much better than having to manually count whitespace :-)

                • 5. Re: FDMEE 'ICP' Mapping (LIKE) - Help!!!
                  991158

                  Thanks. That did it.