Business Rules 10g - Dis_count calculation rules

Hello
We have scenario where we need to calculate the total dis_count that can be applied on Order.
Say,
If Customer buying the <service1> for 2 yr contract then
add 10% to <TotalDis_count>
If Customer is Employee then
add 5% to <TotalDis_count>
If it is fall 2010
add 5% to <TotalDis_count>
If Customer's status is "Golden"
add 5% <TotalDis_count> etc..
I have following questions.
1) Can we keep adding dis_count to some variable say <TotalDis_count> and return the total from rule engine ??
2) If we give total base price as fact to BRE then at the end can BRE calculate the dis_counted price after applying the total dis_count ??
3) Also I want to stop applying dis_counts if <TotalDis_count> reaches at its maxlimit say 25%. How should I do that ?? One solution is We can add AND condition <TotalDis_count> < MaxLimit
to all rules. Is there any other way ?
4) What is "Retract" action in BRE? Does it mean BRE erases that fact instance so that it will not match to some other rule ?
Can anyone please help me ?
Thanks
/Mishit
Edited by: Mishit P on Aug 2, 2010 2:44 PM

Any input would be appreciated.

Similar Messages

  • Calculation rules in free goods

    Hi Friends,
    In free goods condition record NA00, in calculation rule field, there are 3 options - Pro rata; unit reference; Whole units.
    Please give an example for each calculation rule as to how system should calculate if we select one of the options.
    Thanks

    Hello,
    There are three standard rules in SAP for free goods calculation, there are, 1. Prorata ( Propotional), 2. Unit reference, 3. Whole Units.
    A company offers free goods to their customers when they order certail materials. When a customer buys 100 numbers of a product, he gets 20 numbers free.
    1. Rule 1 ( Prorata)
    In this rule, if the customer order for 162 pieces, the system calculates 32 to as free goods ( 162 X 20/100).
    2. Rule 2 Unit Reference:
    When you maintian this rule, the above scenario becomes:  The customer get only 20 as free goods. (100 X 20/100), as the system will consider as 20 free for every full 100 purchased.
    3. Rule 3, whole units:
    If you maintian this the sstem will give only 0 as free because it will not consider 162 as it is not the multiple of 100.
    Prase

  • IT0071 Dynamic Action does not overwrite Pension Scheme Calculation Rule

    I am trying to write a dynamic action to create IT0071 with default values for the Employee contribution (0%) and Employer contribution (4%). However when IT0071 is created the default values from the associated Pension Scheme Calculation Rule (4% and 8%) are not being overwritten by the dynamic action. Is there a way to get the dynamic action to override the Pension Scheme Calculation Rule values?
    This is the dynamic action u2026
    0171              BENGR     06     10     P     T001P-MOLGA='08'
    0171              BENGR     06     15     P     PSPAR-MASSN='01'/X
    0171              BENGR     06     20     P     PSPAR-MASSN='12'/X
    0171              BENGR     06     25     P     P0171-BENGR<>NOBN
    0171              BENGR     06     30     P     P0171-BSTAT<>NOBN
    0171              BENGR     06     300     I     INS,0071,SS7,,(P0171-BEGDA),(P0171-ENDDA)
    0171              BENGR     06     315     W     P0071-PCTEE='0.0000'
    0171              BENGR     06     320     W     P0071-PCTER='4.0000'
    Any help much appreciated.
    Regards,
    Janet

    Hi Brian,
                  In standard SAP physical sample planning requires sample drawing procedure.
    Link: [http://help.sap.com/erp2005_ehp_05/helpdata/EN/2d/3521b6448c11d189420000e829fbbd/frameset.htm]
                  And drawing procedure is advised with partial sample numbers.
    Link: [http://help.sap.com/erp2005_ehp_05/helpdata/EN/2d/3521b6448c11d189420000e829fbbd/frameset.htm]
                 Generally when we use partial sample numbers, we also use a drawing procedure. And in that scenario SAP describes the calculation as shown in
    Link: [http://help.sap.com/erp2005_ehp_05/helpdata/EN/2d/3521b6448c11d189420000e829fbbd/frameset.htm]
                 What you have done (partial samples for MICs and not having for others, all without drawing procedure) is not generally done. I think our observations in this context should be confirmed only if we try more of such examples.
    Regards
    Sm.

  • Formula's and Calculation rules in Pricing.

    Hi All,
    Could anyone who is familiar with pricing please let me know if there is a mapping between the routines(Requirements/Formulas) that we have on the R/3 system and the CRM system, Requirements and Formulas.
    We are trying to replicate the pricing procedures in the CRM 2007 system, but we are having a problem in replicating the formulas and requirements. Kindly help us, useful answers will be suitably rewarded.
    Regards,
    Thiru

    Hi Das,
    Schema is is set of rules means when ever you run the pay roll driver for eg: US driver RPCALCU0, in selection screen you have to mention the pay roll driver for US u000 in schema field.
    when ever run the driver the set of rules executed and according the rules payroll is calculated.
    OR
    Each country payroll version supported by SAP has a program called the "payroll driver" that calculates payrolls. For example, in the U.S., the payroll driver is RPCALCU0, in Mexico it is HMXCALC0, and in Canada RPCALCK0. Each one is different, but they share a common core of functionality. The job of the payroll driver is to process payroll functions as specified in a payroll schema. These payroll functions each perform a specific job, for example - reading data from infotypes, calculating taxes, and processing wage types. Some functions process payroll rules. Rules are a collection of payroll operations. Each operation does a small unit of work, such as multiplying a wage typeu2019s number by a rate to get an amount.
    Schemas are edited with transaction PE01
    Schema rules PE02
    Functions and operations are maintained with transaction PE04.
    If anything require let me know
    Regards
    Sudheer

  • Schema and calculation rules in Payroll

    hi experts
      what is schema ? what are the function  of schema in payroll? How to set calculation rules for payroll? pls help in detail.
    points will be awarded for useful answers.
    Thanks

    Hi Das,
    Schema is is set of rules means when ever you run the pay roll driver for eg: US driver RPCALCU0, in selection screen you have to mention the pay roll driver for US u000 in schema field.
    when ever run the driver the set of rules executed and according the rules payroll is calculated.
    OR
    Each country payroll version supported by SAP has a program called the "payroll driver" that calculates payrolls. For example, in the U.S., the payroll driver is RPCALCU0, in Mexico it is HMXCALC0, and in Canada RPCALCK0. Each one is different, but they share a common core of functionality. The job of the payroll driver is to process payroll functions as specified in a payroll schema. These payroll functions each perform a specific job, for example - reading data from infotypes, calculating taxes, and processing wage types. Some functions process payroll rules. Rules are a collection of payroll operations. Each operation does a small unit of work, such as multiplying a wage typeu2019s number by a rate to get an amount.
    Schemas are edited with transaction PE01
    Schema rules PE02
    Functions and operations are maintained with transaction PE04.
    If anything require let me know
    Regards
    Sudheer

  • Business Rule Error: Fact not found in the rule engine working memory, rule

    I am trying to create a simple decision table with an input(ValidateInput) and a output(ValidateOutput). The input and output schemas have unbounded and nested elements(Parent-child relationship). When I create a condition(specific condition on input) and in the action I am asserting the output object. But when I run using EM it throws the following exception. It would be helpful if somebody could tell me what could be the problem. Please note when I set the output as ValidateInput object then it runs fine. Also it executes fine with ValidateOutput if it doesn't have unbounded(List) element inside it.
    Error Message: {http://xmlns.oracle.com/OracleRules10/OracleRules10_DecisionService_1}operationErroredFault
    Fault ID     rules:211
    Fault Time     Jun 18, 2011 10:45:13 AM
    Non Recoverable Business Fault :
    Fact not found in the rule engine working memory, rule session execution failed. The rule session 270013 failed because an instance of the fact com.example.customer.ValidateResponse could not be found in the working memory of the rule session. This is most likely a rule modeling error. The decision service interaction expects the fact instance to exist in the working memory of the rule session. Check the rule actions in rule designer and make sure that a fact of the expected type is being asserted. If the error persists, contact Oracle Support Services. 270013
    Edited by: reachsky on 18 Jun, 2011 9:57 AM

    It's working now..I had to use Global variable to declare child element of the output variable and use the same during action.

  • ABAP code for calculation rule in transaction M/08

    Hi,
    In M/08 transaction, we need to do this:
    When maintaining a PO, the user manually creates a condition like this:
    ZXXX Value (+10 %) positive value.
    However, in order to get the belonging negative condition (for accounting purpose), we need to automatically create that when the one above has been created:
    Automatic at the same time:
    ZYYY Value (- 10 %) negative value.
    In transaction M/08 you can enter ABAP code to each condition in the calculation rule. How can I program that ZYYY is created at the same time as ZXXX, when created for a PO ?
    Any help is appreciated.

    Hi Peter,
    This calculations rules are know as routines you can create with them using T code VOFM and then go the menu option -
    > Formula---->Condition value.Double click on that and you will get the ABAP code.
    Here you can amend the existing one or can create the way you like your logic to move and assign it to M/08 T code.
    Hope this will help you.
    Thanks,
    Birender Agnihotri

  • ABAP code for calculation rule in TK = M/08

    Hi,
    In M/08 transaction, we need the following:
    When maintaining a PO, the user manually creates a condition like this:
    ZXXX    Value (+10 %) positive value.
    However, in order to get the belonging negative condition (for accounting purpose), we need to automatically create that when the one above has been created:
    Automatic at the same time:
    ZYYY  Value (- 10 %) negative value.
    In transaction M/08 you can enter ABAP code to each condition in the calculation rule. How can I program that ZYYY is created at the same time as ZXXX, when created for a PO ?
    Any help is appreciated.

    Irrelevant

  • How to update the bucketset of business rules in MDS through Rules SDK

    How to update the bucketset of business rules in MDS through Rules SDK.
    Any sample code which will help me........ :)
    Is it possible to expose a Business Rule as webservice which was created with the help of Java fact?
    Edited by: 984804 on Jan 29, 2013 6:12 PM

    FYI, the output of this call returns something like:
    <?xml version="1.0" encoding="UTF-8"?> 
    <queryplan>
        <union>
            <fullOuterJoin>
                <statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
                <statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) AND ( SERVICE.SL_ID=SERVICE_LINE.SL_ID ) AND ( SERVICE_LINE.service_line = 'Accommodation' ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
            </fullOuterJoin>
            <fullOuterJoin>
                <statement index="3">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
                <statement index="4">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.days * INVOICE_LINE.nb_guests * SERVICE.price) FROM SALES, INVOICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
            </fullOuterJoin>
        </union>
    </queryplan>

  • URGENT : Pls help on Personnel Calculation Rules

    Hello Gurus,
    I am creating new rule to change the attendance type depending on the holiday.
    What is the operation/function should I use.
    Senaio: There is a 'Holiday Hrs Worked' attendance type and this has to be used ONLY when an emp is working on a public holiday (defined in public holiday calender). But technically this attendance type can be used anyday.
    Problem: The 'Holiday Hrs Worked' has different OT calculation rules than regular hrs. So if am emp uses this attendance type for regular day, he gets more OT.
    I am able to differentiate using VARSTHOLCL, but then I want to change the attendance type in the schema.
    Please help me as this is URGENT.
    Thanks in Advance and Max points will given to very helpful answer.

    Fixed on my own by changeing all the PCR underneeth

  • Business Events related to AME Rules in iRecruitment

    Hello all,
    We have a Seeded AME rule and want to know which business event is firing that rule. Is it possible to find this out? The reason i want to know is we have a seeded rule called "Apply For Job - Manager Rule" which is related to iRecruitment. I want to know when this rule is fired. I tried so many ways to find out but couldn't.
    Thanks
    KK

    That means you want to know the condition on when this rule will be fired.
    So, search for the rule see if the Update icon is enabled. If enabled click on it there you can see the conditions.
    If update icon is not enabled, then on top you can see Conditions tab. Click on that.
    Conditions are based on the AME Attributes. There is one more attribute tab to see the definition of the tab.
    Regards,
    Peddi.

  • How to use the language's coding on the personnel calculation rule.

    I want create rules for Time management, I know that it use  the transaction code PE02 for writing calculation rule all the standard rules for time or payroll but I don't know how to use language wrote for the rules.
    Anybody have the documents for using code on the rules.
    Thanks for your help.
    Regards,
    Huyen Nguyen.

    Hi Huyen,
    Please follow this link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_REGEL.pdf
    Warm Regards,
    Kapil Kaushal

  • BRFPlus - Possible for business users to change the rules ?

    Hi,
    1) Is it possible for business users to change the rules in decision table, tree, formula etc?
    2) If yes, what are the steps to achieve it?
    Thanks.
    - julius

    Hi Julius,
    do you know the BRFplus knowledge center:
    Business Rule Framework plus [original link is broken]
    There is a video called Bonus Determination that shows the steps for a developer and a business user.
    The developer may create the function, data objects and maybe the initial decision table. The business user then can create the lines in a decision table.
    In the 701 version this should work fine. The 701 trail version is a pre-release CD which contains some bugs that should be gone in the latest SP of 701.
    BR,
    Carsten

  • Disable Advanced Listpane button with Calculation Rule

    Hello everyone,
    I'm trying to disable a button on an Advanced Listpane using a Calculation Rule.
    This is my advanced listpane:
    The button I'm trying to disable is the "Copy"-button.
    It has to be enabled when the row is active, meaning "Inactive" = false and disabled when the row is inactive, meaning "Inactive" = true.
    As you can see, the button is now always disabled, even for active rows.
    I'm currently trying this Calculation Rule code, but obviously it doesn't work:
    Is what I'm trying even possible?
    And if so, what am I doing wrong here?
    Thanks & Regards,
    Glenn

    Hi, Glenn
    What do you mean by "Active" and "Inactive"?
    result = false;
    if ($data.DataList.LeadSelectedIndex > -1 )
    result = true;
    end
    If you write it in Enabled property of your button ,that code will disable your button when no row is selected.
    And your button will be enabled again when a row is selected.
    I am not sure if this is what you want.
    Regards,
    Fred.

  • Shiment Cost Calculation Rules

    Hi Gurus
    Can you please provide me details of configuring Shipment Cost Calculation Rules?
    Thank You

    Hi Brajesh,
    Is the following rules you are expecting?
    Determining the Calculation Basis  
    Use
    The origin of the data upon which a condition type is based during shipment costing determines the calculation basis. During shipment costing, the system determines the shipment cost items from the different calculation bases for the condition types of a pricing procedure. Shipment costing itself is carried out for each sub-item.
    Prerequisites
    You must maintain a suitable calculation base in the definition for the condition type in Customizing.
    If you select handling units as the calculation basis, you must also specify the packaging material type so that only the relevant handling units are used for shipment cost calculation.
    Features
    The calculation bases are determined during shipment costing for a shipment cost item on the basis of the settings made in the condition type.
    During pricing, the calculation base influences
    The condition types to be considered for each sub-item
    The information available for determination of the conditions
    All condition bases contain information from the shipment header or shipment stage, as well as from the shipment cost item. This information includes service agents, geographical information (point of departure and destination) and shipping type, for example.
    How the scale base types (gross weight, net weight and volume) are calculated
    The following types of calculation bases are possible:
    Deliveries
    If condition types with this calculation base exist in the pricing procedure, then the system creates a shipment cost sub-item for every relevant delivery.
    No information from the delivery items (such as materials) or the handling units is available.
    The scale base types (gross weight, net weight, volume) refer to the corresponding information from the delivery headers.
    Delivery items
    If condition types with this calculation base exist in the pricing procedure, then the system creates shipment cost sub-items for every relevant delivery item.
    Information from the delivery header and the relevant delivery item is available. There is no information from the handling units, however.
    The scale base types (gross weight, net weight, volume) refer to the corresponding information from the delivery items.
    Group of Handling Units
    If condition types with this calculation base exist in the pricing procedure, then the system creates shipment cost sub-items for the sum of all identical handling units with the relevant packaging material type (also specified in the condition type).
    There is no information from the deliveries or the delivery items available.
    The scale base types (gross weight, net weight, volume) refer to the corresponding cumulated information from the relevant handling units.
    Shipment cost item
    If condition types with this calculation base exist in the pricing procedure, then the system creates exactly one shipment cost sub-item.
    There is no information from the deliveries, the delivery items or the handling units.
    The scale base types (gross weight, net weight, volume) refer to the corresponding information from the relevant delivery headers.
    Per handling unit
    This calculation basis corresponds to the calculation basis handling units, with the only difference that each handling unit is calculated individually. This calculation base is necessary for shipping packages, for example.
    Handling unit including delivery item
    If condition types with this calculation basis exist in the pricing procedure, then the system creates a shipment cost sub-item for every packaged delivery item and handling unit (per combination of delivery item and handling unit). Shipment costs are therefore calculated with content depending on the handling unit.
    All of the information from the handling units and delivery items is available.
    The scale basis types (gross weight, net weight, volume) refer to the gross weight of a handling unit per delivery item.
    All
    You can use this calculation base if, for example, you want to define a discount that applies to both delivery-related and handling unit-related shipment prices. A condition type with this calculation base can be used for every shipment cost sub-item.
    Several calculation bases may be used within a shipment cost item. In performing a shipment comparison, for example, the calculation could be performed using two calculation bases. You could then compare the results. See also Shipment Comparisons.
    For system load and clarity reasons, we recommend selecting a calculation base that is only as detailed as absolutely necessary. For example, if only the total weight and the transportation leg are relevant, the calculation base for shipment cost items is sufficient. However, you can still distribute the costs in greater detail. The cost distribution is independent of the calculation base. For example, you can calculate shipment costs using the calculation basis for shipment cost items and distribute the costs at delivery item level. The system weights the costs and distributes them accordingly.
    When defining the condition tables in Customizing (Logistics Execution ® Transportation ® Shipment Costs ® Pricing ® Pricing Control ® Define price dependencies (condition tables), you should make sure that information is not available for every field - depending upon calculation base. If, for example, you select the field Incoterms for a condition table when condition types with the calculation basis Handling units exist in the pricing procedure, there can be no information on Incoterms for the corresponding sub-item. This means that no condition records will be found for this key. For further information on the role of the condition table in pricing, see  Condition Tables.
    Please let me know your thoughts.
    Thanks nand Regards,
    Satheesh Durgi
    Edited by: Satheesh on Jan 25, 2011 1:01 PM

Maybe you are looking for

  • Can no longer burn cds?

    I recently upgraded Itunes and now it says i can't burn cds from my Itunes store purchases. Why is this please? Does this mean that I can no longer keep copies of my Itunes music on CDs to use on another system? I would appreciate some enlightenment

  • Itunes doesn't work on windows 8.1

    after the upgrade to windows 8.1 (I have a HP Henvy H9 x64), itunes doesn't work. I unistalled all the apple software; I restarted the PC and then I installed again itunes (the last version 11.1.5 x64). When the installation finish and I start itunes

  • Restrict PR Unrelease Before PO Unrelease

    Hi, We want that PR should not be Unreleased before PO Unreleased... In my system, currently user is able to Unreleased the PR, before PO Unreleased... Even MIGO / MIRO has been Done...then user is doing PR Unreleased. How can we Stop this??? Please

  • Ipod-looks dead

    I have a 5-GB ipod 1st gen (scroll wheel), and it seems to have died. It gives me the "sad ipod" icon, but it won't go into disk mode, as apple tells me to. I have but it in "diagnostic mode", and run all of the tests, and the only one that it fails

  • Selecting a table, view, synonym

    Hi, If I have a table, view and synonym with the same name, which object gets selected in a select table............