Flip sign in mapping script
Hi All,
is there a possibility to swith the sign in a mapping script.
So my target for the like mapping = #Script and my script says
If VarValues(9) < 0 then
Result = "143100"
Else
Result = "222200"
End if
Is there a possibility to make the value multiplied by -1 for the first option?
My other solution is to use 2 separate mappings but i would prefer to use only 1.
Thanks in advance,
Marc
Also you will have to create a logic account to duplicate the source value for the data line in question or you will never hit the second mapping
Similar Messages
-
How to Flip the Sign using Calculation script for historical data
I am currently using Essbase 9.3.1. Its required to flip sign for a specific set of accounts for that i am currently using UDA's to flip the sign.
But now i need to flip the sign for the historical data too. Is there any possible way to flip the sign using calculation scripts for historical data. Kindly let me know your suggestions.
Many thanks in Advance...
Edited by: [email protected] on Jul 30, 2009 9:37 PM
Edited by: [email protected] on Jul 30, 2009 10:58 PM
Edited by: [email protected] on Jul 30, 2009 11:01 PMOf course there is. This is the kind of calc script that only gets run once, so make usre you test it well before doing it on production and make a backup of production before doing it.
It would be something like
Fix(time frame, accounts to be flipped, level zero other dimensions)
actual = actual * -1;
EndFix
Cal dim dimensions
Note, I chose actual, but you could do it for any dimension that has a single or only a couple of members. What ever dimension you choose to do the calculation on, it can't be included in the fix statement -
Using Wildcards in Mapping Script
Hi everybody, im new in FDM and i have some doubts about mapping scripts.
I have to recreate this Hyperion Translation Rule into FDM:
ACC_SAP tm_sap Reverse Sign UD4
N21099Z300 {NULL} FALSE CD1
D31199Z000 {NULL} FALSE CD1
????99 * FALSE CD
ACC_SAP is the source account
TM_SAP will be loaded into UD5 (as look up)
How could i manage with a like mapping?
I guess using a script but im not sure how to use wildcards within scripts, is it possible?
Another related question, in a explicit mapping, how can i manage with NULL values if i want to assign them [None] value, do i have to put NULL in th source field?
BR and thanksThanks KellyDGreen. With the exampl shown is as you say but what if tm_sap has wildcards?
F.i
ACC_SAP TM_SAP TARGET_CUSTOM4
999? 123? 198276
Suppose that TM_SAP has been stored in UD5. Source dimensions are different from target dimension so i have to do it via script, dont I?
BR
Francisco -
Hello experts,
I'm quite new to FDM and Iv'e been trying to write a simple conditional mapping script with no success. for my entity dimension, in most cases, the source is ths same as the target though there are some cases where this does not apply and have to go to a NA_Entity. For example:
SOURCE TARGET
PE00_0001 PE00_0001
PE00_0002 PE00_0002
PE00_0003 PE00_0003
AL00_0001 NA_Entity
PE00_0004 PE00_0004
CO_HWE NA_Entity
PE00_0005 PE00_0005
As you can see, all source entities which start with "PE" are equal to the target entity and any other entity not starting with PE should be mapped to the "NA_Entity". I believe it's pretty unefficient to maintain an explicit map so we've decided to create a conditional mapping script (not working yet) which reads as follows:
If Left(varValues(15),2)="PE"
Then Result = varValues(15)
Else Result ="NA_Entity"
Every time i try to import a file I keep on getting:
Error: An error occurred importing the file.
Detail: Invalid Like Clause: For Dimension Map (ENTITY) and Rule (Peps)
ERROR:
Code............................................. 4026
Description...................................... Invalid Like Clause: For Dimension Map (ENTITY) and Rule (Peps)
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 5416
IDENTIFICATION:
User............................................. admin
Computer Name.................................... CTARESULDESA2
App Name......................................... INT_IECI
Client App....................................... WebClient
CONNECTION:
Provider......................................... SQLOLEDB
Data Server...................................... 10.228.128.168
Database Name.................................... FDM_INTIECI
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... Argentina-EP
Location ID...................................... 758
Location Seg..................................... 3
Category......................................... Reales
Category ID...................................... 13
Period........................................... Nov - 2013
Period ID........................................ 2013-11-30
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
I've followed the script guide and Iv'e tried several scripts, all with no success. The only workaround I've found is maintaining an explicit map where 99% percent of the elements map to themselves and the other 1% map to "NA_Entity", not very maintenance friendly.
Thank you very much for your help
Santiago Ruiz.You do not mention what release of FDM you are working with, but there should be no need for scripting .
Explicit mappings are the most efficient from a performance point of view, but in view of what you want to achieve then all you need are two 'Like' mapping entries.
the first will be mapping PE* to PE* and the second entry mapping * to 'NA_Entity' to pick up all the other codes.
Alternatively if you are processing millions of records and have a performance issue, then an alternative might be to change the non 'PE' type records with a script on the import format, but i think the two records should be the easiest. -
OWB 904 doesn't use DB Links in mapping scripts
I'm having trouble deploying mappings because they don't use the generated DB Links in the mapping scripts.
Normally when deploying a mapping I get this warning that certainly is correct since it can't find the source table:
VLD-2771: System privileges may not allow extraction from source ZIPCODE.
Extract from the mapping script:
CURSOR "ZIPCODE_c" IS
SELECT
"ZIPCODE_DWH"."ZIPCODE" "ZIPCODE",
"ZIPCODE_DWH"."CITY" "CITY",
ROWNUM "ROWNUM_ALIAS$$$"
FROM "AXAPTA"."ZIPCODE" "ZIPCODE_DWH" ;
Only when explicitly typing the name of the DB link in the configure options of the mapping will it work. But when I do this I get the following warning:
VLD-1124: Schema and/or Database link physical configuration parameters should not be set for ZIPCODE.
The version of the code that works:
CURSOR "ZIPCODE_c" IS
SELECT
/*+ NO_MERGE */
"ZIPCODE_dwh.business8123"."ZIPCODE" "ZIPCODE",
"ZIPCODE_dwh.business8123"."CITY" "CITY",
ROWNUM "ROWNUM_ALIAS$$$"
FROM "ZIPCODE"@"dwh.business.auc.dk@dwh" "ZIPCODE_dwh.business8123" ;
Shouldn't the mapping script use the DB Link normally or is there an option I have missed? I see in the Reviewers Guide that the target user is granted access to the source (through Public) but won't this only work if both source and target is in the same database?
Regards
BentHi guys,
I am facing a strange problem. The code generated for my mapping has NOT used the dblinks. My OWB version is 10.1.0.4
This is my problem in brief.
I have installed OWB newly and started to do a sample task. I created a very simple one to one table population mapping from source to the target schema. Both are in the same database.
When i generated the code for the mapping, it gave a warning 'VLD-2771: System privileges may not allow extraction from source EMP'.
When i checked the code which was generated, i couldnot see any dblinks associated with my source table( which seems strange)
CURSOR "INGRP_c" IS
SELECT
"EMP_SRC_TRG_CONN"."EMPNO" "EMPNO",
"EMP_SRC_TRG_CONN"."ENAME" "ENAME",
"EMP_SRC_TRG_CONN"."JOB" "JOB",
"EMP_SRC_TRG_CONN"."MGR" "MGR",
"EMP_SRC_TRG_CONN"."HIREDATE" "HIREDATE",
"EMP_SRC_TRG_CONN"."SAL" "SAL",
"EMP_SRC_TRG_CONN"."COMM" "COMM",
"DEPT_SRC_TRG_CONN"."DEPTNO" "DEPTNO_1",
"DEPT_SRC_TRG_CONN"."DNAME" "DNAME",
"EMP_SRC_TRG_CONN"."DEPTNO" "DEPTNO",
"DEPT_SRC_TRG_CONN"."LOC" "LOC"
FROM "SCOTT"."EMP" "EMP_SRC_TRG_CONN" ;
In brief this is the process i have done.
Source schema : SCOTT & Target schema : TRG_SCHEMA
1) I have created source (for SCOTT) and target(for TRG_SCHEMA) modules.
2) I have also created DBLinks, Locations and Connector from source to the target locations.
3) I registered both the source location and target locations.
4) Validated, Generated and Deployed the Connector from source to the target.
I was unable to trace the error. Did i miss anything in the configuration? or during the installation of OWB.
Though it is a very old post, i hope someone can help me out here.
Thanks in Advance,
Sri -
FDM Like Mapping Script for Account
I am using the following script as a "Like" map for the Account. The import file has account in this format: 123456-Description. I would like to remove everything after the "-" and set the result to just the account number; however, I keep getting an error saying Conditional Map Script Error: Expected 'End' at line(4)
sParse="-"
ipos=InStr(varValues(13),sParse)
If iPos=0 Then Result=varValues(13)
Else Result=Left(varValues(13),iPos-1)
End If
Anyone know how to resolve the error? I tried moving the End If up to line 4, but that didn't help.
Thanks.
Terri T.The setting of the RESULT must be on its own line of the If statement as follows:
sParse="-"
ipos=InStr(varValues(13),sParse)
If iPos=0 Then
RESULT=varValues(13)
Else
RESULT=Left(varValues(13),iPos-1)
End If -
FDM Conditional Map Script Error
Hi all,
we trying importing data from EBS to HFM though ERPI by using FDM.
We used conditional based scripts to importing data from ebs to FDM.
this scripts used in FDM for ICP dimension between conditional mapping script.script logic is some particular account are related to Intercomapny transaction accounts we have to map to ICP member
can anyone help me on this:
this is error :
** Begin FDM Runtime Error Log Entry [2011-12-12 15:10:18] **
ERROR:
Code............................................. 1014
Description...................................... Conditional Map Script Error: Expected 'End' at line(2)
Script:
If varValues(14)="113401" Then Result="21_ADNIP"
Else Result="[ICP NONE]"
End if
Rule=I1
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 13888
IDENTIFICATION:
User............................................. admin
Computer Name.................................... ADNIPHYPUAT01
App Name......................................... FDMHFM
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPUAT
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... HFMGLLOAD
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... May - 2011
Period ID........................................ 5/31/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
Thanks.
SriniHi, please try the mapping script again having the "Result=" statement on a separate line, like:
If varValues(14)="113401" Then
Result="21_ADNIP"
Else
Result="[ICP NONE]"
End if
Kind regards,
Jeroen -
Hi,
In a quantity field lips-FKIMG, need to be printed with sign and offset,
Example: FKIMG is - 24.000,
Now i am using &FKIMG(C.0)& whixh comes as 24 in script,
I want to make it with the sign -24, so tried with
&FKIMG(c.0)(<)& it is throwing a syntax error, Please tell me how to get the sign in the script.
points assured.
I have tried with &symbol(<)& not working
regards,
PrabhuHi!
It depends of the type of the field. For example if you check in SE11 the MENG13 domain, you'll see, it is not accepting signs (it's a checkbox).
Use an another TYPE for this field, which allows using signs.
And for the formatting, use this kind of syntax: &FKIMG(<C.0)&
Regards
Tamá -
FDM Mapping script produces result #script
Hello,
I am trying to use the following mapping script and instead of getting the result defined in the script it is producing the result #script. It is as if it is taking that as the target rather than processing the script. Has anyone else seen this behavior in FDM?
strTrgAcct = varValues(14)
Select Case strTrgAcct
Case "100900","100925","101310","201690","201700"
Result = "010"
Case "104200", "104300", "104500", "104700", "104800", "104900", _
"105000", "105200", "105300", "105450"
Result = "060"
Case "107300"
Result = "210"
Case Else
Result = "[None]"
End SelectHello,
If you are sure that all the columns are filled out correctly and there is nothing in your user error log; I would then suggest you create an SR to have an engineer review it.
Thank you, -
Hi all,
I have metadata classified as Revenue, Expense, Asset , Liability with help of UDA.
Now the source data is Revenue (-ve) , Expense (+ve).
The hierarchy is + for all all members.
However they want to view data which is Revenue (+ve) and Expense(-ve).
What is the easiest way to do this?
If I do dataload and flip signs on UDA , I think I can only flip sign for one of the UDA. Is there a way where by it can flip sign for all the UDAs.
If not should i write a business rule ?
Any ideas or suggestions are welcomeHi Glenn and Sean,
Thanx for your help.
I have created this application using planning application. I am loading monthly historical data for last 5 years.
Splitting the file to revenue and expense is not practically possible for me :(.
Secondly I have meticulously classified around 1200 accounts as revenue and expense as they would be used for conditional formatting on reports and in business rules. Hence if I give them same udas, it would beat that purpose.
I am trying to run a business rule which flips sign on UDAs.
I would see if it works.
I am bit disappointed that flip sign on UDA while load under dataloadsettings works only for one UDA at a time. :(
If you have any other ideas it would be great.
Cheers -
How to sign a powershell script to be used for distribution
Hi,
I am new to powershell so if I'm missing out on any detail, please let me know.
We have some powershell scripts we send over to the clients to execute. Their powershell enviroment has execution policy set to 'remote signed'
Now I have read multiple blogs for how to sign the powershell script to be used at different execution levels, but my understanding is signing is for my environment only.
http://www.hanselman.com/blog/SigningPowerShellScripts.aspx
http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/17/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-2-of-2.aspx
I'm probably missing out on something obvious and I'll appreciate if someone can explain me how to sign my script so that client can use it in their environment with any execution level set.
Thanks in advance!Here's a bit more information on the subject:
http://technet.microsoft.com/en-us/library/hh847874.aspx
http://msdn.microsoft.com/en-us/library/ms537361.aspx
You can get code signing certificates from the major vendors.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing) -
Need help to write mapping script in OVD
Hi All,
I have a requirement to write a mapping script in python that can rename the attributes of OVD.
ex: cn with mycn, sn with mysn etc.,
Here is the code I have written to achieve that:
class MapperAttributeRenameClass(Mapping):
iattributes = {'rcn':'cn','rsn':'sn','ruserPassword':'userPassword'}
oattrubutes = {'cn':'rcn','sn':'rsn','userPassword':'ruserPassword'}
def inbound(self,mapUtil):
"@sig public void inbound(com.octetstring.vde.chain.plugins.mapper.MapperUtil mapUtil)"
mapUtil.renameAttribute(self.iattributes)
def outbound(self,mapUtil):
"@sig public void outbound(com.octetstring.vde.chain.plugins.mapper.MapperUtil mapUtil)"
mapUtil.renameAttribute(self.oattributes)
Can anyone help me how to go about it as I am new to Python?
Regards,
Sunil KumarHi
If you are unix user...
you can use script like below:
# $2 is the output filename, $1 is the .sql script
runsql()
sqlplus -s user/passwd/@somewhere <<EOF > $2
start $1
exit
EOF
runsql file1.sql logfile1 &
runsql file2.sql logfile2 &
runsql anotherfile.sql logfile3 &
wait -
Using $ sign on MaxL scripts
Hi all,
How does using $ sign on MaxL scripts work? I have seen scripts that $ sign was used instead of username, password, server name, etc. What are the advantages of using it and how can it be set up?
Thanks in advance.
A$ are used to denote variables and to be pedantic about it, encrypted usernames and passwords which I guess are used sort of like variables.
I use them all the time unless the MaxL script is super quick, dirty, and disposable. And they never end up being disposed of.
Check out this part of the Tech Ref for all you ever wanted to know about variables in MaxL:
http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/maxl_syntax_vars.html
If you want to get a different take on them, check out ODTUG's Resource Center and my presentation from 2009 to get a feel for how they can be used in scripting. My blog also has a post from 2009 on how to use variables under the "Fixing Planning's Filters" topic.
Regards,
Cameron Lackpour -
Hello,
I am new to powershell so please be kind :) I have a .ps1 that I want to run on a Windows 2008 web server. It runs fine when I set execution policy to Unrestricted but I do not want to do that. I guess what I want to do is sign the .ps1 script with a cert.
I have created a self signed cert that is used with a CDN. Can I use that cert? If so how do I sign the .ps1 script with that cert (is that the correct terminology)? I saw many a pages that describe using the makecert command but that is not found on my server.
Isn't there any easier way to do this?
Any help is appreciated. Thanks
JoeI was hoping to not have to install a large package on my production web server just to get the commands to create the cert and sign the script. Thanks for the link, however we have a Windows 2008 server and that page is for 2012 server. I am able to create
a self-signed cert in IIS but I am not sure how to sign a script with it.
Thanks.
Joe -
Hey guys,
Would appreciate some help with a mapping script I am using. I am getting this error when IMPORTING the file. This script is in the LIKE mapping for the Custom 2 dimension. varValues(20) is target Custom 1 so I wouldn't expect that value to be null. Also, why is this script processing on IMPORT? Custom 1 mapping is not processed yet so varValues(20) would be null until the maps are processed. I checked the processing order of the dimensions and Custom1 processes before Custom2.
How can I fix this script to work?
Here is the script and error:
Result = Mid(varValues(20), inStr(varValues(20), (len(varValues(20))-inStr(varValues(20), "_"))))
Error: An error occurred importing the file.
Detail: Conditional Map Script Error: Invalid use of Null: 'inStr(...)' at line(1)
The point of the script is to pull the cost center out of the target custom 1 which is to the right of the "_". Here's an example:
Target Custom1 = Chicago_Scrap
Custom2 = ScrapTry this instead
vaSplit = Split(varValues(20),"_")
Result = vaSplit(1)
Maybe you are looking for
-
My itunes will not recognize my ipod shuffle after installing Mcafee
My itunes will not recognize my Ipod shuffle, I have tried almost everything Itunes has suggested including uninstalling and installing Itunes. I am at a loss, the computer recognizes the ipod and assigns a drive to it. When I click on the drive th
-
Monitor transaction is no longer available
Hi Forum members, When I do the CM on IC, I find a message that 'Function no longer available or terminated'...something like that..... Could you please give input as to why..... thanks.....
-
My iPhone 4s battery life is very short. I have done the most recent upgrade with no improvement. Any solutions on the way?
-
I'm creating a form that uses radio buttons. I'd like a number to be inside the button. Is there a way to add a label to the radio buttons?
-
I've heard that Analytical Workspace Manager will be released in OTN by 2nd JUne. Can anyone pls confirm the date for AWM Release in OTN. thanx uma