cancel
Showing results for 
Search instead for 
Did you mean: 

BRF+ Decision table output question

0 Kudos
878

Hi,

I was wondering if it is possible to also output the condition columns in a decision table, or at least know which row it is so I can latter fetch it.

My problem is, I also need the condition column information further ahead in the flow and I am not seeing any options on how to get it.

Can anyone help me?

Thank you,

FC

View Entire Topic
Former Member
0 Kudos

Hi Filipe

I'm interested to know why you need to see the condition columns of the matched row of your decision table. As Nana suggested, maybe if you share your requirement (in its business context) then someone might be able to help reshape your decision table (or other expressions) to meet the requirement.

Regarding your specific question about returning the condition columns of a matched row... Even if there was an easy way to return these values, I'm wondering how you might use the values if someone enters a string pattern, a not-equal-to operator, multiple values in a single cell, or any of the other types of complex conditions? It seems like any code or BRF+ logic that processed these conditions would have to be very complex too.

Kind Regards

Glen

0 Kudos

Hi Nana, Hi Glen,

Thank you for your feedback!

Yes, it is a tricky requirement, let me try to explain it better.

Lets say my BRF+ Function its called with the following arguments:

  • VAR1: 1234
  • VAR2: X
  • VAR3: Y

My decision table has the following information:

VAR1 |   VAR2  |  VAR3 |  OUTPUT1 | OUTPUT2

                X           [Y...Z]          10              100

After my decision table match, I need to call an ABAP Function Module or Method. And the tricky part is, if the the matched line has a column with value (in this case VAR2 and VAR3 have), I have to call the FM/Method with that input value (in this case X and Y). If the rule does not have a value for the column (like VAR1) I cannot use that input value to call the FM/Method.

In the end I would need to call the FM/Method with: X, Y (not with 1234).

It would be really easy if the decision table could return the whole line, and not only the output columns, but I guess that is not currently possible.

Best Regards,

FC

kakshat
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Filipe,

Yes, directly getting the whole line as output from a decision table in BRF+ won't be possible. However, the closest you can get to that is probably by making use of intermediate variables (elements in BRF+ parlance) to which you can assign the values of your condition columns before calling the decision table. You can then define these intermediate variables as result columns in the decision table. Make sense?

Regards,

Akshat

Former Member
0 Kudos

Hi Filipe

When you say that a FM/method will be called after your decision table match, do you mean that it will be called in a subsequent rule in your ruleset?

Rather than calling a FM/method after the decision table, it is technically possible to embed a Procedure Call in a result cell for each row. This way, the result of each row can be populated with the procedure call expression (with appropriate parameter mapping) that matches the type of conditions that are populated in the condition columns. For example, If VAR1 and VAR2 are populated in a row then you embed procedure call expression "Proc - 1 and 2", but if VAR2 and VAR3 are populated then you embed procedure call expression "Proc - 2 and 3". (I just made up the names of the procedure call expressions. )

Is embedding the procedure call expressions in a decision table result column a feasible option for your rule?

Regards

Glen

0 Kudos

Hi Glen,

Yes, that would probably solve my problem!

But I don't think the client would accept having to fill that column everytime a new row is added.

From what I have seen there isn't an option to have a specific action defined as the default value correct?

Thank you and Best Regards