Showing results for 
Search instead for 
Did you mean: 

Performing Multiple actions in Decision table (BRF+)

Former Member
0 Kudos

I've a scenario in which based on the evaluation of conditions in a decision table, I need to execute a set of function modules in a specified sequence. Though this could be partially modeled with a Call Procedure Action with Follow up actions activated, it doesn't solve the problems stated below.

Let's consider the decision table below.

Condition 1

Condition 2




Call Function F1

Call Function F2



Call Function F1

Call Function F3

I want to allow the end users to model / add any new rules in the decision table and re-use the modular functions F1, F2 , F3. Say for example, the user should be able to create a new rule in decision table with Condition 1 = C, Condition 2 = D and Action = Call F1, F2 and F3.  I would like to pre-deliver each of the call procedure actions independently and allow the end users to specify the right set of functions to call with the sequence. How to achieve this?

Creating a call procedure action and defining the follow up actions doesn't solve this as links / dependency between the procedures gets hardbound and doesn't provide the modularity to invoke each of the call procedure actions independently. How to solve this? Is there any other elegant way to handle this scenario?

Also would like to model the actions in such a way that only if the preceding function call was successful then the subsequent function calls should get executed. I couldn't model the above mentioned decision table in BRF+!

Any pointers on this would be highly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Bala,

Your solution lies in your question..

Define rules in DT as below

Make sure you have selected Table settings "Return all matches found".

Regarding point 2 "if the preceding function call was successful then the subsequent function calls should get executed. " The best practice is you should Assert in function itself if something went wrong.

I have an idea but you will not like it.

1. Add another condition column "Cond 3" of type char1 at third position and which will have value 'X' for all rows.

2. Define one exporting parameter say ev_cond3 in Procedure Call and map with "Cond 3" in BRFplus.

In Coding you need to set always set ev_cond3 = "X" if your function code logic executed successfully else "Cond 3" will become " " which will not allow to execute any next rows.

Hope it help you.



Active Contributor
0 Kudos

Hi Rahul,

Your suggestion is a nice idea but I nevertheless have to warn to follow this approach. In the generated code for the decision table there are various optimizations. One is to evaluate cells only when required. So it may happen that the cell is evaluated to false and following rows which compare against true are excluded from processing. So your approach will no be successful as the value is not checked again.

Regards, Carsten

Former Member
0 Kudos

Hi Carsten,

I also dont like my second idea.. ..

On second thought I realized  this scenario could also be easily solved by just settings class attribute and checks the status in every procedure.



Active Contributor
0 Kudos

I agree to this approach. Looks simple and hides the complexity from the rules author.

So the solution is a couple of call procedure actions put into a decision table of all match mode with an action column. Each call procedure is implemented with a method of a class. In case of a problem there is a class attribute saved inside of the particular methods. In case it is already set the actions are not executed.

Prio to the rules call the error attribute is initialized outsode of the rules.

Good idea, Rahul!

Answers (0)