SAP ABAP IMG Activity REFX_RECD_CALC_RULE (Calculation Formula for Conditions)
Hierarchy
EA-FIN (Software Component) EA-FIN
   RE-FX (Application Component) Flexible Real Estate Management
     RE_CA_CU (Package) RE: Customizing (IMG) and Area Menu
IMG Activity
ID REFX_RECD_CALC_RULE Calculation Formula for Conditions  
Transaction Code S_PEN_05000399   (empty) 
Created on 20050623    
Customizing Attributes REFX_RECD_CALC_RULE   Calculation Formula for Conditions 
Customizing Activity REFX_RECD_CALC_RULE   Calculation Formula for Conditions 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name RECD_CALC_RULE    

Use

Using this Business Add-In (BAdI) you can determine the time-dependent calculation factors that are multiplied with the unit price.

Implementation of this Business Add-In (BAdI) is mandatory for each external calculation formula that is defined in Customizing (under Calculation Formulas) on the basis of internal calculation formula 1000 ( = BAdI calculation).

You can process all user-specific calculation formulas within the same Business Add-In implementation. This means that you do not have to create a separate implementation of the BAdI for each calculation formula.

Requirements

Standard settings

Activities

  1. Create a BAdI implementation that contains the following methods:
    • GET_ATTRIBUTES
    • GET_PARAMETER
    • GET_UNITS
    • GET_VALUES
    • GET_FLEXIBLE

      Each method contains the ID_CALCRULEEXT parameter, which is used to control the implementation (dependent on the formula).

  2. Activate the BAdI implementation.

Method description

  • GET_ATTRIBUTES
    The method returns the following attributes:
    • @78@ ID_CALCRULEEXT: Defines the external calculation formula
    • @7A@ CF_DISTRIBUTE: Defines whether or not the calculation can be distributed
    • @7A@ CF_ADJUSTABLE: Defines whether or not the condition can be adjusted
    • @7A@ CF_UNITPRICE_HIDE: Defines whether or not the unit price can be hidden
    • @7A@ CF_DEPEND_CONDITION: Defines whether or not the calculation is dependent on conditions
    • @7A@ CF_DEPEND_OBJECT: Defines whether or not the calculation is dependent on object data
    • @7A@ CF_UNIQUE_VALUES: Defines whether or not the calculation returns one-time amounts
    • @7A@ CF_UNIQUE_VALUES_MULTI: Defines whether or not the calculation returns multiple one-time amounts
    • @7A@ CD_INFO_IDENT: Defines the help text ID
    • @7A@ CD_GUI_FM_PARA_PBO: Defines the PBO function module for maintenance of formula parameters
    • @7A@ CD_GUI_FM_PARA_PAI: Defines the PAI function module for maintenance of formula parameters

      Using the CD_GUI_FM_PARA_PBO and CD_GUI_FM_PARA_PAI parameters, you can link to a special interface for maintaining formula parameters. The function groups RECD_GUI_CALC_RULE_13 and RECD_GUI_CALC_RULE_15 serve as examples for this.

  • GET_PARAMETER
    The method returns the following parameters:
    • @78@ ID_CALCRULEEXT: Defines the external calculation formula
    • @78@ ID_PARA_NO: Defines the number of the parameter
    • @78@ IO_OBJECT: Defines the object that has the condition
    • @78@ IS_CONDITION: Defines the condition
    • @7A@ CT_PARA_VALUES: Defines the list of parameter values (F4)
    • @7A@ CD_PARA_INFO: Defines the description of the parameter
    • @7A@ CF_PARA_CHECK: Defines whether or not a standard check of the parameter is performed
  • GET_UNITS
    The method returns the following units:
    • @78@ ID_CALCRULEEXT: Defines the external calculation formula
    • @78@ IO_OBJECT: Defines the object that has the condition
    • @78@ IS_CONDITION: Defines the condition
    • @7A@ CD_UNIT_UNITPRICE: Defines the unit of the unit price
    • @7A@ CD_UNIT_CALCVALUE: Defines the unit of the calculation factor
  • GET_VALUES
    The method returns the following calculation factors:
    • @78@ ID_CALCRULEEXT: Defines the external calculation formula
    • @78@ ID_PARA_1: Defines parameter 1
    • @78@ ID_PARA_2: Defines parameter 2
    • @78@ ID_ABS_FROM: Defines the absolute start of the calculation
    • @78@ ID_ABS_TO: Defines the absolute end of the calculation
    • @78@ IO_OBJECT: Defines the object that has the condition
    • @78@ IS_CONDITION: Defines the condition
    • @78@ IT_OBJECT_CONTRACT: Defines the contract object
    • @78@ IT_OBJECT_CONDITION: Defines the condition objects
    • @7A@ CT_CALC_VALUES: Defines the time-dependent calculation factors
    • @7A@ CT_ DIST_VALUES: Defines the time-dependent distribution factors
    • @7A@ CT_CALC_USED_OBJECTS: Defines the objects that are considered by the calculation
    • @7A@ CT_DIST_USED_OBJECTS: Defines the objects that are considered by the distribution
  • GET_FLEXIBLE
    The method returns the following flexible values:
    • @78@ ID_CALCRULEEXT: Defines the external calculation formula
    • @78@ IO_OBJECT: Defines the object that has the condition
    • @78@ IS_CONDITION: Defines the condition
    • @7A@ CF_FLEXIBLE: Defines whether or not the formula supports flexible intervals
    • @7A@ CD_FLEXIBLE_FROM: Defines the start date of the flexible interval
    • @7A@ CD_FLEXIBLE_TO: Defines the end date of the flexible interval

      Using this method, you can define a condition so that it is valid beyond the term of the object.

Dependent on the actual condition object, the table of condition objects is structured as follows:

  • The condition object is a concrete object.
    The table of condition objects contains the concrete object.
  • The condition object is an object group.
    The table of condition objects contains the object group and the objects in the object group.
  • The condition object is the contract.
    The table of condition objects is identical to the table of contract objects.

Note the following:

  • Do not directly access the database (SELECT statements) on tables where the data could be being processed. Use only the API_RE_xx_GET_DETAIL function module for data retrieval. (Here xx stands for the English abbreviation for the object type, for instance CN for the real estate contract.)
  • Do not use statements that execute actions on the interface, for example, MESSAGE without RAISING, CALL SCREEN and so on. Also, do not use COMMIT WORK or ROLLBACK WORK.

Example

SAP provides the external calculation formulas that are based on these internal calculation formulas: 12 (amount per object), 13 (amount per rental object status), 14 (amount per tenant changeover) and 15 (% share of condition group). You implement these external calculation formulas in the following classes:

  • CL_RECD_CALC_RULE_12
  • CL_RECD_CALC_RULE_13
  • CL_RECD_CALC_RULE_14
  • CL_RECD_CALC_RULE_15

These classes have the same structure as a corresponding BAdI implementation for the BAdI definition RECD_CALC_RULE. They can serve as a guide for the implementation of your own formulas.

Notes for Developers

Business Attributes
ASAP Roadmap ID 153   Design enhancements 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG RECD_CALC_RULE 0 EE60000001 Conditions and Cashflow 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20050623 
SAP Release Created in 600