2 Replies Latest reply: Oct 19, 2012 1:29 PM by Sree Menon-Oracle RSS

    Calc Manager - Using a Template (macro) called from a Rule with FIX

    CooleyK
      We upgraded from 11.1.1.3 to 11.1.2 and migrated our business rules to Calc Manager. Our results indicate during the Template the FIX's set in the Rule are ignored.

      Here's a sample:

      RULE
      FIX("My Location", @RELATIVE("My Project",0), "USD", "No Dept", {rtpScenario}, "Working" )
      FIX(&PlanYear0, &StartMonth:"Dec")
      %Template(name:="Macro_Change_Accounts",application:="MyApp",plantype:="Plan1");
      ENDFIX
      ENDFIX

      TEMPLATE
      "V2520"(
      IF(@ISMBR("Jan") AND @ISMBR(&PlanYear0))
      "P1700" = - "L1700" + @Prior("L1700"->"Dec"->"Actuals"->"Final",1,@LEVMBRS("Years",0));
      ELSEIF(@ISMBR("Jan") )
      "P1700" = - "L1700" + @Prior("L1700"->"Dec",1,@LEVMBRS("Years",0));
      ELSE
      "P1700" = - "L1700" + @Prior("L1700");
      ENDIF )

      When calling a template from a rule in Calc Manager, are the FIX conditions from the rule passed through to the template or is there a setting required to make this happen?
      Please let me know if you have seen similar behavior or know a setting or solution.

      Thanks!
      Kim
        • 1. Re: Calc Manager - Using a Template (macro) called from a Rule with FIX
          Sree Menon-Oracle
          Kim,
          Technically, the ruel should have generated the following script:
          FIX("My Location", @RELATIVE("My Project",0), "USD", "No Dept", {rtpScenario}, "Working" )
          FIX(&PlanYear0, &StartMonth:"Dec")
          "V2520"(
          IF(@ISMBR("Jan") AND @ISMBR(&PlanYear0))
          "P1700" = - "L1700" + @Prior("L1700"->"Dec"->"Actuals"->"Final",1,@LEVMBRS("Years",0));
          ELSEIF(@ISMBR("Jan") )
          "P1700" = - "L1700" + @Prior("L1700"->"Dec",1,@LEVMBRS("Years",0));
          ELSE
          "P1700" = - "L1700" + @Prior("L1700");
          ENDIF )
          ENDFIX
          ENDFIX

          If you go to the script tab at the bottom panel of the rule and view the script tab, the script should look like above.
          When you call a template from rule, the calling statement is replaced with in the rule by the script that the template generate. It seems very odd that the FIX statements in the rule is not included in the script.

          How did you determine that the FIX statements are not generated in the rule script?
          Sree Menon
          • 2. Re: Calc Manager - Using a Template (macro) called from a Rule with FIX
            CooleyK
            Sree,

            Thank you for the quick response. You are correct. The script does incorporate the template as you indicated. When saving a form that contains this rule, our data appeared to calculate more than what we expected. Maybe we have something else going on beyond this rule. I'll dig in further. Thanks for pointing out the script. It makes me feel more comfortable with the rule/template.

            Kim