Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FDMEE - Mapping Script for ICP

athlon007Nov 18 2016 — edited Nov 21 2016

Hi all,

I am not the best at scripting in Python nor in SQL, so it would be great if somebody could help me with optimizing a script we have to map our ICPs

Situation

Our source system is coming with 6 digit ICP partner, in HFM we only have the ICP as 4. An example is the following

Source: 151060

HFM: 1060

The most cases the ICP always matches the last 4 digits of the source system. there can sometimes be cases where it should not map to the same last 4 digits, so the script could have an exception list, sort of like

If entity x go to y, else use the last 4 digits.

Below is a snipplet of the current code which is just too huge we had to split it into two mapping rows. You can see that it's just taking the last 4 digits in most cases, except for example below 151040.

======================================================================

arrAccnt = ('11670000')

ICP = fdmRow.getString("ICP") 

if fdmRow.getString("ACCOUNTX") in arrAccnt: 

if '_151000_' in ICP:

  fdmResult = '1000'

elif '_151002_' in ICP: 

  fdmResult =  '1002'

elif '_151004_' in ICP: 

  fdmResult =  '1004'

elif '_151005_' in ICP: 

  fdmResult =  '1005'

elif '_151020_' in ICP: 

  fdmResult =  '1020'

elif '_151030_' in ICP: 

  fdmResult =  '1030'

elif '_151040_' in ICP: 

  fdmResult =  '7197'

elif '_151060_' in ICP: 

  fdmResult =  '1060'

======================================================================

Thanks so much for the help.

Regards

Roman

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2016
Added on Nov 18 2016
4 comments
437 views