Using variables in Business Rules

Hello Experts,
Do you know if it's possilble to declare (and use) text variables in Business Rules?
I want to do some strings treatment (concatenation, substring) and I need to use variables.
Regards,
Rodrigo

Hi,
thanks for your answers.
But without variables I don't know if it's possible to do the following:
I have a member dimension (that is from text type) and I want to access to it's content and, with some string treatment, reach to a member that I will FIX.
How can I access to the content of the text dimension member?
I give you the example:
Let's supose that the name of the text dimension member is TEXTMEMBER.
For Example if I use @SUBSTRING("TEXTMEMBER", 0, 3).
If I write the member like the above I'm not reaching to the content of dimension member....
Do you know how to do this?
Regards,
Rodrigo

Similar Messages

  • User Variable in Business Rule or Global Variable

    I wanted to call the User Variable value of Planning application under the Globel Variable of Default Value. Example I have created one Globel variable under the Default value the user varible value need to pickup so any thought how I can do this.
    I know in the Form if you use &UsrVar this will show the user variable value in the Data form but it is not showing the User Variable value in global variable or inside the Business rule.It is giving an error message there is no substitution variable has been defined. Please explain.
    Thanks in Advance,
    Irsh
    Edited by: 818693 on 17 May, 2011 7:22 AM

    Hi,
    User variables are meant to be used in web forms and web forms only. You can certainly pass their values to business rules when you used them in POV or page section of the form during save. All you need to do is to create another business rule (local or global) variable in business rule on the corresponding dimension and use it in your business rule. If you enable running the business rule on save and using the form values for variables options in form properties, business rules would replace the values of business rule variables with the values that are set in user variables.
    Cheers,
    Alp

  • Using Global variables in business rules

    In EAS after expanding the Business Rules section there is a Global Variables section. I have created some global variables in this section and I am trying to use them in the Rule editor and not having much luck. Are they retrieved differently to local variables...Currently this is how I am calling them within a FIX....
    FIX([Global_Varaiable])
    calculation;
    EndFix
    Please correct me if I am wrong, also can any one provide some good documentation and some gd links for writing business rules. I'm just starting out to create some business rule which runs on save on some input forms I am creating and finding it rather difficult.... :-(..
    Many Thanks
    Stephen

    Hi,
    Global variables will work in the same way as local variables so you are using them correctly.
    Business rules are just really glorified calc scripts, if you want to know about calc script commands have a read of the tech ref :- http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/frameset.htm?launch.htm
    It will have all the calculation commands and functions and descriptions on how they work.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Syntax for using AND with a variable in Business Rule Source

    I've never fully gotten my head around the AND/OR syntax of calc scripts. What I'd like to do is as follows in some basic pseudo code:
    FIX( ("A97" AND [Selected_Entity]) OR ("B76" AND [Selected_Entity]) OR ("C63" AND [Selected_Entity]) ).
    I want my webform's business rule to execute on the selected Entity in the form (eg. A97) ONLY if that entity is part of a restricted list of members (in this case, 3 entities out of 200).
    Thanks for any advice!

    Hi,
    I am not sure if I have totally understood what you are trying to achieve so sorry if I have misread it.
    But what you could do is set up a variable in the Bus Rule, lets call EntVar.
    It is set up as a local variable of type member and dimension Entity with a run time prompt "Enter Entity"
    Now in your script it could look something like this....
    FIX(&CurrentYr, "Working".......)
    "AccMember"(
    IF(@ISMBR([EntVar]) AND ([EntVar]=="A97" OR [EntVar]=="B76" OR [EntVar]=="C63") )
    AccMember=.......;
    ENDIF
    ENDFIX
    Once you have tested the business rule, you can get your form to pass through the entity into the variable.
    Is this what you are trying to do?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Different tables used in Consolidation Business Rules

    I was going through the documentation of different tables that needs to be maintained for consolidation business rules. I am a little confused and need some clarifications.
    These are different tables that needs to be maintained for consolidation -
    clcELIM - This table will tell what each source account needs to be divided into what 4 destination accounts.
    clcRULES - The RULES will tell how this source account needs to be divided (percentage wise as stored in the OWNERSHIP application) into these 4 destination accounts.
    clcMETHOD - This table lists down the different methods (along with their types and description) and its used in the clcRULES table
    clcELIMH_- What does this table do and where does it come into picture?
    *clcELIM_ - Is this same as clcELIM table mentioned above?
    clcRULESH - What does this table do and where does it come into picture?
    Also, what am I looking at is  what is the sequence in which these tables needs to be defined.
    For example - 
    1. clcELIM has a field called RULE whose details are mentioned in clcRULES.
    2. clcRULES has a field called METHOD and I_METHOD whose detailes are mentioend in clcMETHOD.
    3. .... I am not sure what other tables do? Please fill in the gaps.
    Thanks everyone for their help so far.
    Ameya Kulkarni
    Edited by: Ameya Kulkarni on Sep 18, 2008 7:19 PM
    Edited by: Ameya Kulkarni on Sep 18, 2008 7:21 PM
    Edited by: Ameya Kulkarni on Sep 18, 2008 7:21 PM

    Great explanation Alwin!
    Since I am new to SAP BPC world and to tell the truth, consolidation world as well (I am a planning & forecasting guy), my follow up questions are -
    (Sorry if the questions are naive).
    So according to what you have explained, clcELIM and clcELIMH work together along with clcMETHOD to define the elimination rules for entities.
    What do clcRULES and clcRULESH do?
    Also you said that these are the SQL tables (clcELIM, clcRULES, clcELIMH etc.) and its advisable not to configure them directly. So what business rules from the administration side update these tables. I am sure the METHOD administration will update clcMETHOD while RULES administration will update clcRULES and clcRULESH, is that right? what about ELIM and ELIMH.
    I am asking these questions since I dont have the system to work on yet but will be getting it on Monday next week. Right now I am trying to grasp as much as I can. So if you can send me some snapshots to amey420 at gmail dot com, that will be really appreciated.
    Also you can send me the other documents you were talking about. I will shoot you an email as well.
    Thanks a lot for your help.
    Ameya Kulkarni

  • Temporary variables in business rule in essbase

    hi,
    I want to add temporary variable in my business rule. I have declared the variable as below:
    VAR TaxRate;
    "ROA Tax Rate"
    TaxRate = "ROA Tax Rate"->"GLBU_CVD CONSOLIDATED"->"OU_NUTRITIONAL CHEM"->"All DEPTS"->"Working"->"Forecast"->&FcstYear->"USD"->&FcstMths;
    It is validatoing correctly but when I am running the rule it is giving the error as:
    Error executing formula for [ROA Tax Rate] (line 18): Cannot assign [DOUBLE] objects of different length
    A I doing something wrong with the declaration? (ROA Tax Rate is the member name)
    Please suggest.

    Hi,
    Try this,
    VAR TAXRATE = #MISSING;
    "ROA Tax Rate"
         TAXRATE= "GLBU_CVD CONSOLIDATED"->"OU_NUTRITIONAL CHEM"->"All DEPTS"->"Working"->"Forecast"->&FcstYear->"USD"->&FcstMths;
                             //Intersection of your data;  (i.e., A->B->C)
    Regards,
    Avneet

  • Guideline for making java application to be used in oracle business rules

    hi'
    I am using Oracle Business Rules and trying to use one of my simple java program and trying to use it in rule author, however its showing "0 classes or packages have been imported.", please Tell me what guidelines to follow to program in Java so that we can use those Java classes in Rule Author.*
    I am using Oracle Rule author and in definition's Tab when I try to Import the classes then nothing is importing {color}"0 classes or packages have been imported."
    My Java class is
    package getDiscount;
    public class Test123 {
    private int i;
    public void setDiscount(int i) {
    this.i = i;
    public int getDiscount() {
    return i;
    public static void main(String args[]) {
    Test123 d = new Test123();
    d.getDiscount(100);
    void getDiscount(int quantity) {
    if (quantity > 500) {
    setDiscount(10);
    System.out.println("Discount on this Quantity is-->"+getDiscount());
    } else if (quantity > 250 && quantity < 499) {
    setDiscount(5);
    System.out.println("Discount on this Quantity is-->"+getDiscount());
    } else {
    setDiscount(0);
    System.out.println("Discount on this Quantity is-->"+getDiscount());
    Test class:
    package getDiscount;
    public class Test123 {
    private int i;
    public void setDiscount(int i) {
    this.i = i;
    public int getDiscount() {
    return i;
    public static void main(String args[]) {
    Test123 d = new Test123();
    d.getDiscount(100);
    void getDiscount(int quantity) {
    if (quantity > 500) {
    setDiscount(10);
    System.out.println("Discount on this Quantity is-->"+getDiscount());
    } else if (quantity > 250 && quantity < 499) {
    setDiscount(5);
    System.out.println("Discount on this Quantity is-->"+getDiscount());
    } else {
    setDiscount(0);
    System.out.println("Discount on this Quantity is-->"+getDiscount());
    Edited by: Yatanveer Singh on Dec 24, 2008 12:19 AM

    Error
    Cannot perform operation. 'RUL-01527: Received exception for loadClass. RUL-01016: Cannot load Java class lib.Demo. Please make sure the class and all its dependent classes are either in the class path, or user specified path. Root Cause: lib/Demo (wrong name: Demo) '
    Hide
    oracle.rules.sdk.exception.RulesSDKException: RUL-01527: Received exception for loadClass. RUL-01016: Cannot load Java class lib.Demo. Please make sure the class and all its dependent classes are either in the class path, or user specified path. Root Cause: lib/Demo (wrong name: Demo) at oracle.rules.sdk.mapper.RuleObjectHelper.loadClassOrPackage(RuleObjectHelper.java:2154) at oracle.rules.ra.uix.mvc.ClassSelectorEH.importClassesOrPackages(ClassSelectorEH.java:184) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at oracle.rules.ra.uix.mvc.BeanEH.genericHandleEvent(BeanEH.java:869) at oracle.rules.ra.uix.mvc.BeanEH.handleEvent(BeanEH.java:838) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.TableEventHandler.handleEvent(Unknown Source) at oracle.cabo.servlet.event.BasePageFlowEngine.handleRequest(Unknown Source) at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source) at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source) at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)

  • How to use array variable in Business Rule

    Hi,
    I have read a lot about Array variable. But everywhere declaration of array variable in described. I can declare that. It works fine. But i can't implement that array variable.
    Can any one please provide me an example of implementation of array variable?
    Regards,
    Rubi
    Edited by: Rubi Banerjee on Mar 30, 2012 3:35 AM

    forget about all varible in essbase CSC
    it's bad practics.^^^Is it?
    Essbase cube are self big array )^^^That's what makes ARRAY so cool -- you can set up an array that encompasses a dimension.
    Example straight from a HBR:
    ARRAY SomeArray["Entity"] ;
    Regards,
    Cameron Lackpour

  • Using variables in data rules

    Hi,
    I have set-up a data transfer mechanism between serveral Essbase cubes that uses on the source cube a report script to generate a file and on the target cube imports this text file using a data rule file.
    The current problem I'm encountering is that it does not seem to be possible to limit down the transfer to a single period. In the report script, there's no issue because that is recognizing the server variable easily.
    But on the import side I have not found a method to have a single column dynamically writing into current period only. Is there no other option than someone going into this rules file and change the hardcoded fieldname each month?
    Thanks for any input
    Erik
    Belgium

    You can use substitution variables in version 9 of Essbase but not in earlier versions. Before v9 we'd get around this by using aliases e.g. CurrMonth. Each new month we'd move the alias to the next month.
    "But on the import side I have not found a method to have a single column dynamically writing into current period only"
    I'm assuming that you've created a text column here and filled it with a month value? It would be better to not have a month column and just set the month in the Header of the Data Load Settings.
    Hope this helps.
    Gee

  • User Variable Options: How can I use them in a Business Rule?

    How can I use a "User Variable" set in File / Preferences in a Business Rule? It doesn't seem to appear as an Essbase Substitution Variable or as a Global Variable of Business Rules. The only way I know how to use it is to place the dimension on the POV or Page dimension of a data form, then use a Global Variable in a run time prompt to pick the member and run a BR against it, or some function of it.
    What do I do if I want to have that dimension in Columns or Rows? How can I set a BR to directly reference the member chosen under User Variable Options?
    J

    Thanks Alp, but I can't seem to reproduce what you are writing below. I want to refer my Business Rule to address the value set in File / Preferences / User Variable Options; no matter what members I show elsewhere in the data form.
    My other workaround is through a run time prompt and hope the user selects the appropriate user variable at the very bottom of the selection list in order to calculate the appropriate list of members.
    J

  • Get cell value in Planning Data form and using it in a business rule

    Hi Everybody,
    if i set the data type of an Account Member as text, is there a way to get the value inserted by the user in a dataform, turning it as dimensional member and using it in a business rule?
    So, if the user insert the value "USA" in a cell, can i use any functions to tell essbase that "USA" is a dimensional member and then using it in a business rule, for example in a cross-dimension like Period1->FY12->USA?
    I tried to use the function @Member and it doesn't work, but i'm wondering if there is a way that can let me get the value inserted and use it just like a dimensional member. What are the ways that can let user input value that can be used in a business rule? I think one is by using SmartList, is there any other ways? Maybe using variables?? As an alternative i tried to use Prompt Variable but there are too many members on which the rule must run.
    Please help me, i wanna know if i can or not let the user input the member on which the rule must run...
    Thank all guys
    Bye
    Maurizio

    Thanks EW for your answer,
    YesI could use SmartList even if i think it's very tough to handle. My experience on using SmartList in caclc script is not so good. I try to enter in details of my requirement:
    I have 500 account members.
    For each one, I have to calculate the monthly budget by sharing the amount among the months. The user wants to calculate it on the basis of the actual flow(over the months) of an unspecified account of the prior year. The unspecified account must be inserted in a data form.
    So, i could use a Smart List but it colud be of 500 elements and then i should make a rule with as many IF as how many are the accounts. Or im wrong? The only way to use smart list dynamically in a business rule is by referring its values in a IF condition. Or i'm wrong.
    I tried to use execution variable ma it seems don't work. In this case the user must pay attention to write the account correctly, otherwise as you say the rule doesn't work.
    The value in PD0A020 is "PD0A000" (that is a dimensional member). The value in PD0A000 is "hello". In PD0A040 the rule returns "PD0A000" and not "hello" as i would. The function @Member appears to be not able to catch the dimensional member by the value in PD0A000.
    {Example}="test"->"Input"->"Scenario_test"->"FY12"->"PD0A020";
    Fix("test1","Input","Scenario_test","FY12")
    "PD0A040"=@Member({Example});
    endfix
    So, my doubt is: is it possible for Essbase/Planning to use the value inserted in a data form and to turn it in a dimensional member? What are the practicable ways to let the user input/choose the member on which makes the rule run?
    Thank you Ew, thank you guys
    Maurizio

  • Using dataexport in a business rules and define the filename with a sub var

    Hi,
    I have created a calc script to export data using DATAEXPORT, and to define the filename an essbase variable.
    Here all right
    I copy this code to a business rules to run it from a business rules, but I have a problem with the essbase variable, when I validate it, it gives me the error:
    Detail:Encountered "&FileNm" at line 28, column 26.
    Was expecting:
    My essbase variable is set to:
    "e:\Hyperion\products\Essbase\EssbaseServer\app\TMPGB\dataexportCustomerY2.txt"
    in double quote
    How anyone use in a Business rules with the command dataexport an essbase substitution variable

    Just tried:
    Script: DATAEXPORT "File" " " &Filename "#Missing";
    SubsVar: "c:\DataExtract.txt"
    it worked with no issues.
    Cheers,
    Alp

  • Comparing two List values using Oracle Business Rules

    Hi all,
    i just need to know how to use the Oracle Business Rules to Compare 2 list types
    say for example list1( 10,20,30,40) and List2(10,50,60). when i compare both the list using the business rules
    the rule should return true if there is atleast one match..here 10.
    any help is appreciated
    Thanks,
    karthik

    Hi folks,
    Please show the way....
    Regards,
    PavanKumar.M

  • Automating consolidation entries using business rules

    Hi all,
    May I know whether it is possible to automate the following standard consolidation entries in SAP BPC using Automatic Adjustments Business Rules tables:
    1. Attribution of profit after tax to Equity Holders and Minority Interest;
    2. Appropriation of changes in post-acquisition Reserves to Minority Interest; and
    3. Elimination of parent company's Investment in Subsidiaries against subsidiaries' pre-acquisition Share Capital and Reserves.
    The mechanics of these entries are:
    1. [Profit after Tax|https://forums.sdn.sap.com/] x POWN% -> post to [Retained Earnings|https://forums.sdn.sap.com/] and [Profit after Tax|https://forums.sdn.sap.com/] x Minority Interest % -> post to [Minority Interest|https://forums.sdn.sap.com/]
    2. [Post-acquisition changes in Reserves|https://forums.sdn.sap.com/] x Minority Interest % -> post to [Minority Interest|https://forums.sdn.sap.com/]
    3. Parent company's [Investment in Subsidiaries|https://forums.sdn.sap.com/] -> post to [Goodwill|https://forums.sdn.sap.com/], Subsidiaries' [Pre-acquisition Share Capital and Reserves|https://forums.sdn.sap.com/] x POWN% -> post to [Goodwill|https://forums.sdn.sap.com/] and Subsidiaries' [Pre-acquisition Share Capital and Reserves|https://forums.sdn.sap.com/] x Minority Interest % -> post to [Minority Interest|https://forums.sdn.sap.com/].
    The questions are:
    How do I specify the Minority Interest % in the Automatic Adjustments Business Rules Table.
    How do I specify that I am using Direct PCON% and Direct Minority Interest % for some entries and Indirect POWN% and Indirect Minority Interest % for some other entries?
    How do I post one entry to the same level in the ENTITY hierarchy in which the ENTITY resides for subsidiaries and post the same entry to the immediate next higher level for the Parent Company in that level?
    Thank you.
    Regards.

    Resolved.
    correcting the code below
    *RUN_PROGRAM VALIDATION
    //CATEGORY = %CATEGORY_SET%
    CURRENCY = %GROUPS_SET%
    TID_RA=%TIME_SET%
    OTHER=[ENTITY=%ENTITY_SET}
    *ENDRUN_PROGRAM
    to
    *RUN_PROGRAM VALIDATION
    //CATEGORY = %CATEGORY_SET%
    CURRENCY = %GROUPS_SET%
    TID_RA=%TIME_SET%
    OTHER=[ENTITY=%ENTITY_SET%]
    *ENDRUN_PROGRAM

  • Problem in mapping Task payload parameters to Oracle Business Rules facts

    Hi all,
    We are using complex types from our project XSDs inside the Human Task payload. We intend to use these Human Task payload parameters to build routing rules using the Oracle Business Rules interface. Our observation is that when the complexity of these complex types increase, the business rules editor does not show these as facts that can be used in formulating rules.
    Has anybody faced such a problem before. Any help is appreciated.
    We are using the following link to add routing rules –
    http://docs.oracle.com/cd/E25054_01/dev.1111/e10224/bp_decision.htm
    Version details :
    ADF Business Components     11.1.1.60.13
    Java(TM) Platform     1.6.0_29
    Oracle IDE     11.1.1.5.37.60.13
    SOA Composite Editor     11.1.1.5.0.01.74
    Thanks,
    Yamini.

    Problem solved. There was an element in the xml schema that had nillable = true. Because of this the XML Fact for that element would no longer be available in the BPEL Process. Removing the nillable and generating the XML Facts again solved the missing variable problem.

Maybe you are looking for

  • Printing from windows 8.1 pro

    i can't print form a windows 8.1pro computer on network it seams to send the information but the imac do nothing i installed bonjour in a win7 and it runs ok but on win8.1 pro dose not work what can i do?

  • Error:Unable to reserve .lok file for Integrated WLS server (DefaultServer)

    Hi, I am having jdev 11.1.1.1.0. Many times I get following error while running my application pages: Unable to reserve the .lok file for Integrated WLS server (DefaultServer). Typically this is because another instance of this server is already runn

  • Directv - Diversified Consultants Collection Account (Adverse Activity)

    Hello, I currently have an open outstanding past due collection against me for Directv. They sent an account to collections bearing my SSN# due to the $118.00 balance going unpaid. Basically I signed with my brother and his wife for the account - and

  • Recipe Management - Composition of an Output Substance error

    Hi all, I am trying to implement recipe management best practice for demo purposes and have come across an error with composition output of substance in which I need some help. The BPP doco outlines that by choosing the Composition tab and selecting

  • Can't install new flash using winetricks

    I am not able to install any newer Flash then the default Flash 7 which can be found inside bin32-wine. When I ran a program which opens a Flash animation and I right-click it, I get "About Macromedia Flash Player7" I tried using winetricks: [warnec@