3 Replies Latest reply on Oct 12, 2017 7:59 PM by 3513762

    TDATASEG Table Update After Import

    3513762

      We are sending data out to a target and the target system does not store data for stats in a "currency".. The planning app is storing all data in a default reporting currency and is mapped correctly to the functional currency at the time of export,,  BUT we are trying to update records in TDATASEG for accounts beginning with "9" to a code of "XSTATX" for the target, but for some reason all records are being duplicated with "XSTATX".

      Any suggestions would be greatly appreciated.

       

      Sample Code is::

      if fdmContext["TARGETAPPNAME"] == "SOURCEX":

      sUpdateSql = "update TDATASEG

      set CURKEY =

      if ACCOUNTX == 999001: 'XSTATX'

      elif ACCOUNTX == 900001: 'XSTATX'

      else: 'MXN'

      where ENTITYX in ('SAMPLE_TARGET_SUB_LEDGER') and LOADID = ?"

      lstparams = [fdmContext["LOADID"]]

      print fdmAPI.executeDML(sUpdateSql, lstparams, False)

      fdmAPI.commitTransaction()