cancel
Showing results for 
Search instead for 
Did you mean: 

BRFPlus Multi Expression in a Ruleset

arijitkumardas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi there

System ECC 6; ABAP and Basis release 731 SP 0009.

How do I achieve the following?

I am tying in 3 Expressions in 1 Ruleset.

Expression 1 has 3 input fields and 1 output field.

Expression 2 has has 1 input and returns a multi line output.

Expression 1 and 2 work fine. Expression 1 and 2 are mutually exclusive - no corelation between the two.

Expression 3 is dependant on the output from Expression 1 and 2. These need to go into the inputs of Expression 3; and will then produce another multi line output. I am not able to create my Expression 3. How do I cater for this in my Expression 3; and how do i define it in my Rule in my Ruleset?

Once I define my output from Expression 2 as a multi line item I lose the ability to insert it into Expression 3. If I change the return option for my Expression 2 (remove return all results) so that I can use it in my Expression 3 then go back and tick the checkbox in Expression 2 to retrieve all the results; I am not able to assign values to the column in Expression 3. I have attached screen shots to illustrate the matter.

I have achieved it using DB Lookup in lieu of Expression 3. But I don't want multiple places to maintain my data - backend config table; and BRF+ expressions. I would rather do it all in 1 place in BRF+.


What is the best approach here? Any help on this or alternate approach to achieving this would be greatly appreciated!

Thanks and regards

Arijit

Accepted Solutions (1)

Accepted Solutions (1)

kakshat
Advisor
Advisor
0 Kudos

Hi Arijit,

Can you provide more details as to how do you want to use the results from Rule #1 and Rule #2 in Rule #3?

As you may know, it is possible to use other expression types (like table operations, loops, functions etc.) in a decision table. So, depending on what is it that you want to do, a solution could be thought of.

Akshat

arijitkumardas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Akshat

Thank you for your response.

The output of Rule 1 and Rule 2 are inputs to Rule 3.

Expression 1

Input Field A     Input Field B     Input Field C     Output Field D

01                    01                    01                    01

01                    01                    02                    01

Expression 2

Input Field A     Output Field B (Multi Level)

0001                Z1

0001                Z2

0001                Z3             

0002                Z1    

Expression 3

Input Field A     Input Field B     Output Field C (Multi Level)

(from Exp 2      (from Exp 1

Output)             Output) 

Z1                    01                    10000

Z2                    01                    20000

Z3                    01                    30000   

Ok this is what I just did -

Get the value from Output Field D from Expression 1

LOOP at Output Field B from Expression 2

In the LOOP Rule - Insert into Output Field C (Expression 3)  after processing Expression 3

And looks like it works!

And I have taken it a step further to not exclusively run Expression 1 in a Rule in the Ruleset.

Instead I have included it in my Expression 3.

So Expression 3 has -

Condition Columns

Expression 1

Output Field B (Multi Level) from Expression 2


Result Column

Output Field C (Multi Level)

Works like a charm...!

Thanks for your help. It helped my thought process.

kakshat
Advisor
Advisor
0 Kudos

Cool!

Answers (0)