cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Optional Input Parameter in BRF+ Decision table

2,839

Hi Experts,

I have the requirement in BRF+ decision table.

let say I have a decision table with 2 condition columns and 2 result columns

NUM_ID | OPT1 | RES_1 | RES_2 |
-------------------------------
  =2   |  ... |   X   |  YZ   |
  =1   |  =S  |   G   |   O   |
  =2   |  =P  |   Y   |  ES   |
  =1   |  ... |   O   |   K   |  

In some cases, I will input both condition columns (num_id and opt1), but in other cases, I don't need to input OPT1.
can I only pass num_id (e.g. num_id = 1) and i get 2 records where num_id = 1 without considering OPT1?

I Imagine if its SE16 i will put
NUM_ID = 1
OPT1 = *

Here is my table setting

please advise.

Accepted Solutions (0)

Answers (1)

Answers (1)

MateuszAdamus
Active Contributor

Hello fabednego

Yes, you can do it, but you need to remember to have the records with most strict condition at the top, and the record with less strict condition at the bottom.

The BRF+ searches for the record which fits the criteria and returns the first found.

Kind regards,
Mateusz
0 Likes

HI Mateusz,

my objective here is to get 2 records if I pass 1 or 2 in NUM_ID for my input.

Input:
NUM_ID: 2
OPT1: *
Expected Output:
NUM_ID | OPT1 | RES_1 | RES_2 |
-------------------------------
  =2   |  ... |   X   |  YZ   |
  =2   |  =P  |   Y   |  ES   |

when I try to simulate my decision table using that particular input, I didn't get what I want

Input Parameter
---------------
NUM_ID: 2 OPT1: *

Actual Output
-------------

Result Evaluation:
its only show 1 row of table which is the first row. Its because in the decision table, the 1st row column OPT1 is '...' like accept whatever / a wildcard column.
i put the * in OPT1 is to skip the column checking and just take whatever it is.
so im expecting <blank> and =S will include in the result.

I also try to leave the OPT1 as blank, but it doesn't work as well. Could you please tell me where i was wrong?

Input Parameter
---------------
NUM_ID: 2 OPT1: *

Actual Output
-------------

MateuszAdamus
Active Contributor

In the settings of your decision table you need to have the option "Return all matches found" marked.


Kind regards,
Mateusz

Yes I do check that option

When I evaluating the step in the decision table simulation, I found that the * input is not considered as a wildcard to check the value on OPT1 column. otherwise, it considers as a non-match parameter for the value on OPT1 column.

ould you please advise further?

MateuszAdamus
Active Contributor
0 Likes

No, the star is understood as a concrete value, not a special character.

You need to delete the condition for that particular column, which will give you something like shown below.

Just like you did for row "2 ...", you now need to have a row with "... VALUE".

Kind regards,
Mateusz
0 Likes

Hi Mateusz,

kindly advise how I put this setting below

do I need to remove the value "P" and set it into "..." in another row to get those 2 records with NUM_ID = 2?
refer to the blue box below

because my requirement is to keep the table like that, but for some cases, I don't need to get the data based on all condition columns (NUM_ID and OPT1). only based on NUM_ID col.

is there any way that I can do to achieve that? besides changing the value of OPT1 in row 3?
I've tried to remove the value in the input parameter, but it still not working as expected

in terms of simulation & processing steps is similar to the " * " input. it considers as non-match criteria. " " compare to "P"

are we have an option to put "wildcard" on OPT1 in the simulation input?

Thanks

MateuszAdamus
Active Contributor

With your current setup, if you want to return both records from the condition table, then pass 2 and P as input parameters.

2 meets criteria in both records in column NUM_ID.

P meets criteria in both records in column OPT1.


Kind regards,
Mateusz
0 Likes

I see. Thanks for your explanation.
now I understand the behavior of BRF+ Decision table.

So, if I have another row with NUM_ID = 2 and OPT1 = Q like below, it will not possible to get all 3 rows with NUM_ID = 2. am I correct?

NUM_ID | OPT1 | RES_1 | RES_2 |
-------------------------------
  =2   |  ... |   X   |  YZ   |
  =1   |  =S  |   G   |   O   |
  =2   |  =P  |   Y   |  ES   |
  =1   |  ... |   O   |   K   |
  =2   |  =Q  |   P   |  S4   |
MateuszAdamus
Active Contributor

Yes, correct.


Kind regards,
Mateusz