Rule Definition
Use
In rule definition, the system determines the rules that should be processed in the current event. The BRF stores the rules that are determined as follows:
-
Rules (without rule sets) in table TBRF210
-
Rules from rule sets in table TBRF310
Rule definition is as follows:
Rule definition takes place in the following classes that implement interface IF_DETERMINE_ASSIGNMENT_BRF:
-
Class CL_DET_ASSIGNMNT_RL_BRF for rules (without rule sets)
-
Class CL_DET_ASSIGNMNT_RS_BRF for rules from rule sets
Take a look at these two classes in your system.
These two classes form the basis for you being able to parameterize rules further. In SAP Claims Management, for example, one such parameter is the insurance line of business. This allows you to specify that a rule should only be processed in the line of P&C insurance, but not in the line of health insurance.
The insurance line of business is a parameter that the BRF does not know. You therefore have to save rules that are only valid for a certain line of insurance in tables of the application (in this case, in the SAP Claims Management application).
SAP Claims Management therefore contains the class DETERMINE_ASSIGNMENT.
Sample source text:
Only the main parts of the source text are mentioned below.
METHOD if_det_assignment_brf_icl~determine_assignment .
* step 1: initialize return table
REFRESH et_brf210.
* step 2: get Line of business
CALL FUNCTION 'ICL_CLAIM_GET'
IMPORTING
e_ticl321 = ls_icl321
e_claim = ls_claim.
* step 3: get the rules
SELECT * FROM ticl943 INTO TABLE lt_icl943
WHERE event = lo_event->mv_event AND
version = '000' AND
plineofbus = ls_icl321-plineofbus.
* step 4: prepare return table
ls_brf210-applclass = 'ICL'.
ls_brf210-event = ls_icl943-event.
ls_brf210-expression = ls_icl943-expression.
ls_brf210-action = ls_icl943-action.
ls_brf210-repeat_action = ls_icl943-repeat_action.
ls_brf210-on_single_inst = ls_icl943-on_single_inst.
ls_brf210-on_multi_inst = ls_icl943-on_multi_inst.
ls_brf210-ignore_event_log = ls_icl943-ignore_event_log.
ls_brf210-expr_gate_is = 'A'.
ls_brf210-expr_gate = ls_icl943-expr_gate.
ls_brf210-expr_gate_vs = 0.
APPEND ls_brf210 TO et_brf210.
ENDMETHOD.
Description:
-
In step 2 you determine the insurance line of business.
-
In step 3, you determine the rules for the current event, depending on the insurance line of business from step 2. These rules are read from a table of the application (from table TICL943 in this case).
-
In step 4, the output table is formatted. This output table contains the rules in a format that can be processed by the BRF.