on 07-31-2017 2:24 PM
Hello,
I am modelling a BRF+ "Search Tree" for calculating the BuPa credit worthiness.
The algorithm looks something like this:
Basically the structure contains the credit-worthiness score and additional details of the check.
I am not sure how to populate the structure 😞
Is there any built-in BRF+ expression which can do the structure mapping? (similar to the mapping done in procedure call)?
Any pointers will be appreciated.
BR,
Suhas
Search trees allow for dynamic conditions but have rigid results. Decision tables do the opposite - the search criteria are fixed but results can be highly flexible. As I understand, you want a combination of both.
I would implement this as two expressions in a ruleset with local context data. The search tree provides the result and passes it on to a decision table which populates the returning expression in the format you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The search tree provides the result and passes it on to a decision table which populates the returning expression in the format you need.
I already have two solutions in my mind:
IMO in my case calling a ABAP procedure is acceptable, because there's no business rule involved there!
I want to know if there was a easier way to do this. All i want is to fill up a structure & not an element.
BR,
Suhas
Multiple expressions in a ruleset is very straightforward. As a general strategy, breaking a rule down into sequential parts is exactly what rulesets are designed for, and I don't see how adding a procedure call expression would make it easier.
Personally I see ABAP method vs. other BRF+ expressions a bit differently. If it's business data then avoid ABAP calls, as they turn things into a black box and make debugging more difficult. A decision table makes it clear to everyone what is going on.
Multiple expressions in a ruleset is very straightforward. --> True, the search tree in our case has expressions all over the place - boolean, loop, table expressions, function calls etc. It's a really complicated expression!
If it's business data then avoid ABAP calls, as they turn things into a black box and make debugging more difficult. --> We need to read business data based on the "check" we are performing. We use ABAP calls to load the data into the BRF+. I think it makes sense to load the data when (or if) needed & not load everything at once. Again no business logic there, just fetch data for the partner & supply it.
I agree with the "black box" comment & therefore i don't wanna use my solution!
Anyway, isn't there an expression to map a structure?
I agree, and another way to differentiate is that ABAP calls are useful to push technical logic into the ABAP layer, which sounds exactly like what you're doing.
"isn't there an expression to map a structure?" -> No, that's what I suggested to use a decision table for. It will work well if it's a finite number of entries (and not too many). It could be a candidate for a custom expression type, or perhaps implemented as a BRF+ function. But then I don't see too many use cases.
Is there a reason you can't return a structure from your expressions to start with? Perhaps using a decision tree instead of a search tree? Or how about slicing your rule in other ways? e.g. If it's returning a category and a set of values, then perform the category determination in a tree and do the value calculation(s) in a decision table.
I don't know your scenario, so these are just a few ideas...
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.