SAP ABAP IMG Activity RECD_DIST_RULE (Distribution Formula for Conditions)
Hierarchy
EA-FIN (Software Component) EA-FIN
   RE-FX-CN (Application Component) Real Estate Contract
     RE_CD_CD (Package) RE: Conditions
IMG Activity
ID RECD_DIST_RULE Distribution Formula for Conditions  
Transaction Code S_EE6_85000184   (empty) 
Created on 20110802    
Customizing Attributes RECD_DIST_RULE   Distribution Formula for Conditions 
Customizing Activity RECD_DIST_RULE   Distribution Formula for Conditions 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name RECD_DIST_RULE    

Use

Using this Business Add-In (BAdI) you can determine a time-dependent distribution for a calculation.

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

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

Requirements

Standard settings

Activities

  1. Implement the BAdI and define the following methods:

  • GET_ATTRIBUTES
  • GET_PARAMETER
  • GET_UNIT
  • GET_VALUES
  • GET_FLEXIBLE

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

  1. Activate the BAdI implementation.

Method description

  • GET_ATTRIBUTES
    The method returns the following attributes:
    • @78@ ID_DISTRULEEXT: Defines the external distribution formula
    • @7A@ CF_DEPEND_OBJECT: Defines whether or not the distribution is dependent on object data
    • @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 group RECD_GUI_DIST_RULE_6 serves as an example for this.

  • GET_PARAMETER
    The method returns the following parameter values:
    • @78@ ID_DISTRULEEXT: Defines the external distribution 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 (input help)
    • @7A@ CD_PARA_INFO: Defines the description of the parameter
    • @7A@ CF_PARA_CHECK: Defines whether or not the standard check of the parameter is performed
  • GET_UNIT
    The method returns the following units:
    • @78@ ID_DISTRULEEXT: Defines the external distribution formula
    • @78@ IO_OBJECT: Defines the object that has the condition
    • @78@ IS_CONDITION: Defines the condition
    • @7A@ CD_UNIT_DISTVALUE: Defines the unit of the distribution factor
  • GET_VALUES
    The method returns the following calculation factors:
    • @78@ ID_DISTRULEEXT: Defines the external distribution 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 objects
    • @78@ IT_OBJECT_CONDITION: Defines the condition objects
    • @78@ IT_OBJECT_DISTRIBUTION: Defines the distribution objects
    • @7A@ CT_ DIST_VALUES: Defines the time-dependent distribution factors
    • @7A@ CT_DIST_USED_OBJECTS: Defines the objects that are considered by the distribution

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

    • If the condition object is a concrete object, then the table contains the concrete object.
    • If the condition object is an object group, then the table of condition objects contains the object group and the objects in the object group.
    • If the condition object is the contract, then the table is identical to the table of contract objects.
  • GET_FLEXIBLE
    This method returns the following flexible values:
    • @78@ ID_DISTRULEEXT: Defines the external distribution 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 allowed to be valid beyond the term of the object.

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

The distribution formula based on internal formula 6 (Aggregation), which is provided by SAP, is implemented in the class CL_RECD_DIST_RULE_6.

This class has the same structure as a corresponding BAdI implementation for the BAdI definition RECD_DIST_RULE. Therefore, you can use the class as a guide for the implementation of your own formulas.

Notes for Developers

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
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_DIST_RULE 0 EE60000001 Conditions and Cashflow 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20110802 
SAP Release Created in 606